1、am命令打开应用
先am stack list,列出当前最近使用的apk:
root@octopus-t826:/ # am stack list
am stack list
Stack id=1 bounds=[0,0][1200,1920] displayId=0
taskId=21: com.android.camera2/com.android.camera.CameraLauncher
taskId=204: com.android.camera2/com.android.camera.CameraLauncher
Stack id=0 bounds=[0,0][1200,1920] displayId=0
taskId=158: com.android.systemui/com.android.systemui.recents.RecentsActivity
taskId=22: com.android.launcher3/com.android.launcher3.Launcher
然后再
am start -n com.android.launcher3/com.android.launcher3.Launcher
或者
am start -n com.android.systemui/com.android.systemui.recents.RecentsActivity
或者
am start -n com.android.camera2/com.android.camera.CameraLauncher
这个即打开camera apk
2、屏分辨率
wm size
3、列出服务
service list
4、dumpsys命令
(1)window
dumpsys window lastanr
dumpsys window policy
dumpsys window animator
dumpsys window sessions
dumpsys window tokens
dumpsys window windows
(2)input
dumpsys input
(3)activity
dumpsys activity activities
dumpsys activity broadcasts
dumpsys activity intents
dumpsys activity processes
dumpsys activity providers
dumpsys activity services
dumpsys activity recents
(4)display
dumpsys display
(5)power
dumpsys power
(6)accessibility
dumpsys accessibility
(7)meminfo
dumpsys meminfo
(8)package
dumpsys package
5、dumpstate
dumpstate
6、/data/anr/trace.txt
debuggerd -b 6726