Browsing privacy and ad blocking on Android

On the desktop, I usually rely on Privoxy to strip out ads, tracking resources and other privacy-invading elements. So I was looking for an equivalent solution on Android.

Firefox 10

With the current version of Firefox for Android, you can simply install the Adblock Plus extension and it will filter most undesirable elements from webpages.

Unfortunately, that extension is not yet available for the latest Firefox Beta, so I had to find another solution.

Android Adblock

It turns out that there is an Open Source proxy similar to Privoxy (though much more limited in functionality) available for Android: Adblock (also available on the F-Droid Free Software market).

However, its default configuration really doesn't block much and so you'll probably want to import a new blocklist as soon as you install it. I used a combination of the Easylist and EasyPrivacy blocklists.

Configuring Fennec to use a proxy

Unlike its desktop cousin, Firefox for Android (also called Fennec) doesn't expose proxy settings in the user interface. Instead, you have to open the about:config page and configure the following settings manually:

network.proxy.http = localhost  
network.proxy.http_port = 8080  
network.proxy.ssl = localhost  
network.proxy.ssl_port = 8080  
network.proxy.type = 1  

Once you're done, test your connection by going into the AdBlock application and turning the proxy off. Then switch back to Firefox and go to a new website. You should get an error message telling you that the proxy is blocking connections. That means it's successfully using your proxy to talk to other websites and not connecting to them directly.

(It might also be possible to set this up in the default Android browser or in the Chrome for Android Beta, but I haven't been able to find how. Feel free to leave a comment if you know how it's done.)

Bonus tips

While you're at it, I highly recommend you turn on the Do Not Track feature in Firefox. Some large sites (like Twitter) have recently committed to turning off individual tracking on web requests which contain this new privacy header.

Also, if you want to help move the mobile web away from a WebKit monoculture (remember how bad the Internet Explorer 6 monoculture was for the web?), then please consider joining the Mobile Testdrivers team and help us make Firefox rock on Android!

Attaching files to Github issues

This is a hack to work-around the lack of support for file attachments on the Github issue tracker.

You can of course host your files somewhere else and link to them, but it's a bit annoying to not be able to attach files directly on a bug report because these remote files might go away in the future and make archived issues much less useful.

Hosting attachments on Github

To host file attachments on Github, you could create a new repository, but then it would clutter up your list of personal repos. A better option is to create a new gist:

  • use the bug title as the description (ideally with the issue number too)
  • put "temp" as the filename (it will be deleted shortly)
  • put something like "TODO" as the file content

At that point, you'll have a new throw-away repository that you can clone on your local machine:

git clone [email protected]:2963192.git gist-2963192

Once you've done that, delete the temporary file and add the one(s) you want:

git rm temp  
git add screenshot1.png  
git add screenshot2.png  
...  
git commit  
git push

Now, visit your gist page and right-click on each attachment to get its direct URL:

https://gist.github.com/raw/2963192/36e1ec2c185905bbfd545a30950ba060183e30ea/grant_p-s_bug.png  
https://gist.github.com/raw/2963192/5f708ea14fbd75c28e5e95ee891c36894ce48f46/grant_p-s_persona_bug.png

Embedding remote images in Github issues

Finally, to include the above images into my bug report, here's the Markdown code I used:

![BrowserID](https://gist.github.com/raw/2963192/36e1ec2c185905bbfd545a30950ba060183e30ea/grant_p-s_bug.png)  
![Persona](https://gist.github.com/raw/2963192/5f708ea14fbd75c28e5e95ee891c36894ce48f46/grant_p-s_persona_bug.png)

Hopefully Github will at some point listen to all of the users that have been asking for this feature. In the meantime, if you don't mind the hassle, it is possible to have issues and attachments on the same site (sort of).