User:Bear:AndroidNotes
From MozillaWiki
Contents
Misc Notes about Android Build environments
Headless Android SDK Installs
If your a fan of GUIs, installing the base SDK and platforms is as simple as running tools/android from the Base SDK directory.
But if your not, then it's a pain in the tuckus, but I discovered how the GUI gets it's updates :)
The magic is all contained in a manifest file repository.xml which lists all the SDKs and AddOns that are available to download.
2.2 SDK manifest entry snippet
<sdk:platform> <sdk:version>2.2</sdk:version> <sdk:api-level>8</sdk:api-level> <sdk:codename/> <sdk:revision>01</sdk:revision> <sdk:min-tools-rev>6</sdk:min-tools-rev> <sdk:description>Android SDK Platform 2.2_r1</sdk:description> <sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url> <sdk:archives> <sdk:archive os="linux" arch="any"> <sdk:size>76404989</sdk:size> <sdk:checksum type="sha1">eec1e438e39de6d9ef9fad7bc2cb229b73dfea39</sdk:checksum> <sdk:url>android-2.2_r01-linux.zip</sdk:url> </sdk:archive> ... </sdk:archives> </sdk:platform>
if you take the repository.xml url http://dl-ssl.google.com/android/repository/ and add the sdk:url item's value you get the download path for the 2.2 SDK zip file.
SDK Install "recipe"
- Download the base SDK
wget http://developer.android.com/sdk/download.html?v=android-sdk_r06-linux_86.tgz
- download the platform SDK(s)
wget http://dl-ssl.google.com/android/repository/android-2.1_r02-linux.zip wget http://dl-ssl.google.com/android/repository/android-2.2_r01-linux.zip
- extract the base SDK and "install" the platform SDK
tar xf android-sdk_r06-linux_86.tgz cd android-sdk-linux_86/platforms unzip /path/to/it/android-2.2_r01-linux.zip mv android-2.2_r01-linux android-8 unzip /path/to/it/android-2.1_r01-linux.zip mv android-2.1_r01-linux android-7