How to filter ads on your G1

krweby

Senior Member
Oct 26, 2010
280
84
48
Indeed it seems that in the last couple of weeks the hosts file went from perfect to almost useless. It is almost as if the ad peddlers had "tweaked" the host file.

Checking the site (http://msmvps.com/blogs/hostsnews/default.aspx), the problems seem to have started with the 15th June update. I'm tempted to download the May version to see if it still works.
I manually installed the hosts file from the 15th and it fix it. Might just uninstall adfree and just check every once in a while.
 

jbbandos

Senior Member
May 26, 2010
1,349
319
103
Brussels
I manually installed the hosts file from the 15th and it fix it. Might just uninstall adfree and just check every once in a while.
That makes sense with what I see on my custom ROM, as I add that hosts file when cooking it I see no ads until adfree asks for an update. This points to adfree now using a different source for its hosts file.
 

JimmyLeeBillyBob

Senior Member
Apr 4, 2011
65
5
0
I've uninstalled adfree because it wasn't working (latest version). I downloaded the hosts file (http://www.mvps.org/winhelp2002/hosts.txt) and put it in place of "/data/data/hosts". I also checked the sysmling to /system/etc/hosts which works fine. Then I rebooted the phone to clear the dns cache.
I still see ads left and right. It seems almost as if the hosts file is ignored. It appears it's not even used for dns lookups.

I'm on CM7 RC1 running on a LG 990 (Optimus x2).

Does anyone know what's going on here or has any inside on this?
 

jbbandos

Senior Member
May 26, 2010
1,349
319
103
Brussels
I've uninstalled adfree because it wasn't working (latest version). I downloaded the hosts file (http://www.mvps.org/winhelp2002/hosts.txt) and put it in place of "/data/data/hosts". I also checked the sysmling to /system/etc/hosts which works fine. Then I rebooted the phone to clear the dns cache.
I still see ads left and right. It seems almost as if the hosts file is ignored. It appears it's not even used for dns lookups.

I'm on CM7 RC1 running on a LG 990 (Optimus x2).

Does anyone know what's going on here or has any inside on this?
I gave up on /data/data/hosts, now I only place the file in /system/etc/hosts. It seems to work better like that.
 

jbbandos

Senior Member
May 26, 2010
1,349
319
103
Brussels
I now have a copy of the hosts file in both paths /data/data/ and /system/etc/. To be sure it's not a caching issue I rebooted my phone. Still, I get ads. This is very strange.
I've checked the plugin I am using with the dsixda kitchen to get the hosts file, and it is using also a second source, "http://pgl.yoyo.org/adservers/serverlist.php?showintro=0;hostformat=hosts", which it then combines with the one in the OP, sorting them and eliminating duplicates. The plugin was written by Mr. X- AKA Juggalo_X, and claims to use the same databases that adfree does.
 

JimmyLeeBillyBob

Senior Member
Apr 4, 2011
65
5
0
No, but I did try each file individually. It should have blocked ads at least once, I believe.

@sgsI9003: Please post the file, it's called "hosts" and should be located in /data/data/. Thanks!
 

gpz1100

Senior Member
Nov 28, 2009
3,053
581
0
I think it's BigTinCan's ip address... the idea was to point to a tiny image for any 404 encountered error. I think this has since been disabled on their service, but the ad blocking still works well.
 

JimmyLeeBillyBob

Senior Member
Apr 4, 2011
65
5
0
Thanks. Tried your hosts file but still I get ads. This is really weird.

edit: Nevermind. I think this works. I just added "208.82.100.156 mobfox.com" for this one particular app and now I think I'm good. Thanks again.
 
Last edited:

duckredbeard

Senior Member
Aug 21, 2010
1,432
189
0
So how do we revert to previous host files? I see a few references, but no details. Is there a walkthrough to get around the latest update?
 

JimmyLeeBillyBob

Senior Member
Apr 4, 2011
65
5
0
I use a file erplorer and/or a terminal emulator on my phone. You'll also need root access. If you have those you can just download a hosts file and replace the original hosts file located in /data/data/.

I still get ads in the Accu Weather app. Does anyone happen to know the ad-provider url they use?

edit: Got it. It's "amobee.com". But I can't make out the correct hostname to use to block the ads.
 
Last edited:

duckredbeard

Senior Member
Aug 21, 2010
1,432
189
0
I've got terminal emulator, but have never used it. No idea where to start with that. Where would I get the download?

My last Intruder was a Grumman A-6E.
 

JimmyLeeBillyBob

Senior Member
Apr 4, 2011
65
5
0
Easiest way is probably this:
1. root your phone
2. get super manager (https://market.android.com/details?id=gpc.myweb.hinet.net.TaskManager&feature=search_result)
3. get a hosts file (such as the ones posted here)
4. copy the hosts file to the phone's sdcard
5. use super manager's file explorer to navigate to your sdcard and copy the hosts file (long press on the file -> copy)
BE VERY CAREFULL WHEN AT THIS POINT AND BEYOND:
6. navigate to the root folder ("/") then navigate to /data/data/ (if it asks for root permissions -> yes, if it asks for a remount in r/w -> yes)
7. rename the original hosts file to hosts.save (long press -> rename)
8. paste the copied file (use the clipboard icon on the bottom when you're still in /data/data/)

You might need to reboot to empty the dns cache. I have yet to find a flushdns-command.

That should do it.
 
Last edited: