- 点击访问我的网站,查看效果 上海驾校
- start your Android Virtual Device (AVD):
emulator -avd myAvdNameHere -partition-size 256
This is located in C:\Program Files (x86)\Android\android-sdk-windows\tools\ on Windows 64bit.
Note: The partition-size parameter is needed to expand the image size to prevent an error in step 5. If you try and perform these steps after starting the emulator from the UI you will receive the following error: failed to copy ‘c:\temp\hosts’ to ‘/system/etc/hosts’: Out of memory
- remount the device image as writable:
adb remount
This is located in C:\Program Files (x86)\Android\android-sdk-windows\platform-tools\ on Windows 64bit.
- save a copy of the existing hosts file to a temporary location on your host computer:
adb pull /system/etc/hosts c:\temp
- edit the hosts file adding an entry pointing to your host computer:
127.0.0.1 localhost 10.0.2.2 mytesthost
- save the edited hosts file to your Android emulator:
adb push c:\temp\hosts /system/etc
android 模拟器 host修改
于 2014-09-28 10:42:58 首次发布