There isnt really a hosts file in Android/linux* -- the closest thing is called iptables as mentioned above
*(not in the way Windows has a hosts file, the linux hosts file does not perform the same task as the windows one does)
there really is a hosts file capability in android, and it does really perform the same task as hosts in windows
simply create a HOSTS file according to the standards and place it here:
/system/etc/hosts
There is fantastic Open Source for managing it, most recently AdAway
Code:
code google com p ad-away
(dot dot slash slash)
HOSTS was not designed to
BLOCK resolution, but it can be used for this purpose. An overly large HOSTS file can lead to unpleasant results
YES!!!
iptables
DroidWall uses iptables to control internets access by application
f-droid.org /repository/browse/?fdid=com.googlecode.droidwall
but iptables can be tasked to block ads from ip addresses
nixcraft.com /getting-started-tutorials/1427-iptables-block-ip-address.html
bodhizazen.net /Tutorials/iptables
for more root control over apps consider also installing
DroidWall
LBE Privacy Guard
Permissions Denied
AdAway
+1 * 1000
Stir in
SetDNS
and elect to use
FoolDNS for wifi and 3g
ALL adware is by definition malware.
For additional malware blocking goodness someone needs to fork cyanogenmod to actually-include the code suggestion to report bogus data to apps according to the permissions you wish to spoof instead of block.
one's privacy is NEVER a commodity
For more
iptables information read up on
netfilter and the various android
KERNEL requirements. You might experience "
multiport" errors with current builds of iptables for android.
Code:
code google com p iptables4n1
(dot dot slash slash)
malware applications ARE NOT free applications
the less malware is tolerated, the less malware there will be