Android emulator
emulator offline issue
troubleshooting emulator
ADB connection
Android development

How to fix Android emulator-5554 offline in adb devices

Codemia Knowledge Hub ·

"emulator-5554 offline" means ADB (Android Debug Bridge) cannot communicate with your running emulator. The fastest fix is to restart the ADB server with adb kill-server && adb start-server, then check adb devices. If the emulator is still offline, cold boot it or resolve a port conflict.

What emulator-5554 refers to

Emulators talk to ADB over localhost TCP ports. Each instance uses a pair of consecutive ports: an even-numbered console port and the next odd-numbered ADB port.

Emulator InstanceConsole PortADB PortDevice Name
First55545555emulator-5554
Second55565557emulator-5556
Third55585559emulator-5558

emulator-5554 is the first instance. "Offline" means the ADB server on your host can see the emulator process but cannot establish a working data connection to the ADB daemon inside the emulator's Android OS.

Checking the current state

bash
1# List all connected devices and their status
2adb devices
3# Expected output when offline:
4# List of devices attached
5# emulator-5554   offline
6
7# Check if multiple ADB servers are running
8ps aux | grep adb     # macOS/Linux
9tasklist | findstr adb # Windows

If it shows "offline", work through the fixes below in order.

Fix 1: restart the ADB server

This resolves the issue in roughly 70% of cases. ADB's internal state can get corrupted, and a clean restart resets all connections:

bash
1# Kill the ADB server and start a fresh one
2adb kill-server
3adb start-server
4
5# Verify the emulator is now online
6adb devices
7# Should show:
8# emulator-5554   device

If the status is now "device", you can deploy and debug as normal.

Fix 2: cold boot the emulator

The quick boot snapshot can hold stale ADB connection state. A cold boot starts Android from scratch.

From Android Studio:

  1. Open the Device Manager (formerly AVD Manager).
  2. Click the dropdown arrow next to your AVD.
  3. Select Cold Boot Now.

From the command line:

bash
1# Close the running emulator
2adb -s emulator-5554 emu kill
3
4# Start with a cold boot (no snapshot restore)
5emulator -avd Pixel_6_API_34 -no-snapshot-load

Cold boot takes longer than quick boot (30-60 seconds vs 5-10 seconds) but eliminates snapshot-related connection issues.

Fix 3: wipe data

If the internal state is corrupted beyond what a cold boot fixes:

bash
# Wipe all user data and cache
emulator -avd Pixel_6_API_34 -wipe-data

From Android Studio: Device Manager > dropdown arrow > Wipe Data, then start the emulator.

This resets the emulator to factory state, so you lose any installed apps and data on it.

Fix 4: resolve port conflicts

Another process may hold port 5554 or 5555 and stop the emulator from binding:

bash
1# Check what is using port 5554 (macOS/Linux)
2lsof -i :5554
3
4# Check on Windows
5netstat -ano | findstr 5554

Kill that process, or start the emulator on a different port:

bash
# Start emulator on custom ports
emulator -avd Pixel_6_API_34 -port 5580
# This creates emulator-5580 on console port 5580 and ADB port 5581

A previous emulator that did not shut down cleanly can also leave a zombie process holding the port:

bash
1# Find and kill stale emulator processes (macOS/Linux)
2ps aux | grep qemu
3kill -9 <PID>
4
5# Windows
6taskkill /F /IM qemu-system-x86_64.exe

Then restart ADB and launch the emulator again.

Fix 5: check system resources

The emulator needs significant RAM and CPU. On a resource-constrained machine, its ADB daemon may not respond within ADB's timeout.

bash
1# Check available memory (macOS)
2vm_stat | head -5
3
4# Check available memory (Linux)
5free -h
6
7# Recommended minimums for emulator
8# RAM: 8 GB total, 4 GB free
9# Disk: 10 GB free for emulator images
  • Close other memory-intensive applications (browsers, other IDEs).
  • Reduce emulator RAM in AVD settings (2 GB is usually enough for testing).
  • Use a smaller screen resolution AVD (for example Pixel 4a instead of Pixel 6 Pro).
  • Enable hardware acceleration (HAXM on Intel, Hypervisor.Framework on Apple Silicon, KVM on Linux).

Fix 6: update SDK Platform-Tools

An outdated ADB can have compatibility issues with newer emulator images:

bash
1# Check ADB version
2adb version
3# Android Debug Bridge version 1.0.41
4
5# Update via command line
6sdkmanager --update
7sdkmanager "platform-tools"

Or in Android Studio: Tools > SDK Manager > SDK Tools tab > check Android SDK Platform-Tools > Apply.

Fix 7: check firewall and VPN

Firewalls or VPN software can block the localhost ports ADB uses:

bash
1# Test if ADB port is reachable
2telnet localhost 5555
3
4# On macOS, check firewall status
5/usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate

On a corporate VPN, try disconnecting and restarting the emulator. Some VPN clients modify routing tables in ways that break localhost communication.

StepCommandExpected Result
1. Check device statusadb devicesShows emulator with "device" status
2. Restart ADBadb kill-server && adb start-serverServer restarts cleanly
3. Cold boot emulatorClose and relaunch with cold bootEmulator boots fresh
4. Check port conflictslsof -i :5554No conflicting processes
5. Check resourcesfree -h or Activity MonitorSufficient RAM available
6. Update toolsadb versionLatest platform-tools version
7. Check firewallTest telnet localhost 5555Connection established

Running several emulators at once

Each emulator needs its own port pair. If you assign ports explicitly, avoid overlaps:

bash
1# First emulator (default ports)
2emulator -avd Phone_API_34
3
4# Second emulator on different ports
5emulator -avd Tablet_API_34 -port 5556
6
7# Target a specific emulator with ADB
8adb -s emulator-5554 install app.apk
9adb -s emulator-5556 install app.apk

Things that keep the emulator offline

Killing ADB during a deploy. If Android Studio or Gradle is deploying, adb kill-server mid-operation can leave both the IDE and the emulator in a bad state. Wait for the deployment to finish or fail first.

Quick Boot after an unclean shutdown. If the emulator crashed or was force-killed, the snapshot may be corrupted. Cold boot after any abnormal termination.

No HAXM/KVM acceleration. Without hardware acceleration the emulator runs 10-50x slower and often times out ADB connections. Check with emulator -accel-check.

Multiple Android Studio instances. Each can start its own ADB server, and two competing servers make both report emulators as offline. Close the other instances or make them share the same ADB binary.

Antivirus quarantining ADB. Some antivirus programs flag adb.exe and block its network access. Add the SDK platform-tools directory to the exclusion list.


Free course
Beginner
7 lessons
2 hours
Tackling System Design Interview Problems

A short course that equips you with the skills to approach system design interviews methodically.

Start the free course
Basis Lab
No course covers this one yet

Basis Lab writes one for you from a sentence about what you want to be able to do, then teaches it and checks you understood. Your first course is free.

Build my course
Data Structures & Algorithms practice on Codemia

Step through 300+ coding interview problems with animated visualisers that show the data structure changing as the code runs. The Blind 75 are free.

Practice algorithms