java如何生成只读文件系统_android – 创建imagefile时出错(只读文件系统)

问题可能来自:

> 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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值