Update to support updated FrankeNDK

This commit is contained in:
topjohnwu 2019-07-07 17:38:22 -07:00
parent 4bb2fd6ba6
commit 4c8f357978
3 changed files with 4 additions and 6 deletions

View File

@ -218,9 +218,6 @@ def build_binary(args):
with open(bin_file, 'rb') as src: with open(bin_file, 'rb') as src:
binary_dump(src, out, 'magisk_xz') binary_dump(src, out, 'magisk_xz')
if 'busybox' in args.target:
run_ndk_build('B_BB=1')
if 'magiskinit' in args.target: if 'magiskinit' in args.target:
if not os.path.exists(os.path.join('native', 'out', 'x86', 'binaries_arch.h')): if not os.path.exists(os.path.join('native', 'out', 'x86', 'binaries_arch.h')):
error('Build "magisk" before building "magiskinit"') error('Build "magisk" before building "magiskinit"')
@ -235,6 +232,9 @@ def build_binary(args):
if 'magiskboot' in args.target: if 'magiskboot' in args.target:
run_ndk_build('B_BOOT=1') run_ndk_build('B_BOOT=1')
if 'busybox' in args.target:
run_ndk_build('B_BB=1')
if 'test' in args.target: if 'test' in args.target:
run_ndk_build('B_TEST=1 B_64BIT=1') run_ndk_build('B_TEST=1 B_64BIT=1')

View File

@ -160,6 +160,7 @@ LOCAL_C_INCLUDES := \
jni/include \ jni/include \
$(LIBUTILS) $(LIBUTILS)
LOCAL_SRC_FILES := test.cpp LOCAL_SRC_FILES := test.cpp
LOCAL_LDFLAGS := -static
include $(BUILD_EXECUTABLE) include $(BUILD_EXECUTABLE)
endif endif

View File

@ -17,8 +17,5 @@ endif
# Busybox require some additional settings # Busybox require some additional settings
ifdef B_BB ifdef B_BB
APP_CFLAGS := -Os -fomit-frame-pointer -flto
APP_SHORT_COMMANDS := true
NDK_TOOLCHAIN_VERSION := 4.9
APP_PLATFORM := android-21 APP_PLATFORM := android-21
endif endif