Skip to content

Instantly share code, notes, and snippets.

@anhhp0
anhhp0 / adb-dns.bat
Last active September 12, 2023 16:39 — forked from sharunkumar/adb-dns.bat
Enabling / Disabling private DNS in android via ADB
rem to disable private dns
adb shell settings put global private_dns_mode off
rem to enable private dns with hostname (example with dns.nextdns.io)
adb shell settings put global private_dns_mode hostname
adb shell settings put global private_dns_specifier dns.nextdns.io
rem or with yourID
adb shell settings put global private_dns_specifier yourID.dns.nextdns.io
rem or with yourID, Identify your devices
adb shell settings put global private_dns_specifier DeviceName-yourID.dns.nextdns.io