Disabling adverts on the Samsung Galaxy Y Pro (B5510)

I recently bought a Samsung Galaxy Y Pro (B5510). It's cute and typing on the keyboard is much easier than on a touch-screen.

I used to use Droidwall as a firewall to prevent applications from accessing the internet. Now, however, this is no longer possible. The B5510 kernel does not support "owner" mode target specification - so Droidwall can no longer ban / allow specific applications from accessing the internet.

Since my main reason for blocking access to the internet is to block adverts, I had to find another solution.

Fortunately, there is one! I use the "/etc/hosts" file to return localhost ( for "undesirable" server names.

The Solution

First, I had to root my phone. This is a trivial exercise performed by:

  1. downloading this update, as described here.

  2. copying it to the phone's SD card,

  3. rebooting into maintenance mode (Switch the phone off, then hold down volume up + home key + power)

  4. applying the update.

Secondly, I had to edit the phone's "/etc/hosts" file.

For this, I used adb, the android debugger. There is plenty of help on installing this tool elsewhere - I'll leave it to you to find it...

In linux, I access the phone's shell with:

> adb shell

Then, in the adb shell, I go super and mount "/services" read write:

> su
# mount -o remount rw /services

I use "/services", since "/etc/" is actually linked to "/services/etc/"

And now I can use the busybox extras that came with the root kit to edit /etc/hosts:

busybox vi /etc/hosts

The current content of my /etc/hosts is:   googleads.a.doubleclick.net   googleads.b.doubleclick.net   googleads.c.doubleclick.net   googleads.d.doubleclick.net   googleads.e.doubleclick.net   googleads.f.doubleclick.net   googleads.g.doubleclick.net   pagead1.googlesyndication.com   pagead2.googlesyndication.com   pagead3.googlesyndication.com   media.admob.com

I used my imagination on some of the entries, based on actual sites visited (I use wireshark to monitor traffic from my phone via my wifi network).

At some point I may look into writing iptables scripts to block access to IP addresses, but for the moment, I am happy.