From 8175bb235277f637faf30138b30e97e07fb85b8e Mon Sep 17 00:00:00 2001 From: Pavlin Radoslavov Date: Fri, 19 Jun 2015 19:12:46 -0700 Subject: [PATCH] Fix the file permissions of /data/misc/bluedroid/bt_config.conf Fix the file access permissions and group ownership of "/data/misc/bluedroid/bt_config.conf" so the file can be reused when switching users on the device. For that purpose, we need to do the following: 1. Set the set-group-ID (bit 02000) flag for directory "/data/misc/bluedroid" so the files created in that directory will have group-id of "net_bt_stack" . 2. Change the file's permissions of file "/data/misc/bluedroid/bt_config.conf" to Read/Write by User and Group. Bug: 21493919 Change-Id: Ie00ab4695198ef2aa299b484ef9d4f17bd41b98a --- rootdir/init.rc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rootdir/init.rc b/rootdir/init.rc index acca0973c..17e2153c2 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -270,7 +270,10 @@ on post-fs-data # create basic filesystem structure mkdir /data/misc 01771 system misc mkdir /data/misc/adb 02750 system shell - mkdir /data/misc/bluedroid 0770 bluetooth net_bt_stack + mkdir /data/misc/bluedroid 02770 bluetooth net_bt_stack + # Fix the access permissions and group ownership for 'bt_config.conf' + chmod 0660 /data/misc/bluedroid/bt_config.conf + chown bluetooth net_bt_stack /data/misc/bluedroid/bt_config.conf mkdir /data/misc/bluetooth 0770 system system mkdir /data/misc/keystore 0700 keystore keystore mkdir /data/misc/gatekeeper 0700 system system