What the ADB offline error means
The ADB offline error (device offline) occurs when Android Debug Bridge (ADB) cannot establish a full connection with a connected Android device. In the device list (adb devices), the status device is replaced with offline.
This means the computer recognizes the physical USB connection but cannot exchange debug commands with the device. As a result, operations such as APK installation, logging (logcat), or launching shell sessions become impossible. The issue is characteristic of all operating systems (Windows, macOS, Linux), but is most common in Windows due to driver-specific behavior.
Causes
- Issues with the USB cable or port. Charge-only cable (without data wires), damaged contact, or a faulty USB port on the computer.
- Conflict or outdated ADB drivers (especially in Windows). Installed drivers from the phone manufacturer (Samsung, Xiaomi, etc.) may conflict with universal drivers or ADB itself.
- Missing or revoked USB debugging authorization on the device. After an Android update or phone reset, you must re-confirm the request to connect the computer with debugging privileges.
- Incorrect USB connection mode on the phone. The device is in "Charge only" mode instead of "File transfer" (MTP/PTP).
- A stuck or malfunctioning ADB server. The
adb.exeprocess on the computer is running in an invalid state. - Antivirus or firewall. Some security programs may block the network (even local via USB) connections that ADB uses.
- Insufficient permissions for the current OS user. Running ADB as a regular user without administrator rights (in Windows) can lead to driver access issues.
Solutions
Method 1: Basic reconnection and restart
This is the simplest and often effective method, resolving issues with unstable physical connections or a stuck ADB server.
- Disconnect the USB cable from the computer and phone.
- Restart the ADB server. Open a terminal (Command Prompt, PowerShell, Terminal) and run:
You should see the messageadb kill-server adb start-server* daemon started successfully *. - Reconnect the cable. On the phone, when the "Allow USB debugging?" notification appears, be sure to tap "Allow" and optionally check "Always allow from this computer".
- Check the device status:
The first column should show your device's serial number, and the second should showadb devicesdevice.
Method 2: Check and change USB mode
If reconnection didn't help, the phone might not be switching to the correct mode.
- Connect the phone to the computer.
- On the phone, swipe down from the top of the screen to open the notification panel.
- Find the notification related to USB connection (e.g., "USB charging" or "USB for charging"). Tap it.
- In the menu that opens, select "File transfer" (MTP) or "PTP" instead of "Charge only".
- Wait 5-10 seconds and run
adb devicesagain.
Method 3: Reinstall drivers (Windows)
For Windows users, this is the most probable and effective solution.
- Connect the device to the computer.
- Press
Win + R, typedevmgmt.msc, and press Enter to open Device Manager. - Find your device. It may be under one of these categories:
Portable Devices(e.g., "Xiaomi Redmi Note 9").Other devices(may appear as "Android" or "ADB Interface" with a yellow exclamation mark).
- Right-click on the device and select "Uninstall device". In the dialog box, be sure to check "Delete the driver software for this device" if available. Click "Uninstall".
- Disconnect and reconnect the phone to the computer.
- Windows will attempt to find drivers automatically. This often fails. You need to install Universal ADB Driver.
- Download the latest version from the official website (e.g., adb.clockworkmod.com or a GitHub repository).
- Run the installer and follow the instructions.
- After installation, check
adb devicesagain.
Method 4: Check authorization on the device
Sometimes the problem lies in the phone's reset security settings.
- On the phone, go to Settings → Developer options (to make this visible, you need to tap "Build number" in "About phone" seven times).
- Find "USB debugging" and turn it OFF.
- Turn it back ON.
- Reconnect the phone to the computer. A dialog requesting debugging permission must appear on the phone screen. Tap "Allow".
- If the window didn't appear, disconnect and reconnect the cable again.
Method 5: Check cable and port
- Try a different USB cable, preferably the original one from the phone. Many cheap cables have only two wires (power and ground) and do not support data transfer.
- Connect the phone directly to a port on the computer's motherboard (often ports on the back of a PC), not to a USB hub.
- If you have a laptop, try all available ports.
- Ensure the phone shows charging when connected, not just a blinking indicator.
Prevention
- Use a high-quality cable. Buy cables whose description specifies data transfer support (USB 2.0/3.0 data).
- Install and keep Universal ADB Driver updated (if you're on Windows). Avoid installing manufacturer-specific phone drivers unless needed for other tasks.
- Always tap "Allow" on the USB debugging authorization dialog. You can check "Always allow".
- Do not use USB hubs for debugging. Connect the device directly to the computer.
- Periodically update Android Studio or the platform-tools package to have the latest stable version of ADB.
- In Windows, run the command prompt (cmd) or PowerShell as Administrator when executing ADB commands if you encounter access issues.
# Full ADB restart cycle - a useful command for quick resolution
adb kill-server && adb start-server && adb devices