This question already has an answer here:
I just got a brand new Ubuntu machine and I am trying to setup Android SDK. I am pretty new to Unix so pardon me if I did a silly mistake.
I followed the instructions given here, all the way up to adding the 'Rule' file. Now if I try adb devices
in the terminal, it gives me 'No command 'adb' found' error and asks if I made a spelling mistake.
@USER:~/android-sdk-linux/platform-tools$ ls
NOTICE.txt adb api fastboot source.properties systrace
@USER:~/android-sdk-linux/platform-tools$ adb devices
No command 'adb' found, did you mean:
Command 'cdb' from package 'tinycdb' (main)
Command 'gdb' from package 'gdb' (main)
Command 'dab' from package 'bsdgames' (universe)
Command 'zdb' from package 'zfs-fuse' (universe)
Command 'kdb' from package 'elektra-bin' (universe)
Command 'tdb' from package 'tads2-dev' (multiverse)
Command 'pdb' from package 'python' (main)
Command 'jdb' from package 'openjdk-6-jdk' (main)
Command 'jdb' from package 'openjdk-7-jdk' (universe)
Command 'ab' from package 'apache2-utils' (main)
Command 'ad' from package 'netatalk' (universe)
adb: command not found
I searched through a couple of questions on StackOverflow and some suggest I use apt-get install ia32-libs
command to get some 32-bit libraries. However, I am on a 64-bit machine so not sure whether I should go for that or not.
Another strange issue I noticed is, even if I navigate to the platform-tools
folder and execute adb devices
command, I get the same error. So, I might be missing something else here rather than incorrectly setting the PATH entry.
I tried both the ADB BUNDLE (.zip file) and SDK tools (.tgz file) from the download page and completed all the steps mentioned above but got same error.
I am on Ubuntu 12.04 LTS.
You are in the right directory but the current directory is not in your shell's command search path.
Try
Also search Google for how to set $PATH variable in bash
Type the following into your terminal (from your help.ubuntu.com URL) - it will temporarily add the android tool directories into your PATH for that shell/terminal
You should now be able to run adb (without being in the right dir and without using ./adb)
If you add those commands into your .bashrc and start a new terminal/shell you should find those changes are now permanent.
I'm not sure what this line did and why I had to do that ('cuz the blogs say its some 32-bit libraries and I am on a 64-bit machine). But it seems to be working for me.
When I executed this command, it installed/added some stuff for about 5 minutes (literally) and then everything worked.
Regards, Rumit
(My system is ubuntu 16.10)
This will make the android studio to find the adb-->
1) Open with gedit: (ref:https://askubuntu.com/questions/127056/where-is-bashrc)
gedit ~/.bashrc
2) Add this line to the bottom of your.bashrc and it works.
export PATH=$PATH:$HOME"/android-sdk-linux/platform-tools" (ref: https://askubuntu.com/questions/652936/adding-android-sdk-platform-tools-to-path-downloaded-from-umake)
Restart the android studio
Make sure you installed:
Now check:
It will show adb help.
Now please kill/start adb. Use the following commands:
Lastly, do:
This should work.
In platform-tools folder "adb" is available then 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!