• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Hosts file for Ad Blocking

Purponic

Well-Known Member
Jun 4, 2011
156
43
I found the hosts file in system/etc and I deleted it and replaced it with one that blocks ads but I'm still getting ads. Did I screw something up or is there another location I have to put it in?

I'm in the process of making my own custom rom to educate myself a lil more on how things run. I'm not trying to steal Shabbys thunder this is being made solely for myself.
 
I found the hosts file in system/etc and I deleted it and replaced it with one that blocks ads but I'm still getting ads. Did I screw something up or is there another location I have to put it in?

I'm in the process of making my own custom rom to educate myself a lil more on how things run. I'm not trying to steal Shabbys thunder this is being made solely for myself.
did you look in /etc?
 
  • Like
Reactions: Purponic
Upvote 0
Yeah thats the one I replaced but its not working. I did it through file expert could that be the problem? Does it need to be pushed through adb instead?
Does file expert have the ability to change system files? I dont use it, I did try es explorer, I think that was the one I tried changing system files and even though they said they changed they never did. now its possible I was not using it correctly, its not one I looked at much and since I had root explorer I just dumped it and used root explorer.
 
  • Like
Reactions: Purponic
Upvote 0
I found the hosts file in system/etc and I deleted it and replaced it with one that blocks ads but I'm still getting ads. Did I screw something up or is there another location I have to put it in?

I'm in the process of making my own custom rom to educate myself a lil more on how things run. I'm not trying to steal Shabbys thunder this is being made solely for myself.


Simple answer. No you did everything right. The problem is the hosts file blocks ip addresses so if an ad is hosted on or coming from an ip address not in the hosts file you're still going to see it.there is no magic filter that can block all ads but you can block a large majority of them.

I hope that info helps.
 
  • Like
Reactions: Purponic
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones