I wasn’t able to sideload Magisk or F-Droid priviledged extension. In fact, the Magisk routine which patched the boot image caused the system to stop booting.
What I did instead, was doing it manually through the ADB recovery shell:
# boot into recovery, select mount /system and activate ADB
computer:/ # lsusb
Bus 001 Device 004: ID 0e8d:201c MediaTek Inc.
# get recovery shell on device
adb shell
# verify that system partition is mounted
GS290:/ # mount
/dev/block/mmcblk0p31 on /mnt/system type ext4 (ro,seclabel,relatime)
# list all system apps on system partition
GS290:/ # ls -l /mnt/sytem/system/priv-app/
drwxr-xr-x 50 root root 4.0K 2009-01-01 00:00 .
drwxr-xr-x 19 root root 4.0K 2009-01-01 00:00 ..
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 BackupRestoreConfirmation
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 BlissLauncher
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 BlockedNumberProvider
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 CalendarProvider
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 CallLogBackup
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 CellBroadcastReceiver
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 ContactsProvider
drwxr-xr-x 2 root root 4.0K 2009-01-01 00:00 CtsShimPrivPrebuilt
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 DocumentsUI
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 DownloadProvider
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 DownloadProviderUi
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 DroidGuard
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 DynamicSystemInstallationService
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 ExtServices
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 ExternalStorageProvider
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 FakeStore
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 FusedLocation
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 GmsCore
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 InputDevices
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 LineageParts
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 LineageSettingsProvider
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 LineageSetupWizard
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 LocalTransport
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 ManagedProvisioning
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 MediaProvider
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 MmsService
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 MtpDocumentsProvider
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 NetworkPermissionConfig
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 NetworkStack
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 ONS
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 PackageInstaller
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 PermissionController
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 ProxyHandler
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 Seedvault
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 SettingsProvider
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 SharedStorageBackup
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 Shell
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 StatementService
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 SystemUIWithLegacyRecents
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 Tag
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 TeleService
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 Telecom
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 TelephonyProvider
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 TrebleApp2
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 Updater
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 UserDictionaryProvider
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 VpnDialogs
drwxr-xr-x 3 root root 4.0K 2009-01-01 00:00 WeatherProvider
# mount system partition writable
GS290:/mnt/system/system/priv-app # mount -o remount,rw /mnt/system
# create directories and adjust directory permissions
GS290:/ # mkdir /mnt/system/system/priv-app/F-DroidPrivilegedExtension
GS290:/ # chmod 755 /mnt/system/system/priv-app/F-DroidPrivilegedExtension
GS290:/ # touch /mnt/system/system/priv-app/F-DroidPrivilegedExtension -r /mnt/system/system/priv-app/Shell
GS290:/ # mkdir /mnt/system/system/priv-app/AuroraServices
GS290:/ # chmod 755 /mnt/system/system/priv-app/AuroraServices
GS290:/ # touch /mnt/system/system/priv-app/AuroraServices -r /mnt/system/system/priv-app/Shell
GS290:/ # mkdir /mnt/system/system/app/F-Droid
GS290:/ # chmod 755 /mnt/system/system/app/F-Droid
GS290:/ # touch /mnt/system/system/app/F-Droid -r /mnt/system/system/app/Weather
Then on another shell, I pushed the files from the official OTA zip files (unzip/rename first to match the conventions of /e/os:
# push files from computer
adb push push F-Droid.apk /mnt/system/system/app/F-Droid/
adb push F-DroidPrivilegedExtension.apk /mnt/system/system/priv-app/F-DroidPrivilegedExtension/
adb push privapp-permissions-org.fdroid.fdroid.privileged.xml /mnt/system/system/etc/permissions/
adb push AuroraServices.apk /mnt/system/system/priv-app/AuroraServices/
adb push privapp-permissions-com.aurora.services.xml /mnt/system/system/etc/permissions/
The on the first terminal, continue to adjust permissions and file dates. I did it to be sure, but not every step might be necessary.
# adjust file permissions and modification dates on phone (just to be sure)
GS290:/ # chmod 644 /mnt/system/system/priv-app/F-DroidPrivilegedExtension/F-DroidPrivilegedExtension.apk
GS290:/ # chmod 644 /mnt/system/system/priv-app/AuroraServices/AuroraServices.apk
GS290:/ # chmod 644 /mnt/system/system/app/F-Droid/F-Droid.apk
GS290:/ # touch /mnt/system/system/etc/permissions/privapp-permissions-org.fdroid.fdroid.privileged.xml -r /mnt/system/system/etc/permissions/privapp-permissions-com.google.android.gms.xml
GS290:/ # touch /mnt/system/system/etc/permissions/privapp-permissions-com.aurora.services.xml -r /mnt/system/system/etc/permissions/privapp-permissions-com.google.android.gms.xml
# verify/adjust SELinux context
GS290:/ # ls -lZ mnt/system/system/app/Message/
total 26848
-rw-r--r-- 1 root root u:object_r:system_file:s0 27787572 2009-01-01 00:00 Message.apk
drwxr-xr-x 3 root root u:object_r:system_file:s0 4096 2009-01-01 00:00 oat
# verify/adjust Android permissions settings/files (otherwise chmod 644 the copied files)
GS290:/ # ls -lZ /mnt/system/system/etc/permissions/privapp*
-rw-r--r-- 1 root root u:object_r:system_file:s0 222 2009-01-01 00:00 privapp-permissions-com.android.vending.xml
-rw-r--r-- 1 root root u:object_r:system_file:s0 282 2021-02-03 13:35 privapp-permissions-com.aurora.services.xml
-rw-r--r-- 1 root root u:object_r:system_file:s0 450 2009-01-01 00:00 privapp-permissions-com.google.android.gms.xml
-rw-r--r-- 1 root root u:object_r:system_file:s0 219 2009-01-01 00:00 privapp-permissions-me.phh.treble.app.xml
-rw-r--r-- 1 root root u:object_r:system_file:s0 289 2019-11-23 06:09 privapp-permissions-org.fdroid.fdroid.privileged.xml
-rw-r--r-- 1 root root u:object_r:system_file:s0 20290 2009-01-01 00:00 privapp-permissions-platform.xml
-rw-r--r-- 1 root root u:object_r:system_file:s0 986 2009-01-01 00:00 privapp_whitelist_foundation.e.blisslauncher.xml
-rw-r--r-- 1 root root u:object_r:system_file:s0 1067 2009-01-01 00:00 privapp_whitelist_org.lineageos.lineageparts.xml
-rw-r--r-- 1 root root u:object_r:system_file:s0 1066 2009-01-01 00:00 privapp_whitelist_org.lineageos.lineagesettings.xml
-rw-r--r-- 1 root root u:object_r:system_file:s0 1518 2009-01-01 00:00 privapp_whitelist_org.lineageos.setupwizard.xml
-rw-r--r-- 1 root root u:object_r:system_file:s0 968 2009-01-01 00:00 privapp_whitelist_org.lineageos.updater.xml
Finally, unmount the system partition to avoid file corruption.
GS290:/ # umount /mnt/system
Now click power off on recovery or reboot. That worked for me, but will probably only last until the next system upgrade.
Be sure to understand what you are doing, there might be typos in my code!
I still hope to find a better solution, for instance through a working Magisk boot image which keeps the system partition untouched.