三星Galaxy S II AVD(Android虚拟设备)基本设置? [英] Samsung Galaxy S II AVD (Android Virtual Device) Basic Settings?

查看:508
本文介绍了三星Galaxy S II AVD(Android虚拟设备)基本设置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建的三星Galaxy S II的AVD。唯一的目的是为了测试网站与它的默认网页浏览器,看看他们如何看待在纵向和横向模式。

I would like to create an AVD of the Samsung Galaxy S II. The sole purpose is to test websites with it's default web browser to see how they look in both portrait and landscape mode.

由于这是现在最流行的Andr​​oid智能手机,我想用我的网站进行测试。

As it's now the most popular Android smartphone, I'd like to test it with my websites.

我只是想知道最基本的设置,这样我就可以得到至少一个大概的了解。我使用的是安卓SDK的GUI前端。

I would just like to know the most basic settings so I can get at least a rough idea. I'm using the Andriod SDK with the GUI frontend.

我在寻找那些点击安卓虚拟设备管理器新即拿出后,你的设置。

I'm looking for those settings that come up after you click "New" in the Andriod Virtual Device Manager.

例如:

目标: SD卡: 皮肤: 硬件: 抽象液晶密度 最大VM应用程序堆大小 设备RAM大小

Target: SD Card: Skin: Hardware: Abstracted LCD Density Max VM application heap size Device RAM size

我想三星的在线远程测试实验室,但我发现,太多的限制(似乎无法使用在这一点上有一定的端口关闭互联网热点),启动缓慢,我刚刚结束了空白黑屏反正。所以,我真的preFER只跑我自己的版本为AVD。

I tried Samsung's online remote test lab but I've found that too restrictive (can't seem to use it at Internet hotspots that have certain ports closed), slow to start and I just end up with blank black screens anyway. So, I'd really prefer to just run my own version as an AVD.

推荐答案

该接口AVD经理发生了变化。因此,有必要的过程的变化。而不是一个单独的文件,现在有两个一个设备定义和虚拟设备定义。不幸的是,用户界面​​不会充分地控制任一的内容。

The interface to the AVD manager has changed. So there are changes needed to the process. Rather than a single file, there's now both a device definition and a virtual device definition. Unfortunately, the UI doesn't give full control over the contents of either.

这些说明了Android SDK工具修订21.工作,他们参考的Windows 7路径。如果您使用的是不同的操作系统,你需要找出其中的文件住。

These instructions work with the Android SDK Tools revision 21. They make reference to Windows 7 paths. If you're using a different OS, you'll need to figure out where the files live.

从mwalter按照以下步骤执行到步骤6(以获得适当的皮肤)。然后执行以下操作:

Follow the steps from mwalter up to step 6 (to get the appropriate skins). Then do the following:

  1. 在Android虚拟设备管理器中,单击设备定义选项卡和preSS新设备

  1. Within the Android Virtual Device Manager, click on the Device Definitions tab and press "New Device"

键入名称三星Galaxy SII(该名称必须是准确的以下文件的工作。如果你改变它,一定要在以下几个文件,相当于更改名称。)

Type the name "Samsung Galaxy SII" (the name must be exact for the following files to work. If you change it, be sure to make the equivalent changes to the names in the following files.)

在屏幕尺寸,分辨率和RAM填写。我们要覆盖的内容,所以价值其实并不重要,但正确的是: 屏幕尺寸:4.3 分辨率:480 * 800 RAM:1024 密度:华电国际 按钮:硬件

Fill in the screen size, resolution and RAM. We're going to override the contents, so values don't really matter, but correct ones are: Screen Size: 4.3 Resolution: 480 x 800 RAM: 1024 Density: hdpi Buttons: Hardware

点击创建设备,然后关闭AVD管理

Hit Create Device, then close the AVD Manager

打开文件C:在您最喜爱的XML编辑器\用户\ [用户​​名] \机器人\ devices.xml

Open the file C:\Users\[user name]\.android\devices.xml in your favorite XML editor

更​​换的< D:设备> ...< / D:设备>其命名为三星Galaxy SII具有以下元素:

Replace the <d:device>...</d:device> element having the name "Samsung Galaxy SII" with the following:

<d:device>
  <d:name>Samsung Galaxy SII</d:name>
  <d:manufacturer>Samsung</d:manufacturer>
  <d:meta/>
  <d:hardware>
    <d:screen>
      <d:screen-size>normal</d:screen-size>
      <d:diagonal-length>4.30</d:diagonal-length>
      <d:pixel-density>hdpi</d:pixel-density>
      <d:screen-ratio>long</d:screen-ratio>
      <d:dimensions>
        <d:x-dimension>480</d:x-dimension>
        <d:y-dimension>800</d:y-dimension>
      </d:dimensions>
      <d:xdpi>216.97</d:xdpi>
      <d:ydpi>216.97</d:ydpi>
      <d:touch>
        <d:multitouch>jazz-hands</d:multitouch>
        <d:mechanism>finger</d:mechanism>
        <d:screen-type>capacitive</d:screen-type>
      </d:touch>
    </d:screen>
    <d:networking>
      Bluetooth
      <!--NFC (put this back in if you have an S2 model that supports NFC-->
      Wifi
    </d:networking>
    <d:sensors>
      Compass
      Accelerometer
      GPS
      ProximitySensor
      LightSensor
      Gyroscope
    </d:sensors>
    <d:mic>true</d:mic>
    <d:camera>
      <d:location>back</d:location>
      <d:autofocus>true</d:autofocus>
      <d:flash>true</d:flash>
    </d:camera>
    <d:keyboard>nokeys</d:keyboard>
    <d:nav>nonav</d:nav>
    <d:ram unit="GiB">1</d:ram>
    <d:buttons>hard</d:buttons>
    <d:internal-storage unit="GiB">16</d:internal-storage>
    <d:removable-storage unit="GiB">32</d:removable-storage>
    <d:cpu>Generic CPU</d:cpu>
    <d:gpu>Generic GPU</d:gpu>
    <d:abi>
      armeabi-v7a
      armeabi
    </d:abi>
    <d:dock/>
    <d:power-type>battery</d:power-type>
  </d:hardware>
  <d:software>
    <d:api-level>10-</d:api-level>
    <d:live-wallpaper-support>true</d:live-wallpaper-support>
    <d:bluetooth-profiles>
      HSP
      HFP
      A2DP
      AVRCP
      OPP
      PBAP
      HID
    </d:bluetooth-profiles>
    <d:gl-version>2.0</d:gl-version>
    <d:gl-extensions>
      <!-- No clue why the tool is unhappy declaring these, but it is.  (Doesn't complain about their presence in the 'official' devices.)  Comment them out for now.
      GL_OES_rgb8_rgba8
      GL_OES_depth24
      GL_OES_vertex_half_float
      GL_OES_texture_float
      GL_OES_texture_half_float
      GL_OES_element_index_uint
      GL_OES_mapbuffer
      GL_OES_fragment_precision_high
      GL_OES_compressed_ETC1_RGB8_texture
      GL_OES_EGL_image
      GL_OES_EGL_image_external
      GL_OES_required_internalformat
      GL_OES_depth_texture
      GL_OES_get_program_binary
      GL_OES_packed_depth_stencil
      GL_OES_standard_derivatives
      GL_OES_vertex_array_object
      GL_OES_egl_sync
      GL_EXT_multi_draw_arrays
      GL_EXT_texture_format_BGRA8888
      GL_EXT_discard_framebuffer
      GL_EXT_shader_texture_lod
      GL_IMG_shader_binary
      GL_IMG_texture_compression_pvrtc
      GL_IMG_texture_npot
      GL_IMG_texture_format_BGRA8888
      GL_IMG_read_format
      GL_IMG_program_binary
      GL_IMG_multisampled_render_to_texture
      -->
    </d:gl-extensions>
    <d:status-bar>true</d:status-bar>
  </d:software>
  <d:state default="true" name="Portrait">
    <d:description>The device in portrait orientation</d:description>
    <d:screen-orientation>port</d:screen-orientation>
    <d:keyboard-state>keyssoft</d:keyboard-state>
    <d:nav-state>nonav</d:nav-state>
  </d:state>
  <d:state name="Landscape">
    <d:description>The device in landscape orientation</d:description>
    <d:screen-orientation>land</d:screen-orientation>
    <d:keyboard-state>keyssoft</d:keyboard-state>
    <d:nav-state>nonav</d:nav-state>
  </d:state>
</d:device>

  • 重新打开AVD管理器并返回到设备定义选项卡,选择三星Galaxy SII设备并选择创建AVD。将它命名为您认为合适的,然后点击确定。 (同样,我们要超越这一点,所以不用担心设置太多。)

  • Re-open the AVD Manager and go back to the Device Definitions tab, select the Samsung Galaxy SII device and select Create AVD. Name it as you see fit and hit "ok". (Again, we're going to override this, so don't worry about the settings too much.)

    关闭AVD管理器并打开文件C:\用户\ [用户​​名] \机器人\ AVD \ [AVD名] \ config.ini文件中的文本编辑器

    Close the AVD Manager and open the file C:\Users\[user name]\.android\avd\[avd name]\config.ini in your favorite text editor

    替换文件的内容有以下几点:

    Replace the contents of the file with the following:

    avd.ini.encoding=ISO-8859-1
    abi.type=armeabi
    hw.accelerometer=yes
    hw.audioInput=yes
    hw.battery=yes
    hw.cpu.arch=arm
    hw.device.hash=-1902399403
    hw.device.manufacturer=Samsung
    hw.device.name=Samsung Galaxy SII
    hw.dPad=no
    hw.gps=yes
    hw.gsmModem=yes
    hw.keyboard=no
    hw.lcd.density=240
    hw.mainKeys=yes
    hw.ramSize=1024M
    hw.sdCard=yes
    hw.sensors.orientation=yes
    hw.sensors.proximity=yes
    hw.touchScreen=yes
    hw.trackBall=no
    image.sysdir.1=platforms\android-10\images\
    skin.dynamic=yes
    skin.name=galaxy_s2
    skin.path=platforms\android-10\skins\GALAXY_S2
    vm.heapSize=32
    disk.dataPartition.size=2G
    hw.camera.back=webcam0
    sdcard.size=200M
    

  • 您可能要编辑的最后3项改变多少存储可用,以及如何/相机是否被改变。我发现,如果我做了disk.dataPartition.size大,因为它应该是(16G),仿真器无法正常启动。同样为sdcard.size,可以是一样大32G。该hw.camera.back可以设置为无或取法如果你preFER。同时,检查hw.device.hash值是相同的原始文件。如果是不同的,该文件将无法正常工作。

  • You may want to edit the last 3 entries to change how much storage is available and how/whether the camera is changed. I've found that if I make the disk.dataPartition.size as big as it ought to be (16G), the simulator doesn't start properly. The same for sdcard.size, which can be as big as 32G. The hw.camera.back can be set to "None" or "Emulated" if you prefer. As well, check that the hw.device.hash value is the same as in the original file. If it's different, the file won't work.

    祝你好运。

    这篇关于三星Galaxy S II AVD(Android虚拟设备)基本设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆