Manually grant executable privileges to linker

Even though executable permissions have been added to the version control, considering that some people don't use it, they directly download the zip archive and unzip it, which by default has no executable permissions
Close #121
This commit is contained in:
Howard Wu 2022-09-24 15:42:37 +08:00
parent 0c650f9f15
commit 105a778eee

View File

@ -376,6 +376,7 @@ if [ -f "$MAGISK_PATH" ]; then
$SUDO patchelf --replace-needed libc.so "../linker/$HOST_ARCH/libc.so" "$WORK_DIR"/magisk/magiskpolicy || abort
$SUDO patchelf --replace-needed libm.so "../linker/$HOST_ARCH/libm.so" "$WORK_DIR"/magisk/magiskpolicy || abort
$SUDO patchelf --replace-needed libdl.so "../linker/$HOST_ARCH/libdl.so" "$WORK_DIR"/magisk/magiskpolicy || abort
chmod +x "../linker/$HOST_ARCH/linker64" || abort
$SUDO patchelf --set-interpreter "../linker/$HOST_ARCH/linker64" "$WORK_DIR"/magisk/magiskpolicy || abort
chmod +x "$WORK_DIR"/magisk/magiskpolicy || abort
elif [ -z "${CUSTOM_MAGISK+x}" ]; then