An occasional outlet for my thoughts on life, technology, motorcycles, backpacking, kayaking, skydiving...

Sunday, December 19, 2010

Android Oneliners

The next time I have to setup a non-Eclipse (aka: VIM) Android development environment, I'm going to want to remember these commands.

# android PATH
export PATH=$PATH:/Applications/Android/sdk/android-sdk-mac_86/platform-tools:/Applications/Android/sdk/android-sdk-mac_86/tools

# complete the SDK install (adb and all other platform-tools will be missing without this)
android update sdk

# create an Android Virtual Device
android create avd -c 256M -t $(android list | awk '$1=="id:"{l=$2} END{print l}') -n latest

# start the emulator
emulator -avd Captivate2.1u1 -no-boot-anim -scale 0.65 -show-kernel
# or
emulator -avd latest -no-boot-anim

# kill the adb server (for when the adb server was started before your emulator was launched)
adb kill-server

# add sdk.dir to ant settings
sed -i.bak '/^sdk\.dir=/d' local.properties; echo "sdk.dir=$(which adb | sed 's|/[^/]*/[^/]*$||')" >> local.properties

# compile in debug mode
ant debug

# install a package in the emulator replacing the existing install
adb -e install -r bin/HelloWorld-debug.apk 

1 comment:

  1. The History of the '90s: Casino Games for the European
    The 아이 벳 25 “Casino 아시안 부키 Games” of the 1990s: Casino 그래프 사이트 Games for the European Version of the 검증 놀이터 Game casino has been operating 스포츠 토토 사이트 since 1990s.

    ReplyDelete

Followers