1.安卓系统log分析
事件输入:InputDispatcher
49617: 08-14 09:57:42.185832 1551 1683 I InputDispatcher: dispatchMotion deviceId=7, displayId=0, action=0x0, id=0,x=2193.143555,y=718.500977
action=0x0 按下
action=0x1 松开
action=0x105 双指
action=0x106 双指
action=0x205 三指
action=0x206 三指
事件输出:OutputDispatcher
查看当前的输入焦点在哪里:
过滤:input_focus
08-14 09:57:42.748199 1551 1585 I input_focus: [Focus request 4359156 com.app.xxxx/com.app.xxxx.xxxx,reason=UpdateInputWindows]
查看谁启动的我的Activity:
08-27 11:11:10.248 1279 8545 I ActivityTaskManager: START u0 {flg=0x10000000 cmp=com.android.systemui/.navigationbar.activity.xxx} from uid 10090 pid 1602|com.android.systemui
在栈顶的activity:
08-29 17:27:40.543 D 1657 5050 TopActivityMonitor: notifyTopActivityChanged displayid:0 taskid:204 componentName:ComponentInfo{com.app.xxx/com.xxx.app.xxx.xxxx}
低内存被KILL:
lowmemorykiller: Kill
性能健康:
HealthMain_CPUMonitor: Mem
掉帧查看:
Choreographer: Skipped 240 frames! The application may be doing too much work on its main thread.
系统启动完成:
07-16 19:03:57.000 I 1046 1142 ActivityManager: Sending BOOT_COMPLETE user #0
请求权限方式不对:
GrantPermissionsActivity null callingPackageName. Please use "RequestPermission" to request permissions
获取和设置白天黑夜状态:
08-29 17:50:14.234 D 1657 4382 UiModeManager: updateConfigurationLocked: mDockState=0; mCarMode=false; mNightMode=2; mNightModeCustomType=-1; uiMode=35
08-29 17:50:14.228 I 1657 4382 UiModeManager: setNightMode: mode is 2 and currentMode(mNightMode) is 1, callingPid = 18202
事件分发超时:
Subject: Input dispatching timed out (ab95b8a com.app.xxx/com.app.xxx.activity.xxx (server) is not responding. Waited 5000ms for FocusEvent(hasFocus=true))
应用被冻结:
Line 57027: 05-07 11:06:39.219806 1180 1576 D ActivityManager: freezing 2736 com.app.xxx.xxx
系统GC:
I/art: GC_Reason GC_Name Objects_freed(Size_freed) AllocSpace Objects, Large_objects_freed(Large_object_size_freed) Heap_stats LOS objects, Pause_time(s)
2.常用到的adb命令:
申请root权限:adb root
申请可读写:adb remount
重启系统:adb reboot
启动activity: adb shell am start -n com.xxx.xxx.xxx/com.xx.test.xxx
切换黑夜模式:adb shell "su 0 cmd uimode night yes"
发送广播:adb shell am broadcast -a cl --es locale en
查看某应用的权限申请信息:adb shell dumpsys package com.xxx.xxx.xxx
修改分辨率:adb shell wm density 140 adb shell wm size 1920x1080
修改系统时间:adb shell date "04131410"
删除文件:adb shell rm [选项] <文件路径>
复制文件:adb shell cp [选项] <源文件路径> <目标文件路径>
杀死某个进程:adb shell am force-stop com.xxx.xxx.xxx
隐藏/恢复应用:adb shell pm hide <package_name> / adb shell pm unhide <package_name>
安装应用:adb install -r -t -d 路径
卸载应用:adb uninstall com.xxx
push应用:adb push xxxx /system/app/xxx
获取dump信息(从进程创建到执行命令这段时间的heap):
adb shell am dumpheap com.xxx.app.xxx.xxx /data/local/tmp/1111111.hprof -nanoTime

2万+

被折叠的 条评论
为什么被折叠?



