Android ADB 命令(1)常用命令

基本安装程序

  • 安转Apk程序 Install
adb install -r xxx.apk
  • 安装Apk程序 Push
adb push <local><remote>
  • 获取手机文件pull
adb pull <remote><local>

区别: push命令是将文件写入手机,相对应的是pull
remote: 手机内路径 local : 主机文件路径

基本操作

  • 查看Log
adb shell
logcat |grep "adb"
  • 删除应用
adb remount (重新挂在系统分区,使系统分区重新可写)
adb shell
cd system/app
rm *.apk
  • 输出所有已经安装的应用
adb shell pm list packages -f
  • 模拟按键输入
adb shell input keyevent
  • 模拟滑动输入
adb shell input touchscreen <x1><y1><x2><y2>

adb AM 命令

  • 启动activity
Adb shell am start -n 包名/+类名
  • 录制屏幕
adb shell screenrecord /sdcard/demo.mp4
  • 重新启动
adb reboot

猜你喜欢

转载自blog.csdn.net/xiaocajiyyd/article/details/79378854
今日推荐