JAVA
adb command not found
ndlessrain
2013. 8. 2. 17:05
Work at Stack Exchange
- 20+ days vacation
- Insanely great workstations, chairs, and desks
- Yearly stipend for conferences

|
While implementing the BluetoothChat application .apk inside G1 device, it always pops up a message: $adb install -r /home/parveen/workspace/BluetoothChat/bin/BluetoothChat.apk
-bash: adb: command not found
I am not getting clearly why this error is popping up every time. Please help me.
Thanks in advance. Praween
|
|
asked Mar 25 '10 at 16:42
| |
|
|
|
I found the solution to my problem. In my ~/.bashrc:
export PATH=$PATH{}:/path/to/android-sdk/tools
However adb is not located in the tools/, rather in platform-tools/. So I added the following
export PATH=$PATH{}:/path/to/android-sdk/tools:/path/to/android/platform-tools
And that solved the problem for me.
|
answered Dec 13 '10 at 21:16
| |
|
|
Work at Stack Exchange
- 20+ days vacation
- Insanely great workstations, chairs, and desks
- Yearly stipend for conferences

|
Updating the path as listed above in ~/.bashrc makes other bash commands stop working all together. the easiest way I found is to use what eaykin did but link it your /bin. [sudo] ln -s /android/platform-tools/adb /bin/adb
No restart required jsut type adb devices
To make sure it's working.
|
|
answered Mar 27 '12 at 16:51
| |
|
|
|
I had the same issue on my fresh Ubuntu 64 bit installation, and the path was set up correctly.
Thus, which adb would resolve correctly, but trying to run it would fail with adb: command not found .
The very helpful guys at #android-dev pointed me to the solution, namely that the 32 bit libraries hadn't been installed. On my previous computers, this had probably been pulled in as a dependency for another package.
On Ubuntu (probably other Debians as well), running [sudo] apt-get install ia32-libs
|
answered Sep 24 '10 at 7:24
| |
|
|
|
You need to add $ANDROID_SDK/tools to your PATH , where $ANDROID_SDK is wherever you installed the Android SDK.
|
answered Mar 25 '10 at 17:19
| |
|
|
|
adb is in android-sdks/tools directory. You simply type this command: adb logcat .
If you want to your stack traces in a text file use this command: adb logcat > trace.txt. Now your traces are copied into that file.
If it is not working then go to android-sdks/platform-tools then put this command: ./adb logcat > trace.txt. Hope it will helps to you.
|
|
answered Nov 9 '12 at 9:26
| |
|
|
|
I have just resolved the problem myself on mint(ubuntu). It seems that adb is a 32 bit executable at least according to readelf -h. for the program to work in 64-bit ubuntu or whatever installation, we must have 32-bit libraries inplace.
solved the problem with sudo apt-get install ia32-libs
I hope this is helpful. One more thing that may be of importance is oracle java 6 installed , but i am not sure this is necessary to resolve the problem.
|
answered Nov 16 '12 at 15:53
| |
|
|
|
The way I fix this problem is:
- create a link from adb file(drag 'adb' with holding alt then drop to any directory and select 'link here')
- use
#sudo cp adb /bin (copy link from 1 to /bin)
I've done this several times and it works 100%(tested on Ubuntu 12.04 32/64bit).
|
|
answered Aug 21 '12 at 9:05
| |
|
|
|
NOTE: while using adb on Linux you'll need to type ./adb to execute adb commands unless you create a path in ~/.bashrc. In a terminal write:
sudo gedit ~/.bashrc
Add the following line at the end of the file. Once you're done, save and exit.
Android tools
export PATH=~/Development/adt-bundle-linux/sdk/platform-tools:~/Development/adt-bundle-linux/sdk/tools:$PATH
Then in a Terminal run this command to reload your .bashrc: Code:
source ~/.bashrc
Now you can just run adb without put ./ before every command.
|
|
|
|
updating the $PATH did not work for me, therefore I added a symbolic link to adb to make it work, as follows: ln -s <android-sdk-folder>/platform-tools/adb <android-sdk-folder>/tools/adb
|
|
answered Mar 12 '11 at 22:20
| |
|
|
|
I had this problem when I was trying to connect my phone and trying to use adb. I did the following
-
export PATH=$PATH{}:/path/to/android-sdk/tools:/path/to/android/platform-tools
-
apt-get install ia32-libs
-
Connected my phone in USB debug mode and In the terminal type lsusb to get a list of all usb devices. Noted the 9 character (xxxx:xxxx) ID to the left of my phone.
-
sudo gedit /etc/udev/rules.d/99-android.rules
-
Add [ SUBSYSTEM=="usb", ATTRS{idVendor}=="####:####", SYMLINK+="android_adb", MODE="0666" GROUP="plugdev" TEST=="/var/run/ConsoleKit/database", \ RUN+="udev-acl --action=$env{action} --device=$env{DEVNAME}" ] (whatever is in [...] )to the file and replace "####:####" with the number from step 3cop
-
sudo service udev restart
-
Restarted my System
-
open terminal browse to adb directory and run ./adb devices
And it shows my phone hence adb starts working without error.
I hope it helps others
|
answered Feb 27 '12 at 18:36
| |
|
|
|
I have same problem as you. finally as i know, in linux & mac OS, we use ./adb instead of adb
|
answered Sep 19 '12 at 8:08
| |
|
|
출처 : http://stackoverflow.com/questions/2517493/adb-command-not-found-in-linux-environment