2

Trying to use adb tool 1.0.29 on a PC running Linux Ubuntu 20.04 to debug my Motorola Moto G7 Plus running stock Android 10 (hence not rooted) connected via USB. Previously it was working OK, I've granted USB Debugging permissions to my PC. But today adb devices shows it as an offline device, so I can't do anything.

Here's a list of actions I tried:

  • Revoke USB Debugging Authorization - it doesn't work, nothing happens, Android doesn't prompt for new permissions
  • Delete /data/misc/adb/adb_keys on the phone - Can't, no root, adb root and adb shell return error: device offline
  • Rebooting, disabling USB Debugging and Developer Options and disconnecting in any order didn't help
  • adb kill-server and adb start-server didn't do the trick as well

What else could you recommend?

6
  • Was it working with that Linux version before? Because often we have here problems with Linux t!hat require to set specific permissions on Linux side so that ADB can access USB. Please search this site for details.
    – Robert
    Sep 16, 2020 at 20:57
  • @Robert thank you for reply. Yes, it was actually working. At least partially. Device was active (not "offline"), and I was able to do some operations. I've not tested evereything though.
    – VELFR
    Sep 17, 2020 at 4:27
  • Are you sure the relevant adb key is located in /data/misc/adb/adb_keys? From what I know I would have expected it to be located in the user directory, precise in ~/.android/adbkey and ~/.android/adbkey.pub.
    – Robert
    Sep 17, 2020 at 6:59
  • @Robert Not sure. But in any File management app there's no ~/.android folder. Internal storage does only contain visible folders, and Show hidden folders is enabled. When I create a folder like .this, it registers as hidden and is visible when hidden files are.
    – VELFR
    Sep 17, 2020 at 15:04
  • I was talking about your Linux system there you can find the path ~/.android/.
    – Robert
    Sep 17, 2020 at 15:13

1 Answer 1

1

Solved by:

  1. Deleting adbkey and adbkey.pub files from ~/.android/ directory on my Linux PC.
  2. Using newer Android Debug Bridge (in my case, it's current 1.0.41/30.0.4 from here).

Also thanks to Robert for helpful comments.


Update 2020-12-29

Another solution could be in using ADB over Wi-Fi

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .