Giter Site home page Giter Site logo

Need sudo on Fedora about android-udev-rules HOT 14 CLOSED

m0rf30 avatar m0rf30 commented on August 25, 2024
Need sudo on Fedora

from android-udev-rules.

Comments (14)

zamber avatar zamber commented on August 25, 2024

Try adding yourself to the plugdev group and retest.

from android-udev-rules.

DamienCassou avatar DamienCassou commented on August 25, 2024

from android-udev-rules.

zamber avatar zamber commented on August 25, 2024

plugdev that is (edited comment on GH but it was to late and the notification already went out).

from android-udev-rules.

DamienCassou avatar DamienCassou commented on August 25, 2024

from android-udev-rules.

zamber avatar zamber commented on August 25, 2024

Just googled it out. I don't have a Fedrora install to test (nor any friends that would use it).

Please run:

which adb
adb version
sudo udevadm monitor -e
# here plug in your phone

Paste in here in a code block or on a pastebin service you prefer.

from android-udev-rules.

DamienCassou avatar DamienCassou commented on August 25, 2024
12:35:47 [:~] 10s $ 
> which adb
/usr/bin/adb
13:39:18 [:~] $ 
> adb version
Android Debug Bridge version 1.0.35
Revision 3761365735de
13:39:22 [:~] $ 
> sudo udevadm monitor -e
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

KERNEL[12175.598302] add      /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.4/1-4.4.1 (usb)
ACTION=add
BUSNUM=001
DEVNAME=/dev/bus/usb/001/029
DEVNUM=029
DEVPATH=/devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.4/1-4.4.1
DEVTYPE=usb_device
MAJOR=189
MINOR=28
PRODUCT=5c6/6765/232
SEQNUM=3313
SUBSYSTEM=usb
TYPE=0/0/0

KERNEL[12175.599235] add      /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.4/1-4.4.1/1-4.4.1:1.0 (usb)
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.4/1-4.4.1/1-4.4.1:1.0
DEVTYPE=usb_interface
INTERFACE=255/255/0
MODALIAS=usb:v05C6p6765d0232dc00dsc00dp00icFFiscFFip00in00
PRODUCT=5c6/6765/232
SEQNUM=3314
SUBSYSTEM=usb
TYPE=0/0/0

KERNEL[12175.600121] add      /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.4/1-4.4.1/1-4.4.1:1.1 (usb)
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.4/1-4.4.1/1-4.4.1:1.1
DEVTYPE=usb_interface
INTERFACE=255/66/1
MODALIAS=usb:v05C6p6765d0232dc00dsc00dp00icFFisc42ip01in01
PRODUCT=5c6/6765/232
SEQNUM=3315
SUBSYSTEM=usb
TYPE=0/0/0

UDEV  [12175.667278] add      /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.4/1-4.4.1 (usb)
ACTION=add
BUSNUM=001
COLORD_DEVICE=1
COLORD_KIND=camera
DEVLINKS=/dev/libmtp-1-4.4.1
DEVNAME=/dev/bus/usb/001/029
DEVNUM=029
DEVPATH=/devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.4/1-4.4.1
DEVTYPE=usb_device
DRIVER=usb
GPHOTO2_DRIVER=proprietary
ID_BUS=usb
ID_FOR_SEAT=usb-pci-0000_00_14_0-usb-0_4_4_1
ID_GPHOTO2=1
ID_MEDIA_PLAYER=1
ID_MODEL=A0001
ID_MODEL_ENC=A0001
ID_MODEL_ID=6765
ID_MTP_DEVICE=1
ID_PATH=pci-0000:00:14.0-usb-0:4.4.1
ID_PATH_TAG=pci-0000_00_14_0-usb-0_4_4_1
ID_REVISION=0232
ID_SERIAL=OnePlus_A0001_5d5015ff
ID_SERIAL_SHORT=5d5015ff
ID_USB_INTERFACES=:ffff00:ff4201:
ID_VENDOR=OnePlus
ID_VENDOR_ENC=OnePlus
ID_VENDOR_FROM_DATABASE=Qualcomm, Inc.
ID_VENDOR_ID=05c6
MAJOR=189
MINOR=28
PRODUCT=5c6/6765/232
SEQNUM=3313
SUBSYSTEM=usb
TAGS=:uaccess:seat:
TYPE=0/0/0
USEC_INITIALIZED=12175622657

UDEV  [12175.671699] add      /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.4/1-4.4.1/1-4.4.1:1.0 (usb)
.MM_USBIFNUM=00
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.4/1-4.4.1/1-4.4.1:1.0
DEVTYPE=usb_interface
ID_VENDOR_FROM_DATABASE=Qualcomm, Inc.
INTERFACE=255/255/0
MODALIAS=usb:v05C6p6765d0232dc00dsc00dp00icFFiscFFip00in00
PRODUCT=5c6/6765/232
SEQNUM=3314
SUBSYSTEM=usb
TYPE=0/0/0
USEC_INITIALIZED=12175670995

UDEV  [12175.671803] add      /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.4/1-4.4.1/1-4.4.1:1.1 (usb)
.MM_USBIFNUM=01
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.4/1-4.4.1/1-4.4.1:1.1
DEVTYPE=usb_interface
ID_VENDOR_FROM_DATABASE=Qualcomm, Inc.
INTERFACE=255/66/1
MODALIAS=usb:v05C6p6765d0232dc00dsc00dp00icFFisc42ip01in01
PRODUCT=5c6/6765/232
SEQNUM=3315
SUBSYSTEM=usb
TYPE=0/0/0
USEC_INITIALIZED=12175671481

from android-udev-rules.

zamber avatar zamber commented on August 25, 2024

OK, I tried to replicate it with the OnePlus One we have at the office and failed. I'm pretty sure that either the rules file was not parsed by your udev and/or you'll have to add yourself to the plugdev group.

Note that on Fedora there's no default plugdev group and according to this thread they advise to make an androiddev group.

So to ensure that everything is in order we'll follow most of the advise in that thread using plugdev instead of androiddev (because plugdev is used in 51-android.rules):

sudo groupadd plugdev
sudo usermod -aG plugdev your_login_name

# refresh groups for this shell session - hacky hack - log out and in if it fails
exec su -l $USER

# reload rules and restart udev
sudo udevadm control --reload
sudo systemctl restart systemd-udevd.service

# test if it worked
adb devices

from android-udev-rules.

DamienCassou avatar DamienCassou commented on August 25, 2024

adb devices works, but fastboot devices still requires sudo.

> adb devices
List of devices attached
5d5015ff	device

> adb reboot bootloader

> fastboot devices
no permissions (verify udev rules); see [http://developer.android.com/tools/device.html]	fastboot

> sudo fastboot devices
5d5015ff	fastboot

> fastboot devices
no permissions (verify udev rules); see [http://developer.android.com/tools/device.html]	fastboot

from android-udev-rules.

rafael-caldeira avatar rafael-caldeira commented on August 25, 2024

I just had a similar issue. I found out that I had multiple versions of adb, and the version avaliable on PATH wasn't the right one. May be fastboot is calling a different adb

from android-udev-rules.

DamienCassou avatar DamienCassou commented on August 25, 2024

@RSFalcon7 Thanks for the suggestion. I don't think I'm in a similar situation because (1) I just reinstalled my whole system, (2) I installed adb/fastboot from the fedora package manager and from nowhere else, and (3) locate can't find anything else either.

from android-udev-rules.

zamber avatar zamber commented on August 25, 2024

from android-udev-rules.

jacksongoode avatar jacksongoode commented on August 25, 2024

Still having this issue on Fedora 34

from android-udev-rules.

likeadragonmaid avatar likeadragonmaid commented on August 25, 2024

Having same issue on Fedora 35/ Rawhide

from android-udev-rules.

JoesCat avatar JoesCat commented on August 25, 2024

Some differences to note:
With Debian derived distros - example....Ubuntu, Mint,.... use group "plugdev"

With Redhat aligned distros - example...Fedora,Centos,Mageia,SuSE, ...try use group "usb".
These distros didn't really catch onto using sudo either.
sudo is convenient, but it is also putting ease-of-use ahead of security.

Command 'which' can also help you find which version of adb you are actually using, example:
which adb

from android-udev-rules.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.