Defender is back!

But what about the update?

Here it works immediately. Please select only MVPS as source and the update should be done in seconds.

Did you have more sources enabled? That can take really looong time….

Only MVPS makes no difference, the loop remains. Previously I also only had one list, the one you can see in my screenshot.

I was once able to reproduce the loop.

But the function cancel/clear update should have resolved that?

systemctl status harbour-defender

said active (starting)

unfortunately I killed the still running (where it was hanging?)

python3 …./defender_updater.py

and problem was gone and not reproducible.

I deinstalled, removed all config and tmp and var files, rebooted, installed again.

And everything fine!??

So, no idea

Sorry, sometimes I really do not like that SW stuff anymore.

I tried once

  • Removed defender
  • deleted all conf tmp var files
  • Rebooted
  • Installed again
  • Started, updated, all fine
  • Selected lots of sources, started update. And clicked “cancel upd loop”, python process still running, system service still active. Clicked '“cancel upd loop” again and process was gone, system service stopped with error (of course)
  • Selected even more sources, started update, clicked “cancel upd loop” and everything as it should be immediately ???

I do not get it!

Looks like the OS and defender need some time to get to know each other? :smirking_face:

1 Like

Wait,

Both devices have been updated yesterday to 5.0.0.76

Some coincidence?

@eson did you reboot after the update boot (if you did so?)

1 Like

I did.

I’ve been on the run whole day, so need some time to calm down and get my ass back in the saddle. Be back soon… :wink:

1 Like

Today I had a little bit more time so started to check status and got this…

[defaultuser@JollaC2 ~]$ systemctl status harbour-defender
● harbour-defender.service - Update the Defender hosts file
   Loaded: loaded (/etc/systemd/system/harbour-defender.service; static; vendor preset: enabl
ed)
   Active: inactive (dead)

Did what you did, removed defender, deleted all conf tmp var files, rebooted and installed again.

Same update loop, no matter sources, and I also found that the app does not write to the hosts file.

Hosts file timestamp says it was written now when updating from app, but content is same old since August 2025 (haven’t really used the phone since then).

I think I should get an empty hosts file and try again, but I don’t remember what they looked like.

Oooh… new status looks like this, during update…

[defaultuser@JollaC2 ~]$ systemctl status harbour-defender
● harbour-defender.service - Update the Defender hosts file
   Loaded: loaded (/etc/systemd/system/harbour-defender.service; static; vendor preset: enabl
ed)
   Active: activating (start) since Fri 2026-03-20 09:38:11 CET; 1min 17s ago
 Main PID: 3695 (python3)
   Memory: 145.5M
   CGroup: /system.slice/harbour-defender.service
           └─3695 /usr/bin/python3 /usr/share/harbour-defender/qml/python/defender_updater.py

…and this, after cancel update loop.

[defaultuser@JollaC2 ~]$ systemctl status harbour-defender
● harbour-defender.service - Update the Defender hosts file
   Loaded: loaded (/etc/systemd/system/harbour-defender.service; static; vendor preset: enabl
ed)
   Active: failed (Result: signal) since Fri 2026-03-20 09:44:13 CET; 13min ago
  Process: 3695 ExecStart=/usr/bin/python3 /usr/share/harbour-defender/qml/python/defender_up
dater.py (code=killed, signal=TERM)
 Main PID: 3695 (code=killed, signal=TERM)
1 Like

Now I feel a little embarrassed, because I started up my X10V (with an empty original hosts file) and installed Defender, and now everything is working perfect. Two lists downloaded and written to hosts, no loop, no problem at all. AAS restart also working without problem. The small glitch I first mentioned is the only issue I can find.

Don’t know what’s wrong with my C2, because I’ve never really used any of those two phones.

I will try with a fresh empty hosts file on my C2, and if that doesn’t help it’l be a reflash.

1 Like

This looks as it should be.

But the hosts file should be written. Is it writable? Or is it immutable?

Now THAT sounds good :+1:

Permissions is 0644 as it should be I think.

Funny thing is that I have the exact same issue on my X10III (daily drive). Both my C2 and X10III I use to manually update hosts via qCommand, if that matters. On my X10V, hosts was never used.

Starting with a fresh empty hosts file didn’t make any different on any of those two not working phones.

0644 is okay.

What does

lsattr

say?

So, 10V works!

And C2 and 10III not?

Amazing :zany_face:

What does qComman do with /etc/hosts??

Can you run the update manually in terminal as root by

python3 /usr/share/harbour-defender/defender_updater.py

and see/post what happens?

On both X10V and C2…

[defaultuser@Xperia10V ~]$ lsattr
--------------e------- ./Playlists
--------------e------- ./Desktop
--------------e------- ./Pictures
--------------e------- ./Public
-----------I--e------- ./Music
--------------e------- ./android_storage
--------------e------- ./Templates
--------------e------- ./Downloads
--------------e------- ./Videos
--------------e------- ./Documents

Correct!

On both X10V and C2…

[defaultuser@Xperia10V ~]$ devel-su python3 /usr/share/harbour-defender/defender_updater.py
Password: 
python3: can't open file '/usr/share/harbour-defender/defender_updater.py': [Errno 2] No such file or directory

pkexec curl https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts -o /etc/hosts

Oh, dang.

I am suffering from headaches :weary_face: and it was too late :sleeping_face:

lsattr /etc/hosts

and

python3 /usr/share/harbour-defender/qml/python/defender_updater.py

So that’s why I didn’t understand…

I tend to disconnect my own brain when I get copy/paste commands from better knowledge. :wink:

[defaultuser@JollaC2 ~]$ lsattr /etc/hosts
--------------e------- /etc/hosts

[defaultuser@Xperia10V ~]$ lsattr /etc/hosts
--------------e------- /etc/hosts

X10V - working app

Summary

This text w[defaultuser@Xperia10V ~]$ devel-su python3 /usr/share/harbour-defender/qml/python/defender_u
pdater.py
Password:
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts
False
True
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts
False
False
https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt
False
False
https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext
False
False
http://sysctl.org/cameleon/hosts
False
False
https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
False
True
https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
False
False
http://winhelp2002.mvps.org/hosts.txt
False
False
https://raw.githubusercontent.com/jerryn70/GoodbyeAds/master/Hosts/GoodbyeAds.txt
False
False
https://raw.githubusercontent.com/jerryn70/GoodbyeAds/master/Extension/GoodbyeAds-YouTube-AdBlock.txt
False
False
https://raw.githubusercontent.com/jerryn70/GoodbyeAds/master/Extension/GoodbyeAds-Spotify-AdBlock.txt
False
False
https://hosts.oisd.nl/basic
False
False
https://hosts.oisd.nl
False
False
Check internet
Internet connected
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts
https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txtill be hidden

C2 - not working app

Summary

[defaultuser@JollaC2 ~]$ devel-su python3 /usr/share/harbour-defender/qml/python/defender_u
Password:
python3: can’t open file ‘/usr/share/harbour-defender/qml/python/defender_u’: [Errno 2] No such file or directory

edit:

defender_u is actually missing.

You shouldn’t do that :smiley:

Status hosts file(s) is okay

And output of python script as well (for the 10v).

This

python3: can’t open file ‘/usr/share/harbour-defender/qml/python/defender_u’: [Errno 2] No such file or directory

would have been easy to solve.

But somehow copy / paste put in a line break and you missed some parts in the second attempt on non-working devices.

Add

pdater.py

and get back to here :wink:

2 Likes

Someone else gave it a try?

Pushed v0.7.3 to testing, that will open the error log -if any- with sailfish-browser (working again).

Ok then…

On X10V, working:

Summary

| Sailfish OS 5.0.0.77 (Tampella)
'—
[defaultuser@Xperia10V ~]$ devel-su python3 /usr/share/harbour-defender/qml/python/defender_updater.py
Password:
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts
False
True
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts
False
False
https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt
False
False
https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext
False
False
http://sysctl.org/cameleon/hosts
False
False
https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
False
True
https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
False
False
http://winhelp2002.mvps.org/hosts.txt
False
False
https://raw.githubusercontent.com/jerryn70/GoodbyeAds/master/Hosts/GoodbyeAds.txt
False
False
https://raw.githubusercontent.com/jerryn70/GoodbyeAds/master/Extension/GoodbyeAds-YouTube-AdBlock.txt
False
False
https://raw.githubusercontent.com/jerryn70/GoodbyeAds/master/Extension/GoodbyeAds-Spotify-AdBlock.txt
False
False
https://hosts.oisd.nl/basic
False
False
https://hosts.oisd.nl
False
False
Check internet
Internet connected
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts
https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
[defaultuser@Xperia10V ~]$

On C2, not working:

Summary

| Sailfish OS 5.0.0.76 (Tampella)
'—
[defaultuser@JollaC2 ~]$ devel-su python3 /usr/share/harbour-defender/qml/python/defender_updater.py
Password:
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts
False
False
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts
False
True
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts
False
False
https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt
False
False
https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext
False
False
http://sysctl.org/cameleon/hosts
False
False
https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
False
True
https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
False
False
http://winhelp2002.mvps.org/hosts.txt
False
False
https://raw.githubusercontent.com/jerryn70/GoodbyeAds/master/Hosts/GoodbyeAds.txt
False
False
https://raw.githubusercontent.com/jerryn70/GoodbyeAds/master/Extension/GoodbyeAds-YouTube-AdBlock.txt
False
False
https://raw.githubusercontent.com/jerryn70/GoodbyeAds/master/Extension/GoodbyeAds-Spotify-AdBlock.txt
False
False
https://hosts.oisd.nl/basic
False
False
https://hosts.oisd.nl
False
False
Check internet
Internet connected
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts
https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt

Hmm, the output on both devices look as it should.

Did you check the size/content of both host files?

To be safe :wink: :

ls -l /etc/hosts

cat /etc/hosts

Do both device run the same OS version?

Same Android level?

On X10V…
Hosts size 2,48 MiB. Content fine.

On C2…
Hosts size 83 B. Content original empty hosts file.

SFOS 5.0.0.77 Android 13 on both devices.