小虾米资讯
AD1android:牛鹭学院 Appium之常用python+adb指令集合
2021-04-30 10:30:30 / 我要吐槽4、打开指定应用(package/.activity)os.popen("adb shell am start -n cn.kuwo.kwmusiccar/cn.kuwo.kwmusiccar.WelcomeActivity") # 打开酷我os.popen("adb shell am start -n com.edog.car/com.kaolafm.auto.home.MainActivity") # 打开考拉电台os.popen("adb shell am start -n cn.yunovo.car.settings/cn.yunovo.car.settings.SettingsListActivity") # 打开设置os.popen("adb shell am start -n cn.yunovo.nxos.bt/cn.yunovo.nxos.bt.activitys.BluetoothActivity") # 打开蓝牙电话os.popen("adb shell am start -n com.aispeech.aios/.MainActivity") #打开语音助手
5、切换至后台(HOME按键)os.popen("adb shell input keyevent 3") #切换至后台 6、查看系统内存情况os.popen("adb shell dumpsys meminfo")7、获取wifi信息os.popen("adb shell dumpsys wifi")
8、查看进程占用CPU情况os.popen("top -m 20 -d 2 ") #top -m 进程数 -d 秒 9、查看设备电量信息os.popen("dumpsys battery")10、截图操作os.popen("adb shell screencap -p /sdcard/screen.png")
11、跑Monkeyadb shell monkey -p com.spt.carengine.txz.voice -s 1000 --ignore-crashes --ignore-timeouts --monitor-native-crashes -v -v 10000000012、安装和卸载APKadb install xx.apk #安装apkadb uninstall xx.apk #卸载apk13、查看设备名adb devices14、通过WiFi连接设备adb connect 10.0.0.123
Powered By © 小虾米资讯 2015
(本站部分文章来源于网络或网友爆料,不代表本站观点,如有侵权请联系及时删除 )