The most pragmatic way to fix this would be to run adb
tools with root access. You are getting a no permissions error, because you need super user privileges to interact with attached devices.
To improve the answer, and alleviate superfluous security concerns, you can also run adb
without root by adding a udev rule for your device. Instructions here.
First, query lsusb
:
$ lsusb
Bus 002 Device 103: ID 04e8:6860 Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II]
Then create a new rules file and add the rule to it (/lib/udev/rules.d/10-adb.rules
):
# ADB
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", MODE="0600", OWNER="username"
Then restart udev, or reboot your computer (recommended).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…