EMULATING REAL DEVICES

Besides using the Android emulator to test the different configurations of Android, you can also make use of the emulator to emulate real devices, using the system images provided by device manufacturers.

For example, HTC provides images for their devices running Android 1.5 and 1.6 (http://developer.htc.com/google-io-device.html#s3). You can download a device’s system image and then use the Android emulator to emulate it using the system image. Here is how this can be done (in theory, this should work for any version of Android).

image

NOTE If you use HTC’s image, you should be able to boot up the emulator without problems. However, the network cannot be enabled. Some kind souls have uploaded a modified image that works properly. You can try downloading it at www.4shared.com/get/x6pZm3-W/system.html.

First, using the Android SDK and AVD Manager, create a new AVD. In the case of HTC, create an AVD using Android 1.6 as the platform. The AVD will be located in the C:Users<username>.androidavd<avd_name>.avd folder. As shown in Figure B-8, a newly created AVD contains only two files in the folder.

Using the downloaded system image, copy the system.img file into the AVD folder (see Figure B-9).

Launch the AVD and you should see it booting up (see Figure B-10).

You can proceed to sign in using your Google account. When prompted to slide open the keyboard, press Ctrl+F11 to change the orientation of the emulator. This action tricks the emulator into believing that you are sliding the keyboard open. Once you have successfully signed in, you will be able to explore the Android Market on your emulator (see Figure B-11)!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.54.7