Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,782,463 Members 39,903 Now Online
XDA Developers Android and Mobile Development Forum

custom Hosts file | 3/6/2010 | 14,714 ads, banners, 3rd party Cookies GONE!!

Tip us?
 
phiqtion
Old
(Last edited by phiqtion; 7th March 2010 at 12:22 AM.) Reason: file upload!
#1  
Junior Member - OP
Thanks Meter 1
Posts: 16
Join Date: Nov 2009
Post custom Hosts file | 3/6/2010 | 14,714 ads, banners, 3rd party Cookies GONE!!

What it does..

The Hosts file contains the mappings of IP addresses to host names. This file is loaded into memory at startup, then Android checks the Hosts file before it queries any DNS servers, which enables it to override addresses in the DNS. This prevents access to the listed sites by redirecting any connection attempts back to the local (your) phone. Another feature of the HOSTS file is its ability to block other apps from displaying ads (not all).

How to install..
unzip..
transfer hosts file to the tools folder of your sdk installation
open terminal with android connected and adb drivers installed
cd C:\android-sdk-windows\tools
adb remount
adb push hosts /system/etc
exit

..or simply use Root Explorer

You are now protected against 14,714 ads, banners, sites and 3rd party Cookies

works on any 1.5 ROM, not sure if 1.6, 2.0 or 2.1 since i only use cupcake
Attached Files
File Type: zip hosts.zip - [Click for QR Code] (105.6 KB, 1477 views)
 
Gregalous
Old
#2  
Senior Member
Thanks Meter 2
Posts: 340
Join Date: Jan 2010
Location: The Colony, Texas
Awesome! I will test it out on 2.1 right now!

EDIT: There's no download link though lol. As soon as there is one, I will test it out on 2.1!
 
phiqtion
Old
#3  
Junior Member - OP
Thanks Meter 1
Posts: 16
Join Date: Nov 2009
Quote:
Originally Posted by Gregalous View Post
Awesome! I will test it out on 2.1 right now!

EDIT: There's no download link though lol. As soon as there is one, I will test it out on 2.1!
sorry for that, file is now uploaded! let us know if it works on 2.1. I'm not sure if 2.1 stores the hosts file in system/etc still.
 
derekstory
Old
(Last edited by derekstory; 7th March 2010 at 12:07 AM.)
#4  
derekstory's Avatar
Senior Member
Thanks Meter 31
Posts: 325
Join Date: Jan 2010
Location: Cartersville, GA
Installed on quietcblongs AOSP 1.6 and it installed without a hitch. went to popupcheck.com and it passed all the popup test. So it seems to be working on my end.

edit: Also blocks ads on some of my apps
 
phiqtion
Old
#5  
Junior Member - OP
Thanks Meter 1
Posts: 16
Join Date: Nov 2009
Quote:
Originally Posted by derekstory View Post
Installed on quietcblongs AOSP 1.6 and it installed without a hitch. went to popupcheck.com and it passed all the popup test. So it seems to be working on my end.

edit: Also blocks ads on some of my apps
were these test failing before using my custom hosts file?
 
athlet1c
Old
#6  
athlet1c's Avatar
Senior Member
Thanks Meter 24
Posts: 467
Join Date: Aug 2007
Location: City Near You

 
DONATE TO ME
Not sure wish I had of tested before installed for the popup blocker. I do know some apps still have adds where it appears 1 doesn't
 
auxny
Old
#7  
Member
Thanks Meter 0
Posts: 50
Join Date: Sep 2009
Location: Easton

 
DONATE TO ME
can i still surf the 18+ sites with this shiz?
 
wcgbmd
Old
#8  
Member
Thanks Meter 0
Posts: 83
Join Date: Dec 2009
Tip:If you open the hosts file with notepad you can see all of the blocked stites
 
phiqtion
Old
#9  
Junior Member - OP
Thanks Meter 1
Posts: 16
Join Date: Nov 2009
Quote:
Originally Posted by auxny View Post
can i still surf the 18+ sites with this shiz?
Yes you can, it only blocks ads and risky sites. Those sites you mentioned are full of ads, so with this file they will actually load faster.
 
zswilkinson
Old
#10  
Member
Thanks Meter 1
Posts: 42
Join Date: Feb 2008
Is there anyway to use this to change what DNS is used? I'd like to set it to OpenDNS.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Moto G 4G Receives Official CyanogenMod 11 Love

When theMoto Gwas initially released to the world in November of last year,very few actually … more

Get Your Tasks Organized on Android Wear with Agenda Wear

Having a checklist of things you need to do is something we all can find useful at … more

Top 5 LG G3 MODs – XDA Developer TV

The LG G3 has been LG’s breakout hit of the summer. Using their knowledge frombuilding some … more

Make Your Calendar Widget Beautiful with Month

For some of us, summer vacation is alreadyover. For those getting ready to school, work, or … more