A tiny Android app that allows you to easily toggle your phone's Private DNS through the Quick Settings panel.
Warning
To modify the Private DNS system settings, this app requires the WRITE_SECURE_SETTINGS permission. Since this is a protected system permission, you must either have a rooted device, use Shizuku (no PC or root required after a one-time setup), or manually grant the permission using ADB.
If your device is not rooted, you can grant the required permission by connecting your phone to a computer with USB debugging enabled and running the following ADB command:
adb shell pm grant com.ericlowry.dnstoggle android.permission.WRITE_SECURE_SETTINGSAdds a Quick Settings tile to toggle your Private DNS on and off with a single tap from your notification shade.
By long-pressing the Quick Settings tile, you can access the configuration menu to:
- Custom DNS Provider:
Set and label one or more custom Private DNS hostnames you can easily toggle between (e.g.,dns.quad9.net).- Optional automatic DNS hostname reachability check.
- Automatically detects your active system DNS so you can easily save it to your list.
- Wi-Fi Profiles:
Automatically set or disable Private DNS when connected to specific Wi-Fi networks, including options to:- Auto-save changes to a Wi-Fi network profile when you manually toggle DNS or switch hostnames.
- Automatically disable Private DNS for the current network if it causes connectivity issues, ensuring you never lose internet access.
- VPN Override:
Automatically set a specific DNS hostname or switch to "Opportunistic" (Off) mode when a VPN connection is detected. - Material You UI:
Modern, dynamic interface that adapts to your system theme and accent colors (Android 12+). - Backup & Restore:
Export and import your configuration via password-encrypted.dnstogglefiles.Note: For security, your encrypted hostnames and Wi-Fi profiles are excluded from cloud backups and must be transferred manually.
- Dynamic Tile Labeling:
Rename the Quick Settings tile. - Hide App Icon:
Optionally hide the app from your launcher drawer to keep your home screen clean. - USB Debugging Tile:
(Requires Developer Mode) Tap the app version number at the bottom of the settings menu 5 times in quick succession to add a USB Debugging Quick Settings tile. - App Shortcuts:
Includes app shortcuts to toggle Private DNS or open the quick-sepect/settings menu.
- Install the app on your Android device.
- Grant the
WRITE_SECURE_SETTINGSpermission using root or Shizuku (you will be prompted when using the app), or the ADB command provided above. - Edit your Quick Settings panel and drag the DNS Toggle tile into your active tiles.
- Long-press the tile to open the configuration UI to set your custom DNS hostname.
- Tap the tile to toggle the Private DNS on or off!
Note
Saved data may disappear
Android's secure Keystore protects your saved Wi-Fi networks and hostnames. If you change your device's lock screen PIN, pattern, or biometric settings, Android may delete the stored data.
This encrypted data cannot be transferred to another device via the default Android cloud backup. Please use the app's built-in Export feature before migrating devices.
If you encounter issues not covered here, please open a support ticket.
- ADB Command Fails:
Ensure USB Debugging is enabled in Developer Options, and that your device is recognized by running theadb devicescommand. - Tile is Grayed Out:
This usually means the permission was not granted correctly. See the warning above. - Custom DNS is marked as "Unreachable":
Some strict DNS providers block automatic connection tests. If you are certain the address is correct, you can enable theSkip connection testoption. - "Unknown SSID" or Automation fails:
- Ensure Location Permissions are set to "Allow all the time". Android requires this to identify Wi-Fi networks in the background.
- Active VPNs or "Private DNS" settings on some devices can mask the SSID.
- Some devices aggressively kill background apps. If automation stops working, you may need to disable
Battery Optimizationsor enableAutostartfor DNS Toggle in your system settings.
- WRITE_SECURE_SETTINGS:
Required to modify system Private DNS settings. Must be granted via root, Shizuku, or using ADB. - INTERNET (optional):
Used to verify that your Custom DNS Provider is online and reachable before applying it. - Location & Nearby Devices (optional):
Required only for Wi-Fi Profiles automation. Used to identify the Wi-Fi network name (SSID) locally. - Notifications (optional):
Used for status alerts when Private DNS is automatically adjusted.
This app is a shortcut for existing system settings. It does not store, collect, or share any personal data. All permission-related activities (such as reading the Wi-Fi SSID) occur strictly on-device for automation purposes.
Contributions are always welcome! Whether you want to add a new feature, fix a bug, or help translate the app into your native language, please check out our Contributing Guidelines to get started.
This includes the app description and changelogs displayed on F-Droid and IzzyOnDroid.
This project is licensed under the MIT License.




