常用adb命令
查看当前activity
Bash
adb shell dumpsys window | grep mCurrentFocus查看进程
Bash
adb shell ps -A | grep xxx关闭分区验证
Bash
adb root && adb disable-verity && adb remount启动指定Activity
Bash
adb shell am start xx.xx/.XXActivity应用列表
Bash
adb shell pm list package -f应用位置
Bash
adb shell pm path com.启用/禁用应用
Bash
adb shell pm enableBash
adb shell pm disable-user设备型号
Bash
adb shell getprop | grep product包版本
Bash
adb shell dumpsys package com.xx | grep version固件日期
Bash
adb shell getprop | grep build.date时间
Bash
adb root && date "+%m%d%H%M%Y.%S" | xargs adb shell date重启所有进程/服务(软重启)
Bash
adb shell "stop && start"重启adb服务
Bash
adb kill-server && adb start-server关机
Bash
adb reboot -p模拟辅助显示设备
Bash
#开启
adb shell "settings put global overlay_display_devices '1920x1080/320'"
#关闭
adb shell "settings put global overlay_display_devices ''"设置竖屏
Bash
adb shell settings put system user_rotation 0设置横屏
Bash
adb shell settings put system user_rotation 1分辨率
Bash
adb shell wm size 1600x2560DPI
Bash
adb shell wm density 256刷新依赖
Bash
./gradlew build --refresh-dependencies