What to do if there is no Android device at hand? Overview of Android Emulators

Introduction


Often there is a need to check the operation of a freshly written application on a device. But it may well turn out that the device is not at hand. Or there is no device with certain parameters (though this relates more to screen size / resolution). What to do in this case?
Fortunately, there are alternatives. The Android community and various companies offer a choice of several options for replacing android devices for different purposes.

I will briefly talk about the following:
  • Emulator as part of the SDK
  • Genymotion
  • Android x86
  • Bluestacks

If interested - welcome to the cut (carefully, a lot of pictures)

Emulator as part of the SDK


image

Website: http://developer.android.com/sdk/index.html
The most obvious way to replace the device. If you are developing for Android - there is definitely an emulator.

Using

To use, just open the AVD Manager from the eclipse or in the console
/path/to/sdk/tools/android avd
create your AVD (Android Virtual Device) and run. I will not describe the process in more detail, everything is quite simple.
However, not without features. ARM emulators are terribly slow. It is almost impossible to verify something normally, especially on not very strong hardware (because the emulation of the processor is with a different architecture). Intel HAXM technology may come to the rescue , however, this is fraught with the fact that platform-specific code (which should work under ARM) may not work, since x86 is used.
Screenshots
AVD manager

Startup options

Emulator itself



pros

  • Cross-platform solution
  • Included in the SDK, no third-party tools needed
  • Configurable (memory size, camera connection, etc.)
  • Telnet access to configure network, battery, etc.
  • Eclipse plugin, easy adb access
  • Updated immediately after the release of the new version of Android

Minuses



Genymotion


image

Website: http://www.genymotion.com/
Proprietary implementation that grew out of the AndroVM project.
In fact, a virtual machine on VirtualBox with additional features like its controls, advanced settings, etc.
Convenient enough, fast, a lot of opportunity, commandline tools, Java API for tests.
When creating a device from the network, its image is pumped out.
APK can be installed by dragging them onto the virtual window.
Screenshots
Window of a working device

Creating a virtual device

Main application window


pros

  • Cross-platform solution
  • Fast
  • Many additional tools (charge control, accelerometer, API for tests, etc.)
  • Eclipse plugin, easy adb access

Minuses

  • Paid for companies, and this is the main minus
  • Not ARM
  • Long enough release of current versions of Android


Android x86


image

Website: http://www.android-x86.org/
Project for porting Android to the x86 platform. It is distributed as an iso image, it can be launched / installed in a virtual machine, if you so desire, you can even put it on a live machine with an x86 processor (for example, on a laptop).
It works quickly, but there are a lot of problems due to the fact that this is a virtual machine. For example, tying the mouse inside the virtual window, access to adb only over the network, etc.

For use in VirtualBox, you need to disable Mouse Integration, otherwise the cursor is not visible in the virtual machine.

To connect adb you need to run
adb connect ip.add.res.s

You can find the IP address by pressing Alt + F1 in the machine and entering netcfg. Return to graphics mode - Alt + F7.
Screenshots
Main window:

Console with IP address:


pros

  • Cross-platform solution (wherever there is VirtualBox)
  • Fast

Minuses

  • Inconvenient adb access
  • Cons associated with using VM - mouse binding, for example
  • Not ARM
  • Very long release of current versions


Bluestacks




Website: www.bluestacks.com
Positioned as an application player for Windows, Mac and TV. Able to run applications, has access to the market. Inconvenient for development and testing - apk are delivered by the tool from the kit, but adb can be accessed. However, launching applications can be useful.
To connect via adb:
adb connect 127.0.0.1

Screenshots
Launch:

Main window:


pros

  • Cross-platform solution (true, Mac and Windows only)
  • Fast

Minuses

  • It's awkward to install applications
  • It is not clear that with versions of android (2.3 under OS X, under Windows 4.0)
  • No under linux


Conclusion


It turns out that for some situations you can do without a device. However, do not forget that in many cases the hardware of emulators is different from the real one, and the firmware of real devices can also throw surprises. Therefore, emulators are just for an initial check.

Also popular now: