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" |
扫描二维码关注公众号,回复:
4215804 查看本文章
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 |