Android Studio adb on Ubuntu

Viewed 2821

I try to connect the device from USB to Wifi but the command prompt tells me all the time that adb is not found.

But it is definitly inside my folder: "~/Android/Sdk/platform-tools" it contain:

adb          e2fsdroid  hprof-conv  mke2fs       package.xml        sqlite3
api          etc1tool   lib64       mke2fs.conf  sload_f2fs         systrace
dmtracedump  fastboot   make_f2fs   NOTICE.txt   source.properties

I start with

adb tcpip 5555

Here I get the error message. What I do wrong here?

1 Answers

Your shell doesn't know where to look when you call adb that's why you need to specify it.

First check which shell you're using by calling echo $SHELL - the usual ones on Linux are bash and zsh. For Bash the config file is in ~/.bash_profile, for zsh it's in ~/.zshrc.

Depending on what shell you're using open that file and add this line into it:

export PATH=${PATH}:$HOME/Android/Sdk/platform-tools/

And restart the shell.

Then you can check that you the adb location is recognized with:

adb --version
Related