File tree Expand file tree Collapse file tree 3 files changed +22
-8
lines changed Expand file tree Collapse file tree 3 files changed +22
-8
lines changed Original file line number Diff line number Diff line change @@ -4,17 +4,19 @@ include $(CLEAR_VARS)
4
4
LOCAL_MODULE := su
5
5
LOCAL_SRC_FILES := su.c db.c activity.cpp
6
6
7
+ SU_SHARED_LIBRARIES := liblog libsqlite
8
+ ifeq ($(PLATFORM_SDK_VERSION ) ,4)
9
+ LOCAL_CFLAGS += -DSU_LEGACY_BUILD
10
+ SU_SHARED_LIBRARIES += libandroid_runtime
11
+ else
12
+ SU_SHARED_LIBRARIES += libcutils libbinder libutils
13
+ LOCAL_MODULE_TAGS := debug,eng
14
+ endif
7
15
8
16
LOCAL_C_INCLUDES += external/sqlite/dist
9
17
10
- LOCAL_SHARED_LIBRARIES := \
11
- liblog \
12
- libsqlite \
13
- libcutils \
14
- libbinder \
15
- libutils \
18
+ LOCAL_SHARED_LIBRARIES := $(SU_SHARED_LIBRARIES )
16
19
17
20
LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES )
18
- LOCAL_MODULE_TAGS := debug,eng
19
21
20
22
include $(BUILD_EXECUTABLE )
Original file line number Diff line number Diff line change 17
17
18
18
#include < unistd.h>
19
19
#include < android_runtime/ActivityManager.h>
20
+ #ifdef SU_LEGACY_BUILD
21
+ #include < utils/IBinder.h>
22
+ #include < utils/IServiceManager.h>
23
+ #include < utils/Parcel.h>
24
+ #else
20
25
#include < binder/IBinder.h>
21
26
#include < binder/IServiceManager.h>
22
27
#include < binder/Parcel.h>
28
+ #endif
23
29
#include < utils/String8.h>
24
30
#include < assert.h>
25
31
Original file line number Diff line number Diff line change 27
27
28
28
#define DEFAULT_COMMAND "/system/bin/sh"
29
29
30
- #define VERSION "3.0.3.2"
30
+ #ifdef SU_LEGACY_BUILD
31
+ #define VERSION_EXTRA "l"
32
+ #else
33
+ #define VERSION_EXTRA ""
34
+ #endif
35
+
36
+ #define VERSION "3.0.3.2" VERSION_EXTRA
31
37
#define VERSION_CODE 15
32
38
33
39
#define DATABASE_VERSION 6
You can’t perform that action at this time.
0 commit comments