AI;DR – This blog post and the script it describes were developed with significant help from Claude. If you don’t want to read “AI slop”, stop reading now.
Some Android settings screens are buried several taps deep, and the one I reach for most often, the WiFi hotspot / tethering toggle, is a particularly annoying example. A while ago I described how to build a single hotspot-shortcut APK on a Linux box without root. That little app did exactly one thing, and it worked well enough that I wanted the same trick for a whole range of settings screens.
build-settings-shortcut.sh is the result: a single, self-contained Bash script that generalizes that original hotspot shortcut to 20 different Settings screens. It produces a minimal Android APK whose only job is to open one specific Settings screen when you tap its icon. There is no UI of its own: the app launches the target settings activity and immediately closes again. You install it like any other app, and it shows up in your launcher with a proper Material Symbols icon and a sensible name.
What it does
The script picks from a list of 20 predefined shortcuts (WiFi, Bluetooth, Hotspot and Tethering, Battery, Developer Options, and so on). For the one you choose it generates a tiny Kotlin Android project, downloads the matching icon, builds a debug APK and hands you the finished file. The generated app tries the ROM-specific internal settings activity first and falls back to a public, documented Settings.ACTION_* intent if that activity does not exist on your device, so it keeps working across different vendors and Android versions.
A few things I deliberately wanted:
- No root. These are ordinary, self-signed debug APKs. You just need to allow installing from an unknown source once.
- No Android Studio and nothing installed system-wide. The script downloads its entire toolchain (a JDK 17, the Android SDK command-line tools, the build tools and platform, and Gradle) into a local directory and uses only that. Delete the directory and your system is back to how it was. It uses the same
toolchain/directory as its sibling script build-webview-app.sh, so if you already ran that one and put the new script into the same directory, the download is skipped here. - Real icons, no bitmaps checked in. Icons are fetched on demand from Google’s Material Symbols repository (Apache 2.0) and cached locally. The single SVG path is transformed into an Android adaptive-icon vector at build time.
Using it
Run it with no arguments for an interactive menu, pass a shortcut slug to build one directly, or use --list to see everything on offer:
./build-settings-shortcut.sh # interactive numbered menu ./build-settings-shortcut.sh bluetooth # build one directly ./build-settings-shortcut.sh --list # table of all 20 shortcuts ./build-settings-shortcut.sh --help # usage
The first run downloads roughly 3 GiB of toolchain; after that the components are cached and reused, so subsequent builds are quick. The result is a file like bluetooth-shortcut.apk that you copy to your phone and tap to install, or push over USB:
adb install bluetooth-shortcut.apk
Requirements and caveats
The script targets Linux on x86_64 with glibc (it checks for this and refuses to run elsewhere, including on musl-based distributions like Alpine). It runs fine under WSL; in fact it detects when the project lives on a Windows-mounted filesystem, where Gradle’s permission handling otherwise fails, and transparently relocates the build to a native filesystem. curl or wget, plus the usual command-line tools, need to be present.
The “primary” settings activity each shortcut targets is an internal class name that vendors are free to rename or remove. When that happens the app falls back to the public intent, which lands you on a closely related settings screen rather than failing. The APKs are signed with both the v1 and v2 schemes so they install cleanly on older and newer devices alike.
Download
The script itself:
If you just want the finished APKs without running anything, here are all 20, prebuilt:
- WiFi Hotspot & Tethering
- WiFi Settings
- Bluetooth Settings
- Display Settings
- Sound & Vibration
- Battery Settings
- Location Settings
- NFC Settings
- VPN Settings
- Airplane Mode
- Mobile Data Usage
- App Manager
- Developer Options
- Accessibility Settings
- Language & Input
- Date & Time
- Security Settings
- Notification Settings
- Storage Settings
- About Phone
These are debug-signed APKs from an unknown developer, so your phone will warn you on install; that is expected. The icons come from Google’s Material Symbols set and are used under the Apache 2.0 licence.
Discussion about this in the corresponding post in the international Delphi Praxis forum.