Make /data/data a symlink to /data/user/0
For legacy reason, /data/data is a real dir and /data/user/0 is a
symbolic link to it. Overhead for linux kernel to walk through
symbolic link is not negligible. This is unnessary overhead to
carry over. This patch is to make /data/user/0 a a real dir and
make legacy folder /data/data a symbolic link. OTAed system does
not get impacted.
Test: Manual test
Change-Id: I419564a75f6ebf3154badb8725ba9831164592b6
Signed-off-by: cjbao <cathy.bao@intel.com>
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 540e976..8cdc13f 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -419,7 +419,6 @@
# For security reasons, /data/local/tmp should always be empty.
# Do not place files or directories in /data/local/tmp
mkdir /data/local/tmp 0771 shell shell
- mkdir /data/data 0771 system system
mkdir /data/app-private 0771 system system
mkdir /data/app-ephemeral 0771 system system
mkdir /data/app-asec 0700 root root
@@ -472,7 +471,8 @@
mkdir /data/user 0711 system system
mkdir /data/user_de 0711 system system
- symlink /data/data /data/user/0
+ mkdir /data/user/0 0711 system system
+ symlink /data/user/0 /data/data
mkdir /data/media 0770 media_rw media_rw
mkdir /data/media/obb 0770 media_rw media_rw