Guest pulser Posted December 5, 2009 Report Posted December 5, 2009 (edited) I have managed to get OpenDNS to work on my hero by typing the following commands from adb. setprop net.rmnet0.dns1 208.67.222.222 setprop net.rmnet0.dns2 208.67.220.220 setprop net.dns1 208.67.222.222 setprop net.dns2 208.67.220.220 And these settings can be verified by "getprop ¦ grep dns" Also, browsing to WWW.opendns.com/welcome indicates the phone is using the dns correctly. The issue us that the settings do not last through a disable and enable of mobile internet from the home screen. I am looking to make a new boot.img with these commands in init.rc., but that would only enable them at bootup. When I enable or disable the internet, the default settings return, but I can re-run the commands and get OpenDNS back. So... my question is could someone (maybe Paul) let me know if the toggle network button runs a script, and if so, where it is located. I think we are really close to getting this properly working, and web surfing seemed noticeably snapping with less time waiting before loading begins. If I could edit the aforementioned script to run this command, that could be this sorted for everyone. Or, if there is another way to run this command, I would really appreciate a hand. If I get it working, I will try and post a modified boot.img / other files necessary asap. Hope someone can help. Sorry for poor typing - sent from my hero. EDIT: Oh, and no credit taken for the commands used, found them on a post either here or on xda. Can't find it now but props to whoever found it. Edited December 5, 2009 by pulser
Guest stevenz Posted December 5, 2009 Report Posted December 5, 2009 I have managed to get OpenDNS to work on my hero by typing the following commands from adb. setprop net.rmnet0.dns1 208.67.222.222 setprop net.rmnet0.dns2 208.67.220.220 setprop net.dns1 208.67.222.222 setprop net.dns2 208.67.220.220 And these settings can be verified by "getprop ¦ grep dns" It's largely Linux based, is there not a resolv.conf equivalent or something?
Guest pulser Posted December 5, 2009 Report Posted December 5, 2009 It's largely Linux based, is there not a resolv.conf equivalent or something? Unfortunately not. File does not exist. The closest I've found is /etc/dhcpcd/dhcpcd-hooks/20-dns.conf, and it seems to only do WiFi. I have had no luck in finding out what the homescreen widget that turns on and off the internet does, but my hope is that it executes a batch file or equivalent, which could have the original commands used every time the connection is turned on. Either that or a way to force a setprop value and block future changes to it.
Guest stevenz Posted December 6, 2009 Report Posted December 6, 2009 Unfortunately not. File does not exist. The closest I've found is /etc/dhcpcd/dhcpcd-hooks/20-dns.conf, and it seems to only do WiFi. I have had no luck in finding out what the homescreen widget that turns on and off the internet does, but my hope is that it executes a batch file or equivalent, which could have the original commands used every time the connection is turned on. Either that or a way to force a setprop value and block future changes to it. Just digging through the properties, and there's also; [dhcp.tiwlan0.dns1]: [10.0.1.1] [dhcp.tiwlan0.dns2]: [] [dhcp.tiwlan0.dns3]: [] [dhcp.tiwlan0.dns4]: [] WiFi DNS only obviously, and in this case 10.0.1.1 on my network has a local caching DNS server which forwards lookups to OpenDNS anyway. Annoyingly there also appears to be no way to set a WiFi proxy even via setprop. The on/off toggle might just be sending an echo to one of the devices in the shell which does the hard work. I've had a poke around in the filesystem and can't see anything that looks very hopeful. You could possibly just do an IP substitution in the /system/etc/hosts file. Interestingly, nslookup appears to be a bit broken, it can't find the current DNS to do lookups against, always returns it as 0.0.0.0
Guest keyra74 Posted December 6, 2009 Report Posted December 6, 2009 google has his own dns now :D 8.8.8.8 and 8.8.4.4
Guest obelisk79 Posted December 6, 2009 Report Posted December 6, 2009 (edited) couldn't you set the properties from the init.rc? Edited December 6, 2009 by obelisk79
Guest pulser Posted December 6, 2009 Report Posted December 6, 2009 (edited) I will try init.rc, but I think it will stop working as soon as a connection is made, since that seems to be when the setting is overridden. I take it there is no way to force a setprop to not be overwritten after it is set. I use mcr 2.9 and heard about the nslookup issue. I can find out the default dns if it helps anyone, but I guess it comes in by dhcp. Edited for Spelling. Edited December 6, 2009 by pulser
Guest iken Posted March 6, 2010 Report Posted March 6, 2010 Think about 3G Watchdog. There must be a way to monitor rmnet status.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now