1

Problem

On fresh system reboot, I can see the ADB device. But if I reboot the device, it does not show up any more. At this point, I can get it back to working by either 1) rebooting the system (which is undesirable because this is a multi-user server) or 2) toggling USB debugging setting off and on and disconnecting/reconnecting device from server (this sometimes works after 1 try, or sometimes takes multiple tries).

user@server:~$ adb devices
List of devices attached
0000001234567890        device

user@server:~$ adb reboot
user@server:~$ adb devices
List of devices attached

user@server:~$

But I can see the device is attached to the device when doing lsusb

user@server:~$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
[...]
Bus 001 Device 003: ID 04e8:6860 Samsung Electronics Co., Ltd Galaxy series, misc. (MTP mode)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Here is my ADB version:

user@server:~$ adb --version
Android Debug Bridge version 1.0.41
Version 30.0.4-6686687
Installed as /usr/lib/android-sdk/platform-tools/adb

Ubuntu version:

user@server:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.1 LTS
Release:        20.04
Codename:       focal

Solutions I have tried

  1. Add to /etc/udev/rules.d/51-android.rules
[...]
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", MODE="0666", GROUP="plugdev", SYMLINK+="android%n"
  1. Add to /etc/udev/rules.d/99-android.rules
# do not forget to run 'sudo udevadm control --reload-rules' after editing this file

ACTION!="add", GOTO="android_usb_rules_end"
SUBSYSTEM!="usb", GOTO="android_usb_rules_end"
ENV{DEVTYPE}!="usb_device", GOTO="android_usb_rules_end"

ENV{ID_SERIAL_SHORT}=="",                 GOTO="android_empty_serial"
ENV{ID_SERIAL_SHORT}=="0000:*",           GOTO="android_empty_serial"
ENV{ID_SERIAL_SHORT}=="0123456789ABCDEF", GOTO="android_empty_serial"

ENV{ID_USB_INTERFACES}=="*ff4201*", SYMLINK+="adb/$env{ID_SERIAL_SHORT}",      TAG+="android"
ENV{ID_USB_INTERFACES}=="*ff4203*", SYMLINK+="fastboot/$env{ID_SERIAL_SHORT}", TAG+="android"
GOTO="android_usb_rules_end"


LABEL="android_empty_serial"
ENV{ID_USB_INTERFACES}=="*ff4201*", SYMLINK+="adb/usb:%k",      TAG+="android"
ENV{ID_USB_INTERFACES}=="*ff4203*", SYMLINK+="fastboot/usb:%k", TAG+="android"

LABEL="android_usb_rules_end"

# use your preferred way to set device permissions here
TAG=="android", MODE="0666"

If you think the question is not appropriate for askubuntu, I would appreciate if you could guide me on where this question should be posted instead.

1
  • I have the same issue here Apr 12, 2021 at 18:25

0

You must log in to answer this question.

Browse other questions tagged .