常用adb 命令

adb 发送事件

示例

adb shell input keyevent 4

关于事件说明

事件说明 keycode
回退键/BACK 键 4
HOME 键 3
VOLUME UP 24
VOLUME DOWN 25
POWER 键 26

调节屏幕亮度

要使用 ADB 调整 Android 设备的屏幕亮度,你可以使用以下命令:

设置特定亮度值:

adb shell settings put system screen_brightness <value>

其中 <value> 是 0 到 255 之间的整数,0 是最暗,255 是最亮。

例如,要将亮度设置为最大:

adb shell settings put system screen_brightness 255

不灭屏

方法: 设置系统永不休眠(推荐)

adb shell settings put system screen_off_timeout 2147483647