forked from arenekosreal/MagiskOnWSAScript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
magisk-wsa.patch
45 lines (38 loc) · 1.78 KB
/
magisk-wsa.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
diff --git a/build.py b/build.py
index 4cf96de..ad38037 100755
--- a/build.py
+++ b/build.py
@@ -408,9 +408,10 @@ def setup_ndk(args):
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}')
- with urllib.request.urlopen(url) as response, open(ndk_zip, 'wb') as out_file:
- shutil.copyfileobj(response, out_file)
+ if not os.path.exists(ndk_zip):
+ header(f'* Downloading {ndk_zip} with URL {url}')
+ with urllib.request.urlopen(url) as response, open(ndk_zip, 'wb') as out_file:
+ shutil.copyfileobj(response, out_file)
header('* Extracting NDK zip')
rm_rf(ndk_path)
@@ -449,17 +450,17 @@ def setup_avd(args):
build_binary(args)
build_app(args)
- header('* Setting up emulator')
+ # header('* Setting up emulator')
- abi = cmd_out([adb_path, 'shell', 'getprop', 'ro.product.cpu.abi'])
- proc = execv([adb_path, 'push', f'native/out/{abi}/busybox', 'out/app-debug.apk',
- 'scripts/avd_magisk.sh', '/data/local/tmp'])
- if proc.returncode != 0:
- error('adb push failed!')
+ # abi = cmd_out([adb_path, 'shell', 'getprop', 'ro.product.cpu.abi'])
+ # proc = execv([adb_path, 'push', f'native/out/{abi}/busybox', 'out/app-debug.apk',
+ # 'scripts/avd_magisk.sh', '/data/local/tmp'])
+ # if proc.returncode != 0:
+ # error('adb push failed!')
- proc = execv([adb_path, 'shell', 'sh', '/data/local/tmp/avd_magisk.sh'])
- if proc.returncode != 0:
- error('avd_magisk.sh failed!')
+ # proc = execv([adb_path, 'shell', 'sh', '/data/local/tmp/avd_magisk.sh'])
+ # if proc.returncode != 0:
+ # error('avd_magisk.sh failed!')
def patch_avd_ramdisk(args):