commit | 2923defaeace94529d526df18bb4525e224611a2 | [log] [tgz] |
---|---|---|
author | Ian Macdonald <ian@caliban.org> | Wed Dec 04 19:45:32 2019 +0100 |
committer | Ian Macdonald <ian@caliban.org> | Thu Dec 05 01:54:57 2019 +0100 |
tree | 5eb8693ebc47c87816b3d9cec41b6ff93a2e75e1 | |
parent | 72d75b0b40221d5c079448d7b2ad04a15d1505da [diff] |
/sbin should come first in the linker search path. /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
Team Win Recovery Project (TWRP)
You can find a compiling guide here.