Connect your Android device over adb to get adb shell and check the default screen timeout value already set, $ adb shell settings get system screen_off_timeout 30000 As you can see above for our android device the default screen timeout was set to 30 sec i.e. 30 * 1000 ms, now we can change this value to say 45 sec as, $ adb shell settings put system screen_off_timeout 45000 The display information can be obtained using below command, $ dumpsys power | grep Screen mLastScreenBrightnessBoostTime=0 (3088734 ms ago) mScreenBrightnessBoostInProgress=false mSuspendWhenScreenOffDueToProximityConfig=false mDozeAfterScreenOff=true mMinimumScreenOffTimeoutConfig=10000 mMaximumScreenDimDurationConfig=7000 mMaximumScreenDimRatioConfig=0.20000005 mScreenOffTimeoutSetting=45000 mMaximumScreenOffTimeoutFromDeviceAdmin=900000 (enforced=true) mScreenBrightnessSetting=0 mScreenBrightnessModeSetting=1 mScreenBrightnessOverrideFromWindowManager=-1 mDozeScreenStateOverrideFromDreamManager=1 mDozeScreenBrightnessOverrideFromDreamManager=17 mScreenBrightnessSettingMinimum=1 mScreenBrightnessSettingMaximum=255 mScreenBrightnessSettingDefault=102 Screen off timeout: 10000 ms Screen dim duration: 2000 ms As you can see above, if we change the “screen_off_timeout” to 45 sec, it changes as “mScreenOffTimeoutSetting=45000” as reported in dumpsys. Reference – <integer name= "def_screen_off_timeout">60000</integer> as seen in frameworks/base/packages/SettingsProvider/res/values/defaults.xml#21 from http://androidxref.com/9.0.0_r3/xref/frameworks/base/packages/SettingsProvider/res/values/defaults.xml#21 You can also refer to “How to change Android display brightness using adb command ?”

Execution & Command Syntax

Terminalbash
adb to get adb shell and check the default screen timeout value already set, $ adb shell settings get system screen_off_timeout 30000 As you can see above for our android device the default screen timeout was set to 30 sec i
Terminalbash
adb shell settings put system screen_off_timeout 45000 The display information can be obtained using below command, $ dumpsys power | grep Screen mLastScreenBrightnessBoostTime=0 (3088734 ms ago) mScreenBrightnessBoostInProgress=false mSuspendWhenScreenOffDueToProximityConfig=false mDozeAfterScreenOff=true mMinimumScreenOffTimeoutConfig=10000 mMaximumScreenDimDurationConfig=7000 mMaximumScreenDimRatioConfig=0

Risk level: destructive. Review the command before running it.

Terminalbash
adb command ?”

Gotchas and Common Issues

  • Permission Verification - confirm execution permissions and path variables before invoking system binaries.

  • Version Compatibility - check software version release notes for deprecated flags or syntax changes.

  • Log Monitoring - inspect system logs (journalctl or /var/log) to troubleshoot execution failures.

Following these steps ensures clean configuration, proper security boundaries, and reliable execution for change default display timeout settings using adb command.