Ask / Submit

[How-To] AdBlock for Sailfish-Browser

asked 2014-02-19 00:25:17 +0200

mgbler gravatar image

updated 2014-08-15 13:50:37 +0200

Edit 2:

For the time being try the solutions by @drcouzelis (edit hosts file) or ny @jbrek (use alternative DNS). The images were removed for better readability.


With the current version of Sailfish-Browser (mozembedlite) I didn't find a way to install AdBlock. Yet. If I or someone else finds a method it we be published here. Thx


today I'm sharing how you can get rid of ads and (some) malware/tracking while using our beloved standard browser. I assume you all know AdBlock, if not search it on

  1. Go on and search adblock
  2. Choose AdBlock Plus, then long press the install button and choose open in new tab
  3. swipe to accept and install
  4. Go to chrome://adblockplus/content/ui/subscriptionSelection.xul and choose your subscription
  5. Go to about:addons, tap AdBlock Plus->Preferences->Filter Rules and uncheck the allowance of addon-promoted ads
  6. Profit

By the way check out chrome://adblockplus/content/ui/ there you'll find all addon specific dialogues like firstRun.html. However you can't simply tap on the link but have to type the filename like this: chrome://adblockplus/content/ui/firstRun.html


edit retag flag offensive close delete



Great, it works!!!

deedend ( 2014-02-19 00:59:44 +0200 )edit

Does it work for Ghostery or Disconnect too? Adblocking is one thing, but actually I'm more interested in stopping trackers, which happen to include most ads; Ghostery therefor makes a great adblocker as well.

Fuzzillogic ( 2014-02-19 01:20:27 +0200 )edit

Has anyone tried ad-block edge with built in browser?

Tanghus ( 2014-02-19 02:46:16 +0200 )edit

Adblockedge is installing fine. Go to: Install and then configure here: chrome://adblockedge/content/ui/subscriptionSelection.xul


J4ZZ ( 2014-02-19 05:46:01 +0200 )edit

Great post! Thanks a lot! I can't believe I didn't think of trying this before :)

Drekkarian ( 2014-02-19 14:12:40 +0200 )edit

6 Answers

Sort by » oldest newest most voted

answered 2014-08-13 19:47:43 +0200

drcouzelis gravatar image

updated 2014-08-14 19:52:33 +0200

I setup ad blocking by modifying the "/etc/hosts" file (similarly to the comment by @garrosh).

Installation: This needs to be done as root (use the "su-devel" command).

1) Make a backup of the original file:

mv /etc/hosts /etc/hosts.ORIGINAL

2) Get the latest copy of of the hosts file with blocked advertisers and save it as "/etc/hosts". In one command:

curl -o /etc/hosts

That's it! No reboot necessary.

Result: System-wide ad blocking, including all web browsers and applications, with no slowdown to the device.

Note: If you have any special entries in your hosts file then you will need to combine your original hosts file with the new ad blocking version of the file. If you don't know what I'm talking about then you can ignore this.

Uninstalling: Just put the original file back:

mv /etc/hosts.ORIGINAL /etc/hosts

If you don't have the original "/etc/hosts" file, here are the contents for reference:       localhost.localdomain localhost
::1     localhost6.localdomain6 localhost6
edit flag offensive delete publish link more


@drcouzelis Could you pls elaborate a little bit about how to combine the two files correctly?:)

Alex ( 2014-08-14 12:47:31 +0200 )edit

@Alex I added more detailed instructions to my original post. The new file has all the information that the original file needs, so it's ok to simply replace it.

drcouzelis ( 2014-08-14 19:34:55 +0200 )edit

that made my internet faster :)

mgbler ( 2014-08-15 13:51:49 +0200 )edit

First of all thank you for this advice, but at least in my case this does not block most ads. It blocks some ads in desktop versions but not in mobile version of sites. Also it leaves a "blank"-spot instead of ads, so it's not quite as useful as AdBlock.

Edit: I forgot to mention: I have Tahkalampi update installed at the moment.

Sandoz ( 2014-08-16 00:07:26 +0200 )edit

@Sandoz - That's true, there are benefits and drawbacks. Which website has ads that it didn't block? Did you report them? They won't get blocked if nobody reports them. ;)

drcouzelis ( 2014-08-16 03:00:16 +0200 )edit

answered 2014-05-15 14:03:32 +0200

Quattra gravatar image

This doesn't work with current build of Sailfish. Any idea how to revert changes that Adblock made?

edit flag offensive delete publish link more



Any idea how to make AdBlock work again? :)

Drekkarian ( 2014-05-15 15:14:11 +0200 )edit

i want it too. Maybe we have to wait for the new update, maybe it comes with the new version of the browser (real tabs), maybe than we can activate a adblocker (of course... real tabs have no sense ;) )

cvp ( 2014-05-15 19:07:46 +0200 )edit

To revert, the simplest method is to delete /home/nemo/.mozilla That will reset everything :)

mgbler ( 2014-05-16 09:41:45 +0200 )edit

In another question someone posted that the latest development version of Adblock Edge works

vasavr ( 2014-05-16 15:32:07 +0200 )edit

When I try to download and install Adblock Edge, it's say that "It's not available for Maemo" 😢

carmenfdezb ( 2014-05-16 18:05:47 +0200 )edit

answered 2014-08-15 13:27:28 +0200

jbrek gravatar image

updated 2014-08-15 13:30:28 +0200

My solution to block ads (android & sailfish apps, browser, ...) is to redirect dns requests to FoolDNS with iptables:

iptables -t nat -A OUTPUT -p udp --dport 53 -j DNAT --to-destination
iptables -t nat -A OUTPUT -p tcp --dport 53 -j DNAT --to-destination
edit flag offensive delete publish link more


Thank you, nice hint.

jolladiho ( 2014-08-18 12:28:56 +0200 )edit

Thank you, works a treat!

Should this not be selected as the right answer, as the question was how to Ad'Block' for Sailfish-Browser.

I'm using Sailfish and this little trick works, browsing speeds are better as pages seem to load quicker.

Markkyboy ( 2014-10-29 01:35:06 +0200 )edit

answered 2014-06-09 23:13:47 +0200

ApB gravatar image

Did it just came back with the last update :D

edit flag offensive delete publish link more



I solved this adblocking issue in a slightly different way. Back in the days of android I used to use an app called adaway. That app replaced the system wide hosts file (/etc/hosts) with a huge hosts file where all sorts of ad-serving sites are re-routed to localhost... I linked the aliendalvik hosts file to the sailfishos hosts file, so now I've got ad blocking in both "android" and sailfish :-D Works like a charm.

garrosh ( 2014-06-11 10:35:50 +0200 )edit

Too bad hosts file blocking isnt a solution good enough for my needs.

vasavr ( 2014-06-11 22:15:53 +0200 )edit

answered 2014-09-12 01:19:01 +0200

You could also give a try to hostsblock

edit flag offensive delete publish link more


Something hosts related should be made into an app. At least untill Adblock plus can be used with the main browser -mine still works-. Don't know if harbor will allow it but even openrepos is a good solution.

ApB ( 2014-09-12 01:36:56 +0200 )edit

answered 2014-11-15 22:02:46 +0200

piloti gravatar image

Hi... Mostly works. Step 5 fails as the browser won't load or zoom to allow me to find the AdBlock to choose the final setting, but apart from that, works. Less adds, faster browsing. Great, thanks.

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools



Asked: 2014-02-19 00:25:17 +0200

Seen: 8,772 times

Last updated: Nov 15 '14