Android emulator-5554 offline
Interview Questions practice on Codemia
Over 8,000 real interview questions from top companies, searchable by company and role.
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 Instance | Console Port | ADB Port | Device Name |
| First | 5554 | 5555 | emulator-5554 |
| Second | 5556 | 5557 | emulator-5556 |
| Third | 5558 | 5559 | emulator-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:
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:
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:
- Open the Device Manager (formerly AVD Manager).
- Click the dropdown arrow next to your AVD.
- Select Cold Boot Now.
From the command line:
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:
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:
If another process holds the port, kill it or start the emulator on a different port:
Stale Emulator Processes
Sometimes a previous emulator process does not shut down cleanly, leaving a zombie process holding the port:
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.
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:
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:
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
| Step | Command | Expected Result |
| 1. Check device status | adb devices | Shows emulator with "device" status |
| 2. Restart ADB | adb kill-server && adb start-server | Server restarts cleanly |
| 3. Cold boot emulator | Close and relaunch with cold boot | Emulator boots fresh |
| 4. Check port conflicts | lsof -i :5554 | No conflicting processes |
| 5. Check resources | free -h or Activity Monitor | Sufficient RAM available |
| 6. Update tools | adb version | Latest platform-tools version |
| 7. Check firewall | Test telnet localhost 5555 | Connection established |
Running Multiple Emulators
When running multiple emulators simultaneously, each needs its own port pair. If you explicitly assign ports, avoid overlaps:
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
- Android emulator doesn't take keyboard input - SDK tools rev 20
- Android Emulator Error Message PANIC Missing emulator engine program for 'x86' CPUS.
- Android Emulator Installation error INSTALL_FAILED_VERSION_DOWNGRADE
- Android Emulator issues in new versions - The emulator process has terminated
- Android emulator not able to access the internet
- Android error Failed to install .apk on device timeout
- Android Endless List
- Android equivalent of NSUserDefaults in iOS
.png&w=3840&q=75)
Tackling System Design Interview Problems
A short course that equips you with the skills to approach system design interviews methodically.
Start the free courseTrack 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.