summaryrefslogtreecommitdiffstats
path: root/rootdir
diff options
context:
space:
mode:
authorZiyan <jaraidaniel@gmail.com>2014-11-27 19:56:50 +0100
committerZiyan <jaraidaniel@gmail.com>2014-12-13 00:39:23 +0100
commitf4d6bd93dc0010cd69ef463bd812398743c0eafd (patch)
tree23e4dd9d7ed6f58329c40ba6327c69a2e551b725 /rootdir
parenta268a90a8d7a1a681864d535835da3a18a61a8f9 (diff)
downloaddevice_samsung_tuna-f4d6bd93dc0010cd69ef463bd812398743c0eafd.zip
device_samsung_tuna-f4d6bd93dc0010cd69ef463bd812398743c0eafd.tar.gz
device_samsung_tuna-f4d6bd93dc0010cd69ef463bd812398743c0eafd.tar.bz2
tuna: simplify /factory partition handling
Currently, we do the following sequence on every bootup: 1. mount /factory ro (fstab) 2. remount /factory as rw 3. update selinux labels on the partition 4. remount /factory as ro By mounting /factory in rw mode from the fstab, we can avoid the second step, simplifying the bootup sequence. Also replaced the restorecons with one restorecon_recursive, which does the same task in one line. And lastly, removed some unnecessary chown/chmods - remounting does not overwrite the permissions and the owner.
Diffstat (limited to 'rootdir')
-rw-r--r--rootdir/fstab.tuna2
-rwxr-xr-xrootdir/init.tuna.rc18
2 files changed, 2 insertions, 18 deletions
diff --git a/rootdir/fstab.tuna b/rootdir/fstab.tuna
index 9ae0928..d89b422 100644
--- a/rootdir/fstab.tuna
+++ b/rootdir/fstab.tuna
@@ -5,7 +5,7 @@
/dev/block/platform/omap/omap_hsmmc.0/by-name/system /system ext4 ro wait
-/dev/block/platform/omap/omap_hsmmc.0/by-name/efs /factory ext4 ro wait
+/dev/block/platform/omap/omap_hsmmc.0/by-name/efs /factory ext4 rw wait
/dev/block/platform/omap/omap_hsmmc.0/by-name/cache /cache ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait,check
/dev/block/platform/omap/omap_hsmmc.0/by-name/userdata /data ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait,check,encryptable=/dev/block/platform/omap/omap_hsmmc.0/by-name/metadata
/dev/block/platform/omap/omap_hsmmc.0/by-name/misc /misc emmc defaults defaults
diff --git a/rootdir/init.tuna.rc b/rootdir/init.tuna.rc
index 591ba74..e4d127a 100755
--- a/rootdir/init.tuna.rc
+++ b/rootdir/init.tuna.rc
@@ -68,19 +68,7 @@ on fs
mkdir /factory 0775 radio radio
mount_all /fstab.tuna
restorecon /dev/block/platform/omap/omap_hsmmc.0/by-name/radio
- mount ext4 /dev/block/platform/omap/omap_hsmmc.0/by-name/efs /factory rw remount
- restorecon /factory
- restorecon /factory/imei/mps_code.dat
- restorecon /factory/.nv_state
- restorecon /factory/.nv_data.bak
- restorecon /factory/nv_data.bin
- restorecon /factory/nv_data.bin.md5
- restorecon /factory/hdcp.keys
- restorecon /factory/imei
- restorecon /factory/wifi
- restorecon /factory/wv.keys
- restorecon /factory/bluetooth
- restorecon /factory/bluetooth/bt_addr
+ restorecon_recursive /factory
mount ext4 /dev/block/platform/omap/omap_hsmmc.0/by-name/efs /factory ro remount
setprop ro.crypto.fuse_sdcard true
@@ -103,10 +91,6 @@ on fs
# change permissions for ION driver
chmod 0777 /dev/ion
-# We chown/chmod /factory because mount is run as root + defaults
- chown radio radio /factory
- chmod 0775 /factory
-
# add symlink for HDCP key
symlink /factory/hdcp.keys /system/vendor/firmware/hdcp.keys