aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRGIB <gibellini.roberto@gmail.com>2016-05-28 00:09:45 +0200
committerRoberto Gibellini <gibellini.roberto@gmail.com>2016-05-27 15:12:05 -0700
commita763813ee688e2995dbf5a34051a428aec52c9ad (patch)
tree644e9576ef307611ff5517454445cb8e1dee6805
parent1644371e19f02d99fdcf0123e298c0134fe8282c (diff)
downloaddevice_samsung_n5100-a763813ee688e2995dbf5a34051a428aec52c9ad.zip
device_samsung_n5100-a763813ee688e2995dbf5a34051a428aec52c9ad.tar.gz
device_samsung_n5100-a763813ee688e2995dbf5a34051a428aec52c9ad.tar.bz2
n5100 : restore libsec-ril
Change-Id: Iceee81ef6137d3eb3dbff807ac38598dea46aabe
-rwxr-xr-xn5100.mk6
-rw-r--r--ril-wrapper/Android.mk9
-rw-r--r--ril-wrapper/ril-wrapper.c99
-rwxr-xr-xsystem.prop2
4 files changed, 2 insertions, 114 deletions
diff --git a/n5100.mk b/n5100.mk
index b36f477..1f4ba90 100755
--- a/n5100.mk
+++ b/n5100.mk
@@ -22,10 +22,6 @@ DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/rootdir/init.target.rc:root/init.target.rc
-# Packages
-PRODUCT_PACKAGES += \
- ril-wrapper
-
# RIL
PRODUCT_PROPERTY_OVERRIDES += \
ro.telephony.ril_class=SamsungExynos4RIL \
@@ -42,4 +38,4 @@ PRODUCT_COPY_FILES += \
# Include common makefile
$(call inherit-product, device/samsung/kona-common/kona-common.mk)
-$(call inherit-product, vendor/samsung/n5100/n5100-vendor.mk)
+$(call inherit-product, vendor/samsung/n5100/n5100-vendor.mk) \ No newline at end of file
diff --git a/ril-wrapper/Android.mk b/ril-wrapper/Android.mk
deleted file mode 100644
index 698e1d3..0000000
--- a/ril-wrapper/Android.mk
+++ /dev/null
@@ -1,9 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= ril-wrapper.c
-LOCAL_SHARED_LIBRARIES := liblog libbinder
-LOCAL_MODULE:= ril-wrapper
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/ril-wrapper/ril-wrapper.c b/ril-wrapper/ril-wrapper.c
deleted file mode 100644
index 886cb34..0000000
--- a/ril-wrapper/ril-wrapper.c
+++ /dev/null
@@ -1,99 +0,0 @@
-#define LOG_TAG "RilWrapper"
-#define RIL_SHLIB
-#include <telephony/ril_cdma_sms.h>
-#include <sys/system_properties.h>
-#include <telephony/librilutils.h>
-#include <cutils/sockets.h>
-#include <telephony/ril.h>
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <sys/cdefs.h>
-#include <utils/Log.h>
-#include <sys/stat.h>
-#include <pthread.h>
-#include <termios.h>
-#include <alloca.h>
-#include <assert.h>
-#include <getopt.h>
-#include <string.h>
-#include <unistd.h>
-#include <dlfcn.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <stdio.h>
-
-#define REAL_RIL_NAME "/system/lib/libsec-ril.so"
-
-
-static RIL_RadioFunctions const *mRealRadioFuncs;
-static const struct RIL_Env *mEnv;
-
-static void rilOnRequest(int request, void *data, size_t datalen, RIL_Token t)
-{
- switch (request) {
- case RIL_REQUEST_GET_RADIO_CAPABILITY:
- RLOGW("Returning NOT_SUPPORTED on GET_RADIO_CAPABILITY");
- mEnv->OnRequestComplete(t, RIL_E_REQUEST_NOT_SUPPORTED, NULL, 0);
- break;
- default:
- mRealRadioFuncs->onRequest(request, data, datalen, t);
- }
-}
-
-const RIL_RadioFunctions* RIL_Init(const struct RIL_Env *env, int argc, char **argv)
-{
- RIL_RadioFunctions const* (*fRealRilInit)(const struct RIL_Env *env, int argc, char **argv);
- static RIL_RadioFunctions rilInfo;
- void *realRilLibHandle;
- int i;
-
-
- //save the env;
- mEnv = env;
-
- //get the real RIL
- realRilLibHandle = dlopen(REAL_RIL_NAME, RTLD_LOCAL);
- if (!realRilLibHandle) {
- RLOGE("Failed to load the real RIL '" REAL_RIL_NAME "': %s\n", dlerror());
- return NULL;
- }
-
- //remove "-c" command line as Samsung's RIL does not understand it - it just barfs instead
- for (i = 0; i < argc; i++) {
- if (!strcmp(argv[i], "-c") && i != argc -1) { //found it
- memcpy(argv + i, argv + i + 2, sizeof(char*[argc - i - 2]));
- argc -= 2;
- }
- }
-
- //load the real RIL
- fRealRilInit = dlsym(realRilLibHandle, "RIL_Init");
- if (!fRealRilInit) {
- RLOGE("Failed to find the real RIL's entry point\n");
- goto out_fail;
- }
-
- RLOGD("Calling the real RIL's entry point with %u args\n", argc);
- for (i = 0; i < argc; i++)
- RLOGD(" argv[%2d] = '%s'\n", i, argv[i]);
-
- //try to init the real ril
- mRealRadioFuncs = fRealRilInit(env, argc, argv);
- if (!mRealRadioFuncs) {
- RLOGE("The real RIL's entry point failed\n");
- goto out_fail;
- }
-
- //copy the real RIL's info struct, then replace the onRequest pointer with our own
- rilInfo = *mRealRadioFuncs;
- rilInfo.onRequest = rilOnRequest;
-
- RLOGD("Wrapped RIL version is '%s'\n", mRealRadioFuncs->getVersion());
-
- //we're all good - return to caller
- return &rilInfo;
-
-out_fail:
- dlclose(realRilLibHandle);
- return NULL;
-}
diff --git a/system.prop b/system.prop
index 67bcb37..0d01e55 100755
--- a/system.prop
+++ b/system.prop
@@ -2,7 +2,7 @@
# system.prop for smdk4x12
#
dalvik.vm.dexopt-data-only=1
-rild.libpath=/system/lib/ril-wrapper.so
+rild.libpath=/system/lib/libsec-ril.so
rild.libargs=-d /dev/ttyS0
ro.sf.hwrotation=270
ro.sf.lcd_density=213