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

Yes, was looking for a possibility of

pkcon refresh

without devel-su.

Thus is an infamous ‘bug’ that after an OS update you need to update your package cache on your own.

This here -using rozgwi’s explanation- is more than just a pkcon refresh but the only possibility I see without terminal and devel-su…

ok, i may be a more average user compred to most of you but i’m not afraid to use console ( on my work i’m the one using shell scripts) :slight_smile:

i did pkcon refresh on decel-su first. now i did it without being root. then i tried to pkcon install habour-defender and got a fatal exception: a conflict with sailfishos-hosts-adblock. i hsd no idea that this is still on my device. after removing it i went to storeman and installed the defender. thanks for your help. i do not get why nowadays i have to be not under devel-su but this is my fault :slight_smile: so as said before compred to nost of you i’m just an average user with some experience.
thanks all, defender is already installed now.

3 Likes

This great update has been working for months but recently I have run into the issue where updating the blocking lists loops forever. I’m using 0.4.2 and am still on SFOS 3.4.0.
I have disabled any sources except the Unified Hosts, Disconnect.me and hpHosts. Individually enabling any of these and restarting the update doesn’t help. Even after reinstalling Defender the update progress bar displays just the same
What can I do? Could it be that all the subscription sources have become unavailable ?
Right now blocking isn’t working at all.

Has anyone got an idea?

2 Likes

short/fast answer…did you reboot or make sure with e.gg killall that ni python defender moduke was still running
afair this really hangs
so just reconfiguring and trying ti get it running okay will not work…

I have the same issue. Uninstalled, restarted, then installed again with the same problem.

Also, some of the sources went offline long time ago:

Maybe, they should be removed from the app?

1 Like

:frowning:

I need to confirm that it looks like the StevenBlack compilation (unified) causes defender to update-loop.
The hosts file are reachable as normal at
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts

I have no idea what may cause this. Some blocking or useragent voodoo changed on github?

So workflow in case your defender loops:

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

@rozgwi
hphosts is also known to not work!
I have enabled:

2 Likes

:+1:
That worked. Thanks!

Just a quick thought: should these stop working too or be insufficient for the need of some - maybe looking at lists provided for PiHole is an option?

1 Like

You are welcome.
__ edit, regarding the ‘update loop’:
In case you have a few lists and StevenBlack list enabled, the update takes a long time, could be > 15 min. So be patient. __

And -as I guess I understood now how the configuration is propagated- we could exclude definitely not working lists.
__ done in v0.4.3 __

I cannot edit/wikify my first post, so we have to compile this info here (hopefully I can make this post to a wiki!?)

Not working lists:

Questionable (atm working again!):

  • StevenBlack hosts, unified (all)

Questionable (atm NOT working due to cert errror!):


And yes of course we could add other good lists. Just provide info about them like:

[stevenblack_unified]
Source = StevenBlack
hostsName = Unified hosts (adware + malware)
Info = https://github.com/StevenBlack/hosts/blob/master/readme.md
Url = https://raw.githubusercontent.com/StevenBlack/hosts/master
/hostsDescription = Composite hosts file of hosts files from a variety of sources like adaway.org, mvps.org, malwaredomainlist.com, someonewhocares.org, yoyo.org, and others
AltUrl = http://sbc.io/hosts/hosts
ZipUrl = https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts.zip
SourceEnabled = no


Oh, and as long as I can still edit this post here, I add the new link to the renamed openrepos page:
https://openrepos.net/content/peterleinchen/defender-ii-updated-encrypted-devices-originated-nodevel

6 Likes

StevenBlack’s unified hosts file do work for me now again!
(after having reset and reconfigured my test device, for another scenario :wink: )

1 Like

I tried this fork on my encrypted Xperia XA2 with Sailfish 4.0.1.48 and my device would not boot. I was able to fix it using ‘fastboot’ and the recovery image, but was wondering if anyone else has tried this with Sailfish 4?

No problem here with an encrypted X.
Update to 4.0.1.48 went well with defender installed.

And survived some reboots and configuration changes (incl. uninstall/re-imstall).
Are you sure you took the defender app from my openrepps?
Did you change/installanything else?

I cannot confirm problems else one made by Jolla, see next post…

1 Like

Hint for native sailfish browser user:

The hosts file is not taken into account by the sailjailed browser.You need to edit/etc/sailjail/permissions/Internet permissionsand add ‘,nsswitch.conf’ to the line starting with \private-etc’, until Jolla hopefully fixes this missing configuration…

2 Likes

Yes, definitely used your fork directly from the OpenRepos website. I downloaded the RPM and installed it using the File Browser app. After rebooting and entering my PIN, the device just showed the spinning screen and never started the main UI.

That would be strange as this sounds like the original (old/fixed) start issue.

And I would not claim it is working if I would not have tested. On an encrypted X. Updated to 4.0.1.48.

Also I do not see a difference between X and XA2 in this regard.

And also the possible difference in the admin user name (nemo/defaultuser) did not cause the boot loop.

Can someone else please confirm/deny this?

1 Like

Hi Peterle. Sadly, regardless of what sources I have enabled, no cookies show up and no ads are blocked. I have added the line you mentioned in Internet.permission. Still no luck. X10 plus.

The crazy thing it is still blocking ads in the browser in 4.0 on my Xperia 10. And you guy say it shouldn’t work without a patch. That’s weird. No I was wrong, the it doesn’t work with the new browser
@apozaf Are you sure you chose correct sources, Steven Black’s were not working for me again, maybe it is simply failing to synchronise them on your device?

Hi Jacek, yes I have tried everything. Disabled StevenB, reinstall app, update, reboots… Maybe the host file has no write permission? At least cookies should show up. Did you update from 3 to 4 with defender installed?

WARNING for all who downloaded v0.4.3 until now (around 20):I had an error in copying a file and this version will definitely bootloop on encrypted devices!So please do NOT reboot, but re-install or uninstall and install defender.Should be fixed now, but cannot test as my test device needs resetting (time!). Sorry.

For experienced:you may use recovery shell and edit sailfish-root::/etc/systemd/system/harbour-defender.pathand have a look at the [Install] section and copy the right command as WantedBy instruction.
Furthermore remove the following: /etc/systemd/system/default.target.wants/harbour-defender.path

https://openrepos.net/comment/36737#comment-36737


Okay, all-clear.
I found some time and did lots of testing.
The version 0.4.3 was only broken until around 0800 UTC. Then I replaced it with a fixed package having the same version number.
Sorry for any inconvenience that mght have occured.

2 Likes

Above has nothing to do with apozaf’s problem.
Or even vansid’s which sounds still strange.
@vansid How did you update, install, in which order? Flashed image version and so on?

About the cookies not showing up:
this is again due to a changed location of browser files (see bookmark problem!) and I wanted to fix this in next release (before I noticed this dumb mistake in above post).

1 Like

New version 0.5.1 will be released tomorrow.

Changelog

  • take care of changes in SFOS4
  • fix reading cookies.sqlite from new file location
  • hack for sailjailed browser not taking changed hosts file into account (nsswitch.conf problem)
  • more secure method at install time to have systemd not bootloop
    [ one scenario could still cause it: if you have defender installed on a non-encrypted device, (you upgrade this and) encrypt it, defender will have old systemd WantedBy references and cause your device to bootloop. Resolution: uninstall before encrypting and reinstall ]

Aaand released …

5 Likes