How to set dns address in android phones?

16 Jul 2014
Ever wondered how setup dns address in android phones. You can do it if your phone is rooted.
You may have a terminal installed with busybox if your phone is rooted. Otherwise install a terminal and gain root permission by typing

su

Then list all the device dns entries using this command

getprop | grep dns

Then set the dns entries by the command

setprop net.rmnet0.dns1  8.8.8.8

Here rmnet0.dns1 is given as an example. This may vary depending on which dns entry you have to choose. 8.8.8.8 is the googles dns server address. Replace it with your choice.



Comments