diff --git a/MagiskManager b/MagiskManager index d3ff482c9..e0b4d1c1e 160000 --- a/MagiskManager +++ b/MagiskManager @@ -1 +1 @@ -Subproject commit d3ff482c9b46f58626fdcb6289ffa0cefbf2afcc +Subproject commit e0b4d1c1e4889fdbd66cc3cb0d2a457ba8e4f693 diff --git a/build.py b/build.py index 11e2a2009..72b692af0 100755 --- a/build.py +++ b/build.py @@ -76,9 +76,9 @@ def build_apk(args): if proc.returncode != 0: error('Build Magisk Manager failed!') - unsigned = os.path.join('app', 'build', 'outputs', 'apk', 'app-release-unsigned.apk') - aligned = os.path.join('app', 'build', 'outputs', 'apk', 'app-release-aligned.apk') - release = os.path.join('app', 'build', 'outputs', 'apk', 'app-release.apk') + unsigned = os.path.join('app', 'build', 'outputs', 'apk', 'release', 'app-release-unsigned.apk') + aligned = os.path.join('app', 'build', 'outputs', 'apk', 'release', 'app-release-aligned.apk') + release = os.path.join('app', 'build', 'outputs', 'apk', 'release', 'app-release.apk') # Find the latest build tools build_tool = sorted(os.listdir(os.path.join(os.environ['ANDROID_HOME'], 'build-tools')))[-1] @@ -93,7 +93,7 @@ def build_apk(args): error('Zipalign Magisk Manager failed!') proc = subprocess.run('{} sign --ks {} --out {} {}'.format( - os.path.join(os.environ['ANDROID_HOME'], 'build-tools', build_tool, 'apksigner'), + 'java -jar {}'.format(os.path.join('../ziptools/apksigner.jar')), os.path.join('..', 'release_signature.jks'), release, aligned), shell=True) if proc.returncode != 0: @@ -154,7 +154,8 @@ def zip_main(args): zip_with_msg(zipf, source, target) # APK - source = os.path.join('MagiskManager', 'app', 'build', 'outputs', 'apk', 'app-release.apk' if args.release else 'app-debug.apk') + source = os.path.join('MagiskManager', 'app', 'build', 'outputs', 'apk', + 'release' if args.release else 'debug', 'app-release.apk' if args.release else 'app-debug.apk') target = os.path.join('common', 'magisk.apk') zip_with_msg(zipf, source, target) diff --git a/ziptools/apksigner.jar b/ziptools/apksigner.jar new file mode 100644 index 000000000..b9017b06a Binary files /dev/null and b/ziptools/apksigner.jar differ