2923defaea
/sbin must come before any other search path when TWRP is built for a different version of Android than the one on which it will run. Otherwise, as soon as any of the other paths becomes available via direct action (i.e. the user mounts a file-system) or indirect action (e.g. the user flashes a zip that mounts a file-system), incompatible libraries will be prioritised and loaded instead of the correct ones from /sbin in TWRP's ramdisk. This will cause severe disruption of the TWRP environment. Toybox and other dynamically linked binaries will immediately cease to work; and since Toybox provides umount, it typically won't be possible to recover from this state without a reboot. For example, the following occurs when a Toybox applet is run on a Samsung Galaxy S10 running Android 10, but using a version of TWRP built for Android 9: android:/ # getprop ro.boot.bootloader CANNOT LINK EXECUTABLE "getprop": cannot locate symbol "_system_properties_init" referenced by "/system_root/system/lib64/libselinux.so"... linker: CANNOT LINK EXECUTABLE "getprop": cannot locate symbol "_system_properties_init" referenced by "/system_root/system/lib64/libselinux.so"... Change-Id: I31fe612ebb1c7d9ad71d67be2c615caa3fbb5d6f
29 KiB
Executable File
29 KiB
Executable File