summaryrefslogtreecommitdiffstats
path: root/Android.mk
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2019-07-02 23:36:16 +0200
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2021-02-28 17:13:37 +0100
commit001c859880de24af0c5219a2638fff3100ee5cd2 (patch)
tree77acf4f66c89aac79c9ffc994813708a98996a39 /Android.mk
parente042bd9967851448e550142c4d8cdb0a557d8927 (diff)
downloadhardware_replicant_libsamsung-ril-001c859880de24af0c5219a2638fff3100ee5cd2.tar.gz
hardware_replicant_libsamsung-ril-001c859880de24af0c5219a2638fff3100ee5cd2.tar.bz2
hardware_replicant_libsamsung-ril-001c859880de24af0c5219a2638fff3100ee5cd2.zip
If we configure Replicant 11, libsamsung-ipc and libsamsung-ril to have both libraries in /system/lib/, tools work fine on the Galaxy SIII (GT-I9300): # find -name libsamsung-ril.so 2>/dev/null ./system/lib/libsamsung-ril.so # find -name libsamsung-ipc.so 2>/dev/null ./system/lib/libsamsung-ipc.so # find -name nv_data-md5 2>/dev/null ./system/bin/nv_data-md5 # nv_data-md5 Usage: nv_data-md5 [nv_data.bin] And libsamsung-ril tries to load libsamsung-ipc from the right location in /system/lib/, but it fails due to the vendor and system separation: 01-14 15:50:57.739 1475 1475 E RILD : dlopen failed: dlopen failed: library "/system/lib/libsamsung-ril.so" needed or dlopened by "/system/vendor/bin/hw/rild" is not accessible for the namespace "(default)" Adding LOCAL_PROPRIETARY_MODULE fixes that. Note that the name of that property can be misleading here: libsamsung-ril is free software and shall remain free software. Instead we need to understand LOCAL_PROPRIETARY_MODULE as a way to tell the Android build system that libsamsung-ril is not part of the base Android code but instead that it is code that is specific to a device, set of devices and/or Android distribution. LOCAL_MODULE_RELATIVE_PATH cannot be used instead: even if the binaies end up in /vendor/bin/hw/, and that the libraries ends up in /vendor/lib/hw/, for some reasons the libraries can't be found: i9300:/ # /system/vendor/bin/hw/nv_data-md5 CANNOT LINK EXECUTABLE "/system/vendor/bin/hw/nv_data-md5": library "libsamsung-ipc.so" not found: needed by main executable And most importantly, rild has the same issue than before: E RILD : dlopen failed: dlopen failed: library "libsamsung-ipc.so" not found: needed by /system/vendor/lib/hw/libsamsung-ril.so in namespace (default) Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Diffstat (limited to 'Android.mk')
-rw-r--r--Android.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk
index 9da4d2e..2b92a56 100644
--- a/Android.mk
+++ b/Android.mk
@@ -19,6 +19,7 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/android_versions.mk
LOCAL_SRC_FILES := \
samsung-ril.c \
@@ -43,6 +44,7 @@ LOCAL_C_INCLUDES := \
$(LOCAL_PATH) \
$(LOCAL_PATH)/include \
hardware/libhardware_legacy/include \
+ hardware/ril/include/ \
system/core/include
LOCAL_CFLAGS := -DRIL_SHLIB
@@ -56,12 +58,14 @@ LOCAL_MODULE := libsamsung-ril
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/android_versions.mk
LOCAL_SRC_FILES := srs-client/srs-client.c
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/include \
$(LOCAL_PATH)/srs-client/include \
+ hardware/ril/include/ \
LOCAL_SHARED_LIBRARIES := liblog libcutils
@@ -72,12 +76,14 @@ LOCAL_MODULE := libsrs-client
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
+include $(LOCAL_PATH)/android_versions.mk
LOCAL_SRC_FILES := tools/srs-test.c
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/include \
$(LOCAL_PATH)/srs-client/include \
+ hardware/ril/include/ \
LOCAL_SHARED_LIBRARIES := liblog libcutils libsrs-client