mirror of
https://github.com/joel16/android_device_sony_kitakami-common.git
synced 2024-11-23 11:49:47 +00:00
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:
parent
1d2f7ab768
commit
843d0d0979
@ -110,7 +110,7 @@ PRODUCT_PACKAGES += \
|
||||
TimeKeep
|
||||
|
||||
# Shim libs
|
||||
PRODUCT_PACKAGES += libgui_shim
|
||||
PRODUCT_PACKAGES += libgui_shim camera.qcom_shim
|
||||
|
||||
# Wlan
|
||||
PRODUCT_PACKAGES += macaddrsetup
|
||||
|
@ -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)
|
||||
|
15
libshim/camera.qcom_shim.cpp
Normal file
15
libshim/camera.qcom_shim.cpp
Normal 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);
|
||||
}
|
||||
}
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user