summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libshims/Android.mk8
-rw-r--r--libshims/libsonycamera.cpp16
-rw-r--r--rootdir/init.camera.rc1
-rw-r--r--shinano.mk3
4 files changed, 27 insertions, 1 deletions
diff --git a/libshims/Android.mk b/libshims/Android.mk
index 88e307f..e4bfd9f 100644
--- a/libshims/Android.mk
+++ b/libshims/Android.mk
@@ -43,3 +43,11 @@ LOCAL_MODULE_TAGS := optional
LOCAL_32_BIT_ONLY := true
include $(BUILD_SHARED_LIBRARY)
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES := libsonycamera.cpp
+LOCAL_MODULE := libsonycamera
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_SHARED_LIBRARIES := liblog
+LOCAL_32_BIT_ONLY := true
+include $(BUILD_SHARED_LIBRARY)
diff --git a/libshims/libsonycamera.cpp b/libshims/libsonycamera.cpp
new file mode 100644
index 0000000..8d759fe
--- /dev/null
+++ b/libshims/libsonycamera.cpp
@@ -0,0 +1,16 @@
+#include <cutils/log.h>
+#include <sys/types.h>
+#include <dlfcn.h>
+#include <string.h>
+
+// Unlock all Sony parameters
+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);
+ }
+} \ No newline at end of file
diff --git a/rootdir/init.camera.rc b/rootdir/init.camera.rc
index 1549cd9..efb7b37 100644
--- a/rootdir/init.camera.rc
+++ b/rootdir/init.camera.rc
@@ -20,6 +20,7 @@ on init
:/system/bin/credmgrd|libshims_signal.so \
:/system/bin/iddd|libshims_idd.so \
:/system/bin/suntrold|libshims_signal.so \
+:/system/lib/hw/camera.qcom.so|libsonycamera.so \
:/system/vendor/lib/libwvm.so|libdtcpipplayer.so \
"
diff --git a/shinano.mk b/shinano.mk
index 124d7cd..dc6f10c 100644
--- a/shinano.mk
+++ b/shinano.mk
@@ -53,7 +53,8 @@ PRODUCT_PACKAGES += \
wait4tad_static \
libshims_wvm \
libshims_signal \
- libshims_idd
+ libshims_idd \
+ libsonycamera
PRODUCT_COPY_FILES += \
$(COMMON_PATH)/rootdir/system/bin/credmgrfirstboot.sh:system/bin/credmgrfirstboot.sh