Inspired by
complaining that there should be an Android developer option called "Keep screen on while ADB is connected", I hacked up a quick prototype app to do just that.


The app uses a NotificationListenerService to check for the presence of the "USB debugging connected" or "Wireless debugging connected" notification. When an ADB connection is detected this way, a WakeLock is acquired to prevent the screen from turning off. The WakeLock is released when the screen is manually turned off and re-acquired when the screen is turned back on.

The feature request (from 2016) to include this functionality in Android can be found here:

Sign in to participate in the conversation

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.