Pairing Device
Follow How to connect your Android device (additional info here)
After that, on my device, I did:
-
Install
adb
$ sudo apt update $ sudo apt install android-tools-adb android-tools-fastboot $ adb version Android Debug Bridge version 1.0.41 Version 34.0.4-debian Installed as /usr/lib/android-sdk/platform-tools/adb Running on Linux 6.14.0-36-generic (x86_64)
-
Enable USB debugging on the device
-
When plugged in, set Charging this device via USB notificatio to File Transfer (MTP)
-
Got my device ID
$ lsusb ... Bus 001 Device 029: ID 18d1:4ee2 Google Inc. Nexus/Pixel Device (MTP + debug) ...
-
Created the
sudo nano /etc/udev/rules.d/51-android.ruleswith:
$ cat /etc/udev/rules.d/51-android.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1:4ee2", MODE="0666", GROUP="plugdev"
|
Note
|
The device ID has to match what lsusb gave.
|
-
Executed:
$ sudo udevadm control --reload-rules $ sudo service udev restart $ sudo chmod a+r /etc/udev/rules.d/51-android.rules
-
Then restarted
adb:
$ adb kill-server $ adb start-server $ adb devices List of devices attached 42050DLJG000FK offline emulator-5554 device