Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10352] Tooling: Android: Support alternative avd/sdcard locations via ANDROID_SDK_HOME environment variable

GitHub Issuen/a
TypeNew Feature
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2012-08-08T13:15:37.000+0000
Affected Version/sRelease 2.1.1
Fix Version/sSprint 2012-16 Core, Release 3.0.0
ComponentsTooling
Labelscore, qe-port
ReporterBill Dawson
AssigneeBill Dawson
Created2012-08-08T12:53:08.000+0000
Updated2013-03-29T00:02:01.000+0000

Description

Android itself supports an environment variable, ANDROID_SDK_HOME, which can be used to indicate where the user wants Android's tools to create user-specific files, most especially AVDs and .sdcard images. We (Titanium) should also support that. By default, the location is ".android" under the user's home directory for AVDs, and ".titanium" for .sdcard images. However, we should respect ANDROID_SDK_HOME if it is available.

Comments

  1. Bill Dawson 2012-08-08

    We have a community pull request for this: https://github.com/appcelerator/titanium_mobile/pull/2664
  2. Bill Dawson 2012-08-08

    Testing Notes

    Do two passes testing the pull request branch. In the first pass, don't change anything on your system. Just make sure building and releasing an app is not broken. Then, before the second pass, set the environment variable ANDROID_SDK_HOME to an alternative path (anything you want) that exists on your system. If you're testing with OSX, remember that because Titanium Studio is a GUI app, setting an environment variable in your .profile or in a shell won't really work. The proper way to do it is this command in a Terminal window....
       launchctl setenv ANDROID_SDK_HOME /your/path/to/wherever
       
    (Re-launch Titanium Studio *after* that.) The testing steps: 0) Make sure no existing emulator instances are running. 1) Open Titanium Studio. 2) Open an existing project or create a new one -- doesn't matter. 3) Launch the project to the Android Emulator. If you're doing the first pass, just make sure it works. If you're doing the second pass, after the emulator loads the app go and check that indeed an .sdcard image and AVD are created in the path you specified for ANDROID_SDK_HOME. (You should see .titanium and .android subfolders under that path, and contents in them.)
  3. Satyam Sekhri 2012-08-28

    Alternate location of AVD/SDK through ANDROID_SDK_HOME environment variable is supported. Tested through the testing notes mentioned in the comment. Verified on: Titanium Studio: 2.1.2.201208201549 Titanium SDK: 2.2.0.v20120827143312 Android: Google API Android 2.2 Emulator Android Runtime: V8, Rhino

JSON Source