Project: titanium
Issue TIMOB-12661: CLI: Support adb's -s option for pointing a build to a specific emulator or device
It would be extremely helpful, and give the CLI more power with Android, if developers were able to specify specifically which device or emulator for which they would like to build. Right now the build process allows us to specify and avd id which would let you pick an emulator, but even that is not ideal as you don't really have a way of knowing an emulator's id from the *android list avd* as it isn't listed. Ideally, I should be able to call *adb devices*, see my listing of emulators and devices, than be able to pass that serial number to the *titanium build* command as an option, directing the build process to that specific emulator or device. The build process _tries_ to be intelligent about this, but more often than not I get errors like: * It fails if there is a connected device AND an emulator open * Even with an emulator already it open, it often attempts to load an entirely different one * Tries to use emulators not compatible with the app (like a non-Google API emulator with an app that uses maps) Allowing a command like the following would make it really easy for developers to have multiple open emulators and connected devices and still get expected behavior: {code} titanium build -p android -s EMULATOR_OR_DEVICE_SERIAL {code} Obviously I leave the choice of the option flag to the implementor. "-s" would correspond to the adb command, but this is already in use for *titanium build* for specifying the target Titanium SDK.
Story points: 3