Sideloading f-droid privileged extension fails on 17.1
- Reported on F-droid's side
- Forum thread the issue was initially debugged in
- Device: Samsung Galaxy S4 with LineageOS 17.1 and same recovery version
adb reboot recovery
- "Apply update"
adb sideload org.fdroid.fdroid.privileged.ota_2110-mod.zip
- Confirm despite the signature verification
Works up to 5. Upon rebooting, the privileged extension doesn't work. Additionally, ADB ceases to work after sideloading.
I investigated this quite thoroughly. There are a few inconsistencies regarding how things are handled:
- Inside the recovery,
- F-droid's OTA mounts
/system, relying on the recovery's
- The recovery itself mounts the system partition at
- Binaries are in
/system/system/binafter mounting the
/system partition, so they are not found in
$PATH, which breaks everything. Additionally, symlinks aren't working TODO
- F-droid relies on
trueto detect the system path as
/system/system. It isn't set to true.
Based on those, even though I am unfamiliar with lineage's build system, I'm wondering if the recovery shouldn't be built with
ro.build.system_root_image = true. I think it should at least have
/system/system/bin set as the
$PATH, or as a secondary one, to keep working after mounting
As an additionnal note, adding
/system/system/bin to the
$PATH doesn't work, nor does copying the
/system/bin binaries somewhere else beforehand. I don't know why this happens, could be due to a different
$LD_LIBRARY_PATH, though I tried setting that to
jflte:/ # mount /system jflte:/ # ls /system/bin/sh: ls: inaccessible or not found jflte:/ # echo $PATH /sbin:/system/sbin:/product/bin:/apex/com.android.runtime/bin:/system/bin:/system/xbin:/odm/bin:/vendor/bin:/vendor/xbin jflte:/ # export PATH=$PATH:/system/system/bin jflte:/ # echo $PATH /sbin:/system/sbin:/product/bin:/apex/com.android.runtime/bin:/system/bin:/system/xbin:/odm/bin:/vendor/bin:/vendor/xbin:/system/system/bin jflte:/ # ls /system/bin/sh: /system/system/bin/ls: Too many symbolic links encountered
Steps to Reproduce
- Download the latest f-droid OTA zip
- Follow instructions from the expected behaviour.
computer ~ % adb reboot recovery computer ~ % adb shell jflte:/ # mount /system jflte:/ # ls
- Build number:
lineage_jfltexx-userdebug 10 QQ2A.200405.005 e1e00a455b
/device jfltexx /version lineage-17.1 /date 2020-04-20 /kernel 3.4.112-g8c8593f /baseband I9505XXUHPK2 /mods F-Droid
I have read the directions.