3

At the moment I'm busy with the Android SDK. I got it working, but when I entered $sudo adb shell. It gave sudo: adb: command not found. For this problem I checked this link: adb devices command not working But if I enter $sudo adb devices now. Noting happens.

Not even *daemon not running. starting it now op port 5037 * and the rest. But it looks like this:

    michiel@ubuntu: ~$ sudo adb devices
    michiel@ubuntu: ~$

So I can enter the next command. Someone knows how to fix that? It's the same with $sudo adb shell. Nothings comes up.

When I enter adb devices without the sudo. I get the error:

-bash: /usr/local/sbin/adb: No such file or directory. 

But it's there!

echo $PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/michiel/jdk1.6.0_29/bin:home/michiel/android-sdk-linux/tools:/home/michiel/android-sdk-linux/platform-tools

Edit

When I start Eclipse now, I get the next error: Failed to get the adb version: Cannot run program"/home/michiel/android-sdk-linux/platform-tools/adb":java.io.IOException:error=2, No such file or directory.

SOLVED

Last weekend I installed a clean install of Ubuntu. I downloaded the ia32.lib and openjdk instead of java jdk and install is manually. After some struggling I managed to connect the device and now I can see it. Thx for the help :)

4
  • @Vivek Kalkur How do you mean it's there? You mean its in the PATH. I know, but I dont get *deamon not running. starting now on port 5037 * sudo adb devices just does NOTHING!
    – Michielodc
    Commented Nov 25, 2011 at 9:38
  • I just edited your question without altering the theme of it. Commented Nov 25, 2011 at 9:42
  • @Vivek Kalkur Thank you for the edit :)
    – Michielodc
    Commented Nov 25, 2011 at 9:45
  • @Michielodc I am already using openjdk, and facing the problem. Commented Feb 11, 2012 at 4:07

5 Answers 5

13

I also had this problem two days ago and I searched and searched so I found that my ubuntu is 64-bit and adb is not match to ubuntu 64-bit so I used the below command in terminal:

sudo apt-get update
sudo apt-get install ia32-libs

and my problem was solved don't forget, you should export your java-version-sdk.

4

Try adding the following at the end of your .bashrc file (can found in your home directory):

export PATH=:/home/michiel/android-sdk-linux/platform-tools:$PATH 

Now use the adb command without sudo. This solved the problem for me.

HTH!

4
  • Now it says after adb devices: -bash: /home/michiel/android-sdk-linux/platform-tools/adb: No such file or directory.
    – Michielodc
    Commented Nov 25, 2011 at 9:42
  • is the path to your android sdk correct? :P Did you also check if you're using the correct binary? 32-bit or 64-bit?
    – c05mic
    Commented Nov 25, 2011 at 9:57
  • the PATH I entered is the one you posted. Even tried it twice now.
    – Michielodc
    Commented Nov 25, 2011 at 10:00
  • i merely copied the path to your sdk from your question. check if it does exist. sometimes the solution may be as trivial as that.
    – c05mic
    Commented Nov 25, 2011 at 10:14
1

try to kill & start the adb server cmd

adb kill-server

adb start-server

3
  • I tried that before. But now it says -bash: /home/michiel/android-sdk-linux/platform-tools/adb: No such file or directory. But I tried that before, even reboot.
    – Michielodc
    Commented Nov 25, 2011 at 9:44
  • 1
    have you did apt-get install ia32-libs apt-get install sun-java6-jdk Commented Nov 25, 2011 at 9:58
  • I do not have ia32-libs yet, but as far I know you do not need it. But I'll download it when I'm home. Im behind some nasty proxy here.
    – Michielodc
    Commented Nov 25, 2011 at 10:13
0

I think you are running on the linux platform so for that running binary will be followed by .

try with sudo .adb devices
    or try with sudo .adb shell
3
  • navigate to the android sdk where you find the adb binary file and try , so we can check whether that is proper or not. Commented Nov 25, 2011 at 9:44
  • I entered cd /home/michiel/android-sdk-linux/platform-tools and after that I entered ./adb It said -bash: ./adb: No such file or directory. Im a beginner with this. So I probably did it wrong.
    – Michielodc
    Commented Nov 25, 2011 at 9:51
  • 1
    please go to this link stackoverflow.com/questions/2517493/… Commented Nov 25, 2011 at 9:54
-1

Check adb is available in your android sdk --> platform-tools. If it available Follow these steps:

Set android vars

Initially go to your home and press Ctrl + H it will show you hidden files now look for .bashrc file, open it with any text editor then place the lines below at the end of file:

export ANDROID_HOME=/myPathSdk/android-sdk-linux export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

Now Reboot the system

It Works!

Not the answer you're looking for? Browse other questions tagged or ask your own question.