diff --git a/MagiskManager b/MagiskManager index ea6552615..657f4ab30 160000 --- a/MagiskManager +++ b/MagiskManager @@ -1 +1 @@ -Subproject commit ea6552615d25fb107fd8ecab06a80102acdc1354 +Subproject commit 657f4ab3036aca81bdf415a32b65ea76efae88fe diff --git a/build.py b/build.py index 2ff9e66aa..04f40ee64 100755 --- a/build.py +++ b/build.py @@ -85,14 +85,24 @@ def build_apk(args): print('cp: {} -> {}'.format(source, target)) shutil.copyfile(source, target) + os.chdir('MagiskManager') + + # Build unhide app and place in assets + proc = subprocess.run('{} unhide::assembleRelease'.format(os.path.join('.', 'gradlew')), shell=True) + if proc.returncode != 0: + error('Build Magisk Manager failed!') + source = os.path.join('unhide', 'build', 'outputs', 'apk', 'release', 'unhide-release-unsigned.apk') + target = os.path.join('app', 'src', 'main', 'assets', 'unhide.apk') + print('cp: {} -> {}'.format(source, target)) + shutil.copyfile(source, target) + print('') - os.chdir('MagiskManager') if args.release: if not os.path.exists(os.path.join('..', 'release_signature.jks')): error('Please generate a java keystore and place it in \'release_signature.jks\'') - proc = subprocess.run('{} assembleRelease'.format(os.path.join('.', 'gradlew')), shell=True) + proc = subprocess.run('{} app::assembleRelease'.format(os.path.join('.', 'gradlew')), shell=True) if proc.returncode != 0: error('Build Magisk Manager failed!') @@ -122,7 +132,7 @@ def build_apk(args): silentremove(unsigned) silentremove(aligned) else: - proc = subprocess.run('{} assembleDebug'.format(os.path.join('.', 'gradlew')), shell=True) + proc = subprocess.run('{} app::assembleDebug'.format(os.path.join('.', 'gradlew')), shell=True) if proc.returncode != 0: error('Build Magisk Manager failed!')