Difference between iPhone Simulator and Android Emulator

AndroidIphoneAndroid EmulatorIos Simulator

Android Problem Overview


What is the difference between iPhone Simulator and Android emulator? I have heard people saying that Emulator really emulates the target device which is not true in case of simulator.

I think Android emulator mimics the processing speed of the target device, the memory usage, but a simulator does not emulate the device.

Android Solutions


Solution 1 - Android

Disclaimer: I'm only an iPhone developer, not an Android developer.

You are correct, the difference between emulators and simulators is that emulators mimic the software and hardware environments found on actual devices. Simulators, on the other hand, only mimic the software environment; they otherwise have access to all of the host system's hardware resources such as disk space, memory and processor speed.

Apple always harps on the importance of device testing because iPhone Simulator does not emulate an iPhone processor, disk drive, memory constraints and whatnot. You hardly ever get memory warnings unless your Mac is struggling to manage resources itself, unless you simulate (again) memory warnings from the Simulator's menu item.

In fact, if you go to Settings > General > About, you'll see that the Simulator's disk capacity is the same as the filesystem of the Mac it's installed on:

Solution 2 - Android

Though android emulator emulates the ARM processors and certain hardware, it still doesn't do a good job of matching the CPU performance.

Being an emulator it can match Memory consumption well, it can emulate certain simple devices well but fails when the devices gets complicated for example mobile GPU and HW media decoders. And as the emulation logic works on translating each ARM instruction to X86 instruction and executing its a performance hog and by design not cycle accurate.

With programming model being Java this design doesn't buy anything to the Application developer as the performance on emulator doesn't reflect performance on device (due to speed of emulation and due to missing HW devices) and more often is is an inconvenience as debug cycles are slow. The only advantage being Application complied for emulator work as it is on devices (no recompilation).

In the simulator model of iPhone Apple realized they are not going to match device perfectly, so they do not even try and in return give developers a fast cycle time and enhanced tool support to develop applications effectively.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionRK-View Question on Stackoverflow
Solution 1 - AndroidBoltClockView Answer on Stackoverflow
Solution 2 - AndroidNeeraView Answer on Stackoverflow