I was wondering how to set DNS server on my Android Phone’s Network.
Now, i found it, it’s simple just like we set DNS Server on Linux.
You’ve got to choose your fav. DNS, (i think there’s 2 best : Google DNS and OpenDNS), so it’s your choice
Ok, if you already have resolv.conf before on your /system/etc/, we just need to set DNS server that you like..
echo "nameserver 188.8.131.52" > /system/etc/resolv.conf echo "nameserver 184.108.40.206" > /system/etc/resolv.conf
On that example above, i set DNS Server for Google DNS. But, if you like to set Open DNS, you should change the IP address to 220.127.116.11 and 18.104.22.168
and what if there’s no resolv.conf on my /system/etc?
Ok, here we go..for 1st step, we need to make a file “resolv.conf” on /system/etc on your Android OS.
Maybe you could use ADB shell, i think.
adb shell [enter] su [enter] mount -o remount, rw /system [enter] cat > /system/etc/resolv.conf [enter] nameserver 22.214.171.124 [enter] nameserver 126.96.36.199 [enter] [ctrl+C]
Ctrl+C used for exit from editing file resolv.conf and exit from adb shell.
At last, we just need to set permissions “resolv.conf” to rw-r–r–, just type this command :
chmod 4755 /system/etc/resolv.conf
done..reboot your phone and goodluck!