Useful Android cmds

These are a couple of command line commands I have never managed to commit to memory so I figured I’d blog them for reference.

Install apk on multiple connected devices
$ adb devices | tail -n +2 | cut -sf 1 | xargs -I X adb -s X install pathto/myapp-release.apk

Port forwarding device
adb forward tcp:8000 tcp:8000

Generate an Ant build.xml
$ android update project -p .