Last active
June 2, 2016 13:51
-
-
Save blazsolar/02cdb30e06f1ca046fc4e479c2897107 to your computer and use it in GitHub Desktop.
Killing Android emulator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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