zjw-swun / appmethodorder Goto Github PK
View Code? Open in Web Editor NEW一个能让你了解所有函数调用顺序以及函数耗时的Android库(无需侵入式代码)
一个能让你了解所有函数调用顺序以及函数耗时的Android库(无需侵入式代码)
E:\workspace\IndiaCP\android>gradlew AOPMO --stacktrace
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
at org.gradle.api.tasks.compile.JavaCompile.setDependencyCacheDir(JavaCompile.java:241)
at com.android.build.gradle.tasks.factory.AndroidJavaCompile_Decorated.setDependencyCacheDir(Unknown Source
)
at com.android.build.gradle.tasks.factory.JavaCompileConfigAction.execute(JavaCompileConfigAction.java:131)
at com.android.build.gradle.tasks.factory.JavaCompileConfigAction.execute(JavaCompileConfigAction.java:39)
at org.gradle.api.internal.tasks.DefaultTaskContainer.create(DefaultTaskContainer.java:142)
at com.android.build.gradle.internal.TaskContainerAdaptor.create(TaskContainerAdaptor.java:59)
at com.android.build.gradle.internal.scope.AndroidTaskRegistry.create(AndroidTaskRegistry.java:47)
at com.android.build.gradle.internal.scope.AndroidTaskRegistry.create(AndroidTaskRegistry.java:89)
at com.android.build.gradle.internal.TaskManager.createJavacTask(TaskManager.java:1102)
832 ent 3209420 ........com.zjw.appmethodorder.MainActivity. ()V MainActivity.java
832 ent 3209438 .........com.zjw.appmethodorder.BaseActivity. ()V BaseActivity.java
是什么方法,啥意思
//def capturesDirPath = project.getProjectDir().getParentFile().path + File.separator + "captures";
我的快照目录在project/captures; Mac OS。
两个task中,改成 def capturesDirPath = project.getProjectDir().path + File.separator + "captures";
运行通过
832 ent 128540 ........com.zjw.appmethodorder.SecondActivity. ()V SecondActivity.java
大神,你就说这个.啥意思就行。
你好,那个工具的代码有没有?
我没看懂怎么操作,能否把具体操作通俗一点。
为什么我在点了几次activity跳转后两个输出文件都是空?traceview文件明确是有包含有包名调用的。我用的是mac,直接clone下来跑的demo,没有改过代码
两个projects一样的配置,执行 AppOutPutMethodOrder ,其中一个正常,另外一个生成的txt却为空
1
非常不错的库, 但我想查阅每个方法的耗时, 或者说只输出耗时200毫秒以上的method, 这个能支持么?
Please write comments and readme.md in english
转换成json是干嘛用的?
有这个324704 ..........com/example/myapp/SecondActivity. ()V 却没有
324704 ..........com/example/myapp/SecondActivity.onCreate ()V是怎么回事呢?
D:\Demo\captures
In shell.
dmtracedump -ho ./your_trace_file.trace | grep ".*ent.*" > order.txt
无法在captures文件夹下生成对应文件
window10下双击右侧面板的 AppOutPutMethodOrder任务有数据,但是再双击执行AppFilterMethodOrder任务,会得到空文件啊,过滤得到空文件在window10上,虽然也有说“(可以使用 ./gradlew AppFilterMethodOrder -P package_name=com.zjw.appmethodorder执行该任务)",这个是在Android studio下Terminal里直接输入该命令吗,可能是我太笨了,觉得文档不太详细,求助
我现在可以知道了所有的函数调用顺序,但是我想把Android框架层的API都给过滤出来,大佬有没有什么思路啊?
我没看懂怎么操作,能否把具体操作通俗一点。
可以适用于逆向分析三方App,但是对于一个不拥有源码的App该如何生成trace文件呢?相当于不用反编译分析apk包就可以知道某个关键函数在哪里了。
1 ent 20999 ......com/example/myapp/MainActivity$3.onClick (Landroid/view/View;)V
1 ent 21485 .......com/example/myapp/MainActivity.access$100 (Lcom/example/myapp/MainActivity;)Lcom/umeng/socialize/UMAuthListener;
1 ent 43500 .....com/example/myapp/MainActivity$1.onStart (Lcom/umeng/socialize/bean/SHARE_MEDIA;)V
1 ent 20999 ......com/example/myapp/MainActivity$3.onClick (Landroid/view/View;)V
1 ent 21485 .......com/example/myapp/MainActivity.access$100 (Lcom/example/myapp/MainActivity;)Lcom/umeng/socialize/UMAuthListener;
1 ent 43500 .....com/example/myapp/MainActivity$1.onStart (Lcom/umeng/socialize/bean/SHARE_MEDIA;)V
1 ent 20999 ......com/example/myapp/MainActivity$3.onClick (Landroid/view/View;)V
1 ent 21485 .......com/example/myapp/MainActivity.access$100 (Lcom/example/myapp/MainActivity;)Lcom/umeng/socialize/UMAuthListener;
1 ent 43500 .....com/example/myapp/MainActivity$1.onStart (Lcom/umeng/socialize/bean/SHARE_MEDIA;)V
1 ent 43500 .....com/example/myapp/MainActivity$1.onStart (Lcom/umeng/socialize/bean/SHARE_MEDIA;)V
1 ent 43500 .....com/example/myapp/MainActivity$1.onStart (Lcom/umeng/socialize/bean/SHARE_MEDIA;)V
1 ent 232643 ........com/example/myapp/MainActivity.onActivityResult (IILandroid/content/Intent;)V
1 ent 232643 ........com/example/myapp/MainActivity.onActivityResult (IILandroid/content/Intent;)V
1 ent 232643 ........com/example/myapp/MainActivity.onActivityResult (IILandroid/content/Intent;)V
1 ent 232643 ........com/example/myapp/MainActivity.onActivityResult (IILandroid/content/Intent;)V
1 ent 232643 ........com/example/myapp/MainActivity.onActivityResult (IILandroid/content/Intent;)V
1 ent 232643 ........com/example/myapp/MainActivity.onActivityResult (IILandroid/content/Intent;)V
1 ent 232643 ........com/example/myapp/MainActivity.onActivityResult (IILandroid/content/Intent;)V
1 ent 232643 ........com/example/myapp/MainActivity.onActivityResult (IILandroid/content/Intent;)V
1 ent 232643 ........com/example/myapp/MainActivity.onActivityResult (IILandroid/content/Intent;)V
1 ent 284636 ......com/example/myapp/MainActivity$1.onComplete (Lcom/umeng/socialize/bean/SHARE_MEDIA;ILjava/util/Map;)V
1 ent 284636 ......com/example/myapp/MainActivity$1.onComplete (Lcom/umeng/socialize/bean/SHARE_MEDIA;ILjava/util/Map;)V
1 ent 284636 ......com/example/myapp/MainActivity$1.onComplete (Lcom/umeng/socialize/bean/SHARE_MEDIA;ILjava/util/Map;)V
1 ent 284636 ......com/example/myapp/MainActivity$1.onComplete (Lcom/umeng/socialize/bean/SHARE_MEDIA;ILjava/util/Map;)V
1 ent 284636 ......com/example/myapp/MainActivity$1.onComplete (Lcom/umeng/socialize/bean/SHARE_MEDIA;ILjava/util/Map;)V
1 ent 284636 ......com/example/myapp/MainActivity$1.onComplete (Lcom/umeng/socialize/bean/SHARE_MEDIA;ILjava/util/Map;)V
1 ent 284636 ......com/example/myapp/MainActivity$1.onComplete (Lcom/umeng/socialize/bean/SHARE_MEDIA;ILjava/util/Map;)V
1 ent 284636 ......com/example/myapp/MainActivity$1.onComplete (Lcom/umeng/socialize/bean/SHARE_MEDIA;ILjava/util/Map;)V
1 ent 324704 ..........com/example/myapp/Daye. ()V
1 ent 284636 ......com/example/myapp/MainActivity$1.onComplete (Lcom/umeng/socialize/bean/SHARE_MEDIA;ILjava/util/Map;)V
1 ent 324704 ..........com/example/myapp/Daye. ()V
1 ent 324704 ..........com/example/myapp/Daye. ()V
1 ent 324704 ..........com/example/myapp/Daye. ()V
1 ent 324704 ..........com/example/myapp/Daye. ()V
1 ent 324704 ..........com/example/myapp/Daye. ()V
1 ent 324704 ..........com/example/myapp/Daye. ()V
1 ent 324704 ..........com/example/myapp/Daye. ()V
1 ent 324704 ..........com/example/myapp/Daye. ()V
Daye是Activity名字, Daye. ()V是什么意思
我使用的AS2.3,capture目录在工程下,所以要去掉capturesDirPath变量初始化中的getParentFile()才能拿到正确的目录。
我电脑上没有dmtracedump环境变量,却可以使用jar工具来解析trace文件,是如何做到的?
想打印安卓sdk自带的函数怎么改?
打印的是那些函数?只有activity的?还是全部,如果是全部方法,那打印出来的内容也太多了吧。。
第一步生成的txt文件还是非常庞大,没有直接价值,所以不如直接一步生成最后的filter
如果是用来熟悉项目,我建议去掉生命周期的调用,直接看类的调用链和类的调用入口会更快上手。
如果一个界面复杂,会打出太多log,反而没有之间看代码来的直接。
个人觉得这个项目可以用来优化项目比较直观。
有没有测试过还可以用吗
还是log好,可以自定义个log输出文件,然后带有计算时间戳的,很简单,你这样太麻烦了
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.