I love owning an Android phone. It’s becoming the smartphone of choice because it’s open, but also managed by a big enough entity that it has the funding to innovate and improve. It was annoying, then, to find that there was no way in the device settings to choose my DNS server for mobile data. This post partly answers that problem.
Using WiFi, it was easy to specify custom static DNS along with static IP settings, but no such options exist for 3G and Edge connectivity. Considering the amount of data I consume on the device and the provider I’m with, I definitely want to specify my own for reliability and performance reasons. A quick Google search led me to the right answers, and I’m partway towards my solution. The following steps require root access on your device.
For temporary testing with specific DNS servers, open up adb (or in a root terminal on the phone) and type the following lines in:
setprop ro.kernel.android.ndns 2
setprop net.dns1 208.67.222.222
setprop net.dns2 208.67.220.220
The above uses OpenDNS servers, if you just want to copy and paste it. If you used OpenDNS, try browsing to the OpenDNS Welcome page or the phishing protection demonstration to test if the DNS settings work (you may need to restart the application, or clear the cache).
Congratulations, you’re using your own custom DNS on your phone! The issue here, however, is that once the phone reboots, these settings are lost. The true place to put these settings are in the init.rc on the phone, but that requires editing the system image used when booting the phone, which is above and beyond the effort required just to change settings. I’m still looking into an alternative place to put these settings to be entered at boot, and I’ll update this post when I do.
Welcome to Mishmash & Bash, my personal blog. Over the next few weeks, I’ll likely begin filling this site up with content, but until then, there’s not much to see.
I’ve decided to start this blog out of necessity. As I develop A Little Kitchen into a full-fledged cooking blog with Rebecca, I do at times need to record some of my technical (behind the scenes) production work. Sometimes I’d like to share some sort of tip I’ve used on my home server, or I’ve found something really neat online to share with you.
Continue reading ‘Hello world.’