Ad Free since about 10 minutes ago

Here is what you do with a rooted Android device like the Xoom; write a script to block ads from being loaded by any of the other apps (like the browser). To do it you’ll need busybox and Scripter.


On most devices Busybox can be installed via this app in the market. On my Xoom when I tried it, the installer claimed not to work, but in fact it did work with everything needed installed in /system/xbin.


Just install Scripter from the market. Works good. Hasn’t been updated for tablets, so the screen is tiny.

  1. Run Scripter and click the “Create Script” button.
  2. Give it a name like “Ad Block”
  3. Enter these commands in the “Commands” window:cd /mnt/sdcard
    rm hosts.txt
    wget -O hosts.txt 2> /dev/null
    dos2unix hosts.txt
    mount -w -o remount /system
    cat hosts.txt /system/etc/hosts
    mount -r -o remount /system
  4. Click the “Save” button.
  5. Click your script and ‘poof’ ads should be blocked. You may have to reboot the device to clear the DNS cache, but I didn’t.

On my Xoom the wget line didn’t work. For some reason wget (which is part of busybox) won’t resolve the domain name. This is probably an issue between busybox and Honeycomb. The current busybox for Android wasn’t designed with Honeycomb in mind. So for Xoom, replace the wget line with this:

wget -O hosts.txt 2> /dev/null

If they change the IP address of the server, you’ll have to manually update it.

Also the busybox cp command doesn’t work, so you can use cat instead.

Sure there are Ad blocking apps in the market, but what is the fun in that? Besides the one I tried blocks stats from the WordPress app. Replace the cat command with a grep -v “” > /system/etc/hosts and you can filter that out.

Both comments and trackbacks are currently closed.
%d bloggers like this: