mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-15 23:31:50 +00:00
Stop embedding stub.apk in magiskinit
This commit is contained in:
15
build.py
15
build.py
@@ -309,13 +309,7 @@ def binary_dump(src, var_name, compressor=xz):
|
||||
|
||||
|
||||
def dump_bin_header(args):
|
||||
stub = op.join(config['outdir'], f'stub-{"release" if args.release else "debug"}.apk')
|
||||
if not op.exists(stub):
|
||||
error('Build stub APK before building "magiskinit"')
|
||||
mkdir_p(native_gen_path)
|
||||
with open(stub, 'rb') as src:
|
||||
text = binary_dump(src, 'manager_xz')
|
||||
write_if_diff(op.join(native_gen_path, 'binaries.h'), text)
|
||||
for arch in archs:
|
||||
preload = op.join('native', 'out', arch, 'libinit-ld.so')
|
||||
with open(preload, 'rb') as src:
|
||||
@@ -432,11 +426,6 @@ def build_app(args):
|
||||
build_apk(args, 'app')
|
||||
|
||||
|
||||
def build_stub(args):
|
||||
header('* Building the stub app')
|
||||
build_apk(args, 'stub')
|
||||
|
||||
|
||||
def cleanup(args):
|
||||
support_targets = {'native', 'java'}
|
||||
if args.target:
|
||||
@@ -554,7 +543,6 @@ def patch_avd_ramdisk(args):
|
||||
|
||||
|
||||
def build_all(args):
|
||||
build_stub(args)
|
||||
build_binary(args)
|
||||
build_app(args)
|
||||
|
||||
@@ -582,9 +570,6 @@ binary_parser.set_defaults(func=build_binary)
|
||||
app_parser = subparsers.add_parser('app', help='build the Magisk app')
|
||||
app_parser.set_defaults(func=build_app)
|
||||
|
||||
stub_parser = subparsers.add_parser('stub', help='build the stub app')
|
||||
stub_parser.set_defaults(func=build_stub)
|
||||
|
||||
avd_parser = subparsers.add_parser(
|
||||
'emulator', help='setup AVD for development')
|
||||
avd_parser.add_argument('-s', '--skip', action='store_true',
|
||||
|
||||
Reference in New Issue
Block a user