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 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.
Note
The app does not create an app drawer icon, as it is meant for use through the Quick Settings panel.
By long-pressing the Quick Settings tile, you can access the configuration menu to:
- Custom DNS Provider: Set a custom hostname for Private DNS (e.g.,
dns.adguard.com). - Wi-Fi Blocklist: Automatically disable Private DNS when connected to specific Wi-Fi networks.
- Auto-Update Blocklist: Optionally add or remove the current SSID from the blocklist automatically when manually toggling the Quick Settings tile.
- Status Notifications: Receive notifications when Private DNS settings are automatically adjusted.
- Dynamic Tile Labeling: Rename the Quick Settings tile label via the settings menu.
- Install the app on your Android device.
- Grant the
WRITE_SECURE_SETTINGSpermission using root 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!
- ADB Command Fails: Ensure USB Debugging is enabled in Developer Options, and that your device is recognized by running the
adb devicescommand. - Tile is Grayed Out: This usually means the permission was not granted correctly. See the warning above.
- WRITE_SECURE_SETTINGS: Required to modify system Private DNS settings. Must be granted via root or using ADB.
- Location & Nearby Devices(optional): Required only for Wi-Fi Blocklist 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.
You can build the app yourself by opening this project in Android Studio or by running ./gradlew assembleDebug using your prefered command line tool.




