Add riscv64 support

This commit is contained in:
LoveSy
2024-04-04 22:15:14 +08:00
committed by John Wu
parent e9694c6195
commit a07b9315a5
11 changed files with 39 additions and 34 deletions

View File

@ -58,7 +58,7 @@ for file in lib*.so; do
mv "$file" "${file:3:${#file}-6}"
done
if $IS64BIT; then
if [ -e "/system/bin/linker" ]; then
unzip -oj magisk.apk "lib/$ABI32/libmagisk.so"
mv libmagisk.so magisk32
chmod 755 magisk32

View File

@ -494,11 +494,7 @@ remove_system_su() {
api_level_arch_detect() {
API=$(grep_get_prop ro.build.version.sdk)
ABI=$(grep_get_prop ro.product.cpu.abi)
if [ "$ABI" = "x86" ]; then
ARCH=x86
ABI32=x86
IS64BIT=false
elif [ "$ABI" = "arm64-v8a" ]; then
if [ "$ABI" = "arm64-v8a" ]; then
ARCH=arm64
ABI32=armeabi-v7a
IS64BIT=true
@ -506,11 +502,18 @@ api_level_arch_detect() {
ARCH=x64
ABI32=x86
IS64BIT=true
else
elif [ "$ABI" = "armeabi-v7a" ]; then
ARCH=arm
ABI=armeabi-v7a
ABI32=armeabi-v7a
IS64BIT=false
elif [ "$ABI" = "x86" ]; then
ARCH=x86
ABI32=x86
IS64BIT=false
elif [ "$ABI" = "riscv64" ]; then
ARCH=riscv64
ABI32=riscv32
IS64BIT=true
fi
}