aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrohan <purohit.rohan@gmail.com>2016-12-23 11:39:27 +0530
committerFaiz Authar <faizauthar@gmail.com>2016-12-24 19:02:03 +0700
commit358f11135acc86ec20990c9e7dba67609fd5a620 (patch)
treeb4bbbffdaf98ecb1407d26622627e8e0a9049ca4
parent8d7dcf23fdc716e55e8ebd4f258186a59aa4fa0f (diff)
ferrari: add shim for mm-pp-daemon
F libc : CANNOT LINK EXECUTABLE "/system/bin/mm-pp-daemon": cannot locate symbol "_ZN7android6SensorC1Ev" referenced by "/system/bin/mm-pp-daemon" Change-Id: Ie45fb4b0388e76de0278279cb7f98d81ff5f75b7
-rw-r--r--libshims/Android.mk24
-rw-r--r--libshims/camera_shim.cpp17
-rw-r--r--product/libshims.mk2
-rw-r--r--rootdir/etc/init.target.rc3
4 files changed, 46 insertions, 0 deletions
diff --git a/libshims/Android.mk b/libshims/Android.mk
new file mode 100644
index 0000000..6491f81
--- /dev/null
+++ b/libshims/Android.mk
@@ -0,0 +1,24 @@
+# Copyright (C) 2016 The CyanogenMod Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := camera_shim.cpp
+LOCAL_MODULE := libcamera_shim
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/libshims/camera_shim.cpp b/libshims/camera_shim.cpp
new file mode 100644
index 0000000..9a1ffa9
--- /dev/null
+++ b/libshims/camera_shim.cpp
@@ -0,0 +1,17 @@
+/*
+ * Copyright (C) 2016 The CyanogenMod Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+const char *_ZN7android6SensorC1Ev;
diff --git a/product/libshims.mk b/product/libshims.mk
new file mode 100644
index 0000000..c4f5f13
--- /dev/null
+++ b/product/libshims.mk
@@ -0,0 +1,2 @@
+PRODUCT_PACKAGES += \
+ libcamera_shim
diff --git a/rootdir/etc/init.target.rc b/rootdir/etc/init.target.rc
index 3cb9977..d25bfb6 100644
--- a/rootdir/etc/init.target.rc
+++ b/rootdir/etc/init.target.rc
@@ -27,6 +27,9 @@
#
#
+on init
+ export LD_SHIM_LIBS /system/bin/mm-pp-daemon|libcamera_shim.so
+
on post-fs-data
chown system system /dev/sysmatdrv
chmod 0660 /dev/sysmatdrv