Skip to content

Commit 815edac

Browse files
author
git-core
committed
Merge legacy branch
1 parent cbcc769 commit 815edac

File tree

3 files changed

+22
-8
lines changed

3 files changed

+22
-8
lines changed

Android.mk

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,19 @@ include $(CLEAR_VARS)
44
LOCAL_MODULE := su
55
LOCAL_SRC_FILES := su.c db.c activity.cpp
66

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
715

816
LOCAL_C_INCLUDES += external/sqlite/dist
917

10-
LOCAL_SHARED_LIBRARIES := \
11-
liblog \
12-
libsqlite \
13-
libcutils \
14-
libbinder \
15-
libutils \
18+
LOCAL_SHARED_LIBRARIES := $(SU_SHARED_LIBRARIES)
1619

1720
LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
18-
LOCAL_MODULE_TAGS := debug,eng
1921

2022
include $(BUILD_EXECUTABLE)

activity.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,15 @@
1717

1818
#include <unistd.h>
1919
#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
2025
#include <binder/IBinder.h>
2126
#include <binder/IServiceManager.h>
2227
#include <binder/Parcel.h>
28+
#endif
2329
#include <utils/String8.h>
2430
#include <assert.h>
2531

su.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,13 @@
2727

2828
#define DEFAULT_COMMAND "/system/bin/sh"
2929

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
3137
#define VERSION_CODE 15
3238

3339
#define DATABASE_VERSION 6

0 commit comments

Comments
 (0)