An Android app that provides quick and easy control over Private DNS (DNS-over-TLS) settings with widgets, Quick Settings tile, and custom DNS provider management.
- Quick Settings Tile - Toggle Private DNS on/off from your notification shade
- Home Screen Widgets - Two widget sizes (1x1 compact and 2x1 with button)
- 10 Pre-configured DNS Providers including Cloudflare, Google, AdGuard, Quad9, and more
- Custom DNS Providers - Add your own DNS-over-TLS providers as you discover them
- One-Tap Toggle - Quickly enable/disable Private DNS
- Provider Selection - Easily switch between different DNS providers
- Persistent Settings - Your selected provider is remembered across reboots
- Android 7.0 (API 24) or higher
- Shizuku - Required for modifying system settings without root
- Install Shizuku from Google Play or GitHub
- Start Shizuku service (via wireless debugging or root)
- Install QuickDNS
- Grant Shizuku permission when prompted
If you prefer not to use Shizuku, you can grant the required permission directly via ADB:
- Enable Developer Options on your Android device
- Enable USB Debugging in Developer Options
- Connect your device to your computer
- Install the app on your device
- Run the following ADB command:
adb shell pm grant com.jphat.quickdns android.permission.WRITE_SECURE_SETTINGSNote: This permission will persist until you uninstall the app. You only need to run this command once after installation.
- Add "Private DNS" tile to your Quick Settings
- Tap once when OFF to enable with your saved provider
- Tap when ON to open provider selection
1x1 Compact Widget:
- Tap anywhere to toggle DNS on/off
- Tap wrench icon to open provider selection
2x1 Large Widget:
- Tap "Toggle" button to switch DNS on/off
- Tap wrench icon to open provider selection
- Open the app or tap the wrench icon on a widget
- Tap "Add Provider" button
- Enter provider name (e.g., "Comodo Secure DNS")
- Enter DNS hostname (e.g., "dns.comodo.com")
- Tap "Add"
- Your custom provider appears in the list with a delete button
Custom providers sync across all widgets and the Quick Settings tile.
- AdGuard - Privacy-focused with ad blocking
- Cloudflare - Fast and privacy-respecting (1.1.1.1)
- Google DNS - Reliable and fast
- NextDNS - Security and privacy with customization
- Quad9 - Threat protection and malware blocking
- LibreDNS - No logging, privacy-focused
- Mullvad - Privacy-focused from VPN provider
- OpenDNS - Cisco's DNS service
- CleanBrowsing - Family-friendly filtering
- Control D - Customizable DNS service
WRITE_SECURE_SETTINGS- Required to modify Private DNS settings (granted via Shizuku)INTERACT_ACROSS_USERS_FULL- Required for Shizuku provider
- Language: Kotlin
- Min SDK: 24 (Android 7.0)
- Target SDK: 34 (Android 14)
- Dependencies:
- Shizuku API for system settings access
- AndroidX AppCompat
- Jetpack Compose (for main activity)
git clone https://github.com/PoppaBuzz/PrivateDNSToggle.git
cd PrivateDNSToggle
./gradlew assembleDebugThe app requires the WRITE_SECURE_SETTINGS permission to modify Settings.Global values:
private_dns_mode- Controls DNS state (off/hostname/automatic)private_dns_specifier- Sets the DNS-over-TLS hostname
This permission can be granted either through Shizuku (user-friendly) or directly via ADB (one-time setup). Neither method requires root access.
You can also control Private DNS directly from the command line:
# Enable Private DNS with a specific provider
adb shell settings put global private_dns_mode hostname
adb shell settings put global private_dns_specifier dns.google
# Disable Private DNS
adb shell settings put global private_dns_mode off
# Check current DNS mode
adb shell settings get global private_dns_mode
# Check current DNS provider
adb shell settings get global private_dns_specifier"Permission Error: Grant via Shizuku"
- Make sure Shizuku is running
- Grant Shizuku permission in the app when prompted
- Restart the app if needed
- Alternatively, grant permission via ADB (see Installation section)
ADB permission not working
- Verify the command ran successfully (no error output)
- Check that USB debugging is enabled
- Try revoking and re-granting:
adb shell pm revoke com.jphat.quickdns android.permission.WRITE_SECURE_SETTINGS adb shell pm grant com.jphat.quickdns android.permission.WRITE_SECURE_SETTINGS
Widget not updating
- Tap the widget to refresh
- Check that Shizuku is still running
Custom provider not working
- Verify the hostname is correct (should be DNS-over-TLS hostname)
- Check your internet connection
- Some providers may not work on all networks
This project is licensed under the MIT License - see the LICENSE file for details.
- Shizuku by RikkaApps
- DNS provider information from various public DNS services
Contributions are welcome! Please feel free to submit a Pull Request.