adb 常用命令一

1.install 和uninstall   

 adb -s 设备号 install 安装包路径
   adb uninstall package名


2.pull 和push:

adb pull /sdcard/Download/1.zip D:/FeigeDownload
adb push d:/FeigeDownload/1.apk /sdcard/Download/

3.adb shell

4.adb shell dumpsys [option]

  4.1 adb shell dumpsys battery

  4.2 adb shell dumpsys wifi

  4.3 adb shell dumpsys power 查看电源管理;

5. adb shell cat /proc/[option]

  5.1 adb shell cat /proc/cpuinfo

  5.2 adb shell cat /proc/meminfo

  5.3 adb shell cat /proc/iomem

6. adb logcat

日志优先级:V:冗余,D:调试,I:信息级别,W:警告级别,E:错误级别

实例:adb logcat *:W 

-b:查看各缓存分区日志,radio:无线/电话,events:事件相关,main:主缓存区

adb logcat -b main;

7.adb start-server, adb kill-server

8. am指令

am:Activity manager 缩写,可以am模拟系统各种行为,例如自动Activity,停止进程,发送广播进程等。

例如:adb shell am start -n com.app.camera

9. pm

pm: package manager. 例如:adb shell pm list packages-f.

参数:

-d:查看disabled 包

-e:查看enable 包

-s:查看系统包

-3:查看第三方包

-i:查看package的对应安装者

-u:曾被卸载的package

-f:查看关联的文件,即apk位置和包名。

6.

原文地址:https://www.cnblogs.com/lianstyle/p/11041379.html