Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List installed sdk package via command line

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

like image 519
hackjutsu Avatar asked Aug 07 '15 20:08

hackjutsu


People also ask

How do I find where the SDK is installed?

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.

How do you check if I have SDK installed?

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”).

Where is SDK path in CMD?

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.

How do I view SDK files?

(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.


3 Answers

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

like image 150
tnissi Avatar answered Oct 19 '22 09:10

tnissi


If you have your path set up, run

sdkmanager --list_installed

This will print out all the packages installed using sdkmanager.

like image 6
Aditya Srivastava Avatar answered Oct 19 '22 09:10

Aditya Srivastava


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!

like image 3
gabocalero Avatar answered Oct 19 '22 09:10

gabocalero