GithubHelp home page GithubHelp logo

chion82 / wechatmomentstat-android Goto Github PK

View Code? Open in Web Editor NEW
982.0 94.0 263.0 30.98 MB

Get your WeChat Moment statistics and export Moments to JSON. 微信朋友圈数据统计、导出工具

License: GNU General Public License v3.0

Java 100.00%

wechatmomentstat-android's Issues

导出失败,发现db文件中内容很少

安装的微信6.3.31
从GitHub上下载的软件是1.1

使用软件失败,无法导出数据。在data/data/com.tencent.mm/MircoMsg/some hash/这目录下发现了三个sqlite的db文件,发现.db-wal文件418k,.db文件才188k。
将.db文件拷到电脑上,用sqlite管理工具打开发现,content字段只存了很少的内容,不知道是什么原因导致导出失败。
![Uploading G~(E[L_NELYCC{}$9E$M9A.png…

在网上查询发现.db-wal文件是类似缓存的,还未合并到db文件之中。

图片都无法获取了?

导出的内容全部都只有文字...看json文件里面的图片链接打开都是空白的。咋回事呢?

从加密数据库获取数据?

SnsMicroMsg.db是一个加密的数据库,但是我看到你在类SnsReader的方法queryDatabase()中,直接就调用了SQLiteDatabase.openDatabase(dbPath, null, 0); 并没抛出类似SQLiteCantOpenDatabaseException:这样的异常!!! 难道是我对数据库的理解错误?

夜神模拟器权限错误

夜神模拟器 v6.0.7.3
已开启root, 允许所有权限
安卓 v4.4.2
微信 v6.3.13.64_r4488992
WeChatMomentStat v1.0
"查询微信缓存失败, 请允许root权限后重试"

6.3.27以后朋友圈的图片被加密为image/wxpc

朋友圈的图片已不能直接通过url下载了,貌似后面加了一些东西。简单的抓了下吧,直接通过抓包的url还是不能下载。不知道啥原因。你知道微信加载的图片缓存在那里吗? 我用app遍历文件内容没有找到。加密了还是?

如何定位到调用解码的方法?

我自己本来的手机没root,另一台已root的手机上,但是这里是拿到本地的数据,我能找到人朋友圈获取数据~插入到数据库的方法吗?

Window is full: requested allocation 818 bytes, free space 452 bytes, window size 2097152 bytes

05-05 09:56:35.774 17332-17550/moe.chionlab.wechatmomentstat I/art: Alloc concurrent mark sweep GC freed 11(352B) AllocSpace objects, 0(0B) LOS objects, 1% free, 200MB/204MB, paused 1.303ms total 222.545ms 05-05 09:56:35.788 17332-17550/moe.chionlab.wechatmomentstat E/art: Throwing OutOfMemoryError "Failed to allocate a 82424620 byte allocation with 4194208 free bytes and 55MB until OOM" 05-05 09:56:35.798 17332-17550/moe.chionlab.wechatmomentstat I/art: Alloc sticky concurrent mark sweep GC freed 5(416B) AllocSpace objects, 0(0B) LOS objects, 0% free, 200MB/202MB, paused 1.627ms total 8.890ms 05-05 09:56:36.024 17332-17550/moe.chionlab.wechatmomentstat I/art: Alloc partial concurrent mark sweep GC freed 10(320B) AllocSpace objects, 0(0B) LOS objects, 1% free, 200MB/204MB, paused 1.442ms total 202.907ms 05-05 09:56:36.253 17332-17550/moe.chionlab.wechatmomentstat I/art: Alloc concurrent mark sweep GC freed 3(96B) AllocSpace objects, 0(0B) LOS objects, 1% free, 200MB/204MB, paused 1.525ms total 218.239ms 05-05 09:56:36.264 17332-17550/moe.chionlab.wechatmomentstat I/art: Forcing collection of SoftReferences for 78MB allocation 05-05 09:56:36.513 17332-17347/moe.chionlab.wechatmomentstat W/art: Suspending all threads took: 205.319ms 05-05 09:56:36.525 17332-17550/moe.chionlab.wechatmomentstat I/art: Alloc concurrent mark sweep GC freed 3(96B) AllocSpace objects, 0(0B) LOS objects, 1% free, 200MB/204MB, paused 1.700ms total 249.585ms 05-05 09:56:37.124 17332-17550/moe.chionlab.wechatmomentstat E/art: Throwing OutOfMemoryError "Failed to allocate a 82424620 byte allocation with 4194304 free bytes and 55MB until OOM" 05-05 09:56:37.144 17332-17332/moe.chionlab.wechatmomentstat E/wechatmomentstat: exception java.lang.OutOfMemoryError: Failed to allocate a 82424620 byte allocation with 4194304 free bytes and 55MB until OOM at java.lang.String.<init>(String.java:400) at java.lang.AbstractStringBuilder.toString(AbstractStringBuilder.java:633) at java.lang.StringBuilder.toString(StringBuilder.java:663) at org.json.JSONStringer.toString(JSONStringer.java:430) at org.json.JSONArray.toString(JSONArray.java:586) at moe.chionlab.wechatmomentstat.Task.saveToJSONFile(Task.java:231) at moe.chionlab.wechatmomentstat.SnsReader.run(SnsReader.java:34) at moe.chionlab.wechatmomentstat.gui.MainActivity$RunningTask.doInBackground(MainActivity.java:62) at moe.chionlab.wechatmomentstat.gui.MainActivity$RunningTask.doInBackground(MainActivity.java:53) at android.os.AsyncTask$2.call(AsyncTask.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818)

现在我点击运行后出现了这个问题。应该是window is ful。是不是应该把SQLiteDatabase创建在存储卡里。我应该怎么做呢

There are some advices for your program

Your program is interesting.But on my device, when I click share button, the program FC.
In the console, I got these:

moe.chionlab.wechatmomentstat E/AndroidRuntime: 
FATAL EXCEPTION: main
    Process: moe.chionlab.wechatmomentstat, PID: 12892
    java.lang.OutOfMemoryError
    at android.graphics.Bitmap.nativeCreate(Native Method)
    ...
    at moe.chionlab.wechatmomentstat.gui.MomentStatActivity.
generateShareImage(MomentStatActivity.java:207)

and you should release memory after you use Bitmap.
Here are my advices:

  1. in AndroidManifest.xml android:largeHeap="true"
  2. in generateShareImage.java (227) add these code:
finally {
            if(cs!=null){
                cs.setBitmap(null);
                cs=null;
            }
            if(dest!=null){
                dest.recycle();
                dest = null;
            }
            if(src!=null){
                src.recycle();
                src = null;
            }
        }

The memory allocated for bitmap will be free after about 20s.

项目导入Eclipse,总是提示有错误

菜鸟一枚,把作者的项目导入Eclipse,总是提示style.xml文件有错误:
error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.,查了下好像说是Android版本问题,但是不确定是不是,希望大神帮忙 @Chion82

导出的数据范围

目前导出的是数据库里有的数据,如果我想导出更多的数据,就要去滑动朋友圈列表,让他加载更多数据到本地数据库再导出,请有什么办法让他把朋友圈数据自动加载到本地数据库呢?

6.5.6版本无法读取朋友圈缓存

全新安装的微信,如果只刷过朋友圈,无法获得记录
如果打开过朋友的朋友圈主页,可以读取到打开过的记录

6.3.13无此问题

找不到微信的混存数据库文件

最新的微信版本 6.3.23,找不到 MicroMsg.db

尝试安装5.x版,但是却无法登录旧版,每次登录后,立即又跳转回登录页面,不知道是不是腾讯的官方限制。

@Chion82 请帮忙看看,谢谢!

如何知道我们需要的几个类的类名呢? 我看你是直接写死的。难道用猜?

比如这个类名com.tencent.mm.protocal.b.atp 就是代表 朋友圈详细内容
比如这个
朋友圈评论和点赞数据
类名: com.tencent.mm.protocal.b.aqi
[方法]添加属性(可作为hook的方法): protected final int a(int paramInt, object... objectArray)
[方法]从BLOB数据导入:public a am(byte[])
[属性]用户ID:String iYA
[属性]用户昵称:String jyd
[属性]时间戳:long fpL
[属性]评论列表:LinkedList<com.tencent.mm.protocal.b.apz> jJX
[属性]点赞列表:LinkedList<com.tencent.mm.protocal.b.apz> jJU

这些我如何知道,尤其是变量。我怎么知道这个混淆后的 fql就是代表时间戳啊?

模拟器

大家都是用真实安卓机调试的吗?
我找了几款安卓模拟器 都无法获取到root权限。
有的话请各位告知下,谢谢

获取微信ID有的出现像是加密过的ID

hello,你好
在运行这个Demo的时候,发现抓取的微信数据,微信ID有的可以正常抓取显示正常,有的抓取回来的在数据库中显示wxid_XXXXXXXXX打头的一串字符串存储在数据库的userName一栏,这个是怎么回事?
怎么样才能正确获取到正常的微信ID号呢?
谢谢!

倒数据失败

获取啦root权,提示查询微信缓存失败,请获取
root权。。。。

导出的json会丢照片

您好,请问一下,我导出的朋友圈信息里,有些照片会丢,通常每一条会丢一张,请问是什么原因,谢谢

能帮忙看下这个报错吗...

问下这个错误怎么解决....

  • asset下面的apk文件的干嘛的
  • 我需要把它替换成手机上安装的微信版本吗
  • 现在支持的最新版本是什么呢

Thanks in advanced 🌹


logcat:
android.database.sqlite.SQLiteException: no such table: snsExtInfo3 (code 1): , while compiling: SELECT userName FROM snsExtInfo3 WHERE ROWID=? LIMIT 1
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:896)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:507)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
at android.database.sqlite.SQLiteProgram.(SQLiteProgram.java:58)
at android.database.sqlite.SQLiteQuery.(SQLiteQuery.java:37)
at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:44)
at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1346)
at android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1193)
at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1064)
at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1270)
at moe.chionlab.wechatmomentstat.SnsReader.getCurrentUserIdFromDatabase(SnsReader.java:59)
at moe.chionlab.wechatmomentstat.SnsReader.queryDatabase(SnsReader.java:49)
at moe.chionlab.wechatmomentstat.SnsReader.run(SnsReader.java:33)
at moe.chionlab.wechatmomentstat.gui.MainActivity$RunningTask.doInBackground(MainActivity.java:62)
at moe.chionlab.wechatmomentstat.gui.MainActivity$RunningTask.doInBackground(MainActivity.java:53)
at android.os.AsyncTask$2.call(AsyncTask.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)

是不是最新的微信已经不支持?

java.lang.ClassNotFoundException: Didn't find class "com.tencent.mm.plugin.sns.f.i" on path: DexPathList[[zip file "/wechat.apk"],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at moe.chionlab.wechatmomentstat.Task.initSnsReader(Task.java:151)
at moe.chionlab.wechatmomentstat.gui.MainActivity$RunningTask.doInBackground(MainActivity.java:61)
at moe.chionlab.wechatmomentstat.gui.MainActivity$RunningTask.doInBackground(MainActivity.java:54)
at android.os.AsyncTask$2.call(AsyncTask.java:307)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:246)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:833)

微信7.0后朋友圈图片获取方法,供参考

首先还是解 snsinfo 里的 content,得到类似于以下的内容(仅截取了 mediaList 的部分)

<mediaList>
    <media>
        <id>
            <![CDATA[12974693252470280264]]>
        </id>
        <type>
            <![CDATA[2]]>
        </type>
        <title></title>
        <description>
            <![CDATA[666]]>
        </description>
        <private>
            <![CDATA[0]]>
        </private>
        <url type =  "1" >
            <![CDATA[http://shmmsns.qpic.cn/mmsns/7CdXdIPctJlHqSJDzRuX4UKeD5iaWHbNF1m2uZVdibib6nX0U0XpCWo9v3oz1x8dhYjQbAGmMrUVPc/0]]>
        </url>
        <thumb type =  "1" >
            <![CDATA[http://shmmsns.qpic.cn/mmsns/7CdXdIPctJlHqSJDzRuX4UKeD5iaWHbNF1m2uZVdibib6nX0U0XpCWo9v3oz1x8dhYjQbAGmMrUVPc/150]]>
        </thumb>
        <size width =  "1080.0"  height =  "2339.0" ></size>
    </media>
</mediaList>

只看 media.id,即 12974693252470280264 这一串数字,在 SD 卡的微信目录下搜索之

$ find . -name "*12974693252470280264"
./sns/b/0/snsu_12974693252470280264
./sns/b/0/snstblur_src_12974693252470280264
./sns/b/0/snst_12974693252470280264
./sns/b/0/snsb_12974693252470280264

看一下每个文件的类型:

$ find . -name "*12974693252470280264" | xargs file
./sns/b/0/snsu_12974693252470280264:         JPEG image data
./sns/b/0/snstblur_src_12974693252470280264: data
./sns/b/0/snst_12974693252470280264:         JPEG image data
./sns/b/0/snsb_12974693252470280264:         JPEG image data

只看 jpg 格式的图片,snsb 开头是大图,snsu 开头中等大小,snst 是微缩图

把 snsb 的图片拿出来就可以了的,不需要请求微信的服务器,也算是一种解决方案吧。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.