1

I am new to Linux and am attempting to set up my machine for Android development. I installed the SDK, and I set up the path to the "platform-tools" in my path by altering ~/.bashrc and adding the following:

export PATH=$PATH:/home/user/sdk/platform-tools

When I type:

echo $PATH 

into the command line, it spits back the directory to my sdk platform-tools.

Now, when I type:

adb devices

The command line says "adb command not found".

If anyone could help me out, it would be greatly appreciated. Thanks!

~Nemisis7654

ariets
  • 4,218
  • 4
  • 28
  • 34

4 Answers4

5

The solution that worked for me was found here (Ubuntu 11.10 x64)

http://kenno.wordpress.com/2011/10/27/ubuntu-11-10-32-bit-applications-do-not-run-64-bit/

and basically even though I had the tools installed I just needed to do a reinstall of the libc6-i386 and it finally found adb.

Mike
  • 1,297
  • 2
  • 14
  • 22
  • Might be good to note that this resolves the 'adb: file or directory not found' error and not the exact error in the initial question. Regardless, this was exactly what I was looking for. – IanBussieres Aug 18 '13 at 03:30
  • That link was close - I no longer get file not found but now it wants libstdc++.so.6. – JavaCoderEx Jun 04 '14 at 17:39
3

Looks like you got the first step down, now you just need to add the udev values for your particular device. See step 3 here. If you are using an emulator rather than a device adb should work fine without this step with what you have. You have mentioned what you have done but not what the problem is so I assume this is the issue you are having. What happens when you type adb into the terminal?

Nathan Schwermann
  • 31,285
  • 16
  • 80
  • 91
3

With the latest android SDK, adb should be under platform-tools. Just put export ANDROID=/usr/local/android/android-sdk-linux_x86 export PATH=${PATH}:${ANDROID}/tools:${ANDROID}/platform-tools and check the file permissions (for android or other binaries too).

Renaud
  • 8,783
  • 4
  • 32
  • 40
2

In older versions of the sdk, adb was located in the /sdk/tools directory. You may need to create a symbolic link from platform-tools into that directory for adb:

ln -s /home/user/sdk/platform-tools/adb /home/user/sdk/tools/adb
Igor
  • 33,276
  • 14
  • 79
  • 112