diff --git a/init/init.cpp b/init/init.cpp index 0e019b059..0d5690b07 100644 --- a/init/init.cpp +++ b/init/init.cpp @@ -628,6 +628,14 @@ int main(int argc, char** argv) { mknod("/dev/random", S_IFCHR | 0666, makedev(1, 8)); mknod("/dev/urandom", S_IFCHR | 0666, makedev(1, 9)); + // Mount staging areas for devices managed by vold + // See storage config details at http://source.android.com/devices/storage/ + mount("tmpfs", "/mnt", "tmpfs", MS_NOEXEC | MS_NOSUID | MS_NODEV, + "mode=0755,uid=0,gid=1000"); + // /mnt/vendor is used to mount vendor-specific partitions that can not be + // part of the vendor partition, e.g. because they are mounted read-write. + mkdir("/mnt/vendor", 0755); + // Now that tmpfs is mounted on /dev and we have /dev/kmsg, we can actually // talk to the outside world... InitKernelLogging(argv); diff --git a/rootdir/init.rc b/rootdir/init.rc index 4f008acb6..319b4c708 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -21,9 +21,6 @@ on early-init # Set the security context of /adb_keys if present. restorecon /adb_keys - # Shouldn't be necessary, but sdcard won't start without it. http://b/22568628. - mkdir /mnt 0775 root system - # Set the security context of /postinstall if present. restorecon /postinstall @@ -83,9 +80,6 @@ on init chmod 0664 /dev/stune/top-app/tasks chmod 0664 /dev/stune/rt/tasks - # Mount staging areas for devices managed by vold - # See storage config details at http://source.android.com/tech/storage/ - mount tmpfs tmpfs /mnt nodev noexec nosuid mode=0755,uid=0,gid=1000 restorecon_recursive /mnt mount configfs none /config nodev noexec nosuid