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'; echo "sdk.dir=$(which adb | sed 's|/[^/]*/[^/]*$||')" >>

# compile in debug mode
ant debug

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

No comments:

Post a Comment


About Me

My photo

Believe it or not, I've never been to jail. Not even for a night. I quit going to bars by the time my fake ID was unnecessary, and I quit hacking into businesses and governments once they started paying me.

Now I just provide for my family and try not to notice politics. I get too angry when I watch how much of my income is taken from me, how it is used, and who is doing it. For the same reason, I can't bear to acknowledge celebrities.

After high school, I went to U of K but the outdated computer engineering curriculum and the seemingly endless amounts of money to be made with my internet specific skills drew me to larger tech markets. I have worked in Silicon Valley, New York City, and have settled in Atlanta.