Is there any benchmark tests results comparing this two emulators ?
I know that Genymotion is seems to be more faster when loading and rebooting the emulator,
but is there any tests show result like, Camera, GPS, networking and etc. ?
Have a look here for some informal benchmark comparisons. However, take these with a grain of salt because benchmark scores will vary greatly depending on the host system.
As for the items you want benchmarks for, not sure that camera/gps can even be benchmarked (what would you test), and networking is perfect since it uses VirtualBox, which has always had great virtual network support.
As a graphics/game developer, I find Genymotion unparalleled for running OpenGL code - on Genymotion it runs much smoother framerate wise, than using an x86+HAXM+HW GPU android emulator. Also, the integration of Google Apps/Services in Genymotion is fantastic.
Compatibility is the only downside, since Genymotion only provides v4.1+ images there is no way to test compatibility on older android versions - but for these tests I just use the standard android emulator (which is fine since it is not as frequent as normal testing).
Update: As of January 2014, Genymotion supports Android v2.3.7 as well as v4.3 (with v4.4 in preview). This means it now covers all relevant android versions except Froyo (v2.2), which at this time accounts for only 1-2% of all devices :)
I've been investigating whether to use Genymotion, with a particular focus on running automated Robotium tests.
The Genymotion startup time is around 5 seconds (compared to at least 30 seconds for the Android emulator). Genymotion also runs Robotium tests visibly faster, and with a smoother UI.
However, be warned there are some noticable differences between Genymotion and the default Android emulators:
You cannot use the special 10.0.2.2 IP address with Genymotion to access localhost on the machine you are running the emulator from. This means for local tests you may need to explicitly configure the IP address of the machine the emulator should connect to.
The difference in emulator speeds will expose timing issues in your tests. The most common one is list views needing to load their data.
I think that some Robotium Solo utilities might behave slightly differently between Genymotion and the default Android emulators. On Genymotion, I vaguely recall some problems with searchText(String) scrolling my screen to the bottom, even when the text I am searching for is already in view. However I suspect this was just another symptom of timing issues than anything being fundamentally different though (in that particular case you could always call searchText(String, true) to prevent the scrolling).
Use Android Emulator
I've personally tried both and android emulator is way better.
You just have to configure the emulator right.
My use case is mostly to manual test things here and there and run automation tests. I've benchmarked them both, android emulator is faster when running tests.
Almost all the sensors are present in android emulator and you also get an awesome command line tool with it.
For more detail, check out my blog benchmarking this.
Related
More specifically, I'm wanting to run OpenCL / Renderscript code in an Android Emulator that actually runs on my computer's GPU instead of CPU. Unluckily I'm using an AMD CPU and GPU.
I know that AMD has OpenGL ES support (and everything supports OpenCL pretty much) via SDKs but that's as far as I've gotten on that front - the only OpenCL / Renderscript information I've found regarding emulators is that they either don't work at all or, if I had an Intel CPU, I could install OpenCL in the emulator but it would only use the CPU (and frankly I wouldn't be surprised if behind the scenes my emulator(s) aren't already doing this - OpenCV runs without incident but OpenCL-Z says there's no OpenCL support).
Is there some way to send the commands from the emulator to my OS and have it automatically run? The only ways I've come up with involve saving and loading a text file which isn't likely to be faster (or good for my hard drive) given I'm running 2 Emulator Instances.
I found some mention of RenderScript being supported in the official emulator but said emulator isn't meant for my use-case and I strongly doubt that it's going to use my GPU.
I'm using Memu at the moment because Bluestacks 3 uses more resources when running 2 instances and the 2nd instance doesn't work very well with adb commands / root for some reason - it thinks it's working but it doesn't do anything. If there's a faster emulator when it comes to running 2 instances I'm sure it would help but oddly enough comparing them is difficult and time consuming (especially when every one of them is like "No, I'M the fastest - look at MY bar graphs!" lol) and ultimately I believe my problem to be with OpenCV not getting GPU acceleration (because it runs much faster on my phone) and not the emulator's base speed.
I have AMD's virtualization features enabled (confirmed with Leomoon or w/e) and they're enabled in the manager for Memu. Perhaps this is already working behind the scenes, then? Either way, emulation costs increase by 10% per instance once the OpenCV stuff comes into play (taking it from 60 to 80%+)
Use a language (like Python) and send commands via ADB. Python can hook into OpenCL and OpenCV; ADB can be used to get the Framebuffer for screenshots or Python can just capture the emulator's window render.
Alternatively, a connection can be made using SocketIO (Flask Socket IO and Javascript's client socket IO in my case) and they can communicate that way. Confirmed via the browser on the emulator and real device. Every emulator has ports to communicate to your native OS. I ultimately chose not to go this route as it's a little convoluted (2 servers, different languages, no better than ADB over LAN) but it's an option. Java (iirc) also runs SocketIO just fine and would likely be a decent option for many devs who are familiar with the language and wish to run some stuff natively on Android Devices.
Feeling physically ill atm and typing on a phone so my apologies for the present lack of examples and assistance. Hopefully I can catch the time to address this but, frankly, there are few use cases for this outside of the one I'm presently targeting and it's quite niche to begin with.
So far I have been developing directly on my galaxy nexus and nexus 7 using the amazing AID app.
However, as the N7 can't provide logs due to it being jelly bean, i feel the need to get a mini notebook in order to utilise adb logcat.
My main worry is that something with only 1gb (2gb if i upgrade, which i will) and a 1.5-1.83GHz atom CPU won't be powerful enough.
I can possibly get around certain worries by not using emulators and testing directly on my two devices, so that will save me a great deal. Also I am tempted to just use vim and command line tools instead of eclipse which again might save me from a slow PC.
What do you guys think? Is the notebook way under powered? What if i just use vim and no emulators?
Side note, does anyone actually code in vim/command line?
something with only 1gb (2gb if i upgrade, which i will) and a 1.5-1.83GHz atom CPU
will work just fine, as long as you're not planning to run a tablet emulator. I sometimes have to work at my Asus EEEPC with the same exact CPU and I've got no problems so far
It is doable with 1gb RAM and using vim/commandline tools. However, eclipse provides a project wide perspective which is hard to duplicate in vim (vim power users may be as productive, if not more though). So in terms of memory 1, 2gb RAM will be fine. Testing on devices is always better than emulators.
One thing else though, a commandline build with multiple module dependency is non-trivial to setup and maintain. This is because Google has historically been modifying the build.xml file, breaking existing build scripts fairly regularly. So if you are well versed with build script internals and prepared to work on them you should be ok.
Debugging Android apps without Eclipse based breakpoint debugging support may be a significant issue too. Some bugs are caught in a lot lesser time with this. So plan accordingly if you don't want to use Eclipse.
Eclipse also provides very good JUnit/Robotium support for writing test cases, You won't get this with vim.
As I wrote down these points I think running Eclipse in 2gb notebook should be possible (just don't run other apps with doing development) and thus is recommended.
I have extensively used vim just not for Android development. You can also install vim plugin for eclipse if you prefer that.
Modern notebook hardware certainly is capable for software development; in fact, many (hobbyists as well as professionals) use a notebook as their main development platform.
However, with a mini / ultra-small form factor, you'll pay more for a less capable machine. Unless you need extreme mobility, I would suggest a standard notebook, with a little extra money spent on RAM (8+ GB) and an SSD. (Then, neither big IDEs nor emulation is out of scope.) If money is an issue, you can still get clunky-looking, but fairly powerful 15" or 17" laptops.
i think you Configuration is good enought to run Eclipse , Myself i had to Remove some Composant on my PC beacause we have 1 PC for Work/Internet/Eclipse and 1 PC for Gaming Etc ... , iam using Galaxy S2 and dont use Emulator many times , Yes i have some Slow Down some Time , but try Eclipse with the Minimal Configuration and No Emulators but Upgrade to 2 GB i have myself 2 GB Here and DUal Core E5200
Yeah that's under powered. For a windows PC I'd want 4gb of ram, not sure about Linux but atoms are dog slow either way.
I'm sure it'll work but it won't be fun, I'd be most worried about disk speed as that's what drives me nuts most.
I'd also take advantage of the ide and all its nice features too
I'm developing an android application, since there are many assets, the generated apk is near 10M. Now deploying it to a simulator is very slow, often takes me 3 or 4 minutes, which is unacceptable.
I've used Robolectric to test most of the logic, which is very fast. But sometimes I still need to use emulator(e.g. adjust the UI), which waste me a lot of time.
Is there any way to make it fast?
This is my experience, too. Debugging with the software emulator is very slow.
It is much faster to use a real device in debug mode. However, you may run in other limitations
Well since somebody suggested Android x86 as an alterante testing Emulator, I'll also present my favorite. This might not be an alternative for everyone but for me it's perfect! Use the Bluestacks Player. It runs Android 2.3.4 and is very fluent and fast. Sometimes even faster than a normal device. The only downsize is, that you can just test Apps on the API Level 10 and just on one screen size, but it's perfect just for testing if it's working or not. Just connect the Player with the adb by running
adb connect 127.0.0.1
After compiling it installs instantly. Very impressive, considering I have a rather average computer hardware(dual core with 4 GB of RAM)
I've found android-x86 image on VirtualBox many times faster for deployment than an emulator running on same machine, sometimes even faster than a USB device.
EDIT
Please use the android image provided by vmlite, not the one provided by android-x86, and refer to this important question: How to change the screen size of vmlite android?
Actually, I absolutly never use the Emulator, which is way too slow in every situations.
I test and debug my apps directly on real devices (and use the ADB screenshot features when I have to pixel-check some screens..)
Hope this helps...
I've developed an Android application and I'm running it on a android virtual machine in order to get a faster execution of my application, but how can I compare the virtual emulator performances to those of a real device?
Thanks
This answer may not be what your looking for. I dont think you can compare performance between an emulator and any real device. Firstly because your software isnt running on the target hardware. The emulator may be doing all sorts of additional things to make it look like that hardware. there will be layers of software running your software generally making your programme run slow.
The best thing you could do is do some performance profiling https://stackoverflow.com/questions/2713940/eclipse-java-profiler which would show you where bottle necks are and give you some idea of performance.
There's no real substitute for running on the target hardware. emulation will show you your software is functionally working but it may hide timing bugs it you have time critical code.
the virtualbox is just an emulater. it wont carry out the application's full preformance, as it has to go through multiple layers of software. for testing out apps, a real android device is necassesary.
What is the recommended way of testing an app on a device? The emulator is slow, mostly unresponsive and a cpu beast on my machine, so I use my phone to test my app. When I make a change to code, Eclipse builds it automatically, and then I debug it on the device. Is this the most efficient way to test small changes in code?
Android has some information on testing here. Personally I've found that testing code is much faster on a device. Other options without a device is to use something like Android x86 and run it in virtual environment like VirtualBox - this can be faster than the emulator. In my opinion, to really make sure your application is working as expected (especially with graphics and memory usage) is to test with the device(s) you intend to deploy the application on.
That's how I test my code, the emulators and on an actual device are the only ways I know of. I usually use an actual device, but I think you can keep an emulator running to speed up time a bit, but not too much.
It's in my opinion a good way to check the general functionality of your application. If everything works fine, I would use the emulator to check with different versions of android/screen sizes/resolutions etc. Maybe you can ask a friend who has a more powerful PC. The best possible thing is of course that friends/family/relatives etc. own Android devices so you can test your application / let it be tested on real devices.