Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; gettext_reader has a deprecated constructor in /home/kmzcoza/public_html/blog/includes/lib/gettext/gettext.php on line 36

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; StringReader has a deprecated constructor in /home/kmzcoza/public_html/blog/includes/lib/gettext/streams.php on line 48

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; FileReader has a deprecated constructor in /home/kmzcoza/public_html/blog/includes/lib/gettext/streams.php on line 84

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; CachedFileReader has a deprecated constructor in /home/kmzcoza/public_html/blog/includes/lib/gettext/streams.php on line 145

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; PasswordHash has a deprecated constructor in /home/kmzcoza/public_html/blog/includes/lib/PasswordHash.php on line 12

Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/kmzcoza/public_html/blog/includes/lib/YAML.php on line 80

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Config.php on line 112

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Config.php on line 112

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/SQL.php on line 468

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/SQL.php on line 468

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/SQL.php on line 468

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/SQL.php on line 468

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/SQL.php on line 468

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Config.php on line 112

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Theme.php on line 328

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/model/Visitor.php on line 77

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Flash.php on line 195

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Config.php on line 112

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Markdown_Parser has a deprecated constructor in /home/kmzcoza/public_html/blog/modules/markdown/lib/markdown.php on line 215

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; MarkdownExtra_Parser has a deprecated constructor in /home/kmzcoza/public_html/blog/modules/markdown/lib/markdown.php on line 1677

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Config.php on line 112

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/model/Visitor.php on line 77

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/model/Visitor.php on line 77

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Config.php on line 112

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Config.php on line 112

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/controller/Main.php on line 856

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Config.php on line 112

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Config.php on line 112

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Config.php on line 112

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Route.php on line 232

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Config.php on line 112

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/SQL.php on line 468

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/SQL.php on line 468

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/SQL.php on line 468

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/SQL.php on line 468

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/SQL.php on line 468

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Config.php on line 112

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/SQL.php on line 468

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/SQL.php on line 468

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/SQL.php on line 468

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/SQL.php on line 468

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/SQL.php on line 468

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/SQL.php on line 468

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/SQL.php on line 468

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/SQL.php on line 468

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Route.php on line 232

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/model/Visitor.php on line 77

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Config.php on line 112

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Theme.php on line 328

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Flash.php on line 195

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Route.php on line 232

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/SQL.php on line 468

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/model/Visitor.php on line 77

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/model/Visitor.php on line 77

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/SQL.php on line 468
KMZ » Disabling adverts on the Samsung Galaxy Y Pro (B5510)
Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Config.php on line 112

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Route.php on line 232

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Route.php on line 232

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Config.php on line 112

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Config.php on line 112

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Config.php on line 112

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Route.php on line 232

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Config.php on line 112

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Config.php on line 112

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/model/Visitor.php on line 77

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Config.php on line 112

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/model/Visitor.php on line 77

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Config.php on line 112

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/model/Visitor.php on line 77

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Config.php on line 112

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

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.

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:

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.


Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Config.php on line 112

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Trigger.php on line 174

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/Config.php on line 112

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/SQL.php on line 468

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/SQL.php on line 468

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/model/Visitor.php on line 77

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/SQL.php on line 468

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/SQL.php on line 468

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/SQL.php on line 468

Notice: Only variable references should be returned by reference in /home/kmzcoza/public_html/blog/includes/class/SQL.php on line 468

Warning: session_write_close(): Session callback expects true/false return value in Unknown on line 0

Warning: session_write_close(): Failed to write session data using user defined save handler. (session.save_path: /var/cpanel/php/sessions/ea-php72) in Unknown on line 0