ads

Sunday 23 October 2011

How to Block Ads in Android Browsers and Apps


If you're sick of giant ads taking up space on your tiny phone's screen, there are a number of ways to banish them from your phone. Here's how to do it.
While we generally support advertisements—after all, it's how us Lifehacker writers make our living—they can make browsing annoying on some sites, especially on a such a little screen (and they can make some apps very difficult to use). Which method you use depends largely on whether you're rooted or not, so we've rounded up the two best methods for blocking ads on your phone.

For Rooted Phones: AdAway

By far the best ad blocking solution is AdAway, which will block ads from most known sources, both in your browser of choice and in the apps you use. Just download it, start it up, and hit the "Download files and apply ad blocking" button. It'll download a few host files and merge them into your phone's, blocking those apps from ever reaching your device. You may need to reboot after you do this. You can also disable ad blocking at any time, but again, you'll have to reboot whenever you make changes.
If you have a particular site that's still showing ads, you can find out the domain of that ad (for example, ads.doubleclick.net and add it to AdAway's blacklist. To do so, open up AdAway, hit Menu, and go to Lists. Navigate to the Black tab, hit Menu, and tap the Add button. Type inads.doubleclick.net and click Add. Those ads should stop showing up after a reboot.
Similarly, blocking ads can mess with certain apps and make them unusable (The popular Words with Friends game is a good example). To whitelist those ads, go back to Menu > List and hit the White tab. Go to Menu > Add to add a new domain, and add the domain of the ads it's trying to show—in the case of Words with Friends, it would be androidsdk.ads andmydas.mobi. Note that you can only add advertising domains on the whitelist, not the sites on which the ads appear. That is, if you wanted to whitelist ads on Lifehacker, you couldn't just addlifehacker.com to your whitelist—you'd have to add ad.doubleclick.net, where our ads are hosted. If you ever decide to uninstall AdAway, remember to disable ad blocking first, otherwise your phone will continue to block ads with no way to turn it off.
Remember also that this blocks ads within apps. This can be convenient, but we recommend you support app developers you like, either by whitelisting their ads or by buying the premium version of their app. App developers gotta eat too.

For Unrooted Phones: Browser-Based Ad Blockers

Unfortunately, if you aren't rooted, you don't have nearly as many choices. You pretty much have to block ads through your browser, and only a few browsers currently support this. Firefox is the easiest method—just download Firefox, and add the Adblock Plus extension, which you can grab from the add-ons page in Firefox's settings.
Opera Mobile is the other choice. Reader Nitesh discovered that you can create your own adblock filter for Opera with a simple text file. First, create a file calledurlfilter.ini somewhere on your SD card (I put mine in Opera's folder), and copy the text from this pastebin page. You can also grab updated filters <a href="this page">here, though the pastebin page contains the full code you need to make the urlfilter.inifile recognizable. Paste that text it into theurlfilter.ini file on your SD card. It's usually easiest to do this from your computer, after plugging in your device and enabling USB mode.
Then, disconnect your phone and open up Opera. Type opera:config in the URL bar and search for "URL Filter". You should see an option to tell Opera where your URL filter file is. Tap that box, then hit the back button until you're at the root of your phone (which it recognizes as a simple /). Then go to /mnt/sdcard and navigate to the urlfilter.ini you just created. After a reboot, you should find that Opera is ad-free.
Sadly, there aren't more methods to block ads on Android, but these should help get most of you by. Got any of your own ad-blocking solutions we didn't mention? Be sure to share them in the comments.

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More