做 Android 开发离不开 ADB,本文仅对常用命令【我不熟悉的】总结。
学习途径:
- Terminal 下,直接输入 adb 回车,会有文档说明
- 第三方博客:
<hr/>指定链接设备
adb -s xxx
adb -t xxx其中 transport id 通过 adb devices -l 可以查看
adb -d
adb -e<hr/>应用操作
# am start -n 包名/启动页包路径
adb shell am force-stop 包名
adb shell pm clear 包名
adb shell dumpsys meminfo 包名
adb shell pm list packages -f
adb shell pm list packages
adb shell pm list packages -s
adb shell pm list packages -3<hr/>系统操作
adb shell reboot -p
adb shell reboot
adb shell wm size
# 设备型号
adb shell getprop ro.product.model
# 设备牌子
adb shell getprop ro.product.brand
# 设备名称
adb shell getprop ro.product.name
# 设备制造商
adb shell getprop ro.product.manufacturer
adb shell getprop ro.build.display.id
adb shell cat /proc/cpuinfo
adb shell cat /proc/meminfo
# 如果是 toybox 日期格式为 MMDDhhmm[[CC]YY][.ss]。
adb shell &#34;su 0 toybox date 091016002019.01&#34;...
<hr/>更新中。。。 |