Live data from Hacker News

Android Needs A Simulator, Not An Emulator

jakewharton.com

11–20 of 46 posts

Re: Android Needs A Simulator, Not An Emulator

#11
post #7
post #4

For a bit of history, once upon a time Android did have one of sorts. You can still see sprinklings are references to it in AOSP but I think the simulator lunch target has been removed. It was from the early early days and allowed them run to run parts of it on the desktop. You can see some of the reasoning on why they preferred the QEMU solution here: https://groups.google.com/forum/#!msg/android-porting/fLObl9... I…

The point of a simulator is it drives deployment time to zero and increases the number of virtual devices on which you can run without adding a new AVD for each. Deploying to a phone takes maybe 40-60 seconds? Maybe less? But I'm not a very patient person. At 60 seconds per deploy, if I make a tiny tweak and then have to wait a full minute for feedback on how it feels, it has become a slow and arduous process to deve…

It is much much less. I just timed it on my machine. It was 8 seconds for a decent sized(~12M) app. A build and deploy takes much longer, but the long pole isn't the time it takes to install the app on the hardware. If you are having a lot of latency, I don't think a simulator will help.

Re: Android Needs A Simulator, Not An Emulator

#12
post #8

I wonder if an Android device as a service would work. No, I don't mean loaning devices. I mean by the hour remote control of an Android device you can take over. Your end looks like the simulator, my end is a farm of Android devices which get a factory reset between every client connecting. You reserve it for as long as you want, or just do one-off testing. Edit: I suppose I should ask a more concrete question: woul…

How would you avoid/handle abuses like using it as a proxy to access extremely illegal things?

You can do this with almost any service now where you can execute arbitrary code, and a lot easier than running it through an android board.

Re: Android Needs A Simulator, Not An Emulator

#13
post #5

Have you guys heard of GennyMotion? It's way faster than the actual Android Emulator. My Professor for my Android Class in college recommended it to use for debugging for our assignments if we didn't have an Android Device. http://www.genymotion.com/

Genymotion is mentioned in the article, along with the reasons why it's not ideal (aside from the fact that it's not a first-party solution, and that you can't get a version with the Google SDKs running).

Re: Android Needs A Simulator, Not An Emulator

#15
post #7

Earlier quoted context omitted.

The point of a simulator is it drives deployment time to zero and increases the number of virtual devices on which you can run without adding a new AVD for each. Deploying to a phone takes maybe 40-60 seconds? Maybe less? But I'm not a very patient person. At 60 seconds per deploy, if I make a tiny tweak and then have to wait a full minute for feedback on how it feels, it has become a slow and arduous process to deve…

It is much much less. I just timed it on my machine. It was 8 seconds for a decent sized(~12M) app. A build and deploy takes much longer, but the long pole isn't the time it takes to install the app on the hardware. If you are having a lot of latency, I don't think a simulator will help.

This is still far longer than it should be.

I just built a not-particularly-large app after making a single-line change and it took 16 seconds to compile, dex, package and install on a running x86 emulator. The installation time is appreciable (4 seconds for my 10MB APK), which would be cut to zero for a simulator. Similarly, removing the dexing and packaging would be a great help.

I'm jealous when I see how fast my iOS colleagues can make code tweaks and see them running on a simulator one second later.

Re: Android Needs A Simulator, Not An Emulator

#16

I wonder if an Android device as a service would work. No, I don't mean loaning devices. I mean by the hour remote control of an Android device you can take over. Your end looks like the simulator, my end is a farm of Android devices which get a factory reset between every client connecting. You reserve it for as long as you want, or just do one-off testing. Edit: I suppose I should ask a more concrete question: woul…

"I wonder if an Android device as a service would work"

Doubtful it would work any better than the custom VM solution that Genymotion (mentioned in the article) does (for this specific pain-point).

I would still need to adb deploy my apk to the device (which is a process that really drags development even when doing it to local devices) and now its even worse because it is remote. Also this remoteness would add all sorts of new issues like that fact that if I'm developing a server in tandem with the client app, now I have to jump through hoops to make the server remotely accessible (so your service devices can see it) whereas otherwise I might just be running it locally in a non-publicly accessible way for development purposes (solvable problem, but still a lot of friction and this request for a simulator is all about removing such friction).

Android devices as a service is still a good idea for other things like testing & QA because while Android fragmentation isn't as bad as it used to be, you still do see device-specific bugs (or at least platform-specific, like TouchWiz bugs on Samsung devices that don't impact other versions of Android) quite often when developing and having access to specific devices would help in such situations, but I don't think it addresses any of the main problems that are driving this request for iOS-style simulation (which, FWIW, I totally agree with Jake Wharton on).

Re: Android Needs A Simulator, Not An Emulator

#17

I wonder if an Android device as a service would work. No, I don't mean loaning devices. I mean by the hour remote control of an Android device you can take over. Your end looks like the simulator, my end is a farm of Android devices which get a factory reset between every client connecting. You reserve it for as long as you want, or just do one-off testing. Edit: I suppose I should ask a more concrete question: woul…

There have been several attempts at device testing as a service. I don't know of any that have really thrived. To be interesting, some have tried offering testing in diverse locations. In theory, they could also move their testing rigs, heat and cool them, pressurize the room, and/or rotate them in order to test sensors.

There are some kinds of sensors with variable quality that some developers claim leads to a need for testing every device. I would write code that characterizes performance instead, and possibly blacklist some known bad devices.

Re: Android Needs A Simulator, Not An Emulator

#18
post #5

Have you guys heard of GennyMotion? It's way faster than the actual Android Emulator. My Professor for my Android Class in college recommended it to use for debugging for our assignments if we didn't have an Android Device. http://www.genymotion.com/

It's mentioned in the article, but the downsides are almost all due to the licensing and pricing model. Doesn't really make it a bad solution from a technical standpoint (and for others to do something similar).

To me Genymotion is what Android "should" have, and it's already here.

Re: Android Needs A Simulator, Not An Emulator

#19
post #5

Have you guys heard of GennyMotion? It's way faster than the actual Android Emulator. My Professor for my Android Class in college recommended it to use for debugging for our assignments if we didn't have an Android Device. http://www.genymotion.com/

Google should buy Genymotion!

Re: Android Needs A Simulator, Not An Emulator

#20
post #5

Have you guys heard of GennyMotion? It's way faster than the actual Android Emulator. My Professor for my Android Class in college recommended it to use for debugging for our assignments if we didn't have an Android Device. http://www.genymotion.com/

Wow, that page has a 2.5mb png as a background image on one of the elements.
Post reply on HN