Add camera shim lib.

With this we can not patch camera.qcom lib and use all sony params.

Change-Id: I14ef800608c7ed7a95921dd71a56702ed2d68b18
This commit is contained in:
Balázs Triszka 2017-02-08 22:10:15 +06:00
parent 1d2f7ab768
commit 843d0d0979
4 changed files with 29 additions and 2 deletions

View File

@ -110,7 +110,7 @@ PRODUCT_PACKAGES += \
TimeKeep
# Shim libs
PRODUCT_PACKAGES += libgui_shim
PRODUCT_PACKAGES += libgui_shim camera.qcom_shim
# Wlan
PRODUCT_PACKAGES += macaddrsetup

View File

@ -25,3 +25,15 @@ LOCAL_SHARED_LIBRARIES := libgui
LOCAL_MULTILIB := both
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := camera.qcom_shim.cpp
LOCAL_MODULE := camera.qcom_shim
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
LOCAL_SHARED_LIBRARIES := liblog
LOCAL_32_BIT_ONLY := true
include $(BUILD_SHARED_LIBRARY)

View File

@ -0,0 +1,15 @@
#include <cutils/log.h>
#include <sys/types.h>
#include <dlfcn.h>
#include <string.h>
extern "C" {
int property_get(const char * key, char * value, const char * default_value) {
if (strcmp("ro.build.type", key) == 0) {
strcpy(value, "eng");
return 3;
}
return ((int( * )(const char * , char *, const char * ))(dlsym((void * ) - 1, "property_get")))(key, value, default_value);
}
}

View File

@ -42,7 +42,7 @@ on early-init
write /sys/module/msm_performance/parameters/managed_cpus 4-7
on init
export LD_SHIM_LIBS "/system/lib64/libgui.so|/system/lib64/libgui_shim.so:/system/lib/libgui.so|/system/lib/libgui_shim.so"
export LD_SHIM_LIBS "/system/lib64/libgui.so|/system/lib64/libgui_shim.so:/system/lib/libgui.so|/system/lib/libgui_shim.so:/system/lib/hw/camera.qcom.so|/system/lib/camera.qcom_shim.so"
mkdir /firmware 0771 system system
mkdir /persist 0771 system system
mkdir /persist/data 0700 system system