emulator -list-avdsThis shows the names of all installed emulators (e.g. Pixel_5_API_34).
adb devicesExample output:
List of devices attached
emulator-5554 device
emulator-5556 offline
Here, emulator-5556 is offline.
adb -s emulator-5556 emu killemulator -avd <avd_name>Example:
emulator -avd Pixel_5_API_34for dev in $(adb devices | grep offline | awk '{print $1}'); do
adb -s $dev emu kill
done
for avd in $(emulator -list-avds); do
emulator -avd $avd -netdelay none -netspeed full &
done# Kill offline emulators
adb devices | ForEach-Object {
if ($_ -match "offline") {
$id = ($_ -split "\s+")[0]
adb -s $id emu kill
}
}
# Start all AVDs
emulator -list-avds | ForEach-Object {
Start-Process emulator -ArgumentList "-avd $_ -netdelay none -netspeed full"
}⚡ After running, check again:
adb devicesYou should see them as device, not offline.