Posted by: glasskeys | 06/03/2011

How to quickly enable “ad blocking” on Android CM7.

(To view a larger image with a more detailed description tap or click a thumbnail.)

To quickly enable “ad blocking” on Android CyanogenMod you can utilise an old Linux/*nix trick — addition of entries to the /etc/hosts file to resolve to 127.0.0.1 (localhost) so that all ad serving network domains point to…nothing.

In proper English this means that any location that matches an “ad serving” web address instead points to the local machine, and therefore never get loaded.

To start using your own “ad blocker”, save this file on your Android CM7 tab. For purposes of this tutorial we will assume the location is in the /sdcard/download folder. Next open the Terminal Emulator and at the $ prompt type the following commands:
$su
#cp /sdcard/download/hosts.txt /system/etc/hosts
(tap y key at the prompt)

(Use the tag cloud at right to view similar topics.)


Responses

  1. Says the file already exists. I’m looking around, but can’t find the command to overwrite.


Leave a comment

Categories