Development of Android applications with Eclipse (part 3)

Android Virtual Device (AVD) manager. Launching of AVD

Aldeniz Rashidov, www.aldeniz.eu

 

In this section, I will introduce you how to create Android Virtual Device (AVD) for debugging of your applications with Android emulator in Eclipse. Eclipse is an integrated development environment, which used to develop Android and Java applications and provides the ability to create, compile, and set up Java programming code.

1. Preparing to install a virtual device

Some of the packages (images) in the different Android SDK APIs are used for debugging of applications on the Android emulator and need to be installed (Figure 1).

Fig. 1. Packages in Android SDK, needs for applications debugging

For example in API 24, these are the following packages:

  • Android TV Intel x86 Atom System Image;
  • ARM 64 v8a System Image;
  • ARM EABI v7a System Image;
  • Intel x86 Atom_64 System Image;
  • Intel x86 Atom System Image.
  • Google APIs ARM 64 v8a System Image;
  • Google APIs ARM EABI v7a System Image;
  • Google APIs Intel x86 Atom_64 System Image;
  • Google APIs Intel x86 Atom System Image.

Usually, these packages are installed further from Android SDK Manager before starting the emulator. You may install the additional packages from an Android SDK by launching an Android SDK manager using Android SDK manager from Window menu in Eclipse (fig 3).

In case of you will start the emulator on PC with AMD CPU and will developed application for phone or tablet then can choice package ARM EABI v7a System Image. If you use PC with Intel CPU and will developed application for phone or tablet then can choice packageIntel x86 Atom_64 System Image or package Intel x86 Atom System Image. The packages-images, which names begins with prefixes Google APIs (for example Google APIs Intel x86 Atom System Image) are choices when in your application are used services or functions of Google.

When you use Intel x86 Atom_64 System Image or Intel x86 Atom System Image is necessary to add the package Intel x86 Emulator Accelerator (HAXM installer) (fig. 2). Otherwise, with this image, the emulator will not be start. Choosing and downloading of package will not installed HAXM. To be use HAXM you must install it from folder extras (
{SDK_FOLDER}\extras\intel\Hardware_Accelerated_Execution_Manager\intelhaxm.exe) of Android SDK.

Fig. 2. Package Intel x86 Emulator Accelerator (HAXM installer)

When SDK Manager for any reason does not allow you to download this package, you may use an address https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager-end-user-license-agreement from site of Intel® with resources for Android (Intel® Hardware Accelerated Execution Manager, https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager?page=3 ). The package is archived (haxm-windows_v6_1_1.zip), and must be extracted in some folder and then installing with intelhaxm-android.exe.

When is not possible starting the emulator withIntel x86 Atom_64 System Image or Intel x86 Atom System Image on PC with Intel CPU you can be use package (image) for AMD CPU, which is more slowly by speed in this case.

Option to startup Emulator without use the Intel x86 Emulator Accelerator package is only available when if from command prompt (console) in tools folder of SDK run:

C:\Users\IEUser\android-sdks\tools> emulator -avd name -memory 512 -no-accel -gpu off

name is name of Android Virtual Device (AVD), which you created in AVD Manager (Windows menu of Eclipse).

You can use this option if your computer or system does not support virtualization, or when using the emulator via VMware or Virtual Box.

2. Starting of Android Virtual Device manager using Android Virtual Device Manager from menu Window в Eclipse

Фиг. 3. Starting of Android Virtual Device manager

3. Defining of new physical device

Before create a new virtual device, you need to specify the physical device on which it will be based. You can select a device from the list in the Device Definitions section of AVD Manager (for example, Galaxy Nexus by Google) or define your own (fig. 4). Defining a new physical device is done by using the button Create Device.

Fig. 4. Defining of new physical device

Must be defined the basic parameters for the device – diagonal size, resolution, sensors and more (fig. 5).

Fig. 5. Defining of parameters of the new physical device

4. Creating of the new virtual device

Creating new virtual devices is done by using the buttonCreate (fig. 6)from Android Virtual Devices section in AVD Manager. It is possible to clone an already created virtual device after you mark the desired virtual device and use the Edit button.

Fig. 6. Creating of new virtual device

Some of the most important parameters to be established are the following (fig. 7):

  • Name of virtual device (AVD Name);
  • Based physical device (Device);
  • Android version (API) (Target);
  • Package-image for a corresponding CPU (CPU/ABI);
  • Using keyboard of PC (Hardware keyboard present);

The Skin is a parameter that used to achieve the closest visual identity to the actual device and usually provided by the manufacturer. For example, Samsung offers skin for its devices at http://developer.samsung.com/galaxy/emulator-skin# . Installing of some skins is done after as downloaded archive file is unzipped into a separate subfolder of the skins folder on a selected platform in SDK. The downloaded Samsung Galaxy S4 image (Galaxy_S4_White.zip) can be unzipped for use with the API 24 in a folder {SDK_FOLDER}\platforms\android-24\skins\galaxy_s 4. The parameters for RAM, internal storage and SD Card should be set according to your preferences and the real possibilities of the system.

Fig. 7. Parameters at creating of new virtual device

5. Launch the selected virtual device and launch of Android emulator

Starting of Virtual devices is done by using the Start button (fig. 8) in Android Virtual Devices section from AVD Manager. Before booting the Android emulator, you can change some parameters in Launch Options dialog box. Launching emulator is performed using the Launch button (fig 9).

Fig. 8. Launching of the created virtual device

Fig. 9. Starting of emulator

Launching of Android emulator take up to a few minutes, depending on your system resources (fig. 10 and fig. 11).

Fig. 10. Launching of android emulator

Fig. 11. Successfully launched Android emulator

LEAVE A COMMENT