From 4df1047b07ba7d1c80b6e99db5a35ac1f69d5904 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Wed, 30 Jan 2019 03:35:07 -0500 Subject: [PATCH] Native project restructuring --- build.py | 2 +- native/jni/Android.mk | 18 +++++++++--------- native/jni/{misc => core}/applets.cpp | 0 native/jni/{daemon => core}/bootstages.cpp | 0 native/jni/{daemon => core}/daemon.cpp | 0 native/jni/{daemon => core}/db.cpp | 0 native/jni/{misc => core}/img.cpp | 0 native/jni/{misc => core}/init.cpp | 0 native/jni/{daemon => core}/log_daemon.cpp | 0 native/jni/{daemon => core}/magisk.cpp | 0 native/jni/{daemon => core}/socket.cpp | 0 11 files changed, 10 insertions(+), 10 deletions(-) rename native/jni/{misc => core}/applets.cpp (100%) rename native/jni/{daemon => core}/bootstages.cpp (100%) rename native/jni/{daemon => core}/daemon.cpp (100%) rename native/jni/{daemon => core}/db.cpp (100%) rename native/jni/{misc => core}/img.cpp (100%) rename native/jni/{misc => core}/init.cpp (100%) rename native/jni/{daemon => core}/log_daemon.cpp (100%) rename native/jni/{daemon => core}/magisk.cpp (100%) rename native/jni/{daemon => core}/socket.cpp (100%) diff --git a/build.py b/build.py index 25f440d75..98dd54515 100755 --- a/build.py +++ b/build.py @@ -374,7 +374,7 @@ def cleanup(args): if 'native' in args.target: header('* Cleaning native') - system(ndk_build + ' -C native B_MAGISK=1 B_INIT=1 B_BOOT=1 B_BXZ=1 B_BB=1 clean') + system(ndk_build + ' -C native B_MAGISK=1 B_INIT=1 B_BOOT=1 B_BB=1 clean') shutil.rmtree(os.path.join('native', 'out'), ignore_errors=True) if 'java' in args.target: diff --git a/native/jni/Android.mk b/native/jni/Android.mk index 2a7d1984c..ff5497639 100644 --- a/native/jni/Android.mk +++ b/native/jni/Android.mk @@ -32,14 +32,14 @@ LOCAL_C_INCLUDES := \ $(LIBUTILS) LOCAL_SRC_FILES := \ - misc/applets.cpp \ - misc/img.cpp \ - daemon/magisk.cpp \ - daemon/daemon.cpp \ - daemon/log_daemon.cpp \ - daemon/bootstages.cpp \ - daemon/socket.cpp \ - daemon/db.cpp \ + core/applets.cpp \ + core/img.cpp \ + core/magisk.cpp \ + core/daemon.cpp \ + core/log_daemon.cpp \ + core/bootstages.cpp \ + core/socket.cpp \ + core/db.cpp \ magiskhide/magiskhide.cpp \ magiskhide/proc_monitor.cpp \ magiskhide/hide_utils.cpp \ @@ -73,7 +73,7 @@ LOCAL_C_INCLUDES := \ $(LIBUTILS) LOCAL_SRC_FILES := \ - misc/init.cpp \ + core/init.cpp \ magiskpolicy/api.cpp \ magiskpolicy/magiskpolicy.cpp \ magiskpolicy/rules.cpp \ diff --git a/native/jni/misc/applets.cpp b/native/jni/core/applets.cpp similarity index 100% rename from native/jni/misc/applets.cpp rename to native/jni/core/applets.cpp diff --git a/native/jni/daemon/bootstages.cpp b/native/jni/core/bootstages.cpp similarity index 100% rename from native/jni/daemon/bootstages.cpp rename to native/jni/core/bootstages.cpp diff --git a/native/jni/daemon/daemon.cpp b/native/jni/core/daemon.cpp similarity index 100% rename from native/jni/daemon/daemon.cpp rename to native/jni/core/daemon.cpp diff --git a/native/jni/daemon/db.cpp b/native/jni/core/db.cpp similarity index 100% rename from native/jni/daemon/db.cpp rename to native/jni/core/db.cpp diff --git a/native/jni/misc/img.cpp b/native/jni/core/img.cpp similarity index 100% rename from native/jni/misc/img.cpp rename to native/jni/core/img.cpp diff --git a/native/jni/misc/init.cpp b/native/jni/core/init.cpp similarity index 100% rename from native/jni/misc/init.cpp rename to native/jni/core/init.cpp diff --git a/native/jni/daemon/log_daemon.cpp b/native/jni/core/log_daemon.cpp similarity index 100% rename from native/jni/daemon/log_daemon.cpp rename to native/jni/core/log_daemon.cpp diff --git a/native/jni/daemon/magisk.cpp b/native/jni/core/magisk.cpp similarity index 100% rename from native/jni/daemon/magisk.cpp rename to native/jni/core/magisk.cpp diff --git a/native/jni/daemon/socket.cpp b/native/jni/core/socket.cpp similarity index 100% rename from native/jni/daemon/socket.cpp rename to native/jni/core/socket.cpp