1. 查询设备号

adb devices

结果:

ADB命令-1-adb常用命令

 

 2. 查询日志

adb shell "logcat |grep OkHttp"

3. 安装apk

adb install xxx.apk

4. 卸载app

adb uninstall com.xxx.app

5. 传递文件

adb push 文件名 手机端SDCard路径

5.1 将手机中的文件拷贝到电脑

adb pull /sdcard/xxx.apk  [local]
# local地址为空,则会拷贝到电脑当前目录下

 

6.查看手机端安装所有app包

adb shell pm list packages

7.启动Activity

adb shell am start 报名/完整Activity路径

8. 发送广播

adb shell am broadcast -a "broadcastactionfilter"

9. 启动服务

adb shell startservice "com.xxx.aaa/com.xxx.aaa.services"

10. 屏幕截屏

adb shell screencap /sdcard/screen.png

11. 录制视频

adb shell screenrecord /sdcard/demo.mp4

 

相关文章:

  • 2021-01-29
  • 2021-06-10
  • 2022-02-17
猜你喜欢
  • 2021-11-26
  • 2022-12-23
  • 2021-12-02
  • 2021-09-28
相关资源
相似解决方案