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 (127.0.0.1) for "undesirable" server names.
First, I had to root my phone. This is a trivial exercise performed by:
copying it to the phone's SD card,
rebooting into maintenance mode (Switch the phone off, then hold down volume up + home key + power)
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:
127.0.0.1 googleads.a.doubleclick.net 127.0.0.1 googleads.b.doubleclick.net 127.0.0.1 googleads.c.doubleclick.net 127.0.0.1 googleads.d.doubleclick.net 127.0.0.1 googleads.e.doubleclick.net 127.0.0.1 googleads.f.doubleclick.net 127.0.0.1 googleads.g.doubleclick.net 127.0.0.1 pagead1.googlesyndication.com 127.0.0.1 pagead2.googlesyndication.com 127.0.0.1 pagead3.googlesyndication.com 127.0.0.1 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.