Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

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

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
6 posts • Page 1 of 1
Author
Message
solamour
l33t
l33t
User avatar
Posts: 749
Joined: Tue Dec 21, 2004 11:29 pm
Location: San Diego, CA

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

  • Quote

Post by solamour » Wed Jan 31, 2018 5:59 pm

I have the following setup.

Code: Select all

# 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.

Code: Select all

# 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.

Code: Select all

$ 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.
__
sol
Last edited by solamour on Thu Feb 01, 2018 8:05 pm, edited 1 time in total.
Top
pjp
Administrator
Administrator
User avatar
Posts: 20668
Joined: Tue Apr 16, 2002 10:35 pm

  • Quote

Post by pjp » Wed Jan 31, 2018 6:32 pm

android group?
Quis separabit? Quo animo?
Top
solamour
l33t
l33t
User avatar
Posts: 749
Joined: Tue Dec 21, 2004 11:29 pm
Location: San Diego, CA

  • Quote

Post by solamour » Thu Feb 01, 2018 12:39 am

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
Top
pjp
Administrator
Administrator
User avatar
Posts: 20668
Joined: Tue Apr 16, 2002 10:35 pm

  • Quote

Post by pjp » Thu Feb 01, 2018 2:15 am

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.

Code: Select all

$ adb devices
List of devices attached
* daemon not running. starting it now on port 5037 *
* daemon started successfully *

$ groups |grep -c android
1
Quis separabit? Quo animo?
Top
fedeliallalinea
Administrator
Administrator
User avatar
Posts: 31985
Joined: Sat Mar 08, 2003 11:15 pm
Location: here
Contact:
Contact fedeliallalinea
Website

  • Quote

Post by fedeliallalinea » Thu Feb 01, 2018 7:11 am

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
Questions are guaranteed in life; Answers aren't.

"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968
Top
solamour
l33t
l33t
User avatar
Posts: 749
Joined: Tue Dec 21, 2004 11:29 pm
Location: San Diego, CA

  • Quote

Post by solamour » Thu Feb 01, 2018 8:05 pm

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.

Code: Select all

/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
Top
Post Reply

6 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic