mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-22 07:57:39 +00:00
Update NDK to r21e
This commit is contained in:
parent
117ae71025
commit
851404205b
29
build.py
29
build.py
@ -405,31 +405,30 @@ def setup_ndk(args):
|
||||
rm_rf(ndk_path)
|
||||
with zipfile.ZipFile(ndk_zip, 'r') as zf:
|
||||
for info in zf.infolist():
|
||||
print(f'Extracting {info.filename}')
|
||||
if info.external_attr == 2716663808: # symlink
|
||||
src = zf.read(info).decode("utf-8")
|
||||
dest = op.join(ndk_root, info.filename)
|
||||
os.symlink(src, dest)
|
||||
continue
|
||||
extracted_path = zf.extract(info, ndk_root)
|
||||
vprint(f'Extracting {info.filename}')
|
||||
if info.create_system == 3: # ZIP_UNIX_SYSTEM = 3
|
||||
unix_attributes = info.external_attr >> 16
|
||||
if unix_attributes:
|
||||
os.chmod(extracted_path, unix_attributes)
|
||||
mv(op.join(ndk_root, f'android-ndk-r{ndk_ver}'), ndk_path)
|
||||
|
||||
header('* Removing unnecessary files')
|
||||
for dirname, subdirs, _ in os.walk(op.join(ndk_path, 'platforms')):
|
||||
for plats in subdirs:
|
||||
pp = op.join(dirname, plats)
|
||||
rm_rf(pp)
|
||||
mkdir(pp)
|
||||
subdirs.clear()
|
||||
rm_rf(op.join(ndk_path, 'sysroot'))
|
||||
|
||||
header('* Replacing API-16 static libs')
|
||||
for target in ['arm-linux-androideabi', 'i686-linux-android']:
|
||||
header('* Patching static libs')
|
||||
for api in ['16', '21']:
|
||||
for target in ['aarch64-linux-android', 'arm-linux-androideabi',
|
||||
'i686-linux-android', 'x86_64-linux-android']:
|
||||
arch = target.split('-')[0]
|
||||
lib_dir = op.join(
|
||||
ndk_path, 'toolchains', 'llvm', 'prebuilt', f'{os_name}-x86_64',
|
||||
'sysroot', 'usr', 'lib', f'{target}', '16')
|
||||
src_dir = op.join('tools', 'ndk-bins', arch)
|
||||
# Remove stupid macOS crap
|
||||
'sysroot', 'usr', 'lib', f'{target}', api)
|
||||
if not op.exists(lib_dir):
|
||||
continue
|
||||
src_dir = op.join('tools', 'ndk-bins', api, arch)
|
||||
rm(op.join(src_dir, '.DS_Store'))
|
||||
for path in copy_tree(src_dir, lib_dir):
|
||||
vprint(f'Replaced {path}')
|
||||
|
@ -29,5 +29,5 @@ kapt.incremental.apt=true
|
||||
# Magisk
|
||||
magisk.stubVersion=18
|
||||
magisk.versionCode=22001
|
||||
magisk.ndkVersion=21d
|
||||
magisk.fullNdkVersion=21.3.6528147
|
||||
magisk.ndkVersion=21e
|
||||
magisk.fullNdkVersion=21.4.7075529
|
||||
|
5
native/jni/external/Android.mk
vendored
5
native/jni/external/Android.mk
vendored
@ -253,9 +253,10 @@ LOCAL_EXPORT_C_INCLUDES := $(LIBSELINUX)
|
||||
LOCAL_STATIC_LIBRARIES := libpcre2
|
||||
LOCAL_CFLAGS := \
|
||||
-Wno-implicit-function-declaration -Wno-int-conversion -Wno-unused-function \
|
||||
-D_GNU_SOURCE -DUSE_PCRE2 \
|
||||
-Wno-macro-redefined -D_GNU_SOURCE -DUSE_PCRE2 \
|
||||
-DNO_PERSISTENTLY_STORED_PATTERNS -DDISABLE_SETRANS -DDISABLE_BOOL \
|
||||
-DNO_MEDIA_BACKEND -DNO_X_BACKEND -DNO_DB_BACKEND -DNO_ANDROID_BACKEND
|
||||
-DNO_MEDIA_BACKEND -DNO_X_BACKEND -DNO_DB_BACKEND -DNO_ANDROID_BACKEND \
|
||||
-Dfgets_unlocked=fgets -D'__fsetlocking(...)='
|
||||
LOCAL_SRC_FILES := \
|
||||
selinux/libselinux/src/avc.c \
|
||||
selinux/libselinux/src/avc_internal.c \
|
||||
|
2
native/jni/external/busybox
vendored
2
native/jni/external/busybox
vendored
@ -1 +1 @@
|
||||
Subproject commit 6e22deb3006f5ab49d50b1840540a64ae6eb4a34
|
||||
Subproject commit 76822933adc85c853daa6743d93433461f620849
|
BIN
tools/ndk-bins/21/aarch64/crtbegin_dynamic.o
Normal file
BIN
tools/ndk-bins/21/aarch64/crtbegin_dynamic.o
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/aarch64/crtbegin_so.o
Normal file
BIN
tools/ndk-bins/21/aarch64/crtbegin_so.o
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/aarch64/crtbegin_static.o
Normal file
BIN
tools/ndk-bins/21/aarch64/crtbegin_static.o
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/aarch64/crtend_android.o
Normal file
BIN
tools/ndk-bins/21/aarch64/crtend_android.o
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/aarch64/crtend_so.o
Normal file
BIN
tools/ndk-bins/21/aarch64/crtend_so.o
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/aarch64/libc.a
Normal file
BIN
tools/ndk-bins/21/aarch64/libc.a
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/aarch64/libm.a
Normal file
BIN
tools/ndk-bins/21/aarch64/libm.a
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/aarch64/libstdc++.a
Normal file
BIN
tools/ndk-bins/21/aarch64/libstdc++.a
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/aarch64/libz.a
Normal file
BIN
tools/ndk-bins/21/aarch64/libz.a
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/arm/crtbegin_dynamic.o
Normal file
BIN
tools/ndk-bins/21/arm/crtbegin_dynamic.o
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/arm/crtbegin_so.o
Normal file
BIN
tools/ndk-bins/21/arm/crtbegin_so.o
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/arm/crtbegin_static.o
Normal file
BIN
tools/ndk-bins/21/arm/crtbegin_static.o
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/arm/crtend_android.o
Normal file
BIN
tools/ndk-bins/21/arm/crtend_android.o
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/arm/crtend_so.o
Normal file
BIN
tools/ndk-bins/21/arm/crtend_so.o
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/arm/libc.a
Normal file
BIN
tools/ndk-bins/21/arm/libc.a
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/arm/libm.a
Normal file
BIN
tools/ndk-bins/21/arm/libm.a
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/arm/libstdc++.a
Normal file
BIN
tools/ndk-bins/21/arm/libstdc++.a
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/arm/libz.a
Normal file
BIN
tools/ndk-bins/21/arm/libz.a
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/i686/crtbegin_dynamic.o
Normal file
BIN
tools/ndk-bins/21/i686/crtbegin_dynamic.o
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/i686/crtbegin_so.o
Normal file
BIN
tools/ndk-bins/21/i686/crtbegin_so.o
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/i686/crtbegin_static.o
Normal file
BIN
tools/ndk-bins/21/i686/crtbegin_static.o
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/i686/crtend_android.o
Normal file
BIN
tools/ndk-bins/21/i686/crtend_android.o
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/i686/crtend_so.o
Normal file
BIN
tools/ndk-bins/21/i686/crtend_so.o
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/i686/libc.a
Normal file
BIN
tools/ndk-bins/21/i686/libc.a
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/i686/libm.a
Normal file
BIN
tools/ndk-bins/21/i686/libm.a
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/i686/libstdc++.a
Normal file
BIN
tools/ndk-bins/21/i686/libstdc++.a
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/i686/libz.a
Normal file
BIN
tools/ndk-bins/21/i686/libz.a
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/x86_64/crtbegin_dynamic.o
Normal file
BIN
tools/ndk-bins/21/x86_64/crtbegin_dynamic.o
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/x86_64/crtbegin_so.o
Normal file
BIN
tools/ndk-bins/21/x86_64/crtbegin_so.o
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/x86_64/crtbegin_static.o
Normal file
BIN
tools/ndk-bins/21/x86_64/crtbegin_static.o
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/x86_64/crtend_android.o
Normal file
BIN
tools/ndk-bins/21/x86_64/crtend_android.o
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/x86_64/crtend_so.o
Normal file
BIN
tools/ndk-bins/21/x86_64/crtend_so.o
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/x86_64/libc.a
Normal file
BIN
tools/ndk-bins/21/x86_64/libc.a
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/x86_64/libm.a
Normal file
BIN
tools/ndk-bins/21/x86_64/libm.a
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/x86_64/libstdc++.a
Normal file
BIN
tools/ndk-bins/21/x86_64/libstdc++.a
Normal file
Binary file not shown.
BIN
tools/ndk-bins/21/x86_64/libz.a
Normal file
BIN
tools/ndk-bins/21/x86_64/libz.a
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user