Failed to mount emulated storage machine is unable to start the problem lookup

Source: Internet
Author: User

Error log:


E/cutils (1180): Not a directory:/storage/sdcard0



w/zygote (1180): Failed to mount emulated storage:22


E/zygote (1180): cannot continue without emulated storage


F/art (1180): art/runtime/jni_internal.cc:776] JNI fatalerror called:runtimeabort


F/LIBC (1180): Fatal signal 6 (SIGABRT), code-6 in Tid 1180 (main)


Log Output code:

Frameworks//base/core/jni/com_android_internal_os_zygote.cpp


Utility routine to fork Zygote and specialize the child process.
Static pid_tForkandspecializecommon(jnienv* env, uid_t uid, gid_t gid, Jintarray javagids,
Jint debug_flags, Jobjectarray javarlimits,
Jlong permittedcapabilities, Jlong effectivecapabilities,
Jint Mount_external,
Jstring Java_se_info, Jstring java_se_name,
BOOL Is_system_server, Jintarray Fdstoclose,
Jstring Instructionset, jstring datadir) {


if (! Mountemulatedstorage (UID, mount_external, Need_native_bridge)) {


ALOGW ("Failed to mount emulated storage:%d", errno);
if (errno = = Enotconn | | errno = = erofs) {
When device was actively encrypting, we get enotconn here
Since FUSE was mounted before the framework restarted.
When encrypted device is booting, we get erofs since
FUSE hasn ' t been created yet by Init.
In either case, continue without external storage.
} else {
Aloge ("Cannot continue without emulated storage");
Runtimeabort (env);
}
}





static bool Mountemulatedstorage (uid_t uid, jint Mount_mode, bool force_mount_namespace) {

if (Mount_mode = = Mount_external_multiuser | | mount_mode = = mount_external_multiuser_all) {
These paths must already be created by init.rc
Const char* Source = getenv ("Emulated_storage_source");
Const char* target = getenv ("Emulated_storage_target");
Const char* Legacy = getenv ("External_storage");

These environment variables are set from the Init.rc

Partition cannot be loaded, suspect that there is a problem with the variable setting

Find settings sure is the problem


if (Source = = NULL | | target = NULL | | legacy = = NULL) {
ALOGW ("Storage environment undefined; Unable to provide external storage ");
return false;
}


Prepare Source Paths


/mnt/shell/emulated/0
Const STRING8 Source_user (String8::format ("%s/%d", Source, user_id));
/storage/emulated/0
Const STRING8 Target_user (String8::format ("%s/%d", Target, user_id));


if (Fs_prepare_dir (source_user.string (), 0000, 0, 0) = = 1
|| Fs_prepare_dir (target_user.string (), 0000, 0, 0) = =-1) {
return false;
}


if (Mount_mode = = Mount_external_multiuser_all) {
Mount entire external storage tree for all users
if (temp_failure_retry (source, target, NULL, ms_bind, null)) = = =-1) {
ALOGW ("Failed to mount%s to%s:%d", source, Target, errno);
return false;
}
} else {
Only Mount User-specific external storage
if (Temp_failure_retry (
Mount (Source_user.string (), target_user.string (), NULL, ms_bind, null)) = =-1) {
ALOGW ("Failed to mount%s to%s:%d", source_user.string (), target_user.string (), errno);
return false;
}
}


if (Fs_prepare_dir (legacy, 0000, 0, 0) = = = 1) {
return false;
}

Failed to mount emulated storage machine is unable to start the problem lookup

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.