【发布时间】:2015-08-29 11:22:16
【问题描述】:
无论我做什么,我都无法正确设置 /data 分区大于 200 MB 的虚拟 android 设备。设置或扩展 /data 分区的正确/确定方法是什么?
我假设其中一个工具存在错误,所以基本上我正在寻找解决方法。
使用 AVD 工具创建新的 AVD 似乎没有正确设置在“内部存储”字段中输入的值,尽管“disk.dataPartition.size”参数确实获得了适当的值:
$ grep "size" *.ini
config.ini:disk.dataPartition.size=1024M
config.ini:sdcard.size=512M
hardware-qemu.ini:disk.cachePartition.size = 66m
hardware-qemu.ini:disk.systemPartition.size = 550m
hardware-qemu.ini:disk.dataPartition.size = 1g
只是列出文件...
$ ls -alsh
total 979M
0 drwxr-xr-x 12 user staff 408 jui 13 11:35 .
0 drwxr-xr-x 7 user staff 238 jui 13 11:38 ..
66M -rw------- 1 user staff 66M jui 13 11:38 cache.img
4,0K -rw-r--r-- 1 user staff 668 jui 13 11:34 config.ini
4,0K -rw-r--r-- 1 user staff 1,8K jui 13 11:35 hardware-qemu.ini
512M -rw-r--r-- 1 user staff 512M jui 13 11:38 sdcard.img
200M -rw------- 1 user staff 200M jui 13 11:38 userdata-qemu.img
200M -rw-r--r-- 1 user staff 200M jui 13 11:34 userdata.img
然后在启动虚拟设备时,磁盘空闲说它只有 200MB:
$ adb shell df
Filesystem Size Used Free Blksize
/dev 373.7M 128.0K 373.6M 4096
/sys/fs/cgroup 373.7M 12.0K 373.7M 4096
/mnt/asec 373.7M 0.0K 373.7M 4096
/mnt/obb 373.7M 0.0K 373.7M 4096
/system 541.9M 260.8M 281.1M 4096
/data 197.0M 31.3M 165.7M 4096
/cache 65.0M 4.1M 60.9M 4096
/mnt/media_rw/sdcard 510.0M 22.0K 510.0M 2048
/storage/sdcard 510.0M 22.0K 510.0M 2048
然后,如果我尝试在这个问题中提出的建议: Android 4.4 Virtual Device Internal Storage Will Not Resize
然后该卷最终以只读方式安装,这意味着它几乎没用:
$ adb install someApp.apk
pkg: /data/local/tmp/someApp.apk
Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]
rm failed for /data/local/tmp/someApp.apk, Read-only file system
并且在启动时也可见...
$ adb shell dmesg
...
<2>EXT4-fs error (device mtdblock1): ext4_mb_generate_buddy:741: group 2, 32366 clusters in bitmap, 32370 in gd
<3>Aborting journal on device mtdblock1-8.
<2>EXT4-fs (mtdblock1): Remounting filesystem read-only
<2>EXT4-fs error (device mtdblock1) in ext4_reserve_inode_write:4356: Journal has aborted
<2>EXT4-fs error (device mtdblock1) in ext4_evict_inode:171: Journal has aborted
<4>QEMU Pipe Device:rw, wait_event error
...
我的设置:
- OSX 10.10.3
- Android SDK(2015 年 6 月 13 日最新)
- Android SDK 工具 24.3.2
【问题讨论】: