Android 4.4 虚拟设备内部存储不会调整大小 [英] Android 4.4 Virtual Device Internal Storage Will Not Resize

查看:38
本文介绍了Android 4.4 虚拟设备内部存储不会调整大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 AVD 管理器创建新的 Android 4.4 虚拟设备时,我无法使内部存储空间大于 200MB.

When creating a new Android 4.4 Virtual Device using the AVD Manager, I cannot get the internal storage to be anything larger than 200MB.

512MB 是我要设置的内部存储大小.

512MB is the internal storage size I would like to set.

我试过了:

  • 在 AVD Manager 中将设备的内部存储设置为 512MB.
  • 在 Eclipse 项目的 Debug Configurations 中,在 Target 选项卡下,将 Additional Emulator Command Line Options 设置为 -partition-size 512.
  • 在 Eclipse Preferences 的 Android 下,我将 Default emulator options 设置为 -partition-size 512.
  • 在 (User)/.android/avd/(device).avd/config.ini 下编辑我的虚拟设备的配置文件
    • 然后设置disk.dataPartition.size为disk.dataPartition.size=512M
    • 还尝试将其设置为 disk.dataPartition.size=512MB
    • 还尝试将其设置为 data.dataPartition.size=512M

    这发生在 ARM 和 Intel Atom x86 CPU 上.

    This happens on both ARM and Intel Atom x86 CPUs.

    现在,当我切换到 Android 3.0 (ARM) 时,我可以简单地使用 AVD 管理器调整它的大小,以满足我的心愿.Android 4.4 有问题吗?有什么我错过的吗?或者可能的解决方法?

    Now when I switch over to Android 3.0 (ARM), I can resize it simply using the AVD Manager to my hearts content. Is there an issue with Android 4.4? Is there something I missed? Or a possible work around?

    推荐答案

    现在模拟器文件系统是 ext4,我可以使用标准 Linux 工具重新调整 userdata.img 的大小.

    Now that the emulator file system is ext4 I was able to re-size the userdata.img using standard Linux tools.

    # Navigate to AVD
    cd ~/.android/avd/Nexus5
    # Delete old image
    rm userdata-qemu.*
    # Re-size the image
    resize2fs userdata.img 512M
    # Start the emulator and enjoy
    emulator @Nexus5
    

    编辑我也可以直接重新调整 userdata-qemu.img 的大小,但我必须先运行 e2fsck.

    Edit I was also able to re-size userdata-qemu.img directly but I had to run e2fsck first.

     e2fsck -f userdata-qemu.img
     resize2fs userdata-qemu.img 512M
    

    这篇关于Android 4.4 虚拟设备内部存储不会调整大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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