Loading include/cutils/multiuser.h +3 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,8 @@ extern "C" { // NOTE: keep in sync with android.os.UserId #define MULTIUSER_APP_PER_USER_RANGE 100000 #define MULTIUSER_FIRST_SHARED_APPLICATION_GID 50000 #define MULTIUSER_FIRST_APPLICATION_UID 10000 typedef uid_t userid_t; typedef uid_t appid_t; Loading @@ -33,6 +35,7 @@ typedef uid_t appid_t; extern userid_t multiuser_get_user_id(uid_t uid); extern appid_t multiuser_get_app_id(uid_t uid); extern uid_t multiuser_get_uid(userid_t userId, appid_t appId); extern appid_t multiuser_get_shared_app_gid(uid_t uid); #ifdef __cplusplus } Loading libcutils/multiuser.c +6 −0 Original line number Diff line number Diff line Loading @@ -27,3 +27,9 @@ appid_t multiuser_get_app_id(uid_t uid) { uid_t multiuser_get_uid(userid_t userId, appid_t appId) { return userId * MULTIUSER_APP_PER_USER_RANGE + (appId % MULTIUSER_APP_PER_USER_RANGE); } appid_t multiuser_get_shared_app_gid(uid_t id) { return MULTIUSER_FIRST_SHARED_APPLICATION_GID + (id % MULTIUSER_APP_PER_USER_RANGE) - MULTIUSER_FIRST_APPLICATION_UID; } rootdir/init.rc +4 −0 Original line number Diff line number Diff line Loading @@ -363,6 +363,10 @@ on post-fs-data mkdir /data/misc/boottrace 0771 system shell mkdir /data/misc/update_engine 0700 root root mkdir /data/misc/trace 0700 root root # profile file layout mkdir /data/misc/profiles 0771 system system mkdir /data/misc/profiles/cur 0771 system system mkdir /data/misc/profiles/ref 0771 system system # For security reasons, /data/local/tmp should always be empty. # Do not place files or directories in /data/local/tmp Loading Loading
include/cutils/multiuser.h +3 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,8 @@ extern "C" { // NOTE: keep in sync with android.os.UserId #define MULTIUSER_APP_PER_USER_RANGE 100000 #define MULTIUSER_FIRST_SHARED_APPLICATION_GID 50000 #define MULTIUSER_FIRST_APPLICATION_UID 10000 typedef uid_t userid_t; typedef uid_t appid_t; Loading @@ -33,6 +35,7 @@ typedef uid_t appid_t; extern userid_t multiuser_get_user_id(uid_t uid); extern appid_t multiuser_get_app_id(uid_t uid); extern uid_t multiuser_get_uid(userid_t userId, appid_t appId); extern appid_t multiuser_get_shared_app_gid(uid_t uid); #ifdef __cplusplus } Loading
libcutils/multiuser.c +6 −0 Original line number Diff line number Diff line Loading @@ -27,3 +27,9 @@ appid_t multiuser_get_app_id(uid_t uid) { uid_t multiuser_get_uid(userid_t userId, appid_t appId) { return userId * MULTIUSER_APP_PER_USER_RANGE + (appId % MULTIUSER_APP_PER_USER_RANGE); } appid_t multiuser_get_shared_app_gid(uid_t id) { return MULTIUSER_FIRST_SHARED_APPLICATION_GID + (id % MULTIUSER_APP_PER_USER_RANGE) - MULTIUSER_FIRST_APPLICATION_UID; }
rootdir/init.rc +4 −0 Original line number Diff line number Diff line Loading @@ -363,6 +363,10 @@ on post-fs-data mkdir /data/misc/boottrace 0771 system shell mkdir /data/misc/update_engine 0700 root root mkdir /data/misc/trace 0700 root root # profile file layout mkdir /data/misc/profiles 0771 system system mkdir /data/misc/profiles/cur 0771 system system mkdir /data/misc/profiles/ref 0771 system system # For security reasons, /data/local/tmp should always be empty. # Do not place files or directories in /data/local/tmp Loading