All Discussions
  • Tech Help
  • Change DNS Via ADB

Started by lamden613 · Jul 13, 2023

anyone know how to change the dns via adb (or alternative means) on a phone where there is no factory option
specifically the Kyocera E4610 (NO YOU CANNOT access it through hiden settings)

i have found the following but cannot figure out
rem to disable private dns
adb shell settings put global private_dns_mode off

rem to enable private dns with hostname (example with dns.adguard.com)
adb shell settings put global private_dns_mode hostname
adb shell settings put global private_dns_specifier dns.adguard.com

https://gist.github.com/sharunkumar/b6195cbbd26a0039ec87fbd3829aa6b3

This is the code needed to change the DNS settings. Just connect your N1 to your PC and open command in your PC then;

adb shell setprop net.dns1 8.8.8.8

adb shell setprop net.dns2 8.8.8.4

https://forum.xda-developers.com/t/q-help-changing-dns-settings.636560/

Biden2020prez they failed to work (Kyocera E4610).
Also which ones the first option or second?

Biden2020prez

lamden613 I dont know. i never did this. im just giving a hint because it looks like a batch script

Techgen

lamden613 Try
adb shell settings put global dns1 DNS_SERVER_IP_ADDRESS
Replace "DNS_SERVER_IP_ADDRESS" with the actual IP address of the DNS server you want to use.
To verify if the DNS settings have been changed, type
adb shell settings get global dns1
You should see the new DNS server IP address displayed.
Some phones might not let changing dns without root

Biden2020prez

Techgen Some phones might not let changing dns without root

DNS Adblockers don't work on some phones?

Techgen

Biden2020prez It should work on any standard Android phone, im just not sure if these AOSP Kyoceras are more locked down by default