ISN (International Social Networking Services - Interactive Apps and Websites)
Managing Virtual Devices | Android DevelopersManaging Virtual Devices
An Android Virtual Device (AVD) is an emulator configuration that lets you model an actual device by defining hardware and software options to be emulated by the Android Emulator.
The easiest way to create an AVD is to use the graphical AVD Manager, which you launch from Eclipse by clicking Window > AVD Manager. You can also start the AVD Manager from the command line by calling the
You can also create AVDs on the command line by passing the
An AVD consists of:
Example of an AVD with API level 15
Creating an AVD to Emulate the Google Nexus OneGoogle’s Nexus One is a powerful phone with the latest Android release. Being a device originally sold directly by Google, this phone seems to get updates the soonest. It also has a nice screen and is quite fast, especially with Android 2.2. The important specs of this device from an Emulator perspective are:
Therefore, let’s create an AVD configuration called NexusOne:
Creating an AVD to Emulate the HTC Evo 4G
One of the newest Android devices on the market, the HTC Evo 4G is a powerful new phone with a nice big screen, a powerful processor, and a great camera.
The important specs of this device from an Emulator perspective are:
Therefore, let’s create an AVD configuration called Evo4G:
Creating an AVD to Emulate the T-Mobile G1
The T-Mobile G1 was the first publicly available Android handset. Although many users have upgraded to the newer Android devices, many G1s are still around. In fact, as of this writing, a good 50% of activated devices are still running Android 1.5 and Android 1.6—a good indication that G1s and other early Android handsets are still being used.
The important specs of this device from an Emulator perspective are:
Therefore, let’s create an AVD configuration called TMobileG1:
Creating an AVD to Emulate the Motorola Droid
The Motorola Droid is one of the most prevalent Android phones available in the United States today. It’s also different from many of the other newer Android handsets in that it has a hardware keyboard.
The important specs of this device from an Emulator perspective are:
Therefore, let’s create an AVD configuration called MotoDroid:
Configuring an AVD to use graphics acceleration
You need Android SDK Tools rev 17 or higher, then start by creating a new AVD with the target value of Android 4.0.3 (API Level 15), using SDK rev 3 and System Image rev 2 (or higher). If you want to have graphics acceleration enabled by default for this AVD, in the Hardware section of the AVD configuration, click New, select GPU emulation and set the value to Yes. You need to make sure to hit enter when you change the value in the list before closing the dialog. You can also turn on graphics acceleration at run time: emulator -avd How can I move .android folder to a different location?
Setting environment variable in Windows XP:
Being PracticalAlthough you can now emulate a device in a far more realistic way, there are certain disadvantages to doing this. First, you’re still only just emulating, as we discussed. Second, and more importantly, some of these settings make using the emulator much more difficult. For instance, if you choose to turn off the keyboard, the emulator will honor that and you’ll be forced to use the on-screen keyboard within Android. Also, if you turn off GSM hardware, you will have no way of making a data connection as the Wi-Fi option does not work, either. Finally, the SD card size directly takes up that much space on your computer. Make sure you use an SD card size that’s large enough for testing your application, but there is no real compelling need to emulate the SD card size exactly. The SD cards are user-replaceable, too, so you can’t guarantee that a user still has the original card in place. So, you have to decide which emulation is most important for you. In addition, the full emulation may be most useful when used with automated testing tools instead of by humans.
|