From 8cc3cffaeb22126336a3de3404bd6a741dce3896 Mon Sep 17 00:00:00 2001 From: Trevor Bunker Date: Wed, 8 Jul 2015 07:09:15 -0700 Subject: bullhead.sensorhub: enforce calibration file owner/permissions Bug: 22286420 Change-Id: I6a22ec5444a32910fa482f51c00da9cd239b5ea8 Signed-off-by: Trevor Bunker --- init.bullhead.sensorhub.rc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/init.bullhead.sensorhub.rc b/init.bullhead.sensorhub.rc index 8812880..4326220 100644 --- a/init.bullhead.sensorhub.rc +++ b/init.bullhead.sensorhub.rc @@ -3,6 +3,10 @@ on post-fs ## set gpio75 as input to power the hall sensor when connected to AP write /sys/class/gpio/export 75 write /sys/class/gpio/gpio75/direction in + ## ensure correct calibration file permissions + chown root system /persist/sensorcal.json + chmod 0640 /persist/sensorcal.json + ## Update SH FW if needed start flash-sh-fw service flash-sh-fw /system/bin/sensortool.bullhead -f /vendor/firmware/nano4x1.bin -- cgit v1.2.3