An Android app that toggles the developer settings I use most, without opening Developer options:
- USB debugging
- Wireless debugging
- Stay awake while charging (AC, USB and wireless)
- Keep screen on for a chosen time, charging or not
The app is for my own phones and Meta Quest headset. It is not published on the Play Store. It needs Android 11 (API 30) or later.
Requirements: JDK 17 or later, and the Android SDK with platform 36. Put the SDK path in
local.properties (sdk.dir=...) or in the ANDROID_HOME environment variable.
./gradlew assembleDebugThe APK is app/build/outputs/apk/debug/app-debug.apk. Install it with:
adb install -r app/build/outputs/apk/debug/app-debug.apkRun the unit tests and lint with:
./gradlew testDebugUnitTest lintDebugChanging these settings needs android.permission.WRITE_SECURE_SETTINGS. Only a computer can grant it, and
only once per installation:
-
Turn on USB debugging in Developer options and connect the phone to the computer.
-
Run:
adb shell pm grant com.rangelreale.devsettings android.permission.WRITE_SECURE_SETTINGS
Until the permission is granted, the main screen shows a setup card with this command and a copy button, and every switch stays disabled. The app notices the grant within a few seconds. It needs neither root nor Shizuku.
Developer options must be on for the settings to have effect. When they are off, the main screen explains how to turn them on: open About phone and tap Build number seven times.
Each row shows the setting, its current value and a switch. Values come from the system on every resume and through a content observer, so changes made in system Settings appear at once.
- Turning off USB or wireless debugging asks for confirmation, because a connected computer loses its connection.
- When wireless debugging is on, the screen shows the phone's address and port for
adb connect, with a copy button. The port is found through theservice.adb.tls.portproperty or, failing that, mDNS. - The first time wireless debugging is turned on for a Wi-Fi network, Android asks whether to allow that network.
- "Open wireless debugging (pairing)" opens Developer options with the wireless debugging row highlighted. Tap the row title to reach pairing. Android has no public intent for the pairing screen itself.
- "Open Developer options" opens the system Developer options screen.
Add the tiles from the Quick Settings edit screen. Every tile shows the real system state, and a long press opens the app. Without the permission, a tile shows "Setup needed" and a tap opens the app on the setup card. (Android does not deliver taps to tiles in the unavailable state, so these tiles stay inactive instead.)
| Tile | Tap |
|---|---|
| USB debugging | Turns USB debugging on or off. On a locked phone, it asks to unlock first. |
| Wireless debugging | Turns wireless debugging on or off. On a locked phone, it asks to unlock first. |
| Stay awake | Turns stay awake while charging on (AC, USB and wireless) or off. |
| Keep screen on | Moves to the next step: 5 min, 15 min, 30 min, 1 hour, until stopped, off. Each step restarts the countdown. The subtitle shows the time left. |
Tiles do not ask for confirmation.
A foreground service holds a screen wake lock. Its ongoing notification counts down the time left and has a Stop action. On Android 13 and later, the app asks for notification permission the first time; without it, the screen still stays on but the notification is hidden. The power button still turns the screen off.
The app also runs on Meta Quest headsets. It was tested on a Quest 3 with Horizon OS on Android 14.
-
Turn on developer mode. This needs a Meta developer account. In the Meta Horizon app on your phone, open the headset's settings and turn on Developer mode. Restart the headset.
-
Connect the headset to the computer with a USB cable. Put the headset on and allow USB debugging for this computer.
-
Install the app and grant the permission:
adb install -r app/build/outputs/apk/debug/app-debug.apk adb shell pm grant com.rangelreale.devsettings android.permission.WRITE_SECURE_SETTINGS
-
In the headset, open the Library, filter it by Unknown sources, and open Dev Settings. It opens as a flat panel.
To use adb without the cable, run adb tcpip 5555 while the cable is connected. Then disconnect it and run
adb connect <headset IP>:5555. You can also turn on wireless debugging from the app: it shows the address for
adb connect. That address only accepts a computer that is already paired.
The app recognises a Quest by the oculus.hardware.standalone_vr system feature and changes as follows:
- USB debugging and wireless debugging work. Turning on wireless debugging opens the Quest's own dialog asking to
allow the network, and the app shows the address for
adb connect. - The proximity sensor puts the headset to sleep about 20 seconds after it is taken off. Neither Stay awake nor a screen wake lock prevents that, so Stay awake is hidden.
- Keep screen on becomes "Keep headset awake". Besides the wake lock, it sends the
com.oculus.vrpowermanager.prox_closebroadcast, which makes the headset act as if it is worn. This is the same override that the Proximity Sensor switch in Meta Quest Developer Hub uses, and it needs no permission. The app sends it again every minute, and sendscom.oculus.vrpowermanager.automation_disablewhen the time runs out or you stop it. The headset uses more battery while the sensor is overridden. If Android kills the app first, the override stays on until it lapses or the headset restarts. - The warning that Developer options are off is hidden. The Quest does not set
development_settings_enabled; developer mode is turned on in the Meta Horizon app instead. - Quick Settings tiles are not available, because Horizon OS has no Quick Settings panel for them.
CI runs on every pull request and every push to master: unit tests, lint and a debug build
(.github/workflows/ci.yml).
Pushing a tag such as v1.2.0 runs .github/workflows/release.yml. It tests, builds an APK signed with the
release key, and publishes it as a GitHub release. The version name comes from the tag (1.2.0) and the version
code is major * 10000 + minor * 100 + patch.
git tag v1.2.0
git push origin v1.2.0The release workflow needs two repository secrets:
| Secret | Value |
|---|---|
RELEASE_KEYSTORE_BASE64 |
The keystore file, base64-encoded. |
RELEASE_KEYSTORE_PASSWORD |
The keystore password. It is also used as the key password. |
The key alias defaults to rrgmc. Set the repository variable RELEASE_KEY_ALIAS to use another one.
To build a signed release locally, set SIGNING_STORE_FILE, SIGNING_STORE_PASSWORD, SIGNING_KEY_ALIAS and
SIGNING_KEY_PASSWORD, then run ./gradlew assembleRelease -PappVersion=1.2.0. Without these variables, release
builds are signed with the debug key.