============
日志
生成日志
adb logcat -v time>C:\Users\log.txt
查看过滤日志
adbshell
logcat -v time | grep “TTSHelper”
adb shell logcat -v time | findstr “mFocusedActivity”
写入日志到指定文件夹
adb logcat -f /sdcard/EchatLog/wlx.log -r 1024
将日志文件写入终端sdcard下规定目录文件,个数不超过6个 大小不超过3M 显示线程
adb logcat -f /storage/emulated/0/EchatLog/Echat20190226184651.log -n 5 -r 1024*3 -v threadtime
清空日志
adb logcat -c
============
活动
查看最顶层活动,当前界面活动
adb shell dumpsys activity | findstr “mFocusedActivity”
查看栈中活动
adb shell dumpsys activity
显示:Running activities 以下活动为堆栈中的活动
强制停止和启动活动
adb shell am force-stop com.ztegota.e180
adb shell am start -n “com.ztegota.e180/com.ztegota.e180.MainActivity”
跳转加密设置界面
adb shell am start -n “com.mcptt/.main.account.SettingsActivity”
adb shell am start -n “com.mcptt/.main.account.ServiceSettingsActivity”
强制启动到登录界面
adb shell am start -n “com.mcptt/.LoginActivity”
跳转需要的activity
adb shell am start -n “com.mcptt/com.mcptt.MainActivity”
adb shell am start -n “com.mcptt/com.mcptt.main.account.SettingsActivity”
adb shell am start -n “