常用命令--ADB

ADB全程:Android Debug Bridge,常用的android debug工具。
 

1. 查看当前的连接设备:

adb devices

2. 进入到设备:

adb shell

进入之后使用shell命令,cd、ls,rm等。

3. 设备有多个,需要指定其中一个设备:

adb -s 设备名 shell

4. 打开或重启adb

adb start-server

adb reboot

5. 关闭adb

adb kill-server

6. 安装软件

adb -s 设备名 install ../..apk

成功显示success,失败显示failure。

-g: 添加权限

7. 卸载软件

adb uninstall <软件名>

adb uninstall -k <软件名>

-k: 为卸载软件保留配置和缓存

8. 查看APP启动时间

adb shell am start -W 包名/activity

9. 关闭app

adb shell am force-stop 包名

10. 从电脑上发送文件到设备

adb push <本地路径> <远程路径>

11. 从设备上下载文件到电脑

adb pull <远程路径> <本地路径>

 

 

 

posted @ 2023-04-11 10:38  为取经而来  阅读(42)  评论(0编辑  收藏  举报