1:显示当前运行的全部模拟器 adb devices 2:对某一模拟器执行命令 adb -s 26944 3:安装应用程序 应用在D盘,文件夹名2下 d: cd 2 adb install -r shanqiandsw.apk 4:卸载应用程序 adb shell ls cd data cd data ls adb uninstall com.shanqianidc 5:获取模拟器中的文件 adb -s 127.0.0.1:26944 pull /mnt d:\2 6:向模拟器中写文件 adb -s 127.0.0.1:26944 push d:\2\aaa.log /mnt/sdcard 7:进入模拟器的shell模式 adb shell 8:启动应用程序 adb shell logcat | grep -i ActivityManager 打开手机QQ应用 找到包名/类名:com.tencent.mobileqq/.activity.LoginActivity adb shell am start -n com.tencent.mobileqq/.activity.LoginActivity 9:设置任意的端口号,作为主机向模拟器厚泽设备请求端口 adb forward tcp:5555 tcp:8000 10:向当前屏幕随机1000次 11:查看进程ID adb shell ps adb shell ps |grep com.tencent.mobileqq 12:获取日志信息 adb shell logcat -v time >d:\2\log.txt 13:获取CPU的消耗 adb shell cat /proc/cpuinfo 14:获取内存的消耗 adb shell cat /proc/meminfo 15:获取电量信息 adb shell dumpsys battery 16:获取GPU信息 17:获取流量信息 接收的数据流量:adb shell cat /proc/uid_stat/$PID/tcp_rcv 发送的数据流量:adb shell cat /proc/uid_stat/$PID/tcp_snd 18:查看被测应用的用户ID adb shell ps com.tencent.mobileqq I/ActivityManager( 502): START u0 {act=android.intent.action.MAIN cat=[android. intent.category.LAUNCHER] flg=0x10200000 cmp=com.tencent.mobileqq/.activity.SplashActivity} from pid 1129 I/ActivityManager( 502): Config changes=1480 {1.0 310mcc260mnc zh_CN ldltr sw36 0dp w360dp h615dp 320dpi nrml long port finger qwerty/v/v dpad/v s.17}