From 102a7f87232190e61d69a88619f178de1bd2e103 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Tue, 18 Apr 2017 21:31:12 +0800 Subject: [PATCH] Change flags --- jni/Android.mk | 2 +- jni/daemon/daemon.c | 4 ++-- jni/magisk.h | 11 +++++++---- jni/main.c | 2 +- jni/su | 2 +- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/jni/Android.mk b/jni/Android.mk index 9943583f2..86c992578 100644 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -44,7 +44,7 @@ LOCAL_SRC_FILES := \ su/su_client.c \ su/su_socket.c -LOCAL_CFLAGS := -Wno-implicit-exception-spec-mismatch -DDEBUG +LOCAL_CFLAGS := -Wno-implicit-exception-spec-mismatch LOCAL_LDLIBS := -llog include $(BUILD_EXECUTABLE) diff --git a/jni/daemon/daemon.c b/jni/daemon/daemon.c index f9cc093dd..5c98c9bba 100644 --- a/jni/daemon/daemon.c +++ b/jni/daemon/daemon.c @@ -44,11 +44,11 @@ static void request_handler(int client) { su_daemon_receiver(client); break; case CHECK_VERSION: - write_string(client, VERSION_STR); + write_string(client, MAGISK_VER_STR); close(client); break; case CHECK_VERSION_CODE: - write_int(client, VERSION_CODE); + write_int(client, MAGISK_VER_CODE); close(client); break; case POST_FS: diff --git a/jni/magisk.h b/jni/magisk.h index 39dce334d..db33b97a5 100644 --- a/jni/magisk.h +++ b/jni/magisk.h @@ -10,10 +10,13 @@ #include #include - -#define VERSION_CODE 130 -#define VERSION 13.0 -#define VERSION_STR xstr(VERSION) ":MAGISK" +#ifndef MAGISK_VER_CODE +#define MAGISK_VER_CODE 99999 +#endif +#ifndef MAGISK_VERSION +#define MAGISK_VERSION VER_DEBUG +#endif +#define MAGISK_VER_STR xstr(MAGISK_VERSION) ":MAGISK" #define str(a) #a #define xstr(a) str(a) diff --git a/jni/main.c b/jni/main.c index 79e2d551c..af85c1b1f 100644 --- a/jni/main.c +++ b/jni/main.c @@ -58,7 +58,7 @@ int main(int argc, char *argv[]) { if (strcmp(arg, "magisk") == 0) { if (argc < 2) usage(); if (strcmp(argv[1], "-v") == 0) { - printf("Client: %s\n", VERSION_STR); + printf("Client: %s\n", MAGISK_VER_STR); int fd = connect_daemon(); write_int(fd, CHECK_VERSION); char *v = read_string(fd); diff --git a/jni/su b/jni/su index 4035d5b03..b499ac8ab 160000 --- a/jni/su +++ b/jni/su @@ -1 +1 @@ -Subproject commit 4035d5b0379ddb69ce037c54587bd222710d0396 +Subproject commit b499ac8abacc9d009d110146e2f681a9b0a66f19