D:\Android\android-sdk>cd tools

D:\Android\android-sdk\tools>emulator -avd hello2.2 -partition-size 128

D:\Android\android-sdk\tools>Unknown savevm section type 95

D:\Android\android-sdk\tools>cd ../

D:\Android\android-sdk>cd platform-tools

D:\Android\android-sdk\platform-tools>adb root
adbd is already running as root

D:\Android\android-sdk\platform-tools>adb remount
remount succeeded

D:\Android\android-sdk\platform-tools>adb pull /system/etc/hosts
0 KB/s (25 bytes in 0.144s)

D:\Android\android-sdk\platform-tools>adb push hosts /system/etc/
1 KB/s (102 bytes in 0.073s)

注意:hosts文件最后需要至少空2行以上,否则最后一行不会起效

如果最后一步出来failed to copy ‘hosts’ to ‘/system/etc/hosts': Directory not empty

可以adb shell

#ls看看空间是不是满了

在项目上点右键 — run as — run configurations — Android Application — Target标签下的 Additional Emulator Command Line Options — 在下面填上“-partition-size 256”即可

或$emulator –avd youravdname –partition-size 128