New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 841773 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

sdkmanager in third_party/android_sdk doesn't pick up other installed packages

Project Member Reported by wnwen@chromium.org, May 10 2018

Issue description

Running third_party/android_sdk/public/tools/bin/sdkmanager --list gives:
Installed packages:=====================] 100% Computing updates...                                                                                                       
  Path    | Version | Description       | Location
  ------- | ------- | -------           | -------                                                                                                                         
  tools   | 26.1.1  | Android SDK Tools | tools/

Running third_party/android_tools/sdk/tools/bin/sdkmanager --list gives:
Installed packages:=====================] 100% Computing updates...                                                                                   
  Path                        | Version | Description                                       | Location                                               
  -------                     | ------- | -------                                           | -------                                                              
  build-tools;27.0.3          | 27.0.3  | Android SDK Build-Tools 27.0.3                    | build-tools/27.0.3/                                                    
  emulator                    | 26.0.3  | Android Emulator                                  | emulator/                                                              
  extras;android;m2repository | 41.0.0  | Android Support Repository, rev 41                | extras/android/m2repository/                            
  extras;android;support      | 23.2.1  | Android Support Library, rev 23.2.1               | extras/android/support/                                                     
  extras;google;gcm           | 3.0.0   | Google Cloud Messaging for Android Library, rev 3 | extras/google/gcm/                                    
  platform-tools              | 27.0.1  | Android SDK Platform-Tools 27.0.1                 | platform-tools/                                                             
  platforms;android-27        | 1       | Android SDK Platform 27                           | platforms/android-27/                                   
  sources;android-25          | 1       | Sources for Android 25                            | sources/android-25/                                                         
  tools                       | 26.1.1  | Android SDK Tools                                 | tools/
 
Components: -Infra Infra>Client>Android
This is because the sdk packages in third_party/android_sdk are all symlinks of cipd packages. Instead of finding the current path, the sdkmanager binary would find the real package path as SDK root, e.g. '.cipd/pkgs/33/_current/tools', which only contains the tools package.

One option is to use the command '--sdk_root' to indicate the specific SDK root 'android_sdk' like `third_party/android_sdk/public/tools/bin/sdkmanager --list --sdk_root=third_party/android_sdk/public`:
Installed packages:=====================] 100% Computing updates...             
  Path                        | Version | Description                                       | Location                    
  -------                     | ------- | -------                                           | -------                     
  build-tools;27.0.3          | 27.0.3  | Android SDK Build-Tools 27.0.3                    | build-tools/27.0.3/         
  emulator                    | 27.1.12 | Android Emulator                                  | emulator/                   
  extras;android;m2repository | 47.0.0  | Android Support Repository                        | extras/android/m2repository/
  extras;android;support      | 23.2.1  | Android Support Library, rev 23.2.1               | extras/android/support/     
  extras;google;gcm           | 3.0.0   | Google Cloud Messaging for Android Library, rev 3 | extras/google/gcm/          
  platform-tools              | 27.0.1  | Android SDK Platform-Tools                        | platform-tools/             
  platforms;android-27        | 1       | Android SDK Platform 27                           | platforms/android-27/       
  tools                       | 26.1.1  | Android SDK Tools                                 | tools/    

Comment 3 by wnwen@chromium.org, May 14 2018

Status: WontFix (was: Assigned)
Nice! I think that is a sufficiently good workaround.

For posterity, use this instead:

third_party/android_sdk/public/tools/bin/sdkmanager --list --sdk_root=third_party/android_sdk/public

Sign in to add a comment