GitHub Issue | n/a |
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-09-06T22:23:30.000+0000 |
Affected Version/s | Release 3.1.1 |
Fix Version/s | 2013 Sprint 18 Core, 2013 Sprint 18, Release 3.2.0 |
Components | Android, Tooling |
Labels | android, android-deployment, android-packaging, androidbuild, build, cb-verified, cli, genymotion, module_android, qe-testadded, simulator |
Reporter | Ygor Lemos |
Assignee | Chris Barber |
Created | 2013-07-23T19:05:26.000+0000 |
Updated | 2013-11-20T19:03:05.000+0000 |
Genymotion is an enhanced android emulator that leverages x86 emulation with builtin HAXM-like optimizations and Google APIs.
In order to have an simulator with a performance like the iOS Simulator we need to setup a x86 android emulation with Intel HAXM support. The problem is that by using the native AVD on Android SDK you can do this setup BUT without the Google APIs, namely the GMaps API, which makes testing apps depending on those APIs, impossible on this high performance simulation.
Although it is possible to add Google APIs to a standard x86 AVD, the process is very complex and involves copying the libraries from other non-x86 AVDs and rebuilding a system image which takes a lot of time and effort for each simulator setup you want to have.
So Genymotion does it all under the hood and allows us to select between several android models and even simulate external sensors and GPS location, much like the Apple Simulator does.
The standard Titanium build script has some problems that causes the Simulator session not to be recognized as a valid deployment target (using titanium build -p android -T device), even though adb successfully recognizes the simulation under adb devices.
In order to fix this I have found some hints on a russian weblog and changed it a bit for working on my Mac.
I have successfully run my Titanium app on Genymotion using Titanium CLI by doing the following:
http://reinraus.ru/wordpress/nastraivaem-titanium-studio-dlya-zapuska-prilozhenij-v-android-x86/
It is written in Russian, so please use the Google Translate tool, he has made 3 changes on the build script.
The tutorial is for windows, so if you're running Titanium on a Mac or Windows, just change the first patch from:
dev_id, dev_type=output.split("\r\n")[1].split("\t")
to:
dev_id, dev_type=output.split("\n")[1].split("\t")
It seems there is still a tiny problem with Logcat on the end, but the app successfully run on Genymotion after this patch.
Follows my builder.py script patched and working attached to this issue.
one vote for this :)
Pull request: https://github.com/appcelerator/titanium_mobile/pull/4646
@Chris could you explain in one sentence hoe to use the new setup?
[~timanrebel] This feature is not ready for preview. It is unstable and has not been merged into master yet which means it's not in the CI builds. You'll be able to preview the new and much improved Android build system shortly. Just hang in there a little while longer. :)
[~cbarber] I understand, I will keep using my customized builder.py for now then. Thanks!