Labels

continuous integration (7) hudson (7) jenkins (7) mac os x (5) git (4) maven (4) android (3) charles (3) launchd (3) scm (3) bitbucket (2) dvcs (2) jnlp (2) mercurial (2) ant (1) apple (1) basex (1) chrome (1) cloud server (1) cobertura (1) css (1) cvs (1) firefox (1) general (1) hardy (1) http (1) iptables (1) java (1) javascript (1) linux (1) lucid (1) python (1) stresstest (1) subversion (1) svn (1) ubuntu (1) xen (1) xml (1) xpath (1) yui2 (1)

2010/09/27

Starting an Android emulator automatically on MacOSX after Login via LaunchAgent

Homebrew offers a simple means to install additional software packages on your MacOSX computer. After initial installation of brew as admin user execute:

brew install android-sdk # will install the newest SDK starter package
android update sdk # this will open the UI, now install all platforms
chgrp -R staff /usr/local/Cellar/android-sdk/r7 # otherwise the ANDROID_HOME will be owned by the wheel group and you may not start anything as non admin user.

To use tools like the emulator add ANDROID_HOME and ANDROID_SDK_ROOT to your $HOME/.profile or $HOME/.bash_profile (if the latter exists, use this):

ANDROID_SDK_ROOT=/usr/local/Cellar/android-sdk/r7
ANDROID_HOME=$ANDROID_SDK_ROOT
export ANDROID_SDK_ROOT ANDROID_HOME

Create an emulator called Wildfire using the android command. Now if you want the emulator to be started automatically after you login, put the following into $HOME/Library/LaunchAgents/emulator-wildfire.plist:

After you saved the file, execute launchctl load $HOME/Library/LaunchAgents/emulator-wildfire.plist. From now on the emulator starts whenever you (or your CI user) logs in.

0 comments:

Post a Comment