Android emulator
emulator offline issue
troubleshooting emulator
ADB connection
Android development

Android emulator-5554 offline

Interview Questions practice on Codemia

Over 8,000 real interview questions from top companies, searchable by company and role.

Browse interview questions

The "emulator-5554 offline" error means ADB (Android Debug Bridge) cannot communicate with your running emulator instance. The fastest fix is to restart the ADB server with adb kill-server && adb start-server, then verify with adb devices. If the emulator still shows as offline, a full emulator restart or port conflict resolution is needed.

What emulator-5554 Means

Android emulators communicate with ADB over localhost TCP ports. Each emulator 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

The name emulator-5554 refers to the first emulator instance. When adb devices shows it as "offline," the ADB daemon 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.

Quick Diagnosis

Run these commands to understand 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 adb devices shows "offline," proceed with 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 become 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 emulator shows as "device" (not "offline"), the problem is fixed. You can now deploy and debug as normal.

Fix 2: Cold Boot the Emulator

The emulator's quick boot snapshot can contain stale ADB connection state. Force a cold boot to start the Android OS 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 booting takes longer than quick boot (30-60 seconds vs 5-10 seconds) but eliminates snapshot-related connection issues.

Fix 3: Wipe Data and Restart

If the emulator's 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. You will lose any installed apps and data on the emulator.

Fix 4: Resolve Port Conflicts

Another process may be occupying port 5554 or 5555, preventing 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

If another process holds the port, kill it 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

Stale Emulator Processes

Sometimes a previous emulator process does not shut down cleanly, leaving 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

After killing stale processes, restart ADB and launch the emulator again.

Fix 5: Check System Resources

The emulator requires significant RAM and CPU. When your machine is resource-constrained, the emulator's ADB daemon may fail to respond within ADB's timeout window.

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

Resource optimization tips:

  • Close other memory-intensive applications (browsers, other IDEs).
  • Reduce emulator RAM in AVD settings (2 GB is usually sufficient for testing).
  • Use a smaller screen resolution AVD (e.g., 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 version 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 update through Android Studio: Tools > SDK Manager > SDK Tools tab > check Android SDK Platform-Tools > Apply.

Fix 7: Network and Firewall Configuration

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

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

Troubleshooting Checklist

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 Multiple Emulators

When running multiple emulators simultaneously, each needs its own port pair. If you explicitly assign ports, 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

Common Pitfalls

Running adb kill-server while a build is deploying. If Android Studio or Gradle is actively deploying to the emulator, killing ADB mid-operation can leave both the IDE and emulator in a bad state. Wait for any active deployment to finish (or fail) before restarting ADB.

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

Ignoring HAXM/KVM acceleration. Without hardware acceleration, the emulator runs 10-50x slower and frequently times out ADB connections. Check that acceleration is enabled: emulator -accel-check.

Multiple Android Studio instances. Each Android Studio instance can start its own ADB server. Two competing ADB servers cause both to report emulators as offline. Close other IDE instances or ensure they share the same ADB binary.

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

Summary

The "emulator-5554 offline" error is an ADB communication failure, not an emulator crash. Start troubleshooting by restarting ADB (adb kill-server && adb start-server). If that fails, cold boot the emulator to clear stale snapshot state. For persistent issues, check for port conflicts, resource constraints, outdated SDK tools, and firewall interference. The fix is almost always one of these seven steps, applied in order from fastest to most involved.


Related reading
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
Track what you have practised

A free account saves your progress, solutions and study plan across every problem on Codemia.

Interview Questions practice on Codemia

Over 8,000 real interview questions from top companies, searchable by company and role.

Browse interview questions

All Rights Reserved.