debug技巧: 我们调试的点在应用一打开的时候,很靠前,例如Application的onCreate方法中,以至于我们不能足够快的设置进程为debug模式
adb shell am set-debug-app -w com.example.jishuxiaoheiwu.appdebugsample
还原:
adb shell am clear-debug-app
查看当前进程的pid
ps -e | grep xxx(进程名)
android o logcat read: unexpected EOF!
adb logcat -G 2m
查看前台 Activity
adb shell dumpsys activity activities | grep mResumedActivity
查看日志
adb shell
logcat | grep xx xx