summaryrefslogtreecommitdiff
path: root/init.hardware.rc
diff options
context:
space:
mode:
authorAdam Shih <adamshih@google.com>2018-12-05 16:11:32 +0800
committerAdam Shih <adamshih@google.com>2018-12-07 10:18:04 +0800
commitd0bae6cb08ac5c4c07ef5d9926c3b4094a06e991 (patch)
tree21941f65f68bdac33f5c53ddc47d84a484d7b8fd /init.hardware.rc
parent2a374a3462b41fe5326adc0589414e0b3df1ba6d (diff)
downloadbonito-d0bae6cb08ac5c4c07ef5d9926c3b4094a06e991.tar.gz
operate files on real path instead for rfs
selinux has problems dealing with symlink, move operation to real path to avoid unexpected behavior Bug: 117254180 Test: Modify modem files gid, uid and reboot and find the settings restored. 1. Modify folder's permission manually: $ adb shell ls -Zl persist/rfs total 32 drwxrwxrwx 3 system vendor_rfs u:object_r:persist_rfs_file:s0 4096 1970-01-01 08:00 apq drwxrwxrwx 7 system vendor_rfs u:object_r:persist_rfs_file:s0 4096 1970-01-06 04:47 mdm drwxrwxrwx 6 system vendor_rfs u:object_r:persist_rfs_file:s0 4096 1970-01-06 04:47 msm drwxrwxrwx 2 system vendor_rfs u:object_r:persist_rfs_file:s0 4096 1970-01-01 08:00 shared $ adb shell ls -Zl persist/ ... drwxrwxrwx 3 system vendor_rfs_shared u:object_r:persist_rfs_file:s0 4096 1970-01-01 08:00 hlos_rfs ... drwxrwxrwx 6 system vendor_rfs u:object_r:persist_rfs_file:s0 4096 1970-01-01 08:00 rfs $ adb shell ls -Zl persist/rfs/mdm total 40 drwxrwxrwx 2 vendor_rfs vendor_rfs u:object_r:persist_rfs_file:s0 4096 1970-01-01 08:00 adsp ... drwxrwxrwx 2 vendor_rfs vendor_rfs u:object_r:persist_rfs_file:s0 4096 1970-01-01 08:00 mpss drwxrwxrwx 2 vendor_rfs vendor_rfs u:object_r:persist_rfs_file:s0 4096 1970-01-01 08:00 slpi $ adb shell ls -Zl persist/rfs/msm/ total 32 drwxrwxrwx 2 vendor_rfs vendor_rfs u:object_r:persist_rfs_file:s0 4096 1970-01-01 08:00 adsp ... drwxrwxrwx 2 vendor_rfs vendor_rfs u:object_r:persist_rfs_file:s0 4096 2018-12-05 11:47 mpss drwxrwxrwx 2 vendor_rfs vendor_rfs u:object_r:persist_rfs_file:s0 4096 1970-01-01 08:00 slpi 2. reboot and find setting corrected by init.sdm670.rc $ adb shell ls -Zl persist/rfs total 32 drwxrwx--- 3 vendor_rfs vendor_rfs u:object_r:persist_rfs_file:s0 4096 1970-01-01 08:00 apq drwxrwx--- 7 vendor_rfs vendor_rfs u:object_r:persist_rfs_file:s0 4096 1970-01-06 04:47 mdm drwxrwx--- 6 vendor_rfs vendor_rfs u:object_r:persist_rfs_file:s0 4096 1970-01-06 04:47 msm drwxrwx--- 2 vendor_rfs vendor_rfs u:object_r:persist_rfs_file:s0 4096 1970-01-01 08:00 shared $ adb shell ls -Zl persist/ ... drwxrwx--- 3 vendor_rfs vendor_rfs_shared u:object_r:persist_rfs_file:s0 4096 1970-01-01 08:00 hlos_rfs drwxrwx--- 6 vendor_rfs vendor_rfs u:object_r:persist_rfs_file:s0 4096 1970-01-01 08:00 rfs $ adb shell ls -Zl persist/rfs/mdm drwxrwx--- 2 vendor_rfs vendor_rfs u:object_r:persist_rfs_file:s0 4096 1970-01-01 08:00 adsp ... drwxrwx--- 2 vendor_rfs vendor_rfs u:object_r:persist_rfs_file:s0 4096 1970-01-01 08:00 mpss drwxrwx--- 2 vendor_rfs vendor_rfs u:object_r:persist_rfs_file:s0 4096 1970-01-01 08:00 slpi $ adb shell ls -Zl persist/rfs/msm drwxrwx--- 2 vendor_rfs vendor_rfs u:object_r:persist_rfs_file:s0 4096 1970-01-01 08:00 adsp ... drwxrwx--- 2 vendor_rfs vendor_rfs u:object_r:persist_rfs_file:s0 4096 2018-12-05 11:47 mpss drwxrwx--- 2 vendor_rfs vendor_rfs u:object_r:persist_rfs_file:s0 4096 1970-01-01 08:00 slpi Change-Id: I8d6a2e91c0a462b4f353a766aaf8f0a949c6f09f
Diffstat (limited to 'init.hardware.rc')
-rw-r--r--init.hardware.rc36
1 files changed, 18 insertions, 18 deletions
diff --git a/init.hardware.rc b/init.hardware.rc
index 897d0c20..d4a2ad05 100644
--- a/init.hardware.rc
+++ b/init.hardware.rc
@@ -186,24 +186,24 @@ on fs
mkdir /mnt/vendor/persist/audio 0770 media audio
mkdir /persist/data 0700 system system
mkdir /persist/display 0770 system graphics
- mkdir /persist/rfs 0770 root system
- mkdir /persist/hlos_rfs 0770 root system
- chmod 0770 /persist/rfs
- chmod 0770 /persist/rfs/shared
- chmod 0770 /persist/rfs/msm
- chmod 0770 /persist/rfs/msm/adsp
- chmod 0770 /persist/rfs/msm/mpss
- chmod 0770 /persist/rfs/msm/slpi
- chmod 0770 /persist/rfs/mdm
- chmod 0770 /persist/rfs/mdm/adsp
- chmod 0770 /persist/rfs/mdm/mpss
- chmod 0770 /persist/rfs/mdm/slpi
- chmod 0770 /persist/rfs/mdm/tn
- chmod 0770 /persist/rfs/apq
- chmod 0770 /persist/rfs/apq/gnss
- chmod 0770 /persist/hlos_rfs
- restorecon /persist/rfs
- restorecon /persist/hlos_rfs
+ mkdir /mnt/vendor/persist/rfs 0770 root system
+ mkdir /mnt/vendor/persist/hlos_rfs 0770 root system
+ chmod 0770 /mnt/vendor/persist/rfs
+ chmod 0770 /mnt/vendor/persist/rfs/shared
+ chmod 0770 /mnt/vendor/persist/rfs/msm
+ chmod 0770 /mnt/vendor/persist/rfs/msm/adsp
+ chmod 0770 /mnt/vendor/persist/rfs/msm/mpss
+ chmod 0770 /mnt/vendor/persist/rfs/msm/slpi
+ chmod 0770 /mnt/vendor/persist/rfs/mdm
+ chmod 0770 /mnt/vendor/persist/rfs/mdm/adsp
+ chmod 0770 /mnt/vendor/persist/rfs/mdm/mpss
+ chmod 0770 /mnt/vendor/persist/rfs/mdm/slpi
+ chmod 0770 /mnt/vendor/persist/rfs/mdm/tn
+ chmod 0770 /mnt/vendor/persist/rfs/apq
+ chmod 0770 /mnt/vendor/persist/rfs/apq/gnss
+ chmod 0770 /mnt/vendor/persist/hlos_rfs
+ restorecon /mnt/vendor/persist/rfs
+ restorecon /mnt/vendor/persist/hlos_rfs
restorecon_recursive /mnt/vendor/persist/
# for cycle count backup