Merge "Iteration on multi-user external storage." into jb-mr1-dev

This commit is contained in:
Jeff Sharkey 2012-08-22 18:17:23 -07:00 committed by Android (Google) Code Review
commit 42a1e6c9d8
4 changed files with 8 additions and 14 deletions

View file

@ -1022,16 +1022,6 @@ int adb_main(int is_daemon, int server_port)
}
#else
// Our external storage path may be different than apps, since
// we aren't able to bind mount after dropping root.
const char* adb_external_storage = getenv("ADB_EXTERNAL_STORAGE");
if (NULL != adb_external_storage) {
setenv("EXTERNAL_STORAGE", adb_external_storage, 1);
} else {
D("Warning: ADB_EXTERNAL_STORAGE is not set. Leaving EXTERNAL_STORAGE"
" unchanged.\n");
}
/* don't listen on a port (default 5037) if running in secure mode */
/* don't run as root if we are running in secure mode */
if (should_drop_privileges()) {

View file

@ -229,9 +229,6 @@ static struct fs_path_config android_files[] = {
{ 00644, AID_ROOT, AID_ROOT, 0 },
};
#define EXTERNAL_STORAGE_SYSTEM "/mnt/shell/sdcard0"
#define EXTERNAL_STORAGE_APP "/storage/sdcard0"
static inline void fs_config(const char *path, int dir,
unsigned *uid, unsigned *gid, unsigned *mode)
{

View file

@ -34,6 +34,7 @@ loglevel 3
export ANDROID_ROOT /system
export ANDROID_ASSETS /system/app
export ANDROID_DATA /data
export ANDROID_STORAGE /storage
export ASEC_MOUNTPOINT /mnt/asec
export LOOP_MOUNTPOINT /mnt/obb
export BOOTCLASSPATH /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar
@ -56,8 +57,9 @@ loglevel 3
mkdir /cache 0770 system cache
mkdir /config 0500 root root
# Directory for shell-visible mount points, like external storage
# See storage config details at http://source.android.com/tech/storage/
mkdir /mnt/shell 0700 shell shell
mkdir /storage 0050 root sdcard_r
# Directory for putting things only root should see.
mkdir /mnt/secure 0700 root root

View file

@ -49,12 +49,17 @@ static const struct mount_opts options[] = {
{ "exec", MS_NOEXEC, 0, MS_NOEXEC },
{ "move", MS_TYPE, MS_MOVE, 0 },
{ "recurse", MS_REC, MS_REC, 0 },
{ "rec", MS_REC, MS_REC, 0 },
{ "remount", MS_TYPE, MS_REMOUNT, 0 },
{ "ro", MS_RDONLY, MS_RDONLY, 0 },
{ "rw", MS_RDONLY, 0, MS_RDONLY },
{ "suid", MS_NOSUID, 0, MS_NOSUID },
{ "sync", MS_SYNCHRONOUS, MS_SYNCHRONOUS, 0 },
{ "verbose", MS_VERBOSE, MS_VERBOSE, 0 },
{ "unbindable", MS_UNBINDABLE, MS_UNBINDABLE, 0 },
{ "private", MS_PRIVATE, MS_PRIVATE, 0 },
{ "slave", MS_SLAVE, MS_SLAVE, 0 },
{ "shared", MS_SHARED, MS_SHARED, 0 },
};
static void add_extra_option(struct extra_opts *extra, char *s)