From 09582dfc1d9a93e777e5da7582782da530776e14 Mon Sep 17 00:00:00 2001 From: tunturn Date: Tue, 28 Feb 2017 11:33:28 +1100 Subject: shinano-common: copy init.qcom-sensor.sh Needed for sensor init Change-Id: I61a323a6c9b08946b5be243ce660e1dc12882266 --- rootdir/system/etc/init.qcom-sensor.sh | 23 +++++++++++++++++++++++ shinano.mk | 4 ++++ 2 files changed, 27 insertions(+) create mode 100644 rootdir/system/etc/init.qcom-sensor.sh diff --git a/rootdir/system/etc/init.qcom-sensor.sh b/rootdir/system/etc/init.qcom-sensor.sh new file mode 100644 index 0000000..21d24c7 --- /dev/null +++ b/rootdir/system/etc/init.qcom-sensor.sh @@ -0,0 +1,23 @@ +#!/system/bin/sh +# Copyright (C) 2013 Sony Mobile Communications AB. + +# +# Function to start sensors for DSPS enabled platforms +# +start_sensors() +{ + if [ -c /dev/msm_dsps -o -c /dev/sensors ]; then + chmod -h 775 /persist/sensors + chmod -h 664 /persist/sensors/sensors_settings + chown -h system.root /persist/sensors/sensors_settings + + mkdir -p /data/misc/sensors + chmod -h 775 /data/misc/sensors + + echo 1 > /persist/sensors/settings + start sensors + fi +} + +start_sensors + diff --git a/shinano.mk b/shinano.mk index 0ad013d..bc54481 100644 --- a/shinano.mk +++ b/shinano.mk @@ -157,6 +157,10 @@ PRODUCT_PROPERTY_OVERRIDES += \ ro.qualcomm.sensors.georv=true \ ro.qc.sensors.max_geomag_rotvec=50 +# Sensor file +PRODUCT_COPY_FILES += \ + $(COMMON_PATH)/rootdir/system/etc/init.qcom-sensor.sh:system/etc/init.qcom-sensor.sh + # GPS PRODUCT_PROPERTY_OVERRIDES += \ persist.gps.qc_nlp_in_use=0 \ -- cgit v1.2.3