Benjamin-Dobell / Heimdall

Heimdall is a cross-platform open-source tool suite used to flash firmware (aka ROMs) onto Samsung Galaxy devices.
MIT License
2.62k stars 587 forks source link

Device accessible as root but not as user #530

Open kikinovak opened 1 year ago

kikinovak commented 1 year ago

Hi,

I have a Samsung SM-A520F phone. I just installed Heimdall from source on a laptop running Rocky Linux 8. Build went OK, and I have now two resulting binaries in /usr/local/bin. (On a side note: does sudo make install install other stuff besides these two binaries in /usr/local/bin?)

I wanted to test Heimdall using heimdall print-pit, but here's what I got:

Initialising connection...
Detecting device...
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/002/009: Permission denied
libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes.
ERROR: Failed to access device. libusb error: -3

This looked like a permissions problem to me, so I tried it again as root, and it worked perfectly.

Now what can I do to access my device as a normal user without root privileges ? Please assume in your explanations that I'm just an average user, not a smartphone developer. I took a peek in the various README information that comes with the source, but found nothing relevant.

Cheers,

Niki

kikinovak commented 1 year ago

I'll answer this myself, since I just found the answer (I think) after some more googling. The source directory contains a 60-heimdall.rules file. Copying this file over to /etc/udev/rules.d seems to have done the trick. Correct me if I'm wrong.