On MacOS/Linux, define the path to wherever you installed your SDK as ANDROID_HOME
:
MacOS
$ export ANDROID_HOME=/Applications/android-sdk-macosx
If you installed Android Studio, the value will need to be
export ANDROID_HOME=$HOME/Library/Android/sdk
Linux
$ export ANDROID_HOME=~/android-sdk-linux
Then add the paths to the platform-tools
and tools
sub-directories (Same on MacOS/Linux).
export PATH=$ANDROID_HOME/tools:$PATH export PATH=$ANDROID_HOME/platform-tools:$PATH
You should now be able to run android
from the shell.
If none of the suggested ANDROID_HOME paths above are valid, you can find the (uniquely and consistently named) platform-tools folder via:
find / -name platform-tools 2>/dev/null
Whatever path that returns will need to be trimmed down to end with either sdk
, android-sdk-linux
, or android-sdk-macosx
.
Related Posts:
- How to install Android SDK on Ubuntu?
- Chmod 777 to a folder and all contents [duplicate]
- Cannot connect to the Docker daemon at unix:/var/run/docker.sock. Is the docker daemon running?
- Amazon Linux: apt-get: command not found
- How do I find all files containing specific text on Linux?
- “Couldn’t find a file descriptor referring to the console” on Ubuntu bash on Windows
- Where can I find php.ini?
- gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now
- How can I recursively find all files in current and subfolders based on wildcard matching?
- How to install grub after installing Windows 10
- Linux: ‘Username’ is not in the sudoers file. This incident will be reported
- “E: Unable to locate package python-pip” on Ubuntu 18.04 [duplicate]
- How can I exclude directories from grep -R?
- How to exclude a directory in find . command
- mysql_config not found when installing mysqldb python interface
- Linux error while loading shared libraries: cannot open shared object file: No such file or directory
- Shell command to tar directory excluding certain files/folders
- QEMU: /bin/sh: can’t access tty; job control turned off
- Explaining the ‘find -mtime’ command
- Meaning of exit status 1 returned by linux command
- Creating a new directory in C
- Extract file basename without path and extension in bash
- How to change permissions for a folder and its subfolders/files in one step
- mv: cannot stat error : No such file or directory error
- mysql_config not found when installing mysqldb python interface
- Linux error while loading shared libraries: cannot open shared object file: No such file or directory
- Pseudo-terminal will not be allocated because stdin is not a terminal
- linux command to get size of files and directories present in a particular folder?
- screen Cannot open your terminal ‘/dev/pts/0’ – please check
- ./configure : /bin/sh^M : bad interpreter
- TCP congestion control version: HTCP module vs highspeed module in linux kernel
- How to use regex with find command?
- What is the difference between /etc/rc.local and ~/.bashrc?
- Snort Message – WARNING: No preprocessors configured for policy 0
- Compile the Fortran program in Windows using gfortran
- How can I set the ‘backend’ in matplotlib in Python?
- Yum fails with – There are no enabled repos.
- Unable to establish SSL connection upon wget on Ubuntu 14.04 LTS
- How can I get the android-support-v4.jar file (from Android Support Library) on Linux?
- Getting stty: standard input: Inappropriate ioctl for device when using scp through an ssh tunnel
- configure: error: cannot run C compiled programs
- tar: add all files and directories in current directory INCLUDING .svn and so on
- What does set -e mean in a bash script?
- What does set -e mean in a bash script?
- How to make rpm auto install dependencies
- How do I install chkconfig on Ubuntu?
- “find: paths must precede expression:” How do I specify a recursive search that also finds files in the current directory?
- Apache server keeps crashing, “caught SIGTERM, shutting down”
- List all mounts in Linux
- How to use sed to extract substring
- Wait for user input in C?
- Difference between exec, execvp, execl, execv?
- Restarting cron after changing crontab file?
- tar: Error is not recoverable: exiting now
- cd into directory without having permission
- python-dev installation error: ImportError: No module named apt_pkg
- How to enable Bash in Windows 10 developer preview?
- How to use dos2unix?
- EC2 ssh Permission denied (publickey,gssapi-keyex,gssapi-with-mic)
- What does ‘bash -c’ do?
- How do I know the script file name in a Bash script?
- WordPress can’t find temporary folder, but folder it’s looking at has correct permissions
- WordPress cloning issue
- Anyone else experiencing high rates of Linux server crashes during a leap second day?
- What permissions should my website files/folders have on a Linux webserver?
- Why is my crontab not working, and how can I troubleshoot it?
- Can I automatically add a new host to known_hosts?
- Can I nohup/screen an already-started process?
- Why is “chmod -R 777 /” destructive?
- How can I run Debian stable but install some packages from testing?
- Environment variables of a running process on Unix?
- In my /etc/hosts/ file on Linux/OSX, how do I do a wildcard subdomain?
- How to check if a library is installed?
- Shell command to monitor changes in a file
- Meaning of the buffers/cache line in the output of free
- Is it normal to get hundreds of break-in attempts per day?
- How to cd into a directory with this name “-2” (starting with the hyphen)?
- how to disable SSH login with password for some users?
- Difference in sites-available vs sites-enabled vs conf.d directories (Nginx)?
- Is it possible to detach a process from its terminal? (Or, “I should have used screen!”) [duplicate]
- Disk full, du tells different. How to further investigate?
- Filename length limits on linux?
- best way to clear all iptables rules
- How can I port forward with iptables?
- Why do we use a OS Base Image with Docker if containers have no Guest OS?
- How can I rename a Unix user?
- How to re-order windows, change the scroll shortcut, and modify the status bar contents in GNU Screen?
- How to make Windows 7 USB flash install media from Linux?
- How to install/change locale on Debian?
- What limits the maximum number of connections on a Linux server?
- How to prevent a user from login in, but allow “su – user” in Linux?
- I have a keypair. How do I determine the key length?
- How to do the port forwarding from one ip to another ip in same network?
- Why drop caches in Linux?
- Linux – Is there a way to prevent/protect a file from being deleted even by root?
- swap partition vs file for performance?
- Best way to disable swap in Linux
- How to remove invalid characters from filenames?
- How can I zip/compress a symlink?
- How to find the physical volume(s) that hold a logical volume in LVM