Adb command not found in linux environment

When implementing the BluetoothChat.apk application inside the G1 device, it always displays a message:

$adb install -r /home/parveen/workspace/BluetoothChat/bin/BluetoothChat.apk -bash: adb: command not found 

I do not understand why this error appears every time. Please help me.

Thanks in advance. Praween

+45
android adb
Mar 25
source share
19 answers

I found a solution to my problem. In my ~/.bashrc :

export PATH=${PATH}:/path/to/android-sdk/tools

However, adb is not in android-sdk/tools/ , but in android-sdk/platform-tools/ . So I added the following

export PATH=${PATH}:/path/to/android-sdk/tools:/path/to/android-sdk/platform-tools

And that solved the problem for me.

+77
Dec 13 '10 at 21:16
source share

Updating the path, as mentioned above in ~ / .bashrc, causes other bash commands to stop working together. the easiest way I've found is to use what eaykin did, but associate it with your / bin.

 [sudo] ln -s /android/platform-tools/adb /bin/adb 

No reboot is required, just enter the following command -

 adb devices 

To make sure this works.

+68
Mar 27 2018-12-12T00:
source share

I had the same problem on my new 64-bit Ubuntu installation, and the path was configured correctly.

Thus, which adb will resolve correctly, but trying to execute it with an error will be adb: command not found .

Very useful guys from # android-dev pointed me to a solution, namely that 32-bit libraries were not installed. On my previous computers, this was probably dragged into a dependency on another package.

On Ubuntu (possibly other Debians as well) by running [sudo] apt-get install ia32-libs

+16
Sep 24 '10 at 7:24
source share

NOTE. When using adb on Linux you will need to enter. / adb to execute adb commands unless you create a path in ~ / .bashrc. In the terminal write:

sudo gedit ~ / .bashrc

Add the following line to 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 Terminal run this command to reload your .bashrc: Code:

source ~ / .bashrc

Now you can simply run adb without put./ before each command.

+14
May 24 '13 at 10:53
source share

sudo apt install adb

adb is not installed on your computer.

Try it while working for me

+13
Aug 12 '16 at 9:18
source share

You need to add $ANDROID_SDK/platform-tools to your PATH , where $ANDROID_SDK is where you installed the Android SDK.

+6
Mar 25 '10 at 17:19
source share
 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 put the lines below at the end of the file:

 export ANDROID_HOME=/myPathSdk/android-sdk-linux export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools Now Reboot the system It Works! 
+6
Aug 21 '17 at 11:37 on
source share

I just solved the problem myself at the Mint (Ubuntu). Adb seems to be a 32 bit executable, at least according to readelf -h. for the program to work in 64-bit Ubuntu or any other installation, we must have 32-bit libraries.

solved the problem with

 sudo dpkg --add-architecture i386 sudo apt-get update sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 
+3
Nov 16 '12 at 15:53
source share

How do I fix this problem:

  • create a link from the adb file (drag "adb" with alt canvas, then go to any directory and select "link here")
  • use #sudo cp adb /bin (copy link from 1 to / bin)

I have done this several times and it works 100% (tested on Ubuntu 12.04 32 / 64bit).

+2
Aug 21 '12 at 9:05
source share

I have the same problem as you. finally, as I know, on Linux and Mac OS we use ./adb instead of adb

+2
19 sept. '12 at 8:08
source share

adb is located in the android-sdks / tools directory. You simply enter this command: adb logcat .

If you want your stack traces in a text file to use this command: adb logcat > trace.txt. Now your tracks are copied to this file.

If it does not work, go to android-sdks / platform-tools, then enter the following command: ./adb logcat > trace.txt. Hope this helps you.

+2
Nov 09 '12 at 9:26
source share

I had this problem when I tried to connect my phone and try 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

  • I connected my phone in USB debugging mode and in a terminal like lsusb to get a list of all USB devices. Marked 9 characters (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} "] (everything that is in [...]), and replace "####: ####" to the number from step 3cop

  • sudo service udev restart

  • Reboot my system

  • open terminal, go to adb directory and run ./adb devices

And it shows my phone, so adb starts to work without errors.

I hope this helps others

+1
Feb 27 '12 at 18:36
source share

Make sure you install sudo apt-get install android-tools-adb. Now check out sudo adb. It will show adb help

Now, please remove / run adb using the following commands -

sudo adb kill-server sudo adb start-server

Finally, sudo adb devices

Hope it works !!!

+1
Apr 10 '15 at 11:45
source share

In my case, "adb" is in "~ / Android / Sdk / platform-tools /"

The following command resolved the issue:

 export PATH=$PATH:~/Android/Sdk/platform-tools/ 
+1
Dec 17 '17 at 15:39
source share

On Ubuntu, I can run the following command:

  sudo apt install android-tools-adb 
+1
Dec 19 '17 at 15:45
source share

the $ PATH update did not work for me, so I added a symlink to adb so that it works like this:

 ln -s <android-sdk-folder>/platform-tools/adb <android-sdk-folder>/tools/adb 
0
Mar 12 '11 at 10:20
source share

I was getting this error too, and Ubuntu suggested I install it, so I installed * this, and it worked in my case.
* - sudo apt-get install android-tools-adb

Note: x64 architecture

0
Nov 07 '14 at 12:36
source share

creating a symbolic link was a solution for me. However, before work, I had to provide access rights and rights to created symbolic links.

I'm not sure if this was the answer of @eaykin or @crazymacleod, which worked for me, just like me, before finding the above solution.

Thank!

0
Dec 06 '14 at 2:26
source share

Ubuntu 18.04

This worked for me:

  1. Find and copy the path of the platform-tools, in my case it is '/home/daniel/Android/Sdk/platform-tools'
  2. Open bashrc nano ~/.bashrc
  3. Save the platform tools path export PATH="${PATH}:/home/daniel/Android/Sdk/platform-tools"
  4. Reset bash_profile source .bash_profile
  5. adb devices is working now
0
Aug 18 '19 at 16:55
source share



All Articles