Android emulator running on VirtualBox vs. real device - android

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.

Related

Is deploying/debugging to real phone is faster than emulator on Xamarin?

We're starting exploring Xamarin.Form as a mobile development using Visual Studio 2015 on Surface Pro 2 machine with 8 GB RAM. We found that when we debugged/deployed into Visual Studio Emulator for Android. It takes a bit time to deploy.
I'm just wondering if we have a proper phone ie. Android device or iPhone will this make faster in term of deploying/debugging speed?
I'm appreciated your feedback.
Thanks
Isadewa
Sure when you use real device you are using the phones's cpu , Gpu , ram to run your app but when you try to use your pc every time you are starting a vm that takes resources from your computer and slows it down so you are probably using and ide and you may have some chrome tabs open so if you are that guy who open alot of chrome tabs , launch alot of apps at once defintly debug on your phone.
for sure testing and debuging your application on mobile device is much better for the reasons below:
Emulators are virtual machine that consumes memory and processing power from you computer which makes you computer much slower, which doesn't hapen when you debug on Mobile.
Mobile devices are better when your app is developed to consume and access mobile resources like camera , contact, push notification ... etc.
The only reason that you can make benefit of emulator , if you want to test your application on a specific mobile device and you don't have it for the moment , then I would prefer to configure an emulator with the specific mobile aspects and test my app on it .
Definitely real device debugging fast as compare to emulatore because emulator taking lot of time to launch even though you configure different cpu, and more ram but real device will be feasible for debugging.
Prefer always real devices because its properly give response while debugging.

android genymotion vs emulator

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.

Why Android Emulator is Way Slower than iPhone Simulator? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
Just Curious. Did Apple do an awesome job with their iPhone simulator?
When Compared,The android Emulator running on i7 and iPhone simulator on i3. The iPhone simulator is faster than the real iPhone.
Did I fail to set things up right?
It's a matter of architectural decisions:
iOS simulator runs native code, directly on your CPU - the project has to be recompiled for x86 architecture to be used with simulator. The simulator itself simply emulates all the iOS APIs.
Android emulator, on the other hand, uses QEMU to run ARM (or x86, but ARM is more popular) CPU virtual machine, with all the software stack on top of it - Linux kernel, Android system image, etc. Think of it as an emulated hardware.
It's a sort of trade off - the way iOS does it is much faster, but it is harder to make it 100% compatible with the target system. For Apple it was perhaps a bit simpler, as iOS and Mac OS have many things in common.
For Android it makes a lot of sense to emulate the whole stack - it is easier to build cross-platform SDK, easier to test some system level components with it, etc. It's simply a different ecosystem, with different goals. Don't forget, that Android emulator can be used e.g. to test native ARM libraries compiled with Android NDK.
Today the Android emulator performance is more or less acceptable, but it was just a disaster in the early Android days. That said, personally I think that fast, API-level native simulator for Android would be a great addition to the SDK, making it possible to test less demanding projects much faster.
Interesting reading: http://logic-explained.blogspot.com/2011/09/why-is-there-no-x86-native-emulator-for.html
iphone ,iphone simulator,apple laptop ,xcode are apple products
but android
windows-Microsoft
android -Google
eclipse -eclipse vendor
these tools are different vendors that why android simulator slow.
i am just kidding :)
Apple Simulator is created using system configuration means it will take the System's ram, memory,cache automatically you don't have to configure it, so an Iphone Simulator is not act as real device but in case of Android one has to provide all the configuration details before creating the emulator,Android emulator to a great extent will act as real device but can be much slower than an Iphone Simulator.
Yes that's true, The emulator (FYI) is slower then simulator.
Does apple did an awesome job with the iPhone simulator?
No other developer can answer this because iOS is not open-source.
Did I fail to set things up right?
No, you are right at everything.
First of all Android does not have a Simulator it has an Emulator.
Secondly I believe the speed of the Emulator depends on your machine config. Better the config the better it will run provided you have created the AVD properly and given it ample memory.
That's simple:
Android Emulates real device, so real architeture and really close behaivour and layout.
In other hands apple simulator is not an emulator, so you can't expect real behaviour, but it has a close layout, which mainly solves for IOS, as you needs only 1 device to test the app behaviour.
Android SDK has an emulator, Whereas ios SDK has simulator.
A simulator behaves similar to something else, but is implemented in an entirely different way. It provides the basic behavior of a system but may not necessarily abide by all of the rules of the system being simulated. It is there to give you an idea about how something works. It uses Desktop resources like processor, ram etc.,
An emulator is a system that behaves exactly like something else, and abides by all of the rules of the system being emulated. It is effectively a complete replication of another system, right down to being binary compatible with the emulated system's inputs and outputs, but operating in a different environment to the environment of the original emulated system.
Thus simulator will be definitely fast compared to emulator.
The Android simulator is actually an emulator, designed to mimic a mobile device running Android, meaning it emulates the hardware running Android OS, to make it as close to 100% identical as possible. The JVM converts Java bytecode into ARM instructions that are decoded by the emulator.
The iOS simulator works at a higher level, simulating the operating system and its libraries, translating OS calls into OS X implementations and simulating events in the other direction like device rotation or low memory conditions. When you run an app on the iOS simulator, the app is compiled into x86 that runs natively on your Mac. Unlike the Android emulator, your iOS app won't run out of memory in the simulator because it's not constrained to any particular iOS device's memory limitations.

Android deployment is slow, how to improve it?

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...

Testing Android apps on device

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.

Categories

Resources