Skip to content

Commit

Permalink
Make the android-5.0 branch compile in 4.4 to 4.1
Browse files Browse the repository at this point in the history
Migrate previous minzip to minzipold replacing the existing
minzipold. This will break compatibility with trees that do not
support selinux (ICS and older). Migrate former verifier files to
verifierold.

Add fuse.h to recovery source because older trees do not have it.

Add LOCAL_MODULE_TAGS where needed for 4.1 tree.

Change-Id: Iade57cb2b0115af7fce9f56aa98636b1744a1ef4
  • Loading branch information
Dees-Troy committed Dec 2, 2014
1 parent cdc3ef5 commit 75bf041
Show file tree
Hide file tree
Showing 21 changed files with 1,225 additions and 52 deletions.
21 changes: 15 additions & 6 deletions Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ LOCAL_CFLAGS += -Wno-unused-parameter
# libm \
# libc

LOCAL_C_INCLUDES += bionic external/stlport/stlport external/openssl/include
LOCAL_C_INCLUDES += bionic external/stlport/stlport external/openssl/include $(LOCAL_PATH)/libmincrypt/includes

LOCAL_STATIC_LIBRARIES :=
LOCAL_SHARED_LIBRARIES :=
Expand Down Expand Up @@ -326,6 +326,11 @@ ifneq ($(wildcard bionic/libc/include/sys/capability.h),)
LOCAL_CFLAGS += -DHAVE_CAPABILITIES
endif

# Auto filled build flag
ifeq ($(PLATFORM_VERSION), 5.0)
LOCAL_CFLAGS += -DANDROID_VERSION=5
endif

LOCAL_LDFLAGS += -Wl,-dynamic-linker,/sbin/linker

LOCAL_ADDITIONAL_DEPENDENCIES := \
Expand All @@ -339,8 +344,7 @@ LOCAL_ADDITIONAL_DEPENDENCIES := \
teamwin \
toolbox_symlinks \
twrp \
unpigz_symlink \
updater
unpigz_symlink

ifneq ($(TARGET_ARCH), arm64)
LOCAL_ADDITIONAL_DEPENDENCIES += \
Expand Down Expand Up @@ -439,7 +443,7 @@ LOCAL_SRC_FILES := fuse_sideload.c

LOCAL_CFLAGS := -O2 -g -DADB_HOST=0 -Wall -Wno-unused-parameter
LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE

LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := libfusesideload
LOCAL_C_INCLUDES := $(LOCAL_PATH)/libmincrypt/includes
LOCAL_SHARED_LIBRARIES := libcutils libc libmincrypttwrp
Expand Down Expand Up @@ -474,7 +478,12 @@ include $(CLEAR_VARS)
LOCAL_MODULE := libaosprecovery
LOCAL_MODULE_TAGS := eng optional
LOCAL_C_INCLUDES := $(LOCAL_PATH)/libmincrypt/includes
LOCAL_SRC_FILES = adb_install.cpp asn1_decoder.cpp bootloader.cpp verifier.cpp mtdutils/mtdutils.c legacy_property_service.c
LOCAL_SRC_FILES := adb_install.cpp asn1_decoder.cpp bootloader.cpp mtdutils/mtdutils.c legacy_property_service.c
ifeq ($(PLATFORM_VERSION), 5.0)
LOCAL_SRC_FILES += verifier.cpp
else
LOCAL_SRC_FILES += verifierold.cpp
endif
LOCAL_SHARED_LIBRARIES += libc liblog libcutils libmtdutils libfusesideload libmincrypttwrp

ifneq ($(BOARD_RECOVERY_BLDRMSG_OFFSET),)
Expand Down Expand Up @@ -533,7 +542,7 @@ endif
ifeq ($(TW_INCLUDE_L_CRYPTO), true)
include $(commands_recovery_local_path)/crypto/lollipop/Android.mk
endif
ifeq ($(TWHAVE_SELINUX), true)
ifeq ($(PLATFORM_VERSION), 5.0)
include $(commands_recovery_local_path)/minzip/Android.mk
else
include $(commands_recovery_local_path)/minzipold/Android.mk
Expand Down
1 change: 0 additions & 1 deletion etc/init.rc
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ service healthd /sbin/healthd -r
seclabel u:r:healthd:s0

service recovery /sbin/recovery
seclabel u:r:recovery:s0

service adbd /sbin/adbd --root_seclabel=u:r:su:s0 --device_banner=recovery
disabled
Expand Down
Loading

0 comments on commit 75bf041

Please sign in to comment.