2
0
mirror of https://github.com/topjohnwu/Magisk synced 2025-09-02 00:25:12 +00:00

Update to NDK r23b

Credits: @yujincheng08

Close #5193
This commit is contained in:
topjohnwu
2022-01-30 07:11:51 -08:00
parent f880b57544
commit d3d28f0623
10 changed files with 55 additions and 27 deletions

View File

@@ -405,7 +405,7 @@ def cleanup(args):
def setup_ndk(args):
os_name = platform.system().lower()
ndk_ver = config['ndkVersion']
url = f'https://dl.google.com/android/repository/android-ndk-r{ndk_ver}-{os_name}-x86_64.zip'
url = f'https://dl.google.com/android/repository/android-ndk-r{ndk_ver}-{os_name}.zip'
ndk_zip = url.split('/')[-1]
header(f'* Downloading {ndk_zip}')
@@ -417,7 +417,7 @@ def setup_ndk(args):
with zipfile.ZipFile(ndk_zip, 'r') as zf:
for info in zf.infolist():
vprint(f'Extracting {info.filename}')
if info.external_attr == 2716663808: # symlink
if info.external_attr >> 28 == 0xA: # symlink
src = zf.read(info).decode("utf-8")
dest = op.join(ndk_root, info.filename)
os.symlink(src, dest)