3

The goal here is to copy and paste downloaded Android SDK packages to multiple computer and run ./sdkmanager 'xxx' to install them locally (with no access to dl.google.com).

I tried ~/Library/Android/sdk/temp and ~/.android/tmp with no luck.

kimkevin
  • 2,202
  • 1
  • 26
  • 48
Aero Wang
  • 8,382
  • 14
  • 63
  • 99
  • I think from memory they are zip files held locally inside the SDK and deleted after installation. – Jon Goodwin Nov 17 '17 at 08:28
  • @JonGoodwin yes, in my memory they were located in `~/Library/Android/sdk/temp` or `~/.android/tmp` but clearly it isn't anymore. – Aero Wang Nov 17 '17 at 08:29
  • Another way. Firstly select the package to be downloaded in android studio sdk, then it will start downloading the package and will say Downloading from . Copy that URL and download it manually. – Jon Goodwin Nov 17 '17 at 08:43
  • @JonGoodwin I already downloaded the files, some of them cannot be decompressed and move to sdk directly, they need to go through an installation process. That's why I need to place them under the temp folder and let the sdk manager do the installation automatically. – Aero Wang Nov 17 '17 at 08:45
  • Did you find any solution, I have exactly same problem – Zain Ali May 17 '18 at 04:52

2 Answers2

2

On linux it is in /tmp/PackageOperationX where X is a number.

EmmanuelMess
  • 1,025
  • 2
  • 17
  • 31
1

MacOS

commandline sdkmanager

the temporary files will be downloaded to /private/var/folders/ when regular professional users couldn't comprehend how this decision can be made by developers of this commandline tool and MacOS, and still not informing their users in documentation

For example, to find out the file while sdkmanager is downloading the package system-images;android-29;google_apis;x86_64, with zip file named "x86_64-29_r11.zip":

lsof | grep x86_64-29_r11.zip

## output
java      5422 username   35w      REG                1,7 408368096            19062984 /private/var/folders/t7/z9lknwrd31q55t9m7s4qhm140000gp/T/PackageOperation02/x86_64-29_r11.zip

Using find also can work, but if you are searching for / it will take longer, so you can try on /private directly

sudo find / -name "*x86_64-29_r11.zip*" 2> >(grep -v 'Operation not permitted' >&2)

sudo find /private -name "*x86_64-29_r11.zip*" 2> >(grep -v 'Operation not permitted' >&2)

Source for coming up with the solutions:

  1. See what process is using a file in Mac OS X
  2. How can I exclude all "permission denied" messages from "find"?

Android Studio SDK Manager

the location for temporary storage of packages downloaded is $HOME/Library/Android/sdk/.downloadIntermediates and will be moved to $HOME/Library/Android/sdk/.temp/PackageOperation0X for extracting operation where X is a number. These packages will be deleted once they are extracted to their respective directories.

wltprgm
  • 21
  • 1
  • 5