Defender II – updated for encrypted devices (originated by nodevel)

Your rating: None Average: 5 (18 votes)

This is the enhanced but mainly original application Defender by nodevel , see (old, deprecated!): and its repository


It was updated for devices with encrypted /home volume, on which it caused boot problems (of course it can also be used on unencrypted devices). And taken care of the new 'defaultuser'.

No more, no less (okay, here and there a bit more now ;)...


New forked repo (github) can now be found here:

And for discussions (FSO ) see here:


Application versions: 
File harbour-defender-0.4.1-1.armv7hl.rpm83.88 KB23/11/2020 - 02:10
File harbour-defender-0.4.2-1.armv7hl.rpm84.19 KB02/12/2020 - 22:12
File harbour-defender-0.4.3-1.armv7hl.rpm84.29 KB24/02/2021 - 09:54
File harbour-defender-0.5.1-1.armv7hl.rpm85.02 KB25/02/2021 - 10:14
File harbour-defender-0.5.2-1.armv7hl.rpm85.03 KB01/03/2021 - 11:03
File harbour-defender-0.5.3-1.armv7hl.rpm85.32 KB16/03/2021 - 22:17
File harbour-defender-0.5.4-1.armv7hl.rpm85.82 KB25/03/2021 - 22:24
File harbour-defender-0.5.5-1.armv7hl.rpm85.85 KB27/03/2021 - 04:27
File harbour-defender-0.5.5-1.i486.rpm85.77 KB27/03/2021 - 10:29
File harbour-defender-0.5.5-1.aarch64.rpm79.53 KB15/05/2021 - 22:04
File harbour-defender-0.5.6-1.armv7hl.rpm86.38 KB06/06/2021 - 12:28
File harbour-defender-0.5.6-1.i486.rpm86.29 KB06/06/2021 - 12:28
File harbour-defender-0.5.6-1.aarch64.rpm79.8 KB06/06/2021 - 12:28
File harbour-defender-0.5.7-1.armv7hl.rpm88.5 KB12/11/2021 - 01:55
File harbour-defender-0.5.7-1.i486.rpm82.26 KB17/11/2021 - 19:12
File harbour-defender-0.5.7-1.aarch64.rpm82.23 KB17/11/2021 - 19:12
in case you are going to encrypt your device manually (only possible for some devices (Xs and XA2s) when having flashed SFOS <=, please make sure you uninstall defender before the encryption/reboot and install again afterwards!
(deprecated as of SFOS 4.1.0.xx, fixed by Jolla),
note to myself --> remove on next OS release...
in case you upgraded from SFOS 3 to SFOS 4 having Defender already installed you might need to re-install (or uninstall and install again) to make sure you have the SFOS4 hack working to let the browser make use of the changed hosts file.



- fixed handling of exception on resolvings hosts url (leading to 'update loop')

- added functionality (and pulley menu) to show an error log, in case it exists

- added creation of special lxc extra_config file to get the (native file system) /system/etc/hosts file bound into the Android (aliendalvik container) file system

- added funtionality (and pulley menu) to restart Android Support (needed to get the updates written to native hosts file read anew into the aliendalvik container)

- added new sources from (thanks to @dry1)

i486 and aarch64 build brought to you by courtesy of @orangecat



- fixed the annoyance that sporadically the hosts file was reset to default values (caused by a cyclic update without internet connectivity, e.g. flight mode)

- added new Adware repositories of  GoodbyeAds (thanks to @orangecat), be aware that mixing repositories of bigger size may take looong time (even hours) so keep it running...



- corrected version number and URL in spec file

- added support for i486 (Jolla tablet)

- provision of aarch64 (courtesy of @orangecat / FSO)



- added version info into DocsPage

- added removal of 'update trigger' file on uninstallation

- added pulley menu for removal of 'update trigger' file
  (still a reboot or uninstall/install or `devel-su systemctl restart harbour-defender`might be needed)



- fix the update loop, e.g. for community ports (where /system is mounted RO); import UnableToWriteHost exception and catch that situation on trying to write updated hosts file(s),

- added some small error logging writing to user space file /home/$USER/.config/harbour-defender

- fix rebuild_hosts to create a new blank default hosts file and save it correctly; NOT reading/copying the default /etc/hosts entries,



- fix regarding the Disable (all) lists at once pulley menu, now the Disable functionality works and disables all lists

(small typo only which looks like was there from the early beginning ;)



- 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 ]



removed not anymore working lists from configuration



fixing the start issue of path unit which caused the infinite update loop



take over from nodevel and fixing the boot loop on encrypted devices

as well as taking care of new default user name 'defaultuser' or old 'nemo'