游戏测试常用adb命令
时间: 2023-12-14 08:34:40 浏览: 190
以下是游戏测试常用的几个adb命令:
1. 查看当前前台Activity的名称
```shell
adb shell dumpsys activity | grep "mFocusedActivity"
```
2. 查看当前应用的包名
```shell
adb shell dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp'
```
3. 查看应用的启动时间
```shell
adb shell am start -W com.example.package/.MainActivity
```
4. 模拟按键事件,例如返回键
```shell
adb shell input keyevent 4
```
5. 模拟触摸事件,例如点击屏幕坐标为(500, 500)的位置
```shell
adb shell input tap 500 500
```
阅读全文
相关推荐















