基础命令1。查看手机设备adbdevices2。packsge(包路径)安装包adbinstall3。(保留数据及缓存文件安装新包)adbinstallrpackages4。(卸载包)adbuninstallpackage5。关闭adb服务adbkillserver6。启动adb服务adbstartserver7。查看手机里面所有包名adbshellpmlistpackages8。查看手机里面所有第三方包名adbshellpmlistpackages39。截频并保存文件在手机上为xx。Pngadbshellsystembinscreencappsdcardxx。png10。将手机xx。png文件保存到D盘文件下adbpullsdcardxx。pngD:xx。png11。将电脑文件导入手机adbpushD:xx。textadcardxx。text12。清除缓存数据adbshellpmclearcom。ablesky。ui。activity13。启动程序adbshellamstartncom。ablesky。ui。activitycom。ablesky。activity。SplashActivity14。强制停止运行程序adbshellamforcestopcom。ablesky。simpleness。activity15。查看日志adblogcat16。将日志打印到电脑上adblogcatD:log。txt17。查看被占用端口对应的PIDnetstataonfindstr503718。查看端口号对应的进程tasklistfiPIDeqPID号19。杀掉某进程taskkillpid2027f20。指定APP产生随机事件100次adbshellmonkeyp包名10021。包名vv100指定APP产生随机事件100次并发送详细的activity信息adbshellmonkeyp进阶命令1、获取手机系统信息(CPU,厂商名称等)adbshellcatsystembuild。propgrepproduct2、获取手机系统版本adbshellgetpropro。build。version。release3、获取手机系统api版本adbshellgetpropro。build。version。sdk4、获取手机设备型号adbdshellgetpropro。product。model5、获取手机厂商名称adbdshellgetpropro。product。brand6、获取手机的序列号有两种方式1、adbgetserialno2、adbshellgetpropro。serialno7、获取手机的IMEI有三种方式,由于手机和系统的限制,不一定获取到1、adbshelldumpsysiphonesubinfo其中DeviceID即为IMEI号2、adbshellgetpropgsm。baseband。imei3、servicecalliphonesubinfo1此种方式,需要自己处理获取的信息得到8、获取手机mac地址adbshellcatsysclassnetwlan0address9、获取手机内存信息adbshellcatprocmeminfo10、获取手机存储信息adbshelldf获取手机内部存储信息:魅族手机:adbshelldfmntshellemulated其他:adbshelldfdata获取sdcard存储信息:adbshelldfstoragesdcard11、获取手机分辨率adbshelldumpsyswindowgrepmUnrestrictedScreen12、获取手机物理密度adbshellwmdensity13、获取手机包名1。查看指定apk的包名:aaptdumpbadging包的全路径2。查看所有apk包名:adbshellpmlistpackagef 以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作具有一定的参考学习价值,如果有疑问大家可以留言交流,谢谢大家的支持。