⬆️ ⬇️

What if there is no Android device at hand? Review of Android emulators

Introduction



Often there is a need to check the work of the newly written application on the device. But it may well be that the device is not at hand. Or not a device with certain parameters (although this is more related to the size / resolution of the screen). What to do in this case?

Fortunately, there are alternatives. Android community and different companies offer a choice of several options for replacing android-devices for different purposes.



I will briefly talk about the following:



If interested - welcome under the cat (carefully, a lot of pictures)



Emulator in the SDK



image

')

Website: http://developer.android.com/sdk/index.html

The most obvious way to replace the device. If you are engaged in the development of Android - the emulator is definitely there.



Using


To use it, 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, it was not without features. ARM emulators are terribly slow. It is almost impossible to check something normally, especially on a not very strong hardware (because emulating a processor with a different architecture). Here Intel HAXM technology can come to the rescue, however it is fraught with the fact that the platform-specific code (which should work under ARM) may not work, since x86 is used.

Screenshots
AVD manager



Launch parameters



Emulator itself







pros




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.

It is convenient enough, fast, a lot of possibilities, commandline tools, Java API for tests.

When creating a device, its image is downloaded from the network.

APK can be installed by dragging them onto the virtual box.

Screenshots
Window working device



Creating a virtual device



Main application window





pros




Minuses






Android x86



image



Website: http://www.android-x86.org/

Project for porting Android to the x86 platform. It is distributed as an iso image, you can run / install it in a virtual machine, with a strong desire, you can even put it on a live machine with an x86 processor (on a laptop, for example).

It works fast, but there are a lot of problems due to the fact that this is a virtual machine. For example, mouse bindings inside the virtual box, access to adb via network only, etc.



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



To connect adb need to run

 adb connect ip.add.res.s 


The IP address can be found by pressing Alt + F1 in the machine and entering netcfg. Return to graphics mode - Alt + F7.

Screenshots
Main window:



Console with IP Address:





pros




Minuses






Bluestacks







Website: www.bluestacks.com

Positioned as a player application for Windows, Mac and TV. Able to run applications, has access to the market. Inconvenient for development and testing - apk is installed using the kit, but adb access is available. However, it can be useful to launch applications.

To connect via adb:

 adb connect 127.0.0.1 


Screenshots
Run:



Main window:





pros




Minuses






Conclusion



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

Source: https://habr.com/ru/post/218739/



All Articles