How to install/downgrade Android SDK via terminal

1. Go to the android developer com  to find the link
mkdir android-sdk
cd android-sdk
on macos: curl -O
brew install wget
on linux: wget
unzip sdk-tools-*.zip

2. Go to the 'tools/bin' and run the
./sdkmanager --list
./sdkmanager "platforms;android-25" "tools" "build-tools;25.0.3" "platform-tools"
./sdkmanager --update

How to downgrade the Android SDK Tools

In case if you need to downgrade the sdkmanager and use the 'android' you can do the following

SDK Tools Release Notes:
SDK Platform Tools Release Notes:

To download a manual version of SDK Tools, fill in the following url with a version from the above:<version><version>

  1. Find your Android SDK folder
  2. Locate the "tools" subfolder and rename it to "tools1" (just to keep a backup copy of the original tools folder)
  3. Likewise, rename platform-tools to platform-tools1
  4. Download from google repository the SDK Tool version you want to downgrade to (for instance: and unpack it.
  5. The ZIP file you downloaded contains a tools folder that has to be moved to your Android SDK folder.
  6. Likewise, download the platform tools (for instance:, and extract it in your SDK folder.

For me downgrading to worked just fine. Once you download an older version the tools, just rename the tools directory at your Android SDK install and replace with the downloaded version.

I didn't need to downgrade Platform Tools, but if you need to, here are those links as well:<version><version>