ADB,即 Android Debug Bridge,它是 Android 开发/测试人员不可替代的强大工具,也是 Android 设备玩家的好玩具。安卓调试桥 (Android Debug Bridge, adb),是一种可以用来操作手机设备或模拟器的命令行工具。它存在于 sdk/platform-tools 目录下。
Adb常用命令
1
| adb shell /system/bin/screencap -p /sdcard/screenshot.png
|
1
| adb pull /sdcard/screenshot.png D:\download
|
1
| adb shell screenrecord /sdcard/filename.mp4
|
1 2
| adb start-server adb kill-server
|
1
| adb shell am force-stop com.sohu.sohuvideo
|
1
| adb shell pm clear com.sohu.sohuvideo
|
1 2
| adb shell pm install -r filePath adb install **.apk
|
1
| adb shell pm list packsges
|
1
| adb shell pm path packages.name
|
1
| adb shell pm uninstall packages.name
|
1
| adb shell am start -n {包(package)名}/{包名}.{活动(activity)名称}
|
1 2 3 4 5 6
| adb tcpip 5555
adb connect device_ip_address:5555
adb devices
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| adb shell
df -h
free -h
adb root adb remount adb reboot
adb disable-verity
adb reboot bootloader fastboot devices fastboot reboot
|
官方文档
https://developer.android.google.cn/studio/command-line/adb