Where is the Hosts File in Android?

Search This thread

CharlieSummers

Senior Member
Mar 6, 2011
119
8
Strange...all of a sudden, my hosts file isn't being honored. Domains I know are in there resolve and display.

Is there an upper size limit on these things? I thought maybe the line feeds were wrong, but it cat's ok in a term, so I think that's ok...
 

bsinclair

Senior Member
Apr 4, 2008
158
5
Question: just bought a LG Optimus Black and I can't make either z4root and gingerbreak to work.

Is there any other way to change the host file without the need to rooting the phone? All I need is to get rid of the damn ads. :(
 

ST3ALTHPSYCH0

Senior Member
May 23, 2011
373
44
Fulton, IN
Vol down is the "ctrl" key in the terminal app (at least the one I use). So it would be Vol down +o to save and then vol down + x to exit.

Also, nano doesn't play well with swype.
 

doktorV

Senior Member
May 14, 2011
64
1
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.

trying to learn how to edit the hosts files from within the phone itself - is it possible to do so with a rooted phone using terminal emulator? if so, any idea how i actually do this please?
 

dwg_priest

Senior Member
Jul 4, 2009
84
9
Does anyone have the default hosts file for android 4.3?

I want to revert it with AdAway and the program gines me an error!
 
Jun 30, 2014
2
0
the host file can be edited using root explorer so you need android root privilege
you need to put # {hash tag} symbol before any ip to fix google play no connection or google account could not connect to server
 

archie4all

Member
Oct 15, 2015
31
4
To replace host file in Android.

1. Download\install Root Explorer.apk
2. Find system/etc/hosts
3. Copy file to your sdcard
4. Plug phone into your computer
5. Drag an drop file to computer/open with notepad/Update host file
6. Replace onto sdcard
7. Use root explorer to copy back to etc folder
 
Last edited:

isDefeated

Member
Apr 28, 2016
25
1
hello all,
i didnt know where to ask this so ill just ask here
i have a note 4 rooted and i downloaded Hosts Editor, and the list of host files is HUUUUUUUUUUUGE there are soo many host files in there, is this normal or is my phone infected?

i have some hosts named:
banners.bigmobileads.com
log.hiir.com
w w w freeonesscams.com
etc..

can i clean it somehow?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    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.
    1