I am trying to test out Admob for an app on my phone. But I have absolutely no idea what is blocking my ads. My phone is rooted, but I don't have any ad-blocking software. I did have AdFree, but then I restored my phone. So what's doing it? My ads are definitely being blocked because I have gone on several websites with ads, and they don't show up.

  • 1
    Could you share what ROM you are using? stock? custom?
    – geffchang
    Jul 23, 2013 at 4:21
  • @geffchang I'm just using the stock. The problem is the hosts file. It's full of ad_website.com I tried the Ad Block Remover, but it didn't work (or i'm not doing it right, idk).
    – Geore Shg
    Jul 23, 2013 at 4:40
  • This is my problem: androidforums.com/transformer-prime-all-things-root/…
    – Geore Shg
    Jul 23, 2013 at 4:45
  • Why did you mark my answer as Answer? Did it fix your problem already?
    – geffchang
    Jul 23, 2013 at 5:13
  • 1
    @geffchang. Didn't mean to.
    – Geore Shg
    Jul 23, 2013 at 5:19

3 Answers 3


Well after an hour of searching around for how to revert the hosts file, I gave up. (I kept having permission denied errors). So I downloaded AdFree again (turns out that's what I had before) and clicked "revert".

  • Did it show the ads? :)
    – geffchang
    Jul 23, 2013 at 5:21
  • @geffchang Yep. Ads started showing up on my app.
    – Geore Shg
    Jul 23, 2013 at 5:43
  • Safe to mark your own answer as Answer then. :) Did you have to restart?
    – geffchang
    Jul 23, 2013 at 6:21
  • 2
    @geffchang Can't accept my answer till tomorrow. No I didn't have to restart
    – Geore Shg
    Jul 23, 2013 at 21:17

Are you using a custom ROM? It may have adblock enabled behind the scenes.

As a work-around, try the Ad Block REMOVER.


Looking at what the app does, and the fact that it needs Root, it looks like one of the methods that it uses to block ads is to make changes to the device's central hosts file.1 2

This changes the way that DNS works on the device so that any requests by an app to connect to certain internet servers are given a bogus IP address, and the attempt to talk to the ad serving server fails.

In fact it looks like AdFree downloads and uses the MVPS list of HOSTS file entries list of host file entries (the file is available for download here).

Based on that I would assume that what's happened is that when you were using AdFree it downloaded that list of HOSTS file entries and saved them into the central HOSTS file on your phone (this would require root access), but when you uninstalled the app it didn't undo the changes it made to the HOSTS file.

If you just want to be able to connect to AdMob servers to test your app then you could edit your HOSTS file to remove just Google's Admob servers from the list, it looks like they're all called something.admob.com. Alternatively you could edit your HOSTS file and remove all entries from it that point to 127.0.01, which should set you back to a default setup, with nothing being blocked. More on editing your hosts file here: Guide to editing /etc/hosts.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .