Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-14637

Android: Fix Titanium Build Script in order to support Genymotion Android Emulator


    • Story Points:


      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:


      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")


      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.


          Issue Links



              • Assignee:
                cbarber Chris Barber
                ygbr Ygor Lemos
                Bryan Hughes
              • Watchers:
                9 Start watching this issue


                • Created:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Integration