Skip to content

Instantly share code, notes, and snippets.

@blazsolar
Last active June 2, 2016 13:51
Show Gist options
  • Save blazsolar/02cdb30e06f1ca046fc4e479c2897107 to your computer and use it in GitHub Desktop.
Save blazsolar/02cdb30e06f1ca046fc4e479c2897107 to your computer and use it in GitHub Desktop.
Killing Android emulator
#!/usr/bin/expect -f
set device [lindex $argv 0]
set token [lindex $argv 1]
spawn telnet localhost $device
expect "OK"
send "auth $token\n"
expect "OK"
send "kill\n"
interact
#!/bin/bash
token=$(head -n 1 ~/.emulator_console_auth_token)
for device in `adb devices -l | tail -n +2 | cut -d" " -f 1 | cut -d"-" -f 2`; do
echo "Killing $device"
expect ./kill-emulators.expect $device $token
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment