Defender app update (harbour-defender) - my very own ‘Sailfish Devember’

Same as I do. At least for those packages which are available for the current SFOS release.

Yes, that may happen. I did not think about this. Thanks.
But then you did not follow the official Jolla release notes advice to uninstall harbour-defender :smiley:
This small hack was more meant to be a temporary hack until Jolla fixes their sailjail config.
A simple re-install is enough.

Sorry, qml and me are not really friends.
I put an information in the openrepos changelog for now. Should suffice? Else I might think about putting that as a one-liner into each start of defender?

Here I would need some more pointers else I would say ‘no idea’.

Thanks for this reminder. I do have it in mind but I expect Jolla to just overwrite these configs…

Hmmm. No joy here on 3.4 a Vollaphone.

Installed with Storeman from the repos. Selected only:
Yoyos and

Did as instructed here,

disable all non-working sources
pulley and choose update again
close defender
reopen defender
(choose working sources) and update again

which did/does not work. also with restarts between.

I can just push to the phone via ssh if I can just edit the hosts file. So maybe it’s not an issue for me? :slight_smile:

[root@VollaPhone ~]# cat /etc/hosts localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6

Incidently peter, I love your website. :slight_smile: mine is WAY too fancy, at … you can make fun of me as you wish.

So, what exactly is not giving you ‘joy’?
Guess work: the update loop?
Please close defender and do a pkill -f defender and check again.

In latest version there are/should not be any non-working list.
But as said somewhere above a selection of multiple list may take a huge time…

To be honest: it is not ‘my web site’ but one of my beloved / most admired ones :smiley: ,
whereas yours makes sense as well.

I get a lot of joy being easily able to obtain a terminal on my phone via ssh.

[root@VollaPhone ~]# killall defender
defender: no process found

Ok. I’ll start again.

Sorry, use
pkill -f defender

or just to look up PID
ps aux | grep defender

But, once more, what is not working as expected?

Lists, even after hours of loading (I went for a walk with the dog the last time) do not appear to load.

What does work is: fetch
[root@VollaPhone ~]# cat /home/defaultuser/hosts.txt >> /etc/hosts.editable
[root@VollaPhone ~]# cat /home/defaultuser/hosts.txt >> /etc/hosts

I’m not sure how to help. The file I uploaded:
[root@VollaPhone ~]# du -hsc /home/defaultuser/hosts.txt
1.9M /home/defaultuser/hosts.txt
So, it could take ‘some time’, but an hour?

The last update I had enabled only one list (yoyos) which is even smaller. The 1.9mb file is from steven black.

No amount of starting/stopping etc. got me changes to hosts using defender.

I just updated StevenBlack file and it worked ‘immediately’.

Why did you put same content in hosts.editable and the hosts file?
afaik defender will try to eliminate doublettes. And that may take looong time.

Please try with e.g. mvps only.
After having used ‘Disable’ from pulley menu.

Ok. Cool.

Redundancy as security.


Step 1. Disable. (the Updating bar continues to update).
Step 2. Attempt to enable MVPS. The button area is too close to the edge to be selected. (I have big fingers).
Step 3. Select, advertising only (that works).
Step 4. Update now. The Updating bar never stopped so, well
Step 5. #tail -f /etc/hosts (waiting…)

Errrr. Should I close Defender? Or should that matter?

7 minutes later, nothing. Next. Remove and re-install.

Or is it like here?

Re-install, after reboot (just in case). The update bar is STILL going. What?

  1. Disable
  2. Enable MVPS (sneak up on it slowly from off the bottom left of the screen.)
  3. Ok. Wait … (check last modified time on /etc/hosts, ok, that’s my last change…)

[defaultuser@VollaPhone ~] ls -alt /etc/hosts -rw-r--r-- 1 root root 2097835 Mar 8 19:01 /etc/hosts [defaultuser@VollaPhone ~] date
Mon Mar 8 19:10:07 CET 2021
[defaultuser@VollaPhone ~] date Mon Mar 8 19:16:42 CET 2021 [defaultuser@VollaPhone ~] ls -al /etc/hosts
-rw-r–r-- 1 root root 2097835 Mar 8 19:01 /etc/hosts

So, nothing happens in 6 minutes with only one list enabled.

That’s after a fresh install. But I saw that de-installing did not remove configs. So maybe those are frigged?

I’d be happy to help if I can do anything constructive. I can clone the repo, turn on debugging … and compile, but, then again, I can script this.

What can I do to help? Oh, it’s still running. Haven’t touched it. Just watching on a terminal.


Okay, stop defender.
ls -l /home/$USER/.config/harbour-defender/update
oh oh
did you start defender from command line as root?
$USER should be nemo or defaultuser

Else do
rm .config/harbour-defender/update
and start defender as normal user from command line…

No, I did not start defender as root. Nor did I start it from a shell. I used the icon like a ‘normal user’. Sigh.

Default user is, defaultuser.
Step 1. rm ~/.config/harbour-defender/update
Step 2. open app (icon thing).
Step 3. pull menu update
Step 4. [defaultuser@VollaPhone ~]$ ls -alt /etc/hosts
-rw-r–r-- 1 root root 2097835 Mar 8 19:01 /etc/hosts

Ok. still no change. Going for a walk with the dog while the update bar rotates.

Nothing interesting in journalctl land.

32 minutes later. dog is happy. no update has taken place.

Well, on the Vollaphone, with 3.4 this app does not appear to work. I could give you some info about other installed apps, but it’s not that special and, other than whisperfish, I’m not using any special network apps.

I fail to see why this should be the case!?

Could you please try one more example by emptying out hosts.editable?
On my XA2 the update took 36 minutes by having all lists copied to hosts.editable and trying to update StevenBlack list…

So something like
as root:
rm /etc/hosts.editable
touch /etc/hosts.editable
as user
rm ./config/harbour-defender/update

start defender inside the console via

and try to update only a small list like MVPS
and check inside the console for log/error outputs

Ok. Using a very large lens to enlarge the very small type. not found
unknown:0 - Got Library name … ???
and working direcotory … off to bed.

Saddly my case, too. The last Qt application was a decade ago, running on Qt4 in C++

I had an (extremely quick) look, but it seems that connman only has a dnsproxy that basically can only forward queries to real servers and cache the results and nothing more.

It doesn’t have the extended configurability of dnsmasq (or of a full-blown dns server like bind or djbdns) so no way to inject blocklists in it.

And connman doesn’t have any other option beside completely disabling the dnsproxy and letting you handle whatever listens to the port 53 yourself (unlike NetworkManager which can assist you in running several solutions, including dnsmasq or systemd-resolved).

So the only solution would be to:

  • disable connman’s dnsproxy (--nodnsproxy)
  • install and run your own dns forwarder (e.g.: dnsmasq)

Which is a bit beyond the scope of defender (though some Android adblocker go exactly this route, throwing a simulated VPN connection in the middle to by able to run their own dns service without root privileges).

1 Like

Weirder and weirder.

What is or
I could find only

Never seen, never heard, not to find on 3.2 nor on 4.0 device.
So where does this message originate from? And is it serious? No idea!

It has to do with Android. But the Volla does not have Android support!
Did you try to enable that Android support somehow?

But thinking back there is one possible scenario with Android and Defender.
In case Android runtime is enabled after installation, there might be this update loop. But that is such low risk I did not further investigate (similar to Dr.Yak’s mentioning of nsswich hack).
And a simple reinstall solves.

So question: any Android activity?
And please post output of
ls -l /etc/host*
ls -l /system/etc/host*
ls -l /opt/alien/system/etc/host*

No android stuff. Clean 3.4 SFOS install from piggz via ubports installer.

I had re-installed Defender.

[defaultuser@VollaPhone ~]$ ls -alt /etc/hosts
-rw-r--r--    1 root     root       2097835 Mar  8 19:01 /etc/hosts
[defaultuser@VollaPhone ~]$ ls -alt /system/etc/hosts
-rw-r--r--    1 root     root            56 Jan  1  2009 /system/etc/hosts
[defaultuser@VollaPhone ~]$ ls -alt /opt/system/etc/hosts
 ls: /opt/system/etc/hosts: No such file or directory

The hosts files you see, is the one I created above with cat…

And that DOES work. I no longer see ads in the browser so with 3.4 at least the host file still works.

When that changes I will install dnsmasq.