参考https://wiki.cyanogenmod.org/w/Adb_--help
记录一些以后常用的adb命令
- adb reboot 重启
- adb reboot bootloader 重启到刷机模式
- adb reboot recovery 重启到恢复模式
- adb install -r <apkfile> 保留数据缓存,重新安装apk
- adb uninstall -k <package> 卸载apk,但保留数据缓存
- adb shell top 查看cpu和内存
- adb shell kill [pid] 杀死进程
- adb remount 将system重新挂载为可读写分区
- adb shell cat /data/misc/wifi/*.conf 查看wifi
- adb shell monkey -v -p <package> 跑monkey
- adb wait-for-device - block until device is online
- adb shell am broadcast -a com.test --es test_string "string" --ei test_int 100 --ez test_boolean true
adb shell dumpsys
- adb shell dumpsys -l --> show running service
- adb shell dumpsys cpuinfo -->
- adb shell dumpsys package <packageName> --> 查看指定包的信息
- adb shell dumpsys activity b <packageName> 查询广播接收
adb shell input
- adb shell input keyevent KEYCODE_HOME