Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 534d4e06 authored by Ethan Yonker's avatar Ethan Yonker
Browse files

Fix compatibility across the board

Change-Id: I6376920775ddabb4d4af505fffd86e404403a64a
parent df681841
Loading
Loading
Loading
Loading
+14 −5
Original line number Diff line number Diff line
@@ -119,7 +119,10 @@ LOCAL_SHARED_LIBRARIES += libaosprecovery libz libc libcutils libstdc++ libtar l
LOCAL_SHARED_LIBRARIES += libcrecovery

ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
    LOCAL_SHARED_LIBRARIES += libstlport libmincrypttwrp
    LOCAL_SHARED_LIBRARIES += libstlport
endif
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 24; echo $$?),0)
    LOCAL_SHARED_LIBRARIES += libmincrypttwrp
    LOCAL_C_INCLUDES += $(LOCAL_PATH)/libmincrypt/includes
    LOCAL_CFLAGS += -DUSE_OLD_VERIFIER
else
@@ -563,12 +566,18 @@ LOCAL_CFLAGS := -std=gnu++0x
LOCAL_SRC_FILES := adb_install.cpp asn1_decoder.cpp bootloader.cpp legacy_property_service.cpp set_metadata.cpp tw_atomic.cpp
LOCAL_SHARED_LIBRARIES += libc liblog libcutils libmtdutils libfusesideload libselinux
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
    LOCAL_SHARED_LIBRARIES += libstdc++ libstlport libmincrypttwrp
    LOCAL_C_INCLUDES := bionic external/stlport/stlport $(LOCAL_PATH)/libmincrypt/includes
    LOCAL_SHARED_LIBRARIES += libstdc++ libstlport
    LOCAL_C_INCLUDES := bionic external/stlport/stlport
else
    LOCAL_SHARED_LIBRARIES += libc++
endif
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 24; echo $$?),0)
    LOCAL_SHARED_LIBRARIES += libmincrypttwrp
    LOCAL_C_INCLUDES := $(LOCAL_PATH)/libmincrypt/includes
    LOCAL_SRC_FILES += oldverifier/verifier.cpp
    LOCAL_CFLAGS += -DUSE_OLD_VERIFIER
else
    LOCAL_SHARED_LIBRARIES += libc++ libcrypto
    LOCAL_SHARED_LIBRARIES += libcrypto
    LOCAL_SRC_FILES += verifier.cpp
endif

@@ -638,7 +647,7 @@ include $(commands_recovery_local_path)/injecttwrp/Android.mk \
    $(commands_recovery_local_path)/adbbu/Android.mk \
    $(commands_recovery_local_path)/libpixelflinger/Android.mk

ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 24; echo $$?),0)
    include $(commands_recovery_local_path)/libmincrypt/Android.mk
endif

+3 −6
Original line number Diff line number Diff line
@@ -29,6 +29,9 @@ LOCAL_CFLAGS = -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing
LOCAL_C_INCLUDES += bionic external/zlib
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
    LOCAL_C_INCLUDES += external/stlport/stlport
    LOCAL_SHARED_LIBRARIES += libstlport
else
    LOCAL_SHARED_LIBRARIES += libc++
endif

LOCAL_SRC_FILES = \
@@ -36,10 +39,4 @@ LOCAL_SRC_FILES = \

LOCAL_SHARED_LIBRARIES += libz libc libstdc++

ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
    LOCAL_SHARED_LIBRARIES += libstlport
else
    LOCAL_SHARED_LIBRARIES += libc++
endif

include $(BUILD_SHARED_LIBRARY)
+1 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ minadbd_cflags := \
    -Wno-unused-parameter \
    -Wno-missing-field-initializers \
    -DADB_HOST=0 \
    -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION)

include $(CLEAR_VARS)

+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ int adb_server_main(int is_daemon, int server_port, int /* reply_fd */) {
    init_transport_registration();
    usb_init();

    VLOG(ADB) << "Event loop starting";
    //VLOG(ADB) << "Event loop starting";
    fdevent_loop();

    return 0;
+13 −1
Original line number Diff line number Diff line
@@ -73,7 +73,12 @@ static int create_service_thread(void (*func)(int, void *), void *cookie) {
    sti->cookie = cookie;
    sti->fd = s[1];

#if PLATFORM_SDK_VERSION == 23
    adb_thread_t t;
    if (adb_thread_create( &t, (adb_thread_func_t)service_bootstrap_func, sti)){
#else
    if (!adb_thread_create(service_bootstrap_func, sti)) {
#endif
        free(sti);
        adb_close(s[0]);
        adb_close(s[1]);
@@ -81,7 +86,7 @@ static int create_service_thread(void (*func)(int, void *), void *cookie) {
        return -1;
    }

    VLOG(SERVICES) << "service thread started, " << s[0] << ":" << s[1];
    //VLOG(SERVICES) << "service thread started, " << s[0] << ":" << s[1];
    return s[0];
}

@@ -102,3 +107,10 @@ int service_to_fd(const char* name, const atransport* transport) {
    }
    return ret;
}

#if PLATFORM_SDK_VERSION == 23
int service_to_fd(const char* name) {
    atransport transport;
    return service_to_fd(name, &transport);
}
#endif
Loading