官方文档:https://developer.android.google.cn/studio/profile/systrace/command-line
使用条件:
1.从 Android Studio 下载并安装最新的 Android SDK Tools。
2.安装 Python 并将其添加到工作站的执行路径中。
3.使用 USB 调试连接将搭载 Android 4.3(API 级别 18)或更高版本的设备连接到开发系统。
systrace 命令在 Android SDK Tools 工具包中提供,位于 android-sdk/platform-tools/systrace/。
命令:
1.python systrace.py [options] [categories]
例如:
$ python systrace.py -o mynewtrace.html sched freq idle am wm gfx view \binder_driver hal dalvik camera input res
2.要查看已连接设备支持的类别列表:
$ python systrace.py --list-categories
![](https://img.haomeiwen.com/i1971072/4b01c3d76461c566.png)
![](https://img.haomeiwen.com/i1971072/f0846a2c6689d799.png)
网友评论