问题可能来自:
> Android AOSP错误或您正在使用的ROM中的错误
(配置错误)
>某些东西导致存储SD卡(或模拟内部卡)上安装的应用程序的分区,只读
“出于平台安全目的,SD卡上的应用程序存储在加密容器中 – 这样其他应用程序就无法修改或损坏它们.安装SD卡时,这些容器的安装方式使得它们可以像应用程序一样访问存储在内部存储器中.“
在你的堆栈跟踪上问题是这样的:
E/Vold ( 932): Error creating imagefile (Read-only file system)
E/Vold ( 932): ASEC image file creation failed (Read-only file
system)
对于在AndroidManifest.xml中定义了android:installLocation =“preferExternal”的应用程序,我遇到了类似的问题,以下内容对我有用(彼此独立完成):
I/qtaguid ( 6299): Failed write_ctrl(u 40) res=-1 errno=22
I/qtaguid ( 6299): Untagging socket 40 failed errno=-22
W/NetworkManagementSocketTagger( 6299): untagSocket(40) failed with errno -22
D/Finsky ( 6299): [1] 2.onResponse: Verification id=29 response=0
D/Finsky ( 6299): [1] PackageVerificationReceiver.onReceive: Verification requested, id = 29
E/Vold ( 127): Error creating imagefile (Read-only file system)
E/Vold ( 127): ASEC image file creation failed (Read-only file system)
W/Vold ( 127): Returning OperationFailed - no handler for errno 30
E/PackageHelper( 6280): Failed to create secure container smdl733025106.tmp
W/DefContainer( 6280): Failed to copy package at /storage/emulated/0/myapp.apk
W/DefContainer( 6280): java.io.IOException: Failed to create container smdl733025106.tmp
W/DefContainer( 6280): at com.android.defcontainer.DefaultContainerService.copyPackageToContainerInner(DefaultContainerService.java:327)
W/DefContainer( 6280): at com.android.defcontainer.DefaultContainerService.access$000(DefaultContainerService.java:67)
W/DefContainer( 6280): at com.android.defcontainer.DefaultContainerService$1.copyPackageToContainer(DefaultContainerService.java:108)
W/DefContainer( 6280): at com.android.internal.app.IMediaContainerService$Stub.onTransact(IMediaContainerService.java:60)
W/DefContainer( 6280): at android.os.Binder.execTransact(Binder.java:446)
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.
>如果要将其安装到“外部存储”
adb root
adb shell
mount -o rw,remount rootfs /
chmod 777 /mnt/sdcard
pm install /mnt/sdcard/myapp.apk
mount -o ro,remount rootfs /
smdl2tmp1 03-24 18:48:38.784:ERROR / Vold(86):ASEC文件’/mnt/secure/asec/smdl2tmp1.asec’目前存在 – 先破坏它! (地址已在使用中)
adb root adb shell rm /sdcard/.android_secure/smdl2tmp1.asec adb shell rm /mnt/secure/asec/smdl2tmp1.asec