Wednesday, May 28, 2014

Android emulator加速和代理

软件加速:
avd设置中,选use host gpu

硬件加速:
1. 在bios设置, enable visualization technology.
2. cmd输入sc query intelhaxm见到尽管硬件设置了,但软件未安装
3. SDK manager下载intel accelarate








4. Go to android SDK folder,  sdk\extras\intel\Hardware_Accelerated_Execution_Manager\intelhaxm.exe, 安装时候,按需要提高内存上限(默认2G)
5. 在Android SDK manager安装 google APIs (x86 system image) and google APIs ( ARM system image) and Intel x86 Emulator Accelerated(HAXM installer)
这时候重复步骤2可见intelhaxm服务开始了
6. Avd设置中,target选google APIs(x86 system image), skin WXga800-7in
或者cmd: emulator -avd nexus5 -gpu on

代理proxy:
在安装apk到虚拟器emulator一文提到用cmd设置proxy,但笔者用后觉得emulator容易暂停或死机,这里用emulator中设置方法达到:
1. 打开emualotor
2. Settings->more->mobile networks->check data enabled option and click 
access point name->us t-mobile
设置Proxy, port, 置空username password
右上角Save

如果要创建文件:
1. 在创建avd时候设置sd card

Reference:
Android using hardware acceleration 
http://developer.android.com/tools/devices/emulator.html#acceleration

No comments:

Post a Comment