Check Your I/O Usage with Iotop for Android

Ever needed to check the I/O usage of apps? If so, you probably tried searching for an iotop … more

T-Mobile HTC One M8 Gets Selfie-Friendly Android 4.4.4 OTA

The T-Mobie variant of HTC One (M8) just now received an over-the-air update … more

Android L is for Lockdown

Root is, without a doubt, the (un)holy grail of the Android world. Those wonderful permissions that allow you as … more

XDA Xposed Tuesday: XHangouts Will Improve Your Hangouts

Ever since Google started supporting text messaging in Hangouts many people have … more
Post Reply

Where is the Hosts File in Android?

OP saluk

13th May 2009, 01:25 AM   |  #1  
OP Junior Member
Thanks Meter: 0
 
5 posts
Join Date:Joined: May 2009
In my country some sites have been banned but most of us keep using them in pc's by changing hosts file in \Windows\System32\drivers\etc

adding ip strings like

207.200.100.5 shoutcast.com
207.200.100.5 www.shoutcast.com



I just wonder if there is someway to do this in android? If the answer is yes then my new question is "how"...

Thx for the answers...
13th May 2009, 01:44 AM   |  #2  
Senior Member
Thanks Meter: 24
 
103 posts
Join Date:Joined: Nov 2008
/etc/hosts
The Following User Says Thank You to rub1k For This Useful Post: [ View ]
13th May 2009, 02:51 AM   |  #3  
OP Junior Member
Thanks Meter: 0
 
5 posts
Join Date:Joined: May 2009
Quote:
Originally Posted by rub1k

/etc/hosts


Thx. I reached the file by a file manager app. but i cant open it with notepad apps. Do I need the root privilage?
13th May 2009, 03:53 AM   |  #4  
Recognized Developer
Thanks Meter: 718
 
853 posts
Join Date:Joined: Jan 2007
yes. Just ADB pull it.
13th May 2009, 03:59 AM   |  #5  
grokdesigns's Avatar
Senior Member
Flag Chandler, AZ
Thanks Meter: 4
 
194 posts
Join Date:Joined: Jul 2007
More
Technically it's in /system/etc/hosts, /etc is a symlink.

If you want to edit it, create a hosts file on your SD card and then cp from terminal with root privileges. Or you could adb push it from your computer.
13th May 2009, 12:47 PM   |  #6  
OP Junior Member
Thanks Meter: 0
 
5 posts
Join Date:Joined: May 2009
Smile
thx a lot for the answers. ill try it.
18th April 2010, 09:07 AM   |  #7  
Junior Member
Thanks Meter: 0
 
1 posts
Join Date:Joined: Apr 2010
question
hello there,

i'm a newbie and i don't know anything about programming. and i need a step by step guide to edit the host file. i have reached the file with file manager but i can't edit or replace it.

thanks.
18th April 2010, 10:20 AM   |  #8  
Senior Member
Thanks Meter: 2
 
311 posts
Join Date:Joined: Feb 2008
Should just be a matter of

adb pull /etc/hosts


Which will copy the file to the current directory, then make the necessary changes, then

adb remount
adb push hosts /etc/hosts

Anyone correct me if I'm wrong. If you don't have ADB set up, now would be a good time to do so; searching for "ADB for dummies" should help you with that.
Last edited by gophergun; 18th April 2010 at 10:22 AM.
18th April 2010, 02:40 PM   |  #9  
cloverdale's Avatar
Senior Member
Flag Washington DC
Thanks Meter: 147
 
1,597 posts
Join Date:Joined: Feb 2009
Re: Where is the Hosts File in Android?
I suggest nano if you have a ROM with this included (such as cyanogenmod). Then all you need to do is open the terminal and enter
Code:
 su
nano /system/etc/hosts
In this manner, one can do the edits straight from the phone terminal.
18th April 2010, 04:27 PM   |  #10  
domenukk's Avatar
Senior Member
Thanks Meter: 24
 
807 posts
Join Date:Joined: Jan 2010
More
Or download estrongs file manager, go to settings and set file system to "read write"(its in something like root settings or so). after that you can edit the file

Post Reply Subscribe to Thread

Tags
ban, ban ip, hosts
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes