Error Creating Imagefile (read-only File System)
Solution 1:
The problem might be either from:
- an Android AOSP bug or a bug in the ROM you are using (misconfiguration)
- something has caused the partition where the apps installed on the SD Card (or an emulated internal card) are stored, to be read only
"Apps on SD card are stored in an encrypted container for platform security purposes -- so that other applications can not modify or corrupt them. When mounting the SD card, these containers are mounted so that they can be accessed in the same way as apps stored in internal storage."
On your stacktrace the problem is this:
E/Vold ( 932): Error creating imagefile (Read-only file system) E/Vold ( 932): ASEC image file creation failed (Read-only file system)
I've had a similar problem with an application that had defined in its AndroidManifest.xml the android:installLocation="preferExternal" and the following things worked for me (done independently of one another):
I/qtaguid(6299):Failedwrite_ctrl(u40)res=-1errno=22I/qtaguid(6299):Untaggingsocket40failederrno=-22W/NetworkManagementSocketTagger(6299):untagSocket(40)failedwitherrno-22D/Finsky(6299): [1] 2.onResponse:Verificationid=29response=0D/Finsky(6299): [1] PackageVerificationReceiver.onReceive:Verificationrequested,id=29E/Vold(127):Errorcreatingimagefile(Read-onlyfilesystem)E/Vold(127):ASECimagefilecreationfailed(Read-onlyfilesystem)W/Vold(127):ReturningOperationFailed-nohandlerforerrno30E/PackageHelper(6280):Failedtocreatesecurecontainersmdl733025106.tmpW/DefContainer(6280):Failedtocopypackageat/storage/emulated/0/myapp.apkW/DefContainer(6280):java.io.IOException:Failedtocreatecontainersmdl733025106.tmpW/DefContainer(6280):atcom.android.defcontainer.DefaultContainerService.copyPackageToContainerInner(DefaultContainerService.java:327)W/DefContainer(6280):atcom.android.defcontainer.DefaultContainerService.access$000(DefaultContainerService.java:67)W/DefContainer(6280):atcom.android.defcontainer.DefaultContainerService$1.copyPackageToContainer(DefaultContainerService.java:108)W/DefContainer(6280):atcom.android.internal.app.IMediaContainerService$Stub.onTransact(IMediaContainerService.java:60)W/DefContainer(6280):atandroid.os.Binder.execTransact(Binder.java:446)
As per https://developer.android.com/guide/topics/data/install-location.html change to android:installLocation="auto"
As per http://forum.xda-developers.com/showpost.php?p=58409922&postcount=4845 If you want to install it to "internal device storage", regardless of what the manifest says or what the system decides.
Go to Settings > Apps > Open the menu > Preferred install location > set it to "Internal device storage". I had this set to "Let the system decide". This caused some of the APKs to fail the install, because they were marked to prefer the SD card as their installation location and thus they tried to install onto the SD and it just failed. Now that everything installs on the device, it works just fine.
If you want to install it to the "external storage"
adb root adb shell mount -o rw,remount rootfs / chmod 777 /mnt/sdcard pm install /mnt/sdcard/myapp.apk mount -o ro,remount rootfs /
As per https://code.google.com/p/android/issues/detail?id=9593 && http://www.androidpolice.com/2011/04/19/fixing-the-couldnt-install-on-usb-storage-or-sd-card-problem-on-android/ Only if you are able to find the smdl2tmp1.asec at the following paths or you get error
smdl2tmp1 03-24 18:48:38.784: ERROR/Vold(86): ASEC file '/mnt/secure/asec/smdl2tmp1.asec' currently exists - destroy it first! (Address already in use)
adb root adb shell rm /sdcard/.android_secure/smdl2tmp1.asec adb shell rm /mnt/secure/asec/smdl2tmp1.asec
Solution 2:
In my case I'm using a device with Android version 6, developing for Unity.
I am getting the same error when installing the app directly from the Unity Editor, this will not happen if i do upload the app to the android Game Play Developer console as a Beta version and then download and install it from there, in this case android will do needed encryption and install the app successfully.
My solution to do direct install was to set in the : android build -> Player Settings > Install location -> to Force Internal
Solution 3:
In addtion to @Mnemoinc's answer:
If you want to force the install to the "internal storage"
adb root adb shell pm install -f /sdcard/myapp.apk
This could be useful when using Cyanogenmod and having a secure storage.
Post a Comment for "Error Creating Imagefile (read-only File System)"