Android 4.4 Virtual Device Internal Storage Will N

2019-01-16 05:20发布

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 is the internal storage size I would like to set.

I've tried:

  • Setting the internal storage of the device in the AVD Manager to 512MB.
  • In Eclipse project Debug Configurations, under the Target tab, setting Additional Emulator Command Line Options to -partition-size 512.
  • In the Eclipse Preferences, under Android, I set the Default emulator options to -partition-size 512.
  • Editing the config file for my virtual device under (User)/.android/avd/(device).avd/config.ini
    • Then setting disk.dataPartition.size to disk.dataPartition.size=512M
    • Also tried setting it to disk.dataPartition.size=512MB
    • Also tried setting it to data.dataPartition.size=512M

This happens on both ARM and Intel Atom x86 CPUs.

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?

10条回答
我只想做你的唯一
2楼-- · 2019-01-16 06:11

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

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
查看更多
Root(大扎)
3楼-- · 2019-01-16 06:12

Here, there seems to be some catch, in older android tools lower than version 22, this does not work. I upgraded the android tools to 23 and this started working.

My configuration was API Level 21 CPU: Intel X86 OS: Ubuntu Linux

查看更多
Evening l夕情丶
4楼-- · 2019-01-16 06:15

delete /data/data/com.google.android.gms/files will release 200M+

查看更多
干净又极端
5楼-- · 2019-01-16 06:17

Someone13, this is definitely a Bug in Target: "Android 4.4.2 - API Level 19"

I have the same problem- can’t change the size of internal storage of the device in emulator of Android SDK by no way(even with “disk.dataPartition.size=xxxM” in config.ini or with command-prompt arguments “-partition-size xxx”) when using Android 4.4.2 in the Emulator of Android SDK.

The only way is to set custom size is when using as Target: Android 3.0 - API Level 11.

My hardware: Windows 7 Ultimate SP1, RAM 4GB; Core Duo 2.28GHz; GT630

查看更多
登录 后发表回答