Big Thanks To Android VM & GenyMotion Team Who Are Authors Of This Softwares.

Files And Tutorials Are Used And Partially Created According My Expirience And Also Colected From Internet & Various Forums.All Regards Are Going To Their Authors.I'm Not Responsible For Any Eventual Errors And Misbehaving Of Your Devices.

- REQUIREMENTS -

PC COMPUTER:

OpenGL 2.0 capable graphic card, with an up-to-date driver

VT-x or AMD-V capable CPU, enabled in BIOS settings

At least 512MB of RAM memory

At least 100 MB of free space on Hard Drive for Genymotion installation)

A minimum of 2GB of free space is required to deploy each Genymotion virtual devices.

They might need more than 8 GB depending on your usage of the virtual devices and the applications you have installed.

The “AndroVM” initiative aims at providing a “as good as possible” support to run Android in Virtual environments.

The main objective of AndroVM is to provide Android developers a better way to test their software (better than the qemu emulator provided with the Android SDK).

DISPLAY

You can use “Software OpenGL” which uses the VirtualBox VGA driver for display or use “Hardware OpenGL” and use the “AndroVM player” external application for display.

Software OpenGL

We use the “UVesa” linux driver and a software-only OpenGL implementation.
The video resolution can be set through the “AndroVM Configuration” android application embedded in the VM.Screen orientation change is supported : if an application rotates the screen, it will rotate automatically.

Hardware OpenGL

Hardware OpenGL ES 2.0 support is included in AndroVM, thanks to the work done by Google.
To use it you have to enable it in the “AndroVM configuration” Android app and install “AndroVM player” on your host.The TCP connections used to exchange OpenGL content are initiated from the host to the VM.
Thus, it’s now possible to have multiple AndroVM running with Hardware OpenGL ; this way, we should also have less problems with firewall software running on the host.An important thing is that, to use “Hardware OpenGL”, you have to configure the first virtual network card to be conntected to a “host only network”
The AndroVMplayer tool can now configure it for you : if the first virtual network card of the VM seems not correctly configured, AndroVMplayer will propose you to set it up for you.When using Hardware OpenGL, the resolution and DPI are not set in the “AndroVM configuration” app but are supplied as parameters when you start “AndroVM player” : the first three parameters are : width, height, DPI. For exemple you would start “AndroVMplayer 1280 720 160″ to have a 1280×720 resolution with 160 DPI.For Linux/Mac OS versions, you have to use the “run.sh” script to start AndroVMplayer, for example “run.sh 1280 720 160″,whereas on Windows, you directly start AndroVMplayer.exe, for example “AndroVMplayer 1280 720 160″.

KEYBOARD

By default, the system will use the hardware keyboard. But you can choose to disable it in order to use the Android virtual keyboard (this could be important for application testing). Keyboard configuration is done through the “AndroVM configuration” android application.Some special (hardware) keys :

To unlock screen, press the “Home” or “F1″ key

The android “back” button is mapped to the physical “Esc” key

STORAGE

The VM on ICS (4.0.x) comes with 2 virtual hard disks :

one with the android system (boot, /system, /data, …)

one with sdcard

The VM on JB (4.1.x) comes with 3 virtual hard disks :

one with the android system (boot, /system, …)

one for the /data android directory

one with sdcard

If you insert a USB stick and connect it to the VM (using VirtualBox) it will be mounted in /mnt/USBVirtualBox shared folders are supported ; all the “auto-mount” shared folders configured for the VM will be mounted in the “/mnt/shared” directory.NETWORKING

The AndroVM comes with 2 virtual Ethernet cards :

The first one (eth0) is dedicated to ‘management’ but is, by default, configured as a “null connexion”

The second one (eth1) is used by the system to emulate a Wifi connection

To use the eth0 management connection, you have to configure the first network card of your VM as a “host only network” and attach it to a DHCP-enabled network – if you don’t have such a network in your VirtualBox configuration, you can create one (go to the general ‘File’ menu, then ‘Parameters’ and ‘Network’).The “AndroVM Configuration” can be used to know the IP address used by the network management card (eth0). Then you can execute an “adb connect [IP]” and connect to your AndroVM (shell, push/pull files, …) and debug your application directly from Eclipse.INSTALLATION

The AndroVM can be downloaded as an “OVA” file. Once dowloaded, you just have to import it in VirtualBox.

Please note AndroVM comes in 3 different versions :

vbox86p : Built for a “phone”, 480×800 default resolution

vbox86t : Built for a “tablet”, 1024×600 default resolution

vbox86tp : Built for a “tablet” with phone capabilities, 1024×600 default resolution

INSTALLATION OF GOOGLE APPS

Download Google Apps [basically the /system directory from the Cyanogen gapps archive without the GoogleTTS app which crashes on AndroVM]

Untar the gapps…tgz file on your host – you’ll have a system directory created

Get the management IP address of your AndroVM (“AndroVM Configuration” tool) and do “adb connect x.y.z.t”

do “adb root”

reconnect with “adn connect x.y.z.t”

do “adb remount”

do “adb push system/ /system/”

Your VM will reboot and you should have google apps including Market/Play.You won’t have some Google Apps, like Maps, but they can be downloaded from the Market/Play.

CONFIGURATION TUTORIAL

Network Adapter

To run with hardware acceleration, as for using the ADB with AndroVM, you’ll need an “Host Only” network adapter. To create one, open VirtualBox, get to the “File” menu, “Preferences…”, “Network”.

Don’t forget to enable DHCP Server for this network adapter.

Importing VMNow, you can import the VM into VirtualBox. Just double-click on the OVA file, or use “File” menu, “Import Appliance”. It can be a good idea to rename the VM into something more friendly.

Setting-up VM

By default, AndroVM has its first network adapter set to disable. Go to the VM network settings and set it to “Host Only Adapter”

Note that you might see the VM IP on the top off the app. This is the Management IP. You can adb connect this IP.If there’s no IP address, then you won’t be able to use hardware OpenGL. Verify your host-only adapter configuration.
Click on the “Save” button, The VM will restart.

The VM will stay in that state. Now it’s time to run the AndroVMplayer.

AndroVMplayer

The AndroVMplayer is a software used to display the VM content and manage its events. It won’t work if the VM is not running !
Open a command line interpreter, get to the AndroVMplayer directory, and type :

AndroVMplayer [width] [height] [density]

Wait a few seconds, and the Android boot animation will appear in the AndroVMplayer.Typical problems

AndroVMplayer blocks on “waiting for connection from VM”

If the VM shows a Management IP, try to connect to the VM through adb. If it doesn’t work, then turn off your firewall

If the VM doesn’t show a Management IP, the your network adapter is not well configured

[PC][Windows/Mac/Linux] Android Emulation For PC

This post was edited by BalcanGSM 23:30,Jul-25-2013

GENYMOTIONINTRODUCTION & DESCRIPTION

Genymotion is a complete set of tools that provides a virtual environment for Android.
It can be very useful for developers, testers, salesman or even gamers.It is available for most operating systems: Windows, Linux and MacOS X.
It is as simple to install as powerful to use.

FEATURES

Android as its best

OpenGL acceleration to achieve the best 3D performance

Install application from Google Play

Enable full screen option and improve your experience

Fully controllable

Start multiple virtual device at the same time

Manage sensors:

Battery level / status

GPS

Accelerator

Directly command virtual devices sensors with Genymotion shell

Fully compatible with ADB. You can control your virtual device from the host

This is the window where the virtual device is running and where you can interact with it

Genymotion widget buttons

Genymotion widget Battery button (CTRL + 1)

Genymotion widget GPS button (CTRL + 2)

Control buttons

Virtual device rotation button (CTRL + F11)

Volume up button (CTRL + +)

Volume down button (CTRL + -)

Recent applications button(CTRL + SPACE)

Back button (CTRL + BACKSPACE)

Home button (CTRL + HOME)

Power button (CTRL + ESCAP)

Battery widget

The battery widget allows modifications of the battery level, power status and power mode of the Genymotion virtual device.

First, open the widget using the correponding panel button

Activate the simulated battery mode By default, the Genymotion virtual device simulates the same battery as the one present in your computer. This button activate the simulation of a battery with custom values that you can adjust to test your application.When your computer does not have a battery (desktop computer for example), the simulated is automatically activated.

Modify the battery power level When the simulated battery is activated, you can specify the Genymotion current battery level using the slider or by entering manually the value in the corresponding field.

Modify the status When the simulated battery is activated, you can also modify the current status of the battery with the corresponding button:

Charging: the AC is plugged in and the battery is currently in charging state

Discharging: the AC is unplugged and the battery is currently in discharging state

GPS widget

The GPS widgets allows *real time* activation and modifications of the position,accuracy and orientation.

Activate the GPS When you activate the GPS with the corresponding button, you enable the reception of generated GPS frames in the Genymotion virtual device. When it is not activated, the GPS is not able to refresh the position, and the last known location is used.

Modify position Using the latitude and longitude field, you can specify the current position you want to simulated. They must be specified in degrees: the latitude from -90.0° to 90.0°, and the longitude from -180 to 180°

Modify the altitude You can specify a custom altitude from -10000 m to 10000 m

Modify accuracy You can specify a custom accuracy value using the slider or by entering the desired value from 0 to 200 m.

Modify bearing You can modify the bearing using the corresponding dial, or by entering the desired value form 0 to 359,99°Note than many applications do not rely on the GPS orientation, but use the device accelerometer or gyroscope to determine the bearing of the device, which are not yet supported.

GENYMOTION SHELL

Genymotion provides a shell that enables you to script the modification of sensor states.

Command line options

-h Print help

-r ip_address Connect to specific Genymotion Virtual Device

-c "command" Execute the given command in genyshell environment and return

-f file Execute the content of the file. Each command per line

Available commands

battery getmode
Return the current battery mode of the selected virtual device. The mode can only be:

host: The virtual battery reflect the host battery (if exists)

manual: In this mode, you can set the level and status battery values

battery setmode
Set the battery mode. The mode can only be:

host: The virtual battery reflect the host battery (if exists)

manual: In this mode, you can set the level and status battery values

battery getlevel
Return the current battery amount of power. The value can only be between 0% and 100%.
If the battery mode is "host", the returned value is the host value.

battery setlevel
Set the current battery amount of power. The value can only be between 0% and 100%.
Set the battery level force the "manual" mode: if the last mode was "host", then it's turned to "manual"

battery getstatus
Return the current battery status. There are 4 possible status:

Discharging: The power supply is disconnected and the battery is discharging.

Charging: The power supply is connected and the battery is charging.

Full: The battery is full.

Unknown: Sometimes, the battery status cannot be established, it happens when there is no host battery.

battery setstatus
Set the current battery status. There are 4 possible status:

Discharging: The power supply is disconnected and the battery is discharging.

Charging: The power supply is connected and the battery is charging.

Full: The battery is full.

Unknown: Sometimes, the battery status cannot be established, it happens when there is no host battery.

devices list
List available Genymotion virtual devices and provides details like current states or IP address.

devices ping
Send a ping message to check if virtual device if responding

android version
Return the Android version of the selected virtual device

build number
Return the genymotion shell build number

help
Prompt the help.

pause
Pause execution (in number of seconds).

version
Return Genymotion Shell version.

exit or quit
Close Genymotion Shell.

ECLIPSE PLUGIN

One of the most interesting feature of Genymotion is that you can test your application developed with Eclipse IDE. It uses ADB to connect to any active Genymotion Virtual Devices and then push your application.

Plug-in installation

There are two ways to install the plug-in:

Update Site method

Start Eclipse

Go to the "Help/Install New Software..." menu

In the new opened window, click on "Add..." button (on top right of the window)

In the "status" column of the main window can take the following status:

Off: The virtual device is in Off state

Paused: The virtual device has been started, and then paused : restart action will get back at exactly same state

On: The virtual device is on, but not connected to ADB. It means that you cannot choose this virtual device in the "Android Device Chooser" window of ADT plug-in

Connected: The virtual device is started and connected to ADB. It means that this virtual device will be available in the "Android Device Chooser" window of ADT plug-in

Use a Genymotion to play Android application

First, click on and start or create the VM you want to use.

Close the Genymotion main window

In your application project, right click and chose "Run as Android application"

The "Android Devices Chooser" opens

Click on the Genymotion virtual device you started/created Genymotion-VMNAME-@IP:PORT Where:

VMNAME is the Virtual Device name, as define in Genymotion

@IP:PORT are the device address and port (assigned by ADB)

After a reboot or an unexpected halt of a Genymotion Virtual Device, its displayed name in the "Android Devices Chooser" window can became unrelated. Close and re-open the Genymotion plug-in to resolve this

Error handling

While Genymotion plug-in window is open, errors are printed in Eclipse console.

The ANDROID VM PLAYER does not list all the Android VMs that are installed in Virtual Box...
they are listed in Virtual Box, but do not appear when I load ANDROID VM PLAYER...
only the Genymotion appears in both Virtual Box and ANDROID VM PLAYER...
how to solve this?
thank you...
bgrau2000