# [Solved] Android adb works with root, but not regular user

## solamour

I have the following setup.

```
# cat /etc/udev/rules.d/51-android.rules 

SUBSYSTEM=="usb", SYSFS{idVendor}=="1004", MODE="0666"

```

When I try adb command with the root user, everything works perfectly.

```
# adb devices

List of devices attached

* daemon not running. starting it now on port 5037 *

* daemon started successfully *

LGLS676efd4ee0f device

```

At this point, the adb daemon is running, so even regular users can use the adb command as well.

But if I start with a regular user, I can't proceed any further due to lack of permissions.

```
$ adb devices

List of devices attached

* daemon not running. starting it now on port 5037 *

* daemon started successfully *

LGLS676efd4ee0f no permissions

$ adb shell

error: insufficient permissions for device

```

I tried adding GROUP="plugdev" in "51-android.rules" and add "plugdev" group the regular user, but that didn't help either. I'd appreciate any help or suggestions.

__

solLast edited by solamour on Thu Feb 01, 2018 8:05 pm; edited 1 time in total

----------

## pjp

android group?

----------

## solamour

 *pjp wrote:*   

> android group?

 

Agreed. Looks like most Android people use Ubuntu, and although I don't believe it's gentoo specific, I threw in the question here simply because gentoo folks are the most knowledgeable bunch. Feel free to remove the post if it's irrelevant.

__

sol

----------

## pjp

I meant add the user to the android group.

I have the android group on one of my systems, and the only reason I can imagine it is there is due to having android-studio installed. 

```
$ adb devices

List of devices attached

* daemon not running. starting it now on port 5037 *

* daemon started successfully *

$ groups |grep -c android

1
```

----------

## fedeliallalinea

 *pjp wrote:*   

> I have the android group on one of my systems, and the only reason I can imagine it is there is due to having android-studio installed.

 

android group is created by dev-util/android-sdk-update-manager package

----------

## solamour

I'm not entirely sure what fixed it, but as others pointed out, I suspect it was the group issue. Here is what I did.

```
/etc/udev/rules.d/51-android.rules

SUBSYSTEM=="usb", ATTR{idVendor}=="1004", GROUP="plugdev"

usermod -a -G plugdev REGULAR_USER'S_ID

udevadm trigger

Log out and log in again from the regular user, just for the good measure.

```

Curiously, one of my other machines that I recently setup doesn't have "plugdev" group, so being a lazy bum that I am, I just used "wheel" and that worked out OK as well. I also don't have "android" group either, most likely because I just downloaded the Android SDK from Google, not from Portage.

Thank you everyone for taking time to share your thoughts.

__

sol

----------

