Tuesday, May 14, 2013

Android Device Offline: Fixing ADB Connection Error

After upgrading to Android Jellybean (4.2.2) the 'adb (Android Debug Bridge)' program failed to connect my Android mobile phone. Running 'adb devices' in the terminal showed error: device offline message.

Recently Android switched to MTP (Media Transfer Protocol). Unfortunately MTP support has some issues. For now I have to resort to using 'adb' command to work with my Android mobile phone.

Digging around the Internet, I learned that Android Jellybean has a new security feature. You need to do RSA key fingerprint verification with the PC. Otherwise the Android device will be reported as offline.

How to Fix ADB Device Offline Error

Here are the steps to connect to your Android device with adb.

  • Get the latest version of adb. Update using Android SDK android program: 'android update adb'
  • Restart adb server with 'adb kill-server'
  • Unplug and reconnect the device to a different USB port
  • Repeat last two steps until you see 'Allow USB Debugging?' dialog on your android device.
  • Select 'Always allow from this computer' option

Now you can talk to your Android device using the adb commands.

17 comments:

  1. Thanks, this was definitely helpful. I've left the phone plugged in to the same port after flashing a new ROM, no wonder it was showing up offline later...

    ReplyDelete
  2. i have not upgraded my phone to 4.2 , i just reflashed my own 4.0.3 rom , and now i have the error:device offline
    what should i do ?

    ReplyDelete
  3. Definitly, "adb kill-server" solves the issue. In my case it happens after rooting the device.

    Thanks!

    ReplyDelete
  4. It helped for my device. Thank's a lot!

    ReplyDelete
  5. This comment has been removed by a blog administrator.

    ReplyDelete
  6. It worked for me by updating tools

    ReplyDelete
  7. em again receiving this error "error: device offline" after running "adb kill-server" command. What should I do?

    ReplyDelete
    Replies
    1. Follow the instructions. And try again. It will work

      Delete
  8. Thanks a lot, I was looking for the solution to this problem and stumbled upon your post.

    ReplyDelete
  9. i tried all the options its not worked for me .when try to close the adb.exe again its coming in task manger

    ReplyDelete
  10. I had the issue that aufter 6h of using adb (was working well) the device turned offline.
    If you do not allow the device it is not called offeline it says "unauthorized"
    There are 3 Status messages messages "unauthorized" "device" and "offline"
    What you describe here is how to solve the "unauthorized" problem. but not the "offline" problem.

    ReplyDelete
  11. The solution to Offline is actually so simple i beat myself for not figuring it out earlier...

    1) USB Debugging mode on
    2) Select CHARGING mode on phone
    3) ADB shows device - which means online

    ReplyDelete
  12. I have a question,I have reinstalled android studio and did the kill-server and start-server but still I have the same problem?

    ReplyDelete

You can leave a comment here using your Google account, OpenID or as an anonymous user.

Popular Posts