56
votes

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.

2
Yeah, thats true about Android emulator. I don't anything about iPhone or its simulator.Mudassir
Just to give you estimation - on a today's PC (Core2 Duo @2.9 GHz, 3 GB RAM) you can expect the Android emulator will work slighty slower than 1st generation of devices (HTC Dream, Hero, Samsung Spica)tomash
In summary - one emulates the hardware, the other just emulates the software :)controlbox
btw, Android emulator (the one that comes with Android Studio) does not emulate a device, but just Android OS built for specific device. Hence it can be called "Android phone simulator", similarly to "iPhone Simulator" (which in turn emulates iOS, but only simulates iPhone). There are, however, true Android phone emulators, like BlueStacks - those can run native apps, and are true emulators.metalim

2 Answers

74
votes

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:

20
votes

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.