From e5b704eb320346a603fc56b6a3e9fa1213c2946d Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Thu, 13 Jul 2017 23:42:01 +0800 Subject: [PATCH] Several cleanups --- jni/Android.mk | 8 -------- jni/external/selinux_stub.c | 2 -- jni/external/sqlite3_stub.c | 1 - jni/resetprop/resetprop.cpp | 18 ++---------------- 4 files changed, 2 insertions(+), 27 deletions(-) diff --git a/jni/Android.mk b/jni/Android.mk index 4423fe09b..5f5f876b0 100644 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -52,13 +52,5 @@ include jni/external/Android.mk # libsepol, static library include jni/selinux/libsepol/Android.mk -##################################################################### -# In order to build separate binaries, please comment out everything -# above (including the lines for libraries) -# Then, uncomment the line you want below -##################################################################### -# include jni/resetprop/Android.mk -# include jni/magiskpolicy/Android.mk - # Build magiskboot include jni/magiskboot/Android.mk diff --git a/jni/external/selinux_stub.c b/jni/external/selinux_stub.c index 6df740152..72998c9f3 100644 --- a/jni/external/selinux_stub.c +++ b/jni/external/selinux_stub.c @@ -1,5 +1,3 @@ -#include -#include #include #include "selinux/avc.h" #include "selinux/context.h" diff --git a/jni/external/sqlite3_stub.c b/jni/external/sqlite3_stub.c index a80d380e4..8b160bdd7 100644 --- a/jni/external/sqlite3_stub.c +++ b/jni/external/sqlite3_stub.c @@ -1,4 +1,3 @@ -#include #include "sqlite3.h" SQLITE_API const char *sqlite3_libversion(void) { return 0; } SQLITE_API const char *sqlite3_sourceid(void) { return 0; } diff --git a/jni/resetprop/resetprop.cpp b/jni/resetprop/resetprop.cpp index 40c278b86..b871c525c 100644 --- a/jni/resetprop/resetprop.cpp +++ b/jni/resetprop/resetprop.cpp @@ -60,27 +60,13 @@ #define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_ #include "_system_properties.h" -#include - -#ifdef INDEP_BINARY - -int resetprop_main(int argc, char *argv[]); -int main(int argc, char *argv[]) { - return resetprop_main(argc, argv); -} -#define PRINT_D(...) if (verbose) printf(__VA_ARGS__) -#define PRINT_E(...) fprintf(stderr, __VA_ARGS__) - -#else +#include "system_properties.h" #include "magisk.h" +#include "resetprop.h" #define PRINT_D(...) { LOGD(__VA_ARGS__); if (verbose) printf(__VA_ARGS__); } #define PRINT_E(...) { LOGE(__VA_ARGS__); fprintf(stderr, __VA_ARGS__); } -#endif - -#include "resetprop.h" - static int verbose = 0; static bool is_legal_property_name(const char* name, size_t namelen) {