• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

ADB not working [Ubuntu]

nkk

Android Expert
Mar 10, 2010
758
565
Ok, so here is my terminal...this should show what is wrong better than I can explain it:

Code:
myName@myName-desktop:~$ adb kill-server
myName@myName-desktop:~$ adb start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
myName@myName-desktop:~$ sudo adb kill-server
sudo: adb: command not found
myName@myName-desktop:~$ sudo adb start-server
sudo: adb: command not found

I have the following line in my ~/.bashrc
Code:
export PATH=${PATH}:/home/myName/AndroidSDK/platform-tools:/home/myName/AndroidSDK/tools

So...why is sudo adb not working when adb does? The proper directories are in my $PATH...right? I did that correctly, right?

Thanks,
Nkk

EDIT: I need adb to work as root because if it does not, this happens:

Code:
myName@myName-desktop:~$ adb devices
List of devices attached 
????????????	no permissions
 
I was never able to use adb as a non root user in ubuntu, more than likely a permission issue and i never bothered to fix it as i just ran things as root as needed instead of using sudo. You could copy adb to /bin/ or /usr/bin/ and that may eliminate the need for the ~/.bashrc entry. That's what i did when i ran ubuntu but ive moved to a diff distro now.

EDIT:

I decided to run adb devices as a non root user to see if it works and it does. So that leads me to believe its an permissions issue. On my Arch Linux install i had to add my user to an adbusers group to use it aswell so maybe that's ubuntu's issue? I'm not 100% sure.
 
  • Like
Reactions: nkk
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones