Ubuntu – Cant open android sdk from terminal

16.04androidcommand line

I am trying yo open the sdk manager.
I downloaded the android sdk command line tools from the official website. I don't want to install android studio. After unzipping the package, i got a folder called tools. I put into a directory as
/home/ujjwal/Android/tools.
I opened the directory with the terminal and tried the command ./android i got the following error :

*************************************************************************
The "android" command is deprecated.
For manual SDK, AVD, and project management, please use Android Studio.
For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager
*************************************************************************
Invalid or unsupported command ""

Supported commands are:
android list target
android list avd
android list device
android create avd
android move avd
android delete avd
android list sdk
android update sdk

I even tried using the command android but it shows no command found.
echo $ANDROID_HOME returns :

/home/ujjwal/Android/tools

echo $PATH returns:

/home/ujjwal/bin:/home/ujjwal/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/ujjwal/Android/tools/tools

Also while i was working on another machine a while back, I remember that a small window used to open in which i could choose which tools and apk to install. Basically, I am trying to achieve that.

Best Answer

android command is deprecated as shown by the output.

Use

$ANDROID_HOME/tools/bin/sdkmanager <option>

 Usage:   
 sdkmanager [--uninstall] [<common args>] [--package_file
 <file>] [<packages>...]   
 sdkmanager --update [<common args>]  
 sdkmanager --list [<common args>]   
 sdkmanager --licenses [<common
 args>]

You can also set the path to sdkmanager command in your $PATH variable for direct use.