ARTICLE: Getting Started by the Rock n Coder
There are several options: Genymotion.com (the faster android emulator), VirtualBox, and as well as the Android emulator described below.
ARTICLE: Common Android Virtual Device Configurations
ARTICLE: A Guide to Mobile Emulators
ARTICLE: Samsung GALAXY Tab Emulator
XDA members developed skins for emulations of several devices so you don't have to tediously specify the hardware properties below.
CAUTION: For AVD Name, use underlines in place of spaces.
CAUTION: Setting the Device ram size larger than 512 can crash AVD on the PC!
Theoretically, each device only needs to be defined once.
However, a lock file is automatically created for an AVD when it is opened.
This can result in AVD files not being usable after a crash.
TIP: Backup files should be taken after AVDs are created.
TIP: Recreate the AVD if you have trouble with an AVD.
Android device CPU have an
ARM (Advanced RISC Machine)-based architecture
in chips made by Qualcomm.
Android 4.0 and above have CPU/ABI of "ARM (armeabi-v7a)".
Built-in Name | Landscape Width x Height | Aspect Ratio |
---|---|---|
Default (WVGA 800) | 480x800 | 1.667 |
HVGA | 480×320 | 1.5 |
QVGA | 240x320 | 1.333 |
WQVGA400 | 240x400 | 1.667 |
WQVG432 | 240x432 | 1.8 |
WQVGA800 | 480x800 | 1.667 |
WQVGA854 | 480x854 | 1.779 |
Instead of selecting a built-in name, a skin file in the android-x/skins/ folder can be selected.
Startup images are 320x460 (1.4375) on iPhones (20 pixels smaller than the screen) and 1004x768 (1.307) on iPads. App icons are 114x114 square png files on iOS and Blackberry OS6 favorites bars.
When a Target API level is selected, Hardware properties may be populated automatically.
Below lists the Hardware properties from the Android.com Dev Guide Managing Virtual Devices and Managing AVDs with AVD Manager, but sorted alphabetically by Property name.
Property Name | Property ID | Characteristic | Default |
---|---|---|---|
Abstracted LCD density | hw.lcd.density | What is the generalized density used by the AVD's screen? | 160 |
Accelerometer | hw.accelerometer | Is there is an accelerometer in the device? | yes |
Audio playback support | hw.audioOutput | Can the device play audio? | yes |
Audio recording support | hw.audioInput | Can the device record audio? | yes |
Battery support | hw.battery | Can the device run on a battery? | yes |
Cache partition size | disk.cachePartition.size | in MB | 66 |
Cache partition support | disk.cachePartition | Is there a /cache partition on the device? | yes |
Camera support | hw.camera | Does the device have a camera? | no |
Device ram size | hw.ramSize | Amount of physical RAM on the device, in megabytes? | 96 |
DPad support | hw.dPad | Does the device have DPad keys? | no |
GPS support | hw.gps | Is there is a GPS in the device? | yes |
GSM modem support | hw.gsmModem | Is there is a GSM modem in the device? | yes |
GPU emulation | hw.gpu.enabled | - | yes |
GSM modem support | hw.gsmModem | - | yes |
Hardware Back/Home keys | hw.mainKeys | - | yes |
hw.dts | hw.dts | (Unknown) | yes |
hw.gyroscope | hw.gyroscope | (Unknown) | yes |
Keyboard support | hw.keyboard | Does the device have a hardware QWERTY keyboard? | no |
Keyboard lid support | hw.keyboard.lid | - | yes |
Ideal size of data partition | disk.cachePartition | - | 0 |
Ideal size of system partition | disk.systemPartition.size | - | 0 |
LCD backlight | hw.lcd.backlight | - | yes |
LCD color depth | hw.lcd.backlight | - | 16 |
LCD pixel height | hw.lcd.height | - | 640 |
LCD pixel width | hw.lcd.width | - | 320 |
Magnetic field support | hw.sensors.magnetic_field | - | yes |
Maximum horizontal camera pixels | hw.camera.maxHorizontalPixels | - | ? |
Maximum vertical camera pixels | hw.camera.maxVerticalPixels | - | 480 |
Max VM application heap size | vm.heapSize | - | 48 |
Number of emulated web cameras | hw.webcam.count | - | 6 |
Orientation support | hw.sensors.orientation | - | yes |
Proximity support | hw.sensors.proximity | - | yes |
SD Card support | hw.sdCard | Does the device support insertion/removal of virtual SD Cards? | yes |
Temperature support | hw.sensors.temperature | - | yes |
Touch-screen support | hw.touchScreen | Is there is a touch screen on the device? | yes |
Track-ball support | hw.trackBall | Is there is a trackball on the device? | yes |
After creation, a confirmation screen like this appears:
An AVD can be created from a Run command batch file such as the one to create an AVD for the WiMM watch
Notice android.bat is in the SDK tools folder.
An AVD can also be started from a Run command batch command:
To uninstall an app within an AVD, a batch command needs to be issued.
The options menu for commands of the android.bat
Command options for emulator.exe in Android SDK tools folder include the "@" sign which specifies the AVD and the -http-proxy.
> emulator.exe @android_2.2 -http-proxy http://web-proxy.isr.hp.com:8080
The program adds the .ini file extension to look for file android_2.2.ini.
In Eclipse Package Explorer, click on the package name to select (highlight) it.
Press Run > Run Configuration to open it. Right-click on Android Application to create New > Run Configuration.
Change the default name "New Configuration" to your package name.
For Project, Browse to select your project. Apply. Run.
Acronyms in the Using the Android Emulator from the Android.com Dev Guide are expanded below.
Value | Description | Nickname | Spec Mbps | Up | Down |
---|---|---|---|---|---|
Full | - | - | - | 0 | 0 |
GSM | Global System for Communications / CSD | 2G | 0.0096 | 14.4 | 14.4 |
HSCSD | High-Speed Circuit-Switched Data (data only) | 3G | 0.576 | 14.4 | 43.2 |
GPRS | General Packet Radio Service | 2.5G | 0.171 | 40.0 | 80.0 |
EDGE | Enhanced Data GSM Environment | 2.75G | 0.473 | 118.4 | 236.8 |
UMTS | Universal Mobile Telecommunications System | 3G | 0.473 | 128.0 | 1920.0 |
HSDPA | High Speed Downlink Packet Access | 3.5G "4G" | 21 | 348.0 | 14400.0 |
HSPA | High Speed Packet Access | 3.5G "4G" | 14.4 | - | - |
LTE | Long Term Evoluation | 4G | down: 100 up: 50 | - | - |
The disclaimer "4G used in connection with product names refer to capability of operating on AT&T's HSPA+ (High Speed Packet Access) mobile broadband network with enhanced backhaul being deployed." are lawyers saying the AT&T is not really 4G and isn't really available anyway.
TIP (from MimirSoft): Since the default emulator screen is too large, scale the emulator screen to fit your screen in Eclipse Run > Run Configurations, click on your project under Android Application. Within the Target tab, scroll down to Additional Emulator Command Line Options, add:
Click Apply.
To build and run in the emulator, menu Run (Ctrl+F11), Run As Android Application.
TIP: To avoid the emulator hanging while launching (at 27%), deleted the AVD and recreate it. Also:
TIP: Start emulation on its own from within Eclipse, click on the emulator icon,
select a device, Start, Launch. Get the D-pad:
If this is not done, you will see a message such as:
Android's emulator is based on
http://wiki.qemu.org.
Motorola device drivers
TOOL:
perfecto.com/ and
deviceanywhere.com/
provide mobile devices in
the internet cloud.
DOTHIS:
To stop the emulated app, press the Menu button on the emulator keyboard (as in real life).
To power off, hold down the on/off buton. On Windows, press Alt+F4.
CAUTION: So make sure there is enough space for the .img file created on your dev. machine.
WARNING: Some sensors are not emulated by the emulator.
This is demo'd
17:03 - 19:00 into
Class 2, Part 1
- Spicing up the UI
of Marko's Bootcamp
When an emulator avd stars, a lock file is created for it.
Sometimes an emulator dies and doesn't clean up that lock file.
This prevents that emulator from being started.
TIP:
Make sure that the emulator process is really killed.
TIP: When flaky behavior occurs, delete them and start over.
A stand-alone Android 1.5 Emulator on Windows was packaged up on 8/28/2009, with an update 8/29/2009. It's (60MB).
The Android Emulator (AVD Manager) is slow.
So one option is to run Android on an x86 (PC) platform (such as ASUS Eee PCs/Laptops, Viewsonic Viewpad 10, Dell Inspiron Mini Duo, Samsung Q1U, Viliv S5, and Lenovo ThinkPad x61 Tablet of mostly Chinese manufacturers) by using a port of Android by android-x86.org. This provides external monitor and keyboard support.
ARTICLE:
Install and Try VirtualBox says
in Virtualbox to create a new virtual machine for Linux as Operating System,
and Other Linux as the version.
Download the ICS version
Android-x86 4.0-devel live and installation iso
and install it to the Virtualbox bootable harddisk
(sda1 Linux partition, ext3 filesystem)
Networking cannot be enabled on the virtual machine.