13安卓手机端自动化框架常用的辅助命令

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
一.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#*#*

  

posted @   冷夜O  阅读(20)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示