Google today decided to remove the popular Adblocking Apps like Adblock Plus and Adaway from their app store, Google Play Store. The reason for which is cited to be that such apps violate the section 4.4 of the Developer Distribution Agreement. You can view the section 4.4 below.
4.4 Prohibited Actions.
You agree that you will not engage in any activity with the Market, including the development or distribution of Products, that interferes with, disrupts, damages, or accesses in an unauthorized manner the devices, servers, networks, or other properties or services of any third party including, but not limited to, Android users, Google or any mobile network operator. You may not use customer information obtained from the Market to sell or distribute Products outside of the Market.
These apps were just as famous as their Desktop counterparts (Adblock Plus addon) and their removal has brought an outcry among users. Here we show you an alternative which can be used by Rooted Android Users.
I hope you are aware of the presence of Hosts File in your intelligent systems. If not this is how Wikipedia describes the hosts file:
The hosts file is a computer file used by an operating system to map hostnames to IP addresses. The hosts file is a plain text file, and is conventionally named hosts.
Err.. ignore that ‘computer file’ part since this file is now present on Mobile devices too, Since Android uses Linux as base this file ought to exist. So what this Hosts file in short does is to redirect hostnames like Google.com to their IP address (126.96.36.199).
What we will be doing is redirecting all (well not all) hostnames which serve Ads in our mobile to 127.0.0.1 (localhost). Hence nullifying their requests and blocking the ad serving in the process.
Well this is the basic structure of a hosts file:
# Some text which are comments will be present here 127.0.0.1 localhost ::1 localhost
In Android, hosts file is present in the “/etc/” or “/system/etc/” folder and as you might have assumed this is inaccessible for non rooted users, So once you have rooted your device proceed with the steps or skip to the ending where you can download the APK file of AdBlock Plus or AdAway App.
How to Block Ads on Android with Hosts File.
Step 1. Install Root Browser Lite app on your device. [Google Play]
Step 2. Open the application and navigate to /etc/ or /system/etc/ folder on your Internal storage (Not SD Card).
Step 3. Look for a file named Hosts (doesn’t have a file extension like .txt etc), Copy it to your SD Card (for backup) then delete it from the original location.
Step 5. Extract the Zip file and transfer the Hosts file to your device and paste it in place of your original Hosts file i.e /etc/ or /system/etc/.
Step 6. Reboot your android.
BSDgeek_Jake is doing a very commendable task by keeping the Hosts file updated by issuing regular updates via the XDA Forum Post. I suggest you register on the Forum and subscribe to the post. I will do my job and try to update the mirror whenever he issues a new update.
Google a few days ago had blocked Adblock Plus from running on their Android 4.2.2 by blocking the way the App modifies the Proxy settings on the device rendering the app unusable, But you can make the app work by manually tweaking the Proxy setting for each network you connect to. It is described here : Proxy Configuration.
Adblock Plus and Adaway APK files.
Adblock Plus APK can be downloaded from their website here : Adblock Plus Android.
Adaway APK can be download from the Fdroid repository here : Adaway APK.
Hope this has helped you in evading Ads on your mobile device, Remember to share this article with your friends on Facebook and Twitter!