Force main binaries recompile everytime

This commit is contained in:
topjohnwu 2017-07-31 23:52:30 +08:00
parent 64e85da59f
commit 7058c8ff5a
1 changed files with 6 additions and 0 deletions

View File

@ -58,6 +58,12 @@ def build_all(args):
def build_binary(args):
header('* Building Magisk binaries')
# Force update Android.mk footprint to trigger recompilation
with open(os.path.join('jni', 'Android.mk'), 'r') as makefile:
content = makefile.read()
with open(os.path.join('jni', 'Android.mk'), 'w') as makefile:
makefile.write(content)
ndk_build = os.path.join(os.environ['ANDROID_HOME'], 'ndk-bundle', 'ndk-build')
debug_flag = '' if args.release else '-DMAGISK_DEBUG'
proc = subprocess.run('{} APP_CFLAGS=\"-DMAGISK_VERSION=\\\"{}\\\" -DMAGISK_VER_CODE={} {}\" -j{}'.format(