0
0
mirror of https://github.com/ankidroid/Anki-Android.git synced 2024-09-20 03:52:15 +02:00
Anki-Android/tools/quality-check/stop_all_emulators.sh
Mike Hardy 05bcefdf01 Remove adb restart
It was only needed because I accidentally had multiple adb's on my local system
and they conflicted with one another. In a correctly installed system it is unneeded
2019-02-20 09:45:41 +09:00

17 lines
457 B
Bash
Executable File

#!/bin/bash
# This attempts to stop all your emulators (on Ubuntu 18.10 at least...) nicely
#
# ...then if they don't stop it kills them
for EMU_ID in `adb devices -l | grep emulator | cut -d' ' -f1`; do
echo Stopping emulator $EMU_ID...
adb -s $EMU_ID emu kill
done
sleep 10
for PID in `ps -eo pid,cmd,args |grep emulator|grep Android|grep -v bash|grep -v crash|grep -v grep|cut -d/ -f1`; do
echo "Stopping emulator with $PID..."
kill $PID
done