错误创建镜像文件(只读文件系统) [英] Error creating imagefile (Read-only file system)

查看:817
本文介绍了错误创建镜像文件(只读文件系统)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,这不是重复的问题,我已经从其他类似的线程试图解决方案,但它看起来像这样的情况是不同的。

在我的情况,我可以成功安装并从同一个模拟器中运行其他Android项目(X86还试图臂),但是这个特殊的应用程序项目抛出安装时也可手动亚行安装由内壳不正常工作或下面的错误。

时,发现一个来自以下日志错误(行号232) https://android.googlesource.com/platform/system/vold /+/froyo/Loop.cpp

不过,我不知道如果错误没有内容提供商......是关系到同样的错误堆栈。

如果它有写权限错误(SD卡或文件系统权限那样),那么其他应用程序应该也不会安装!

此问题的应用程序是一个NDK项目,自定义内容提供商,我试着忽略,但无济于事。这似乎是内容供应商的错误是由操作系统从应用程序中涉及到的APK安装,而不是真正的内容提供者。

我累了测试与实际设备的,我很担心这会降低我的手机生活,因为我不得不这样做很频繁。

  ---------开始的/ dev /日志/主
D / AndroidRuntime(1977):
D / AndroidRuntime(1977):>>>>>> AndroidRuntime开始com.android.internal.os.RuntimeInit<<<<<<
W /连接器(1977年):libdvm.so有文本重定位。这是浪费内存,是一个安全隐患。请修正。
D / AndroidRuntime(1977):CheckJNI为ON
D / dalvikvm(1977):试图加载LIB libjavacore.so为0x0
D / dalvikvm(1977年):添加共享库libjavacore.so为0x0
D / dalvikvm(1977):试图加载LIB libnativehelper.so为0x0
D / dalvikvm(1977年):添加共享库libnativehelper.so为0x0
D / dalvikvm(1977年):无JNI_OnLoad在libnativehelper.so为0x0发现,跳绳的init
D / dalvikvm(1977年):注:类Landroid / APP / ActivityManagerNative;拥有179未实现(抽象)方法
E / memtrack(1977年):未能加载memtrack模块(没有这样的文件或目录)
E / android.os.Debug(1977年):未能加载memtrack模块:-2
D / AndroidRuntime(1977年):调用主入口com.android.commands.pm.Pm
E / PackageHelper(1680年):无法创建安全容器smdl2tmp1
---------中的/ dev /日志/系统开始
W / ActivityManager(1149):没有内容提供商找到许可撤销:文件:///data/local/tmp/myapp.apk
E /沃尔德(932):错误创建镜像文件(只读文件系统)
E /沃尔德(932):ASEC图像文件创建失败(只读文件系统)
W /沃尔德(932):返回OperationFailed  - 没有处理程序错误号30
E / DefContainer(1680年):无法创建容器smdl2tmp1
W / ActivityManager(1149):没有内容提供商找到许可撤销:文件:///data/local/tmp/myapp.apk
D / dalvikvm(1149):GC_EXPLICIT释放161K,22%免费5442K / 6948K,暂停1毫秒+ 1毫秒,总8ms的
D / AndroidRuntime(1977年):关闭虚拟机
 

解决方案

该问题可能是无论是从:

  • 在一个Android AOSP错误或正在使用在ROM中的错误 (配置错误)
  • 在事情已经引起,其中安装在SD卡上的应用程序分区(或仿真内部卡)存储,只读

SD卡上的应用程序被存储在一个加密的容器平台安全目的 - 使得其他应用程序不能修改或对其造成损坏。当安装SD卡时,这些容器被安装,以便它们可以在相同的访问的方式存储在内部存储的应用程序。

在您的堆栈跟踪的问题是这样的:

  

E /沃尔德(932):错误创建镜像文件(只读文件系统)
  E /沃尔德(932):ASEC图像文件创建失败(只读文件   系统)

我有一个类似的问题,这已经在AndroidManifest.xml中定义的的Andr​​oid应用程序:INSTALLLOCATION =preferExternal,然后下面的东西为我工作(的彼此独立地进行的):

  I / qtaguid(6299):无法write_ctrl(U 40)RES = -1错误号= 22
I / qtaguid(6299):取消标记插座40失败错误号= -22
W / NetworkManagementSocketTagger(6299):untagSocket(40)失败,错误号-22
D / Finsky(6299):[1] 2.onResponse:核对ID = 29的反应= 0
D / Finsky(6299):[1] PackageVerificationReceiver.onReceive:验证请求,ID = 29
E /沃尔德(127):错误创建镜像文件(只读文件系统)
E /沃尔德(127):ASEC图像文件创建失败(只读文件系统)
W /沃尔德(127):返回OperationFailed  - 没有处理程序错误号30
E / PackageHelper(6280):无法创建安全容器smdl733025106.tmp
W / DefContainer(6280):无法复制包在/storage/emulated/0/myapp.apk
W / DefContainer(6280):产生java.io.IOException:无法创建容器smdl733025106.tmp
W / DefContainer(6280):在com.android.defcontainer.DefaultContainerService.copyPackageToContainerInner(DefaultContainerService.java:327)
W / DefContainer(6280):在com.android.defcontainer.DefaultContainerService.access $ 000(DefaultContainerService.java:67)
W / DefContainer(6280):在com.android.defcontainer.DefaultContainerService$1.copyPackageToContainer(DefaultContainerService.java:108)
W / DefContainer(6280):在com.android.internal.app.IMediaContainerService $ Stub.onTransact(IMediaContainerService.java:60)
W / DefContainer(6280):在android.os.Binder.execTransact(Binder.java:446)
 

  • 根据 https://developer.android.com /guide/topics/data/install-location.html 更改为机器人:INSTALLLOCATION =自动

  • 根据 HTTP://forum.xda -developers.com/showpost.php?p=58409922&postcount=4845 如果你想安装到设备内部存储,无论什么样的表现还是说一下系统决定。

      

    进入设置>应用程序>打开菜单> preferred安装位置>   将其设置为内部设备存储。我有这个设置为让系统   决定,这引起了一些的APK的失败的安装,因为   他们被标记为preFER SD卡作为其安装位置   因此,他们试图安装到SD,它只是失败。现在   这一切都在设备上安装,它工作得很好。

  • 如果你想将它安装到外部存储

      

    亚行根
      亚行外壳
      坐骑-o RW,重新挂载根文件系统/
      搭配chmod 777的/ mnt / SD卡
      下午安装/mnt/sdcard/myapp.apk
      安装邻RO,重新挂载根文件系统/

  • 根据 https://开头code.google.com / P /安卓/问题/详细信息?ID = 9593 &功放;&安培; <一href="http://www.androidpolice.com/2011/04/19/fixing-the-couldnt-install-on-usb-storage-or-sd-card-problem-on-android/" rel="nofollow">http://www.androidpolice.com/2011/04/19/fixing-the-couldnt-install-on-usb-storage-or-sd-card-problem-on-android/
    只有当你能够找到smdl2tmp1.asec在以下路径 或者你会得到错误

    smdl2tmp1 03-24 18:48:38.784:ERROR /沃尔德(86):ASEC文件'/mnt/secure/asec/smdl2tmp1.asec目前存在 - 首先消灭它! (地址已在使用)

      

    亚行根
          亚行外壳RM /sdcard/.android_secure/smdl2tmp1.asec
          亚行外壳RM /mnt/secure/asec/smdl2tmp1.asec

First of all this is not duplicate question and I have tried solutions from other similar threads but it looks like this case is different.

In my case I can successfully install and run other android project from the same emulator (x86 also tried arm) but this particular app project throws following error when installing also manually "adb install" from inside shell do not work either.

One of the error from log below is found (line number 232) https://android.googlesource.com/platform/system/vold/+/froyo/Loop.cpp

However I do not know if the error "No content provider..." is related to the same error stack.

If it had the write-permission error (sdcard or file system permission like that) then other apps should also not install!

This problematic app is a NDK project with a custom content provider which I tried omitting but no avail. it seems like content provider error is related to apk installation from os and not really the content provider from within the app.

I am tired of testing with a real device, I am worried this would degrade my phones life because I had to do it very often.

--------- beginning of /dev/log/main
D/AndroidRuntime( 1977): 
D/AndroidRuntime( 1977): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
W/linker  ( 1977): libdvm.so has text relocations. This is wasting memory and is a security risk. Please fix.
D/AndroidRuntime( 1977): CheckJNI is ON
D/dalvikvm( 1977): Trying to load lib libjavacore.so 0x0
D/dalvikvm( 1977): Added shared lib libjavacore.so 0x0
D/dalvikvm( 1977): Trying to load lib libnativehelper.so 0x0
D/dalvikvm( 1977): Added shared lib libnativehelper.so 0x0
D/dalvikvm( 1977): No JNI_OnLoad found in libnativehelper.so 0x0, skipping init
D/dalvikvm( 1977): Note: class Landroid/app/ActivityManagerNative; has 179 unimplemented (abstract) methods
E/memtrack( 1977): Couldn't load memtrack module (No such file or directory)
E/android.os.Debug( 1977): failed to load memtrack module: -2
D/AndroidRuntime( 1977): Calling main entry com.android.commands.pm.Pm
E/PackageHelper( 1680): Failed to create secure container smdl2tmp1
--------- beginning of /dev/log/system
W/ActivityManager( 1149): No content provider found for permission revoke: file:///data/local/tmp/myapp.apk
E/Vold    (  932): Error creating imagefile (Read-only file system)
E/Vold    (  932): ASEC image file creation failed (Read-only file system)
W/Vold    (  932): Returning OperationFailed - no handler for errno 30
E/DefContainer( 1680): Failed to create container smdl2tmp1
W/ActivityManager( 1149): No content provider found for permission revoke: file:///data/local/tmp/myapp.apk
D/dalvikvm( 1149): GC_EXPLICIT freed 161K, 22% free 5442K/6948K, paused 1ms+1ms, total 8ms
D/AndroidRuntime( 1977): Shutting down VM

解决方案

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): 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)

这篇关于错误创建镜像文件(只读文件系统)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆