6

I am developing an Android application with jQuery Mobile, Phonegap and the jQuery plugin for Google maps. The emulator takes too long to load a web page, making the test of my code a painful operation. I have installed Android x86 on a virtual machine and linked it to Eclipse to debug my application.

This solution is faster than the emulator but the problem is that my application always crashes, which is not the case in the emulator. This leads me to question: is Android x86 on a virtual machine a stable alternative to the emulator?

PeeHaa
  • 71,436
  • 58
  • 190
  • 262
zizoujab
  • 7,603
  • 8
  • 41
  • 72

3 Answers3

4

In my experience, the answer is definitely Yes.

Unlike the situation you are describing, my application never crashes on the Android-x86 VM and since the SDK's emulator doesn't support microphone input, it is actually the only way to test my app without having to purchase a real device for each variant of Android.

Also, as you noted, it runs much faster. Contrary to Google's claim for "near native speed", Android's SDK runs extremely more slowly than Android-x86 and it is certainly slower than a real phone or tablet.

The fact that your application crashes when run on an Android-x86 VM may actually be a good thing: An opportunity to check for ways to make your application more robust in unforeseeable circumstances (you know, there are many types of devices out there).

The only downside to Android-x86 is that it is only available up to ICS (Android 4.0.4) which means that you cannot test your application in Jelly Bean (Android 4.1.x). That may be solvable by building your own VirtualBox-AOSP.

Community
  • 1
  • 1
Eternal Learner
  • 2,602
  • 5
  • 27
  • 38
1

A lot of virtualization software and systems depend on hardware virtualization capability of the CPU (VT and such), but VirtualBox runs Android x86 (eeepc iso) great (fast) even without it. There are obvious limitations, but bear in mind that any emulator can only go so far.

If your CPU has no support for hardware virtualization, it is a very good alternative.

Ate Somebits
  • 287
  • 1
  • 18
  • 1
    Genymotion is a packaged and supported solution that provides a bunch of VMs for different versions of Android, you might want to take a look at it. – Pierre-Luc Paour Jun 24 '14 at 05:21
0

Google's Android SDK Emulator went native since version 17.

Google said in their ADT version-17 changelog

One of the new features is a big update to the Android emulator – contributions to AOSP from Intel mean that the emulator now runs at near native speed on Windows and Mac OS X.

So you shouldn't be seeing huge differences In speed of the application running if you are using the latest version of sdktools and emulator.

Anirudh Ramanathan
  • 46,179
  • 22
  • 132
  • 191
  • Speed isn't the only difference though. On platforms other than GNU/Linux, Google's emulator requires Intel HAXM to run x86 images, which is an intrusive piece of proprietary software (it uses a kernel extension), and if you already have VirtualBox, then it could make sense to use VBox and not increase the attack surface (because bugs or backdoors in software that adds kernel extensions could be really bad; btw there were real-life cases when Intel HAXM caused kernel panic in the host system) – Display Name Mar 21 '18 at 17:34