The answer is actually quite simple: fastboot needs the permission to access the fairphone device.
Using sudo will work in most cases because root has all permissions by default. But you can also use your normal user account, if it has permissions to access the device.
On many (but not all) Linux distributions this is done via udev using the “plugdev” user group.
To see whether your normal user is in the “plugdev” group, type:
groups
and check if the output list contains “plugdev”. If not, you need to add user user to the groups as described above (“adduser plugdev”).
To see whether your normal user can access the fairphone device, you should first identify which USB device is used by the phone:
lsusb
That gives a list of all attached USB devices. Example:
~$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 006: ID 2ae5:f003
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[…]
With the extra knowledge that Fairphone has the USB vendor ID “2ae5”, I found my Fairphone as device 006 on USB bus 002.
Now simply check the permissions of the device in the fliesystem with:
ls -l
In my case:
~$ ls -l /dev/bus/usb/002/006
crw-rw----+ 1 root plugdev 189, 133 Sep 30 18:13 /dev/bus/usb/002/006
The output tells me that the device is owned by user “root” with "r"ead and "w"rite permissions and by group “plugdev” also with “r"ead and “w"rite permissions. Other users have no access (”-”). So root and all users in the “plugdev” groups should be able to access the device.
That did not work out of the box on my system, but I had to add a udev rule as already described above.
As root user, I created the file
/etc/udev/rules.d/adb.rules
with the following content:
ACTION==“add”, SUBSYSTEM==“usb”, ATTRS{idVendor}==“2ae5”, MODE:=“0660”, GROUP:=“plugdev”
Because the file needs to be created and edited as root user, a text mode editor like nano or vim may be simpler to use with sudo.