一.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#*#*
标签:13,shell,package,安卓,providers,adb,自动化,android,com From: https://www.cnblogs.com/chenzhi2023/p/18438378