• 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
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
How ironic...you could not get it to work without root, and mine does not work with root. I will try the /usr/bin solution to see if it works.


Thanks,
Nkk
 
Type in lsusb and see if your OS can detect the phone in the USB daemon.

Also, make sure you have USB debugging enabled. Otherwise the phone will only tell the computer it is a mass-storage device.
 
Back
Top Bottom