There even seems to be specific domains for mobile ad servers (like admob.com)...
You might even be aware of MVPS' famous, frequently updated hosts file & update utility for the PC, that protects your from 16-odd thousand ad servers and malware hosts.
There also seems to be a number of sources for potential hosts files:
etc. (some individual ad servers are merely mentioned in forums here and there)
Having a read in the Android forums, I've discovered that there is an app for updating your hosts file on your mobile - AdFree - however it seems fraught with issues and slow on updates.
...and who knows where AdFree is getting it's hosts from... does it provide the best possible coverage?
There also seems to be an issue when you use the wrong type of linebreaks in the hosts file on an Android device...
The only solution is to do it yourself - make an uber hosts file! :)
I quickly threw together a small Java app that can take a number of hosts files, and merge them, eliminates duplicates, eliminates comments, eliminate unnecessary spaces, ensures correct linebreaks, and validate line entries.
Download: requires Java 1.5 RTE or higher
Uber hosts file already merged from the above sources and ready to use, dated 22 Dec 2010
How it works:
Collect an up-to-date set of hosts files from your favourite providers, extract the individual hosts files into one folder (e.g.: c:\temp\hosts\), and rename each file to "hosts.?", e.g.: hosts.1, hosts.2, hosts.3, etc.
Then run the MergeHosts application, supplying the location of the folder containing all your hosts files:
java -cp "c:\temp\MergeHosts.jar" com.ri.hosts.MergeHosts "c:\temp\hosts"
Output looks like this:
MergeHosts - looking for "hosts.*" files in: c:\temp\hosts Found hosts files: hosts.1 hosts.2 hosts.3 hosts.4 hosts.5 Processing: hosts.1 14896 domains successfully extracted, with 0 collisions Processing: hosts.2 20809 domains successfully extracted, with 13478 collisions Processing: hosts.3 1302 domains successfully extracted, with 571 collisions Processing: hosts.4 2748 domains successfully extracted, with 2555 collisions Processing: hosts.5 3 domains successfully extracted, with 3 collisions DONE! Final hosts file: c:\temp\hosts\hosts.final Size: 667KB
You can now locate the new uber hosts file: hosts.final, which you can use on your Android device or on your PC!
On Android: requires rooted phone
The hosts file is located on a part of the file system which is read-only, and you will have to mount it as read-write to be able to copy the uber hosts file into place.
Copy the hosts.final file into the root of your SD card
Open your Android shell / console / terminal emulator (you can find them in the market if you don't have one, I'm using Terminal Emulator 1.0.16)
Enter the following commands:
su mount -o remount,rw /dev/block/mtdblock3 /system mv /etc/hosts /etc/hosts.bak cp /mnt/sdcard/hosts.final /etc/hosts chmod 644 /etc/hosts mount -o remount,ro /dev/block/mtdblock3 /system ls -l /etc/hosts
Depending on what root-access mechanism you have on your Android distro, you might be prompted to grant Terminal Emulator super user privileges.
Reboot if you are paranoid.
Open your C:\WINDOWS\system32\drivers\etc folder
If you already have a hosts file, rename it to hosts.bak
Copy the new hosts.final uber file into your C:\WINDOWS\system32\drivers\etc\ folder, and rename it to hosts (no extension).
Test it: you might have to restart your browser after putting the uber hosts file in place before this will work
Locate any entry in the hosts.final file and open it in your PC's browser / Android browser. E.g.: http://00fun.com
If you get "unable to connect", then its working!
I'm sure AdFree is an awesome app, and the most recent version thereof might not be fraught with anything – give it a try if you want... but doing it yourself is always more fun :P