I want to list the installed sdk packages by command lines.(For some reasons I cannot use the GUI)
I have done some research and found out several commands to list the available packages on the remote server, but I fail to find any command to list the installed sdk packages yet.
Thanks
All of the packages are downloaded into your Android SDK directory, which you can locate as follows: In Android Studio, click File > Project Structure. Select SDK Location in the left pane. The path is shown under Android SDK location.
Navigate to “Appearance & Behavior” > “System Settings” > “Android SDK” and now you can see the SDK versions that were installed in the “API Level” and “Name” columns (focus on “API Level”).
Navigate to the File > Settings option you will get to see below dialog screen. Inside that screen. Click on Appearance and Behavior option > System Settings options and then click on the Android SDK option to get to see the below screen. Inside this screen, you will get to see your SDK path.
(For macOS) Use "Finder" to check the SDK installed directory. You can also use "Android Studio" to check the SDK packages installed by selecting "More Actions" (or "Configure" in older versions, or "Tools") ⇒ "SDK Manager" ⇒ "Android SDK" (sidebar): Under "SDK Platforms" tab: Android API 32.
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
If you have your path set up, run
sdkmanager --list_installed
This will print out all the packages installed using sdkmanager.
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 love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With