summaryrefslogtreecommitdiff
path: root/init.angler.sensorhub.rc
diff options
context:
space:
mode:
authorTrevor Bunker <trevorbunker@google.com>2015-07-31 10:54:49 -0700
committerTrevor Bunker <trevorbunker@google.com>2015-07-31 13:11:54 -0700
commit246fc2af6e63b7d9a28490ad22f403aed5f6375d (patch)
tree02fd0493a5dcee2b744a6500f1658bdf6a5ed21c /init.angler.sensorhub.rc
parent005e6d937aa2122013f902d58147ff526a85fcbc (diff)
downloadangler-246fc2af6e63b7d9a28490ad22f403aed5f6375d.tar.gz
angler: set file permissions for sensor calibration file during init
Change-Id: If0bddbd26123725b276ca25eb92f726dc0db7a54
Diffstat (limited to 'init.angler.sensorhub.rc')
-rw-r--r--init.angler.sensorhub.rc8
1 files changed, 8 insertions, 0 deletions
diff --git a/init.angler.sensorhub.rc b/init.angler.sensorhub.rc
index 3404a32..76767af 100644
--- a/init.angler.sensorhub.rc
+++ b/init.angler.sensorhub.rc
@@ -15,6 +15,10 @@ on charger
write /sys/class/gpio/gpio42/direction in
write /sys/class/gpio/export 64
write /sys/class/gpio/gpio64/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
on post-fs
@@ -34,6 +38,10 @@ on post-fs
write /sys/class/gpio/gpio42/direction in
write /sys/class/gpio/export 64
write /sys/class/gpio/gpio64/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/logwrapper /system/bin/sensortool.angler -f /vendor/firmware/nano4x1.bin