CaptainThrowback / android_device_htc_m8

Updated device files for TWRP M8 - All variants
8 stars 7 forks source link

mountpoint of system partition #5

Closed 1aladdin1 closed 4 years ago

1aladdin1 commented 4 years ago

I used your SAR-recovery to install LineageOS 17. This worked fine.

Then I tried to restore a migrate backup - refer to this XDA-thread. This failed because a script inside the zip tried to call /system/bin/awk, which was not found (see my post describing this issue). The awk binary is located in /system_root/bin instead - due to a different mountpoint of system-partition.

This could cause many installations to fail.

CaptainThrowback commented 4 years ago

/system_root is the correct mount point for SAR devices. There is a symlink from /system_root/system to /system by default, but in order for zip installations to succeed, it has to be deleted. The actual location of the binary is /system_root/system/bin. There is no adjustment to be made here.

EDIT: The proper way to determine where the binaries should be located is to check the path of the ANDROID_ROOT variable, and if it's system, use system/bin, but if it's system_root, use the longer path mentioned above. That's pretty basic logic which any app should be able to accommodate.