1
0
mirror of https://github.com/topjohnwu/Magisk.git synced 2024-12-29 15:57:40 +00:00

Add hide Magisk Manager feature

This commit is contained in:
topjohnwu 2017-08-22 03:02:08 +08:00
parent e3df62d812
commit 7f8ba74dac
2 changed files with 14 additions and 4 deletions

@ -1 +1 @@
Subproject commit ea6552615d25fb107fd8ecab06a80102acdc1354
Subproject commit 657f4ab3036aca81bdf415a32b65ea76efae88fe

@ -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!')