List installed sdk package via command line
With Android SDK Tools 25.2.3 (and higher):
$ANDROID_HOME/tools/bin/sdkmanager --list
See: https://developer.android.com/studio/command-line/sdkmanager.html#usage
As described in $ANDROID_HOME/tools/android list --help
- list : Lists existing targets or virtual devices.
- list avd : Lists existing Android Virtual Devices.
- list target : Lists existing targets.
- list device : Lists existing devices.
- list sdk : Lists remote SDK repository.
I guess you are looking for this:
$ANDROID_HOME/tools/android list target
You can learn more on the android
tool in the Command Line Reference.
Good luck!
If you have your path set up, run
sdkmanager --list_installed
This will print out all the packages installed using sdkmanager.
For those want to use awk
getting the inner paragraph between "Installed packages" and "Aavaliable Packages", but not include "Installed packages" and "Aavaliable Packages" lines.
sdkmanager --list | awk '/Installed/{flag=1; next} /Available/{flag=0} flag'