一.adb命令 1.查詢已連線的裝置 C:\Users\Administrator>adb devices List of devices attached 127.0.0.1:21503 device 2.連線裝置 adb connect 127.0.0.1:21503 3.登入裝置shell C:\Users\Administrator>adb shell MI 9:/ # 4.查詢安裝的軟體包 MI 9:/ # pm list package package:com.android.cts.priv.ctsshim package:com.android.providers.telephony package:com.android.providers.calendar package:com.android.providers.med 或 C:\Users\Administrator>adb shell pm list package package:com.android.cts.priv.ctsshim package:com.android.providers.telephony 二.appt命令 獲取app主程式ui入口(activity) aapt dump badging + 軟體包.apk 三.獲取activity 多臺裝置要指定name或udid ,用-s引數 adb shell dumpsys window | findstr mCurrentFocus 四.關閉軟體 adb shell am force-stop +軟體包名 adb shell pm clear +軟體包名 測試手機號 17xxxxx3383 use除錯模式 *#*#2846579#*#*