Appium手机APP自动化-adb常用的命令

1:准备环境

参考:https://blog.csdn.net/hujyhfwfh2/article/details/82925424

cmd进入夜神模拟器的安装目录的bin下 输入:nox_adb.exe connect 127.0.0.1:62001 ok现在已经将夜神和adb连接成功了

2:常用命令

2.1:进入手机的shell环境

adb -s 127.0.0.1:62001 shell

2.2:查看设备的日志

adb -s 127.0.0.1 logcat >c:\22.txt 或者 adb -s 127.0.0.1:62001 logcat >c:\22.txt

设备日志前面的 D表示Debug,I表示Info W表示Warning E表示Error

2.3:APP的安装

adb -s 127.0.0.1:62001 install C:\Users\Anndy\Desktop\11\zhihu.apk

覆盖安装:adb -s 127.0.0.1:62001 install -r C:\Users\Anndy\Desktop\11\zhihu.apk

2.4:APP的卸载

adb -s 127.0.0.1:62001 uninstall "com.zhihu.andriod"

2.5:pull命令 将手机设备的文件copy到电脑指定位置

1:进入手机的shell环境

adb -s 127.0.0.1:62001 shell

2:data目录下新建test.txt

cd /data

touch test.txt

3:将test.txt文件copy到电脑桌面的11文件夹下

adb -s 127.0.0.1:62001 pull /data/test.txt C:\Users\Anndy\Desktop\11

2.6:push命令 将电脑的文件发送到手机

adb -s 127.0.0.1:62001 push C:\Users\Anndy\Desktop\11\22.txt /data

3:adb环境下的shell命令

 

  • 2
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值