am f38f29c8: Let\'s reinvent storage, yet again!
* commit 'f38f29c87d97cea45d04b783bddbd969234b1030': Let's reinvent storage, yet again!
This commit is contained in:
commit
96835733b3
2 changed files with 238 additions and 375 deletions
|
|
@ -67,15 +67,18 @@ on init
|
||||||
mkdir /mnt/user/0 0755 root root
|
mkdir /mnt/user/0 0755 root root
|
||||||
mkdir /mnt/expand 0771 system system
|
mkdir /mnt/expand 0771 system system
|
||||||
|
|
||||||
# sdcard_r is GID 1028
|
# Storage views to support runtime permissions
|
||||||
mkdir /storage 0751 root sdcard_r
|
mkdir /storage 0755 root root
|
||||||
mount tmpfs tmpfs /storage mode=0751,uid=0,gid=1028
|
mkdir /mnt/runtime_default 0755 root root
|
||||||
restorecon_recursive /storage
|
mkdir /mnt/runtime_default/self 0755 root root
|
||||||
|
mkdir /mnt/runtime_read 0755 root root
|
||||||
|
mkdir /mnt/runtime_read/self 0755 root root
|
||||||
|
mkdir /mnt/runtime_write 0755 root root
|
||||||
|
mkdir /mnt/runtime_write/self 0755 root root
|
||||||
|
|
||||||
# Symlink to keep legacy apps working in multi-user world
|
# Symlink to keep legacy apps working in multi-user world
|
||||||
mkdir /storage/self 0751 root sdcard_r
|
|
||||||
symlink /storage/self/primary /sdcard
|
symlink /storage/self/primary /sdcard
|
||||||
symlink /mnt/user/0/primary /storage/self/primary
|
symlink /mnt/user/0/primary /mnt/runtime_default/self/primary
|
||||||
|
|
||||||
# memory control cgroup
|
# memory control cgroup
|
||||||
mkdir /dev/memcg 0700 root system
|
mkdir /dev/memcg 0700 root system
|
||||||
|
|
@ -210,8 +213,10 @@ on post-fs
|
||||||
start logd
|
start logd
|
||||||
# once everything is setup, no need to modify /
|
# once everything is setup, no need to modify /
|
||||||
mount rootfs rootfs / ro remount
|
mount rootfs rootfs / ro remount
|
||||||
# mount shared so changes propagate into child namespaces
|
# Mount shared so changes propagate into child namespaces
|
||||||
mount rootfs rootfs / shared rec
|
mount rootfs rootfs / shared rec
|
||||||
|
# Mount default storage into root namespace
|
||||||
|
mount none /mnt/runtime_default /storage slave bind rec
|
||||||
|
|
||||||
# We chown/chmod /cache again so because mount is run as root + defaults
|
# We chown/chmod /cache again so because mount is run as root + defaults
|
||||||
chown system cache /cache
|
chown system cache /cache
|
||||||
|
|
|
||||||
594
sdcard/sdcard.c
594
sdcard/sdcard.c
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue