summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--doc/languages-frameworks/android.section.md240
-rw-r--r--doc/languages-frameworks/index.xml3
-rw-r--r--doc/languages-frameworks/ios.section.md219
-rw-r--r--doc/languages-frameworks/titanium.section.md115
-rw-r--r--lib/licenses.nix55
-rw-r--r--lib/systems/examples.nix6
-rw-r--r--nixos/modules/programs/adb.nix3
-rw-r--r--pkgs/applications/audio/qjackctl/default.nix4
-rw-r--r--pkgs/applications/misc/pcmanfm/default.nix6
-rw-r--r--pkgs/applications/misc/rtl_433/default.nix6
-rw-r--r--pkgs/applications/networking/instant-messengers/wavebox/default.nix4
-rw-r--r--pkgs/applications/science/astronomy/stellarium/default.nix4
-rw-r--r--pkgs/applications/version-management/gitlab/data.json20
-rw-r--r--pkgs/development/androidndk-pkgs/androidndk-pkgs.nix (renamed from pkgs/development/mobile/androidenv/androidndk-pkgs.nix)26
-rw-r--r--pkgs/development/androidndk-pkgs/default.nix34
-rw-r--r--pkgs/development/libraries/libdeflate/default.nix31
-rw-r--r--pkgs/development/libraries/libfm/default.nix14
-rw-r--r--pkgs/development/libraries/libsigcxx/default.nix21
-rw-r--r--pkgs/development/libraries/menu-cache/default.nix4
-rw-r--r--pkgs/development/libraries/opencv/4.x.nix18
-rw-r--r--pkgs/development/mobile/adb-sync/default.nix6
-rw-r--r--pkgs/development/mobile/adbfs-rootless/default.nix2
-rw-r--r--pkgs/development/mobile/androidenv/addon.xml1614
-rw-r--r--pkgs/development/mobile/androidenv/addons.nix321
-rw-r--r--pkgs/development/mobile/androidenv/androidndk.nix120
-rw-r--r--pkgs/development/mobile/androidenv/androidndk_r8e.nix88
-rw-r--r--pkgs/development/mobile/androidenv/androidsdk.nix296
-rw-r--r--pkgs/development/mobile/androidenv/build-app.nix47
-rw-r--r--pkgs/development/mobile/androidenv/build-gradle-app.nix108
-rw-r--r--pkgs/development/mobile/androidenv/build-tools-srcs-linux.nix376
-rw-r--r--pkgs/development/mobile/androidenv/build-tools-srcs-macosx.nix376
-rw-r--r--pkgs/development/mobile/androidenv/build-tools.nix72
-rw-r--r--pkgs/development/mobile/androidenv/cmake.nix10
-rw-r--r--pkgs/development/mobile/androidenv/compose-android-packages.nix262
-rw-r--r--pkgs/development/mobile/androidenv/convertaddons.xsl128
-rw-r--r--pkgs/development/mobile/androidenv/convertpackages.xsl116
-rw-r--r--pkgs/development/mobile/androidenv/convertsystemimages.xsl47
-rw-r--r--pkgs/development/mobile/androidenv/default.nix378
-rw-r--r--pkgs/development/mobile/androidenv/deploy-androidpackage.nix44
-rw-r--r--pkgs/development/mobile/androidenv/emulate-app.nix93
-rw-r--r--pkgs/development/mobile/androidenv/emulator.nix20
-rwxr-xr-xpkgs/development/mobile/androidenv/fetch.sh14
-rwxr-xr-xpkgs/development/mobile/androidenv/generate-addons.sh3
-rw-r--r--pkgs/development/mobile/androidenv/generate-addons.xsl82
-rwxr-xr-xpkgs/development/mobile/androidenv/generate-platforms.sh4
-rw-r--r--pkgs/development/mobile/androidenv/generate-platforms.xsl54
-rwxr-xr-xpkgs/development/mobile/androidenv/generate-sources.sh3
-rw-r--r--pkgs/development/mobile/androidenv/generate-sources.xsl52
-rwxr-xr-xpkgs/development/mobile/androidenv/generate-sysimages.sh26
-rw-r--r--pkgs/development/mobile/androidenv/generate-sysimages.xsl20
-rwxr-xr-xpkgs/development/mobile/androidenv/generate-tools.sh4
-rw-r--r--pkgs/development/mobile/androidenv/generate-tools.xsl43
-rw-r--r--pkgs/development/mobile/androidenv/generate.sh16
-rw-r--r--pkgs/development/mobile/androidenv/generated/addons.nix1145
-rw-r--r--pkgs/development/mobile/androidenv/generated/packages.nix1910
-rw-r--r--pkgs/development/mobile/androidenv/generated/system-images-android-tv.nix157
-rw-r--r--pkgs/development/mobile/androidenv/generated/system-images-android-wear-cn.nix67
-rw-r--r--pkgs/development/mobile/androidenv/generated/system-images-android-wear.nix97
-rw-r--r--pkgs/development/mobile/androidenv/generated/system-images-android.nix547
-rw-r--r--pkgs/development/mobile/androidenv/generated/system-images-google_apis.nix502
-rw-r--r--pkgs/development/mobile/androidenv/generated/system-images-google_apis_playstore.nix97
-rw-r--r--pkgs/development/mobile/androidenv/lldb.nix12
-rw-r--r--pkgs/development/mobile/androidenv/make-standalone-toolchain_r10e.patch13
-rw-r--r--pkgs/development/mobile/androidenv/make-standalone-toolchain_r8e.patch13
-rw-r--r--pkgs/development/mobile/androidenv/make_standalone_toolchain.py_16b.patch119
-rw-r--r--pkgs/development/mobile/androidenv/make_standalone_toolchain.py_17c.patch119
-rw-r--r--pkgs/development/mobile/androidenv/ndk-bundle/default.nix51
-rw-r--r--pkgs/development/mobile/androidenv/ndk-bundle/make_standalone_toolchain.py_18.patch44
-rw-r--r--pkgs/development/mobile/androidenv/platform-tools.nix56
-rw-r--r--pkgs/development/mobile/androidenv/platforms-linux.nix343
-rw-r--r--pkgs/development/mobile/androidenv/platforms-macosx.nix343
-rw-r--r--pkgs/development/mobile/androidenv/querypackages.sh27
-rw-r--r--pkgs/development/mobile/androidenv/repository-11.xml2834
-rw-r--r--pkgs/development/mobile/androidenv/sources.nix184
-rw-r--r--pkgs/development/mobile/androidenv/support-repository.nix18
-rw-r--r--pkgs/development/mobile/androidenv/support.nix18
-rw-r--r--pkgs/development/mobile/androidenv/sys-img.xml1026
-rw-r--r--pkgs/development/mobile/androidenv/sysimages.nix305
-rw-r--r--pkgs/development/mobile/androidenv/tools.nix26
-rw-r--r--pkgs/development/mobile/androidenv/tools/25.nix62
-rw-r--r--pkgs/development/mobile/androidenv/tools/26.nix40
-rw-r--r--pkgs/development/mobile/flashtool/default.nix6
-rw-r--r--pkgs/development/mobile/titaniumenv/build-app.nix311
-rw-r--r--pkgs/development/mobile/titaniumenv/default.nix24
-rw-r--r--pkgs/development/mobile/titaniumenv/examples/default.nix91
-rw-r--r--pkgs/development/mobile/titaniumenv/examples/emulate-kitchensink/default.nix10
-rw-r--r--pkgs/development/mobile/titaniumenv/examples/kitchensink/default.nix44
-rwxr-xr-xpkgs/development/mobile/titaniumenv/examples/kitchensink/generatekeystore.sh10
-rw-r--r--pkgs/development/mobile/titaniumenv/examples/kitchensink/keystorebin1315 -> 0 bytes
-rw-r--r--pkgs/development/mobile/titaniumenv/examples/simulate-kitchensink/default.nix7
-rw-r--r--pkgs/development/mobile/titaniumenv/titaniumsdk-6.3.nix43
-rw-r--r--pkgs/development/mobile/titaniumenv/titaniumsdk-7.1.nix12
-rw-r--r--pkgs/development/mobile/xcodeenv/build-app.nix101
-rw-r--r--pkgs/development/mobile/xcodeenv/compose-xcodewrapper.nix (renamed from pkgs/development/mobile/xcodeenv/xcodewrapper.nix)6
-rw-r--r--pkgs/development/mobile/xcodeenv/default.nix10
-rw-r--r--pkgs/development/mobile/xcodeenv/install.html.template6
-rw-r--r--pkgs/development/mobile/xcodeenv/simulate-app.nix61
-rw-r--r--pkgs/development/ocaml-modules/ppx_deriving_yojson/default.nix25
-rw-r--r--pkgs/development/ocaml-modules/ppxfind/default.nix21
-rw-r--r--pkgs/development/python-modules/affine/default.nix4
-rw-r--r--pkgs/development/python-modules/biopython/default.nix4
-rw-r--r--pkgs/development/python-modules/dpkt/default.nix4
-rw-r--r--pkgs/development/python-modules/easyprocess/default.nix4
-rw-r--r--pkgs/development/python-modules/nvchecker/default.nix4
-rw-r--r--pkgs/development/python-modules/peewee/default.nix4
-rw-r--r--pkgs/development/python-modules/pytesseract/default.nix4
-rw-r--r--pkgs/development/python-modules/shellingham/default.nix4
-rw-r--r--pkgs/development/tools/apktool/default.nix4
-rw-r--r--pkgs/development/tools/continuous-integration/gitlab-runner/default.nix8
-rw-r--r--pkgs/development/tools/skopeo/default.nix4
-rw-r--r--pkgs/games/boohu/default.nix4
-rw-r--r--pkgs/misc/scrcpy/default.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-4.20.nix18
-rw-r--r--pkgs/os-specific/linux/kernel/linux-libre.nix6
-rw-r--r--pkgs/os-specific/linux/sysdig/default.nix4
-rw-r--r--pkgs/stdenv/cross/default.nix2
-rw-r--r--pkgs/tools/graphics/guff/default.nix25
-rw-r--r--pkgs/tools/misc/diskus/default.nix6
-rw-r--r--pkgs/tools/networking/gnirehtet/default.nix2
-rw-r--r--pkgs/tools/system/osquery/default.nix18
-rw-r--r--pkgs/top-level/all-packages.nix48
-rw-r--r--pkgs/top-level/ocaml-packages.nix2
123 files changed, 6725 insertions, 10106 deletions
diff --git a/.gitignore b/.gitignore
index dba957f7662..b3ae9e6ea86 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,4 +13,5 @@ result-*
 .DS_Store
 
 /pkgs/development/libraries/qt-5/*/tmp/
-/pkgs/desktops/kde-5/*/tmp/
\ No newline at end of file
+/pkgs/desktops/kde-5/*/tmp/
+/pkgs/development/mobile/androidenv/xml/*
diff --git a/doc/languages-frameworks/android.section.md b/doc/languages-frameworks/android.section.md
new file mode 100644
index 00000000000..237f3441874
--- /dev/null
+++ b/doc/languages-frameworks/android.section.md
@@ -0,0 +1,240 @@
+---
+title: Android
+author: Sander van der Burg
+date: 2018-11-18
+---
+# Android
+
+The Android build environment provides three major features and a number of
+supporting features.
+
+Deploying an Android SDK installation with plugins
+--------------------------------------------------
+The first use case is deploying the SDK with a desired set of plugins or subsets
+of an SDK.
+
+```nix
+with import <nixpkgs> {};
+
+let
+  androidComposition = androidenv.composeAndroidPackages {
+    toolsVersion = "25.2.5";
+    platformToolsVersion = "27.0.1";
+    buildToolsVersions = [ "27.0.3" ];
+    includeEmulator = false;
+    emulatorVersion = "27.2.0";
+    platformVersions = [ "24" ];
+    includeSources = false;
+    includeDocs = false;
+    includeSystemImages = false;
+    systemImageTypes = [ "default" ];
+    abiVersions = [ "armeabi-v7a" ];
+    lldbVersions = [ "2.0.2558144" ];
+    cmakeVersions = [ "3.6.4111459" ];
+    includeNDK = false;
+    ndkVersion = "16.1.4479499";
+    useGoogleAPIs = false;
+    useGoogleTVAddOns = false;
+    includeExtras = [
+      "extras;google;gcm"
+    ];
+  };
+in
+androidComposition.androidsdk
+```
+
+The above function invocation states that we want an Android SDK with the above
+specified plugin versions. By default, most plugins are disabled. Notable
+exceptions are the tools, platform-tools and build-tools sub packages.
+
+The following parameters are supported:
+
+* `toolsVersion`, specifies the version of the tools package to use
+* `platformsToolsVersion` specifies the version of the `platform-tools` plugin
+* `buildToolsVersion` specifies the versions of the `build-tools` plugins to
+  use.
+* `includeEmulator` specifies whether to deploy the emulator package (`false`
+  by default). When enabled, the version of the emulator to deploy can be
+  specified by setting the `emulatorVersion` parameter.
+* `includeDocs` specifies whether the documentation catalog should be included.
+* `lldbVersions` specifies what LLDB versions should be deployed.
+* `cmakeVersions` specifies which CMake versions should be deployed.
+* `includeNDK` specifies that the Android NDK bundle should be included.
+  Defaults to: `false`.
+* `ndkVersion` specifies the NDK version that we want to use.
+* `includeExtras` is an array of identifier strings referring to arbitrary
+  add-on packages that should be installed.
+* `platformVersions` specifies which platform SDK versions should be included.
+
+For each platform version that has been specified, we can apply the following
+options:
+
+* `includeSystemImages` specifies whether a system image for each platform SDK
+  should be included.
+* `includeSources` specifies whether the sources for each SDK version should be
+  included.
+* `useGoogleAPIs` specifies that for each selected platform version the
+  Google API should be included.
+* `useGoogleTVAddOns` specifies that for each selected platform version the
+  Google TV add-on should be included.
+
+For each requested system image we can specify the following options:
+
+* `systemImageTypes` specifies what kind of system images should be included.
+  Defaults to: `default`.
+* `abiVersions` specifies what kind of ABI version of each system image should
+  be included. Defaults to: `armeabi-v7a`.
+
+Most of the function arguments have reasonable default settings.
+
+When building the above expression with:
+
+```bash
+$ nix-build
+```
+
+The Android SDK gets deployed with all desired plugin versions.
+
+We can also deploy subsets of the Android SDK. For example, to only the the
+`platform-tools` package, you can evaluate the following expression:
+
+```nix
+with import <nixpkgs> {};
+
+let
+  androidComposition = androidenv.composeAndroidPackages {
+    # ...
+  };
+in
+androidComposition.platform-tools
+```
+
+Using predefine Android package compositions
+--------------------------------------------
+In addition to composing an Android package set manually, it is also possible
+to use a predefined composition that contains all basic packages for a specific
+Android version, such as version 9.0 (API-level 28).
+
+The following Nix expression can be used to deploy the entire SDK with all basic
+plugins:
+
+```nix
+with import <nixpkgs> {};
+
+androidenv.androidPkgs_9_0.androidsdk
+```
+
+It is also possible to use one plugin only:
+
+```nix
+with import <nixpkgs> {};
+
+androidenv.androidPkgs_9_0.platform-tools
+```
+
+Building an Android application
+-------------------------------
+In addition to the SDK, it is also possible to build an Ant-based Android
+project and automatically deploy all the Android plugins that a project
+requires.
+
+```nix
+with import <nixpkgs> {};
+
+androidenv.buildApp {
+  name = "MyAndroidApp";
+  src = ./myappsources;
+  release = true;
+
+  # If release is set to true, you need to specify the following parameters
+  keyStore = ./keystore;
+  keyAlias = "myfirstapp";
+  keyStorePassword = "mykeystore";
+  keyAliasPassword = "myfirstapp";
+
+  # Any Android SDK parameters that install all the relevant plugins that a
+  # build requires
+  platformVersions = [ "24" ];
+
+  # When we include the NDK, then ndk-build is invoked before Ant gets invoked
+  includeNDK = true;
+}
+```
+
+Aside from the app-specific build parameters (`name`, `src`, `release` and
+keystore parameters), the `buildApp {}` function supports all the function
+parameters that the SDK composition function (the function shown in the
+previous section) supports.
+
+This build function is particularly useful when it is desired to use
+[Hydra](http://nixos.org/hydra): the Nix-based continuous integration solution
+to build Android apps. An Android APK gets exposed as a build product and can be
+installed on any Android device with a web browser by navigating to the build
+result page.
+
+Spawning emulator instances
+---------------------------
+For testing purposes, it can also be quite convenient to automatically generate
+scripts that spawn emulator instances with all desired configuration settings.
+
+An emulator spawn script can be configured by invoking the `emulateApp {}`
+function:
+
+```nix
+with import <nixpkgs> {};
+
+androidenv.emulateApp {
+  name = "emulate-MyAndroidApp";
+  platformVersion = "24";
+  abiVersion = "armeabi-v7a"; # mips, x86 or x86_64
+  systemImageType = "default";
+  useGoogleAPIs = false;
+}
+```
+
+It is also possible to specify an APK to deploy inside the emulator
+and the package and activity names to launch it:
+
+```nix
+with import <nixpkgs> {};
+
+androidenv.emulateApp {
+  name = "emulate-MyAndroidApp";
+  platformVersion = "24";
+  abiVersion = "armeabi-v7a"; # mips, x86 or x86_64
+  systemImageType = "default";
+  useGoogleAPIs = false;
+  app = ./MyApp.apk;
+  package = "MyApp";
+  activity = "MainActivity";
+}
+```
+
+In addition to prebuilt APKs, you can also bind the APK parameter to a
+`buildApp {}` function invocation shown in the previous example.
+
+Querying the available versions of each plugin
+----------------------------------------------
+When using any of the previously shown functions, it may be a bit inconvenient
+to find out what options are supported, since the Android SDK provides many
+plugins.
+
+A shell script in the `pkgs/development/mobile/androidenv/` sub directory can be used to retrieve all
+possible options:
+
+```bash
+sh ./querypackages.sh packages build-tools
+```
+
+The above command-line instruction queries all build-tools versions in the
+generated `packages.nix` expression.
+
+Updating the generated expressions
+----------------------------------
+Most of the Nix expressions are generated from XML files that the Android
+package manager uses. To update the expressions run the `generate.sh` script
+that is stored in the `pkgs/development/mobile/androidenv/` sub directory:
+
+```bash
+sh ./generate.sh
+```
diff --git a/doc/languages-frameworks/index.xml b/doc/languages-frameworks/index.xml
index ac0ad712532..4564df98fe9 100644
--- a/doc/languages-frameworks/index.xml
+++ b/doc/languages-frameworks/index.xml
@@ -10,12 +10,14 @@
   Nixpkgs to easily build packages for other programming languages, such as
   Perl or Haskell. These are described in this chapter.
  </para>
+ <xi:include href="android.section.xml" />
  <xi:include href="beam.xml" />
  <xi:include href="bower.xml" />
  <xi:include href="coq.xml" />
  <xi:include href="go.xml" />
  <xi:include href="haskell.section.xml" />
  <xi:include href="idris.section.xml" />
+ <xi:include href="ios.section.xml" />
  <xi:include href="java.xml" />
  <xi:include href="lua.xml" />
  <xi:include href="node.section.xml" />
@@ -27,6 +29,7 @@
  <xi:include href="ruby.xml" />
  <xi:include href="rust.section.xml" />
  <xi:include href="texlive.xml" />
+ <xi:include href="titanium.section.xml" />
  <xi:include href="vim.section.xml" />
  <xi:include href="emscripten.section.xml" />
 </chapter>
diff --git a/doc/languages-frameworks/ios.section.md b/doc/languages-frameworks/ios.section.md
new file mode 100644
index 00000000000..6684b809ffe
--- /dev/null
+++ b/doc/languages-frameworks/ios.section.md
@@ -0,0 +1,219 @@
+---
+title: iOS
+author: Sander van der Burg
+date: 2018-11-18
+---
+# iOS
+
+This component is basically a wrapper/workaround that makes it possible to
+expose an Xcode installation as a Nix package by means of symlinking to the
+relevant executables on the host system.
+
+Since Xcode can't be packaged with Nix, nor we can publish it as a Nix package
+(because of its license) this is basically the only integration strategy
+making it possible to do iOS application builds that integrate with other
+components of the Nix ecosystem
+
+The primary objective of this project is to use the Nix expression language to
+specify how iOS apps can be built from source code, and to automatically spawn
+iOS simulator instances for testing.
+
+This component also makes it possible to use [Hydra](http://nixos.org/hydra),
+the Nix-based continuous integration server to regularly build iOS apps and to
+do wireless ad-hoc installations of enterprise IPAs on iOS devices through
+Hydra.
+
+The Xcode build environment implements a number of features.
+
+Deploying a proxy component wrapper exposing Xcode
+--------------------------------------------------
+The first use case is deploying a Nix package that provides symlinks to the Xcode
+installation on the host system. This package can be used as a build input to
+any build function implemented in the Nix expression language that requires
+Xcode.
+
+```nix
+let
+  pkgs = import <nixpkgs> {};
+
+  xcodeenv = import ./xcodeenv {
+    inherit (pkgs) stdenv;
+  };
+in
+xcodeenv.composeXcodeWrapper {
+  version = "9.2";
+  xcodeBaseDir = "/Applications/Xcode.app";
+}
+```
+
+By deploying the above expression with `nix-build` and inspecting its content
+you will notice that several Xcode-related executables are exposed as a Nix
+package:
+
+```bash
+$ ls result/bin
+lrwxr-xr-x  1 sander  staff  94  1 jan  1970 Simulator -> /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator
+lrwxr-xr-x  1 sander  staff  17  1 jan  1970 codesign -> /usr/bin/codesign
+lrwxr-xr-x  1 sander  staff  17  1 jan  1970 security -> /usr/bin/security
+lrwxr-xr-x  1 sander  staff  21  1 jan  1970 xcode-select -> /usr/bin/xcode-select
+lrwxr-xr-x  1 sander  staff  61  1 jan  1970 xcodebuild -> /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
+lrwxr-xr-x  1 sander  staff  14  1 jan  1970 xcrun -> /usr/bin/xcrun
+```
+
+Building an iOS application
+---------------------------
+We can build an iOS app executable for the simulator, or an IPA/xcarchive file
+for release purposes, e.g. ad-hoc, enterprise or store installations, by
+executing the `xcodeenv.buildApp {}` function:
+
+```nix
+let
+  pkgs = import <nixpkgs> {};
+
+  xcodeenv = import ./xcodeenv {
+    inherit (pkgs) stdenv;
+  };
+in
+xcodeenv.buildApp {
+  name = "MyApp";
+  src = ./myappsources;
+  sdkVersion = "11.2";
+
+  target = null; # Corresponds to the name of the app by default
+  configuration = null; # Release for release builds, Debug for debug builds
+  scheme = null; # -scheme will correspond to the app name by default
+  sdk = null; # null will set it to 'iphonesimulator` for simulator builds or `iphoneos` to real builds
+  xcodeFlags = "";
+
+  release = true;
+  certificateFile = ./mycertificate.p12;
+  certificatePassword = "secret";
+  provisioningProfile = ./myprovisioning.profile;
+  signMethod = "ad-hoc"; # 'enterprise' or 'store'
+  generateIPA = true;
+  generateXCArchive = false;
+
+  enableWirelessDistribution = true;
+  installURL = "/installipa.php";
+  bundleId = "mycompany.myapp";
+  appVersion = "1.0";
+
+  # Supports all xcodewrapper parameters as well
+  xcodeBaseDir = "/Applications/Xcode.app";
+}
+```
+
+The above function takes a variety of parameters:
+* The `name` and `src` parameters are mandatory and specify the name of the app
+  and the location where the source code resides
+* `sdkVersion` specifies which version of the iOS SDK to use.
+
+It also possile to adjust the `xcodebuild` parameters. This is only needed in
+rare circumstances. In most cases the default values should suffice:
+
+* Specifies which `xcodebuild` target to build. By default it takes the target
+  that has the same name as the app.
+* The `configuration` parameter can be overridden if desired. By default, it
+  will do a debug build for the simulator and a release build for real devices.
+* The `scheme` parameter specifies which `-scheme` parameter to propagate to
+  `xcodebuild`. By default, it corresponds to the app name.
+* The `sdk` parameter specifies which SDK to use. By default, it picks
+  `iphonesimulator` for simulator builds and `iphoneos` for release builds.
+* The `xcodeFlags` parameter specifies arbitrary command line parameters that
+  should be propagated to `xcodebuild`.
+
+By default, builds are carried out for the iOS simulator. To do release builds
+(builds for real iOS devices), you must set the `release` parameter to `true`.
+In addition, you need to set the following parameters:
+
+* `certificateFile` refers to a P12 certificate file.
+* `certificatePassword` specifies the password of the P12 certificate.
+* `provisioningProfile` refers to the provision profile needed to sign the app
+* `signMethod` should refer to `ad-hoc` for signing the app with an ad-hoc
+  certificate, `enterprise` for enterprise certificates and `app-store` for App
+  store certificates.
+* `generateIPA` specifies that we want to produce an IPA file (this is probably
+  what you want)
+* `generateXCArchive` specifies thet we want to produce an xcarchive file.
+
+When building IPA files on Hydra and when it is desired to allow iOS devices to
+install IPAs by browsing to the Hydra build products page, you can enable the
+`enableWirelessDistribution` parameter.
+
+When enabled, you need to configure the following options:
+
+* The `installURL` parameter refers to the URL of a PHP script that composes the
+  `itms-services://` URL allowing iOS devices to install the IPA file.
+* `bundleId` refers to the bundle ID value of the app
+* `appVersion` refers to the app's version number
+
+To use wireless adhoc distributions, you must also install the corresponding
+PHP script on a web server (see section: 'Installing the PHP script for wireless
+ad hoc installations from Hydra' for more information).
+
+In addition to the build parameters, you can also specify any parameters that
+the `xcodeenv.composeXcodeWrapper {}` function takes. For example, the
+`xcodeBaseDir` parameter can be overridden to refer to a different Xcode
+version.
+
+Spawning simulator instances
+----------------------------
+In addition to building iOS apps, we can also automatically spawn simulator
+instances:
+
+```nix
+let
+  pkgs = import <nixpkgs> {};
+
+  xcodeenv = import ./xcodeenv {
+    inherit (pkgs) stdenv;
+  };
+in
+xcode.simulateApp {
+  name = "simulate";
+
+  # Supports all xcodewrapper parameters as well
+  xcodeBaseDir = "/Applications/Xcode.app";
+}
+```
+
+The above expression produces a script that starts the simulator from the
+provided Xcode installation. The script can be started as follows:
+
+```bash
+./result/bin/run-test-simulator
+```
+
+By default, the script will show an overview of UDID for all available simulator
+instances and asks you to pick one. You can also provide a UDID as a
+command-line parameter to launch an instance automatically:
+
+```bash
+./result/bin/run-test-simulator 5C93129D-CF39-4B1A-955F-15180C3BD4B8
+```
+
+You can also extend the simulator script to automatically deploy and launch an
+app in the requested simulator instance:
+
+```nix
+let
+  pkgs = import <nixpkgs> {};
+
+  xcodeenv = import ./xcodeenv {
+    inherit (pkgs) stdenv;
+  };
+in
+xcode.simulateApp {
+  name = "simulate";
+  bundleId = "mycompany.myapp";
+  app = xcode.buildApp {
+    # ...
+  };
+
+  # Supports all xcodewrapper parameters as well
+  xcodeBaseDir = "/Applications/Xcode.app";
+}
+```
+
+By providing the result of an `xcode.buildApp {}` function and configuring the
+app bundle id, the app gets deployed automatically and started.
diff --git a/doc/languages-frameworks/titanium.section.md b/doc/languages-frameworks/titanium.section.md
new file mode 100644
index 00000000000..7a97664ec59
--- /dev/null
+++ b/doc/languages-frameworks/titanium.section.md
@@ -0,0 +1,115 @@
+---
+title: Titanium
+author: Sander van der Burg
+date: 2018-11-18
+---
+# Titanium
+
+The Nixpkgs repository contains facilities to deploy a variety of versions of
+the [Titanium SDK](https://www.appcelerator.com) versions, a cross-platform
+mobile app development framework using JavaScript as an implementation language,
+and includes a function abstraction making it possible to build Titanium
+applications for Android and iOS devices from source code.
+
+Not all Titanium features supported -- currently, it can only be used to build
+Android and iOS apps.
+
+Building a Titanium app
+-----------------------
+We can build a Titanium app from source for Android or iOS and for debugging or
+release purposes by invoking the `titaniumenv.buildApp {}` function:
+
+```nix
+titaniumenv.buildApp {
+  name = "myapp";
+  src = ./myappsource;
+
+  preBuild = "";
+  target = "android"; # or 'iphone'
+  tiVersion = "7.1.0.GA";
+  release = true;
+
+  androidsdkArgs = {
+    platformVersions = [ "25" "26" ];
+  };
+  androidKeyStore = ./keystore;
+  androidKeyAlias = "myfirstapp";
+  androidKeyStorePassword = "secret";
+
+  xcodeBaseDir = "/Applications/Xcode.app";
+  xcodewrapperArgs = {
+    version = "9.3";
+  };
+  iosMobileProvisioningProfile = ./myprovisioning.profile;
+  iosCertificateName = "My Company";
+  iosCertificate = ./mycertificate.p12;
+  iosCertificatePassword = "secret";
+  iosVersion = "11.3";
+  iosBuildStore = false;
+
+  enableWirelessDistribution = true;
+  installURL = "/installipa.php";
+}
+```
+
+The `titaniumenv.buildApp {}` function takes the following parameters:
+
+* The `name` parameter refers to the name in the Nix store.
+* The `src` parameter refers to the source code location of the app that needs
+  to be built.
+* `preRebuild` contains optional build instructions that are carried out before
+  the build starts.
+* `target` indicates for which device the app must be built. Currently only
+  'android' and 'iphone' (for iOS) are supported.
+* `tiVersion` can be used to optionally override the requested Titanium version
+  in `tiapp.xml`. If not specified, it will use the version in `tiapp.xml`.
+* `release` should be set to true when building an app for submission to the
+  Google Playstore or Apple Appstore. Otherwise, it should be false.
+
+When the `target` has been set to `android`, we can configure the following
+parameters:
+
+* The `androidSdkArgs` parameter refers to an attribute set that propagates all
+  parameters to the `androidenv.composeAndroidPackages {}` function. This can
+  be used to install all relevant Android plugins that may be needed to perform
+  the Android build. If no parameters are given, it will deploy the platform
+  SDKs for API-levels 25 and 26 by default.
+
+When the `release` parameter has been set to true, you need to provide
+parameters to sign the app:
+
+* `androidKeyStore` is the path to the keystore file
+* `androidKeyAlias` is the key alias
+* `androidKeyStorePassword` refers to the password to open the keystore file.
+
+When the `target` has been set to `iphone`, we can configure the following
+parameters:
+
+* The `xcodeBaseDir` parameter refers to the location where Xcode has been
+  installed. When none value is given, the above value is the default.
+* The `xcodewrapperArgs` parameter passes arbitrary parameters to the
+  `xcodeenv.composeXcodeWrapper {}` function. This can, for example, be used
+  to adjust the default version of Xcode.
+
+When `release` has been set to true, you also need to provide the following
+parameters:
+
+* `iosMobileProvisioningProfile` refers to a mobile provisioning profile needed
+  for signing.
+* `iosCertificateName` refers to the company name in the P12 certificate.
+* `iosCertificate` refers to the path to the P12 file.
+* `iosCertificatePassword` contains the password to open the P12 file.
+* `iosVersion` refers to the iOS SDK version to use. It defaults to the latest
+  version.
+* `iosBuildStore` should be set to `true` when building for the Apple Appstore
+  submission. For enterprise or ad-hoc builds it should be set to `false`.
+
+When `enableWirelessDistribution` has been enabled, you must also provide the
+path of the PHP script (`installURL`) (that is included with the iOS build
+environment) to enable wireless ad-hoc installations.
+
+Emulating or simulating the app
+-------------------------------
+It is also possible to simulate the correspond iOS simulator build by using
+`xcodeenv.simulateApp {}` and emulate an Android APK by using
+`androidenv.emulateApp {}`.
diff --git a/lib/licenses.nix b/lib/licenses.nix
index 5ef60b51063..fc9cb42621d 100644
--- a/lib/licenses.nix
+++ b/lib/licenses.nix
@@ -29,13 +29,13 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec {
   };
 
   agpl3 = spdx {
-    spdxId = "AGPL-3.0";
-    fullName = "GNU Affero General Public License v3.0";
+    spdxId = "AGPL-3.0-only";
+    fullName = "GNU Affero General Public License v3.0 only";
   };
 
-  agpl3Plus = {
+  agpl3Plus = spdx {
+    spdxId = "AGPL-3.0-or-later";
     fullName = "GNU Affero General Public License v3.0 or later";
-    inherit (agpl3) url;
   };
 
   amazonsl = {
@@ -266,13 +266,23 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec {
   };
 
   fdl12 = spdx {
-    spdxId = "GFDL-1.2";
-    fullName = "GNU Free Documentation License v1.2";
+    spdxId = "GFDL-1.2-only";
+    fullName = "GNU Free Documentation License v1.2 only";
+  };
+
+  fdl12Plus = spdx {
+    spdxId = "GFDL-1.2-or-later";
+    fullName = "GNU Free Documentation License v1.2 or later";
   };
 
   fdl13 = spdx {
-    spdxId = "GFDL-1.3";
-    fullName = "GNU Free Documentation License v1.3";
+    spdxId = "GFDL-1.3-only";
+    fullName = "GNU Free Documentation License v1.3 only";
+  };
+
+  fdl13Plus = spdx {
+    spdxId = "GFDL-1.3-or-later";
+    fullName = "GNU Free Documentation License v1.3 or later";
   };
 
   ffsl = {
@@ -297,24 +307,23 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec {
   };
 
   gpl1 = spdx {
-    spdxId = "GPL-1.0";
+    spdxId = "GPL-1.0-only";
     fullName = "GNU General Public License v1.0 only";
   };
 
   gpl1Plus = spdx {
-    spdxId = "GPL-1.0+";
+    spdxId = "GPL-1.0-or-later";
     fullName = "GNU General Public License v1.0 or later";
   };
 
   gpl2 = spdx {
-    spdxId = "GPL-2.0";
+    spdxId = "GPL-2.0-only";
     fullName = "GNU General Public License v2.0 only";
   };
 
-  gpl2Classpath = {
+  gpl2Classpath = spdx {
     spdxId = "GPL-2.0-with-classpath-exception";
     fullName = "GNU General Public License v2.0 only (with Classpath exception)";
-    url = https://fedoraproject.org/wiki/Licensing/GPL_Classpath_Exception;
   };
 
   gpl2ClasspathPlus = {
@@ -328,17 +337,17 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec {
   };
 
   gpl2Plus = spdx {
-    spdxId = "GPL-2.0+";
+    spdxId = "GPL-2.0-or-later";
     fullName = "GNU General Public License v2.0 or later";
   };
 
   gpl3 = spdx {
-    spdxId = "GPL-3.0";
+    spdxId = "GPL-3.0-only";
     fullName = "GNU General Public License v3.0 only";
   };
 
   gpl3Plus = spdx {
-    spdxId = "GPL-3.0+";
+    spdxId = "GPL-3.0-or-later";
     fullName = "GNU General Public License v3.0 or later";
   };
 
@@ -408,32 +417,32 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec {
   };
 
   lgpl2 = spdx {
-    spdxId = "LGPL-2.0";
+    spdxId = "LGPL-2.0-only";
     fullName = "GNU Library General Public License v2 only";
   };
 
   lgpl2Plus = spdx {
-    spdxId = "LGPL-2.0+";
+    spdxId = "LGPL-2.0-or-later";
     fullName = "GNU Library General Public License v2 or later";
   };
 
   lgpl21 = spdx {
-    spdxId = "LGPL-2.1";
+    spdxId = "LGPL-2.1-only";
     fullName = "GNU Library General Public License v2.1 only";
   };
 
   lgpl21Plus = spdx {
-    spdxId = "LGPL-2.1+";
+    spdxId = "LGPL-2.1-or-later";
     fullName = "GNU Library General Public License v2.1 or later";
   };
 
   lgpl3 = spdx {
-    spdxId = "LGPL-3.0";
+    spdxId = "LGPL-3.0-only";
     fullName = "GNU Lesser General Public License v3.0 only";
   };
 
   lgpl3Plus = spdx {
-    spdxId = "LGPL-3.0+";
+    spdxId = "LGPL-3.0-or-later";
     fullName = "GNU Lesser General Public License v3.0 or later";
   };
 
@@ -697,7 +706,7 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec {
   };
 
   wxWindows = spdx {
-    spdxId = "WXwindows";
+    spdxId = "wxWindows";
     fullName = "wxWindows Library Licence, Version 3.1";
   };
 
diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix
index 608db00a968..ac1633a1a15 100644
--- a/lib/systems/examples.nix
+++ b/lib/systems/examples.nix
@@ -47,7 +47,7 @@ rec {
   armv5te-android-prebuilt = rec {
     config = "armv5tel-unknown-linux-androideabi";
     sdkVer = "21";
-    ndkVer = "10e";
+    ndkVer = "18b";
     platform = platforms.armv5te-android;
     useAndroidPrebuilt = true;
   };
@@ -55,7 +55,7 @@ rec {
   armv7a-android-prebuilt = rec {
     config = "armv7a-unknown-linux-androideabi";
     sdkVer = "24";
-    ndkVer = "17c";
+    ndkVer = "18b";
     platform = platforms.armv7a-android;
     useAndroidPrebuilt = true;
   };
@@ -63,7 +63,7 @@ rec {
   aarch64-android-prebuilt = rec {
     config = "aarch64-unknown-linux-android";
     sdkVer = "24";
-    ndkVer = "17c";
+    ndkVer = "18b";
     platform = platforms.aarch64-multiplatform;
     useAndroidPrebuilt = true;
   };
diff --git a/nixos/modules/programs/adb.nix b/nixos/modules/programs/adb.nix
index 942572cef9d..250d8c252a3 100644
--- a/nixos/modules/programs/adb.nix
+++ b/nixos/modules/programs/adb.nix
@@ -16,7 +16,6 @@ with lib;
           To grant access to a user, it must be part of adbusers group:
           <code>users.users.alice.extraGroups = ["adbusers"];</code>
         '';
-        relatedPackages = [ ["androidenv" "platformTools"] ];
       };
     };
   };
@@ -24,7 +23,7 @@ with lib;
   ###### implementation
   config = mkIf config.programs.adb.enable {
     services.udev.packages = [ pkgs.android-udev-rules ];
-    environment.systemPackages = [ pkgs.androidenv.platformTools ];
+    environment.systemPackages = [ pkgs.androidenv.androidPkgs_9_0.platform-tools ];
     users.groups.adbusers = {};
   };
 }
diff --git a/pkgs/applications/audio/qjackctl/default.nix b/pkgs/applications/audio/qjackctl/default.nix
index 83608014f14..eafde7957a2 100644
--- a/pkgs/applications/audio/qjackctl/default.nix
+++ b/pkgs/applications/audio/qjackctl/default.nix
@@ -1,14 +1,14 @@
 { stdenv, fetchurl, pkgconfig, alsaLib, libjack2, dbus, qtbase, qttools, qtx11extras }:
 
 stdenv.mkDerivation rec {
-  version = "0.5.3";
+  version = "0.5.5";
   name = "qjackctl-${version}";
 
   # some dependencies such as killall have to be installed additionally
 
   src = fetchurl {
     url = "mirror://sourceforge/qjackctl/${name}.tar.gz";
-    sha256 = "0x08af8m5l8qy9av3dlldsg58ny9nc69h1s4i6hqkvj24jwy6fw1";
+    sha256 = "1rzzqa39a6llr52vjkjr0a86nc776kmr5xs52qqga8ms9697psz5";
   };
 
   buildInputs = [
diff --git a/pkgs/applications/misc/pcmanfm/default.nix b/pkgs/applications/misc/pcmanfm/default.nix
index a77b2d17ecb..2649c7cbd6a 100644
--- a/pkgs/applications/misc/pcmanfm/default.nix
+++ b/pkgs/applications/misc/pcmanfm/default.nix
@@ -7,10 +7,10 @@ let
   inherit (stdenv.lib) optional;
 in
 stdenv.mkDerivation rec {
-  name = "pcmanfm-1.3.0";
+  name = "pcmanfm-1.3.1";
   src = fetchurl {
     url = "mirror://sourceforge/pcmanfm/${name}.tar.xz";
-    sha256 = "1ywgfyklms5hqkapsbjps4kyx20ac0d1qk16ww74yagkyfdkwsas";
+    sha256 = "0mb8hg76x1z0szdyl0w7jpz0bdblc6a29is1vvnh79z37qxh8138";
   };
 
   buildInputs = [ glib gtk libfm' libX11 pango gnome3.defaultIconTheme ];
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
   configureFlags = optional withGtk3 "--with-gtk=3";
 
   meta = with stdenv.lib; {
-    homepage = http://blog.lxde.org/?cat=28/;
+    homepage = https://blog.lxde.org/category/pcmanfm/;
     license = licenses.gpl2Plus;
     description = "File manager with GTK+ interface";
     maintainers = [ maintainers.ttuegel ];
diff --git a/pkgs/applications/misc/rtl_433/default.nix b/pkgs/applications/misc/rtl_433/default.nix
index 7097dda3574..5d012437e6e 100644
--- a/pkgs/applications/misc/rtl_433/default.nix
+++ b/pkgs/applications/misc/rtl_433/default.nix
@@ -1,14 +1,14 @@
 { stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, libusb1, rtl-sdr }:
 stdenv.mkDerivation rec {
 
-  version = "18.05";
+  version = "18.12";
   name = "rtl_433-${version}";
 
   src = fetchFromGitHub {
     owner = "merbanan";
     repo = "rtl_433";
-    rev = "18.05";
-    sha256 = "0vfhnjyrx6w1m8g1hww5vdz4zgdlhcaps9g0397mxlki4sm77wpc";
+    rev = "18.12";
+    sha256 = "0y73g9ffpsgnmfk8lbihyl9d1fd9v91wsn8k8xhsdmgmn4ra1jk5";
   };
 
   nativeBuildInputs = [ autoreconfHook pkgconfig ];
diff --git a/pkgs/applications/networking/instant-messengers/wavebox/default.nix b/pkgs/applications/networking/instant-messengers/wavebox/default.nix
index d7d882564e7..7a78527c501 100644
--- a/pkgs/applications/networking/instant-messengers/wavebox/default.nix
+++ b/pkgs/applications/networking/instant-messengers/wavebox/default.nix
@@ -8,7 +8,7 @@ with stdenv.lib;
 let
   bits = "x86_64";
 
-  version = "4.5.5";
+  version = "4.5.9";
 
   desktopItem = makeDesktopItem rec {
     name = "Wavebox";
@@ -25,7 +25,7 @@ in stdenv.mkDerivation rec {
   name = "wavebox-${version}";
   src = fetchurl {
     url = "https://github.com/wavebox/waveboxapp/releases/download/v${version}/${tarball}";
-    sha256 = "b392e02b3b1b4deece32311aeb69b31c2550c4251be65f408c35b0badbf3c8b6";
+    sha256 = "158kj7r5p4p3xk5pwzvbd51h543panmgkr64knv418ksyqjdi16g";
   };
 
   # don't remove runtime deps
diff --git a/pkgs/applications/science/astronomy/stellarium/default.nix b/pkgs/applications/science/astronomy/stellarium/default.nix
index cb7b2fbff3c..eb7ba2a8c9c 100644
--- a/pkgs/applications/science/astronomy/stellarium/default.nix
+++ b/pkgs/applications/science/astronomy/stellarium/default.nix
@@ -6,13 +6,13 @@
 
 mkDerivation rec {
   name = "stellarium-${version}";
-  version = "0.18.2";
+  version = "0.18.3";
 
   src = fetchFromGitHub {
     owner = "Stellarium";
     repo = "stellarium";
     rev = "v${version}";
-    sha256 = "17764i52dmipaz62k5n23fyx07d7cjir0dgav0s5b6sjd8gbjwbf";
+    sha256 = "1cnwfk3vdsxh8gacw22qik401z0kpzd1ralbg9ph2cjqx9x2m1s1";
   };
 
   nativeBuildInputs = [ cmake perl ];
diff --git a/pkgs/applications/version-management/gitlab/data.json b/pkgs/applications/version-management/gitlab/data.json
index 1f8f627f5ed..1e0d5de0847 100644
--- a/pkgs/applications/version-management/gitlab/data.json
+++ b/pkgs/applications/version-management/gitlab/data.json
@@ -1,12 +1,12 @@
 {
   "ce": {
-    "version": "11.5.4",
-    "repo_hash": "1mk7zj79cz9g8y6b5p4cznv90h94mwgy14w9vdvmqbgbnx9bayc8",
-    "deb_hash": "18i3w1k8l5hj3732w3adw3cma78l9hx77wlrgvssg9gz609kqvx6",
-    "deb_url": "https://packages.gitlab.com/gitlab/gitlab-ce/packages/debian/stretch/gitlab-ce_11.5.4-ce.0_amd64.deb/download.deb",
+    "version": "11.5.5",
+    "repo_hash": "1dxky06im18s4kxbb33qwm22pkkhgvyjggx31164iy71zcxxj1jr",
+    "deb_hash": "0wnyfl1bb5wb8kdyarjk9y4ydla84f3alnk3m3zwmdqfg9jsqgb8",
+    "deb_url": "https://packages.gitlab.com/gitlab/gitlab-ce/packages/debian/stretch/gitlab-ce_11.5.5-ce.0_amd64.deb/download.deb",
     "owner": "gitlab-org",
     "repo": "gitlab-ce",
-    "rev": "v11.5.4",
+    "rev": "v11.5.5",
     "passthru": {
       "GITALY_SERVER_VERSION": "0.129.0",
       "GITLAB_PAGES_VERSION": "1.3.1",
@@ -15,13 +15,13 @@
     }
   },
   "ee": {
-    "version": "11.5.4",
-    "repo_hash": "1rpj34wblhk6yirix16grrlhg4dfna3mjvhn8bz82m94dkhx06lc",
-    "deb_hash": "05lizhf45xv4j0y0yafrpcrqmav1xmncxxgsm97s2mlhdwn5rfnd",
-    "deb_url": "https://packages.gitlab.com/gitlab/gitlab-ee/packages/debian/stretch/gitlab-ee_11.5.4-ee.0_amd64.deb/download.deb",
+    "version": "11.5.5",
+    "repo_hash": "1j5g0x7rxrdb39b12psjirsa3s0lhqgnxh0q3r22cgzgxv0332b8",
+    "deb_hash": "193s1f7w9lcamqnmrc7c3klmybqqra7yr16x6ay0cznwcdgirisp",
+    "deb_url": "https://packages.gitlab.com/gitlab/gitlab-ee/packages/debian/stretch/gitlab-ee_11.5.5-ee.0_amd64.deb/download.deb",
     "owner": "gitlab-org",
     "repo": "gitlab-ee",
-    "rev": "v11.5.4-ee",
+    "rev": "v11.5.5-ee",
     "passthru": {
       "GITALY_SERVER_VERSION": "0.129.0",
       "GITLAB_PAGES_VERSION": "1.3.1",
diff --git a/pkgs/development/mobile/androidenv/androidndk-pkgs.nix b/pkgs/development/androidndk-pkgs/androidndk-pkgs.nix
index d4189fe8455..e43dacce625 100644
--- a/pkgs/development/mobile/androidenv/androidndk-pkgs.nix
+++ b/pkgs/development/androidndk-pkgs/androidndk-pkgs.nix
@@ -38,14 +38,16 @@ let
 
   hostInfo = ndkInfoFun stdenv.hostPlatform;
   targetInfo = ndkInfoFun stdenv.targetPlatform;
-
 in
 
 rec {
   # Misc tools
   binaries = let
       ndkBinDir =
-        "${androidndk}/libexec/${androidndk.name}/toolchains/${targetInfo.triple}-${targetInfo.gccVer}/prebuilt/${hostInfo.double}/bin";
+        "${androidndk}/libexec/android-sdk/ndk-bundle/toolchains/${targetInfo.triple}-${targetInfo.gccVer}/prebuilt/${hostInfo.double}/bin";
+      ndkGCCLibDir =
+        "${androidndk}/libexec/android-sdk/ndk-bundle/toolchains/${targetInfo.triple}-${targetInfo.gccVer}/prebuilt/${hostInfo.double}/lib/gcc/${targetInfo.triple}/4.9.x";
+
     in runCommand "ndk-gcc-binutils" {
       isGNU = true; # for cc-wrapper
       nativeBuildInputs = [ makeWrapper ];
@@ -54,8 +56,15 @@ rec {
       mkdir -p $out/bin
       for prog in ${ndkBinDir}/${targetInfo.triple}-*; do
         prog_suffix=$(basename $prog | sed 's/${targetInfo.triple}-//')
-        ln -s $prog $out/bin/${stdenv.targetPlatform.config}-$prog_suffix
+        cat > $out/bin/${stdenv.targetPlatform.config}-$prog_suffix <<EOF
+      #! ${stdenv.shell} -e
+      $prog "\$@"
+      EOF
+        chmod +x $out/bin/${stdenv.targetPlatform.config}-$prog_suffix
       done
+
+      ln -s $out/bin/${stdenv.targetPlatform.config}-ld $out/bin/ld
+      ln -s ${ndkGCCLibDir} $out/lib
     '';
 
   binutils = wrapBintoolsWith {
@@ -109,18 +118,15 @@ rec {
   # anyways.
   libraries =
     let
-      includePath = if buildAndroidndk.version == "10e" then
-          "${buildAndroidndk}/libexec/${buildAndroidndk.name}/platforms/android-${stdenv.hostPlatform.sdkVer}/arch-${hostInfo.arch}/usr/include/"
-        else
-          "${buildAndroidndk}/libexec/${buildAndroidndk.name}/sysroot/usr/include";
-      libPath = "${buildAndroidndk}/libexec/${buildAndroidndk.name}/platforms/android-${stdenv.hostPlatform.sdkVer}/arch-${hostInfo.arch}/usr/lib/";
+      includePath = "${buildAndroidndk}/libexec/android-sdk/ndk-bundle/sysroot/usr/include";
+      asmIncludePath = "${buildAndroidndk}/libexec/android-sdk/ndk-bundle/sysroot/usr/include/${targetInfo.triple}";
+      libPath = "${buildAndroidndk}/libexec/android-sdk/ndk-bundle/platforms/android-${stdenv.hostPlatform.sdkVer}/arch-${hostInfo.arch}/usr/lib/";
     in
     runCommand "bionic-prebuilt" {} ''
       mkdir -p $out
       cp -r ${includePath} $out/include
       chmod +w $out/include
-      ${lib.optionalString (lib.versionOlder "10e" buildAndroidndk.version)
-        "ln -s $out/include/${hostInfo.triple}/asm $out/include/asm"}
+      cp -r ${asmIncludePath}/* $out/include
       ln -s ${libPath} $out/lib
     '';
 }
diff --git a/pkgs/development/androidndk-pkgs/default.nix b/pkgs/development/androidndk-pkgs/default.nix
new file mode 100644
index 00000000000..341cdf72028
--- /dev/null
+++ b/pkgs/development/androidndk-pkgs/default.nix
@@ -0,0 +1,34 @@
+{ androidenv, buildPackages, pkgs, targetPackages
+, includeSources ? true, licenseAccepted ? false
+}:
+
+rec {
+  "18b" =
+    let
+      ndkVersion = "18.1.5063045";
+
+      buildAndroidComposition = buildPackages.buildPackages.androidenv.composeAndroidPackages {
+        includeNDK = true;
+        inherit ndkVersion;
+      };
+
+      androidComposition = androidenv.composeAndroidPackages {
+        includeNDK = true;
+        inherit ndkVersion;
+      };
+    in
+    import ./androidndk-pkgs.nix {
+      inherit (buildPackages)
+        makeWrapper;
+      inherit (pkgs)
+        lib stdenv
+        runCommand wrapBintoolsWith wrapCCWith;
+      # buildPackages.foo rather than buildPackages.buildPackages.foo would work,
+      # but for splicing messing up on infinite recursion for the variants we
+      # *dont't* use. Using this workaround, but also making a test to ensure
+      # these two really are the same.
+      buildAndroidndk = buildAndroidComposition.ndk-bundle;
+      androidndk = androidComposition.ndk-bundle;
+      targetAndroidndkPkgs = targetPackages.androidndkPkgs_18b;
+    };
+}
diff --git a/pkgs/development/libraries/libdeflate/default.nix b/pkgs/development/libraries/libdeflate/default.nix
new file mode 100644
index 00000000000..0328a2215b4
--- /dev/null
+++ b/pkgs/development/libraries/libdeflate/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, lib, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  name = "libdeflate-${version}";
+  version = "1.1";
+
+  src = fetchFromGitHub {
+    owner = "ebiggers";
+    repo = "libdeflate";
+    rev = "v${version}";
+    sha256 = "1wqxwza6rwmhrsy9sw86pdcd0w742gbzsy9qxnq6kk59m6h1dbsb";
+  };
+
+  postPatch = ''
+    substituteInPlace Makefile --replace /usr $out
+  '';
+
+  configurePhase = ''
+    make programs/config.h
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Fast DEFLATE/zlib/gzip compressor and decompressor";
+    license = licenses.mit;
+    homepage = https://github.com/ebiggers/libdeflate;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ orivej ];
+  };
+}
diff --git a/pkgs/development/libraries/libfm/default.nix b/pkgs/development/libraries/libfm/default.nix
index 796c03dab5e..a0323481be9 100644
--- a/pkgs/development/libraries/libfm/default.nix
+++ b/pkgs/development/libraries/libfm/default.nix
@@ -9,23 +9,29 @@ stdenv.mkDerivation rec {
   name = if extraOnly
     then "libfm-extra-${version}"
     else "libfm-${version}";
-  version = "1.3.0.2";
+  version = "1.3.1";
 
   src = fetchurl {
     url = "mirror://sourceforge/pcmanfm/libfm-${version}.tar.xz";
-    sha256 = "0wkwbi1nyvqza3r1dhrq846axiiq0fy0dqgngnagh76fjrwnzl0q";
+    sha256 = "1r6gl49xrykldwz8y4h2s7gjarxigg3bbkrj0gphxjj1vr5j9ccn";
   };
 
   nativeBuildInputs = [ vala pkgconfig intltool ];
   buildInputs = [ glib gtk pango ] ++ optional (!extraOnly) menu-cache;
 
-  configureFlags = optional extraOnly "--with-extra-only"
+  configureFlags = [
+    "--sysconfdir=/etc"
+  ] ++ optional extraOnly "--with-extra-only"
     ++ optional withGtk3 "--with-gtk=3";
 
+  installFlags = [
+    "sysconfdir=${placeholder "out"}/etc"
+  ];
+
   enableParallelBuilding = true;
 
   meta = with stdenv.lib; {
-    homepage = http://blog.lxde.org/?cat=28/;
+    homepage = https://blog.lxde.org/category/pcmanfm/;
     license = licenses.lgpl21Plus;
     description = "A glib-based library for file management";
     maintainers = [ maintainers.ttuegel ];
diff --git a/pkgs/development/libraries/libsigcxx/default.nix b/pkgs/development/libraries/libsigcxx/default.nix
index 8eba5377bc3..434dbfb9f72 100644
--- a/pkgs/development/libraries/libsigcxx/default.nix
+++ b/pkgs/development/libraries/libsigcxx/default.nix
@@ -1,20 +1,25 @@
-{ stdenv, fetchurl, pkgconfig, gnum4 }:
-let
-  ver_maj = "2.10"; # odd major numbers are unstable
-  ver_min = "0";
-in
+{ stdenv, fetchurl, pkgconfig, gnum4, gnome3 }:
+
 stdenv.mkDerivation rec {
-  name = "libsigc++-${ver_maj}.${ver_min}";
+  pname = "libsigc++";
+  version = "2.10.1";
 
   src = fetchurl {
-    url = "mirror://gnome/sources/libsigc++/${ver_maj}/${name}.tar.xz";
-    sha256 = "f843d6346260bfcb4426259e314512b99e296e8ca241d771d21ac64f28298d81";
+    url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "00v08km4wwzbh6vjxb21388wb9dm6g2xh14rgwabnv4c2wk5z8n9";
   };
 
   nativeBuildInputs = [ pkgconfig gnum4 ];
 
   doCheck = true;
 
+  passthru = {
+    updateScript = gnome3.updateScript {
+      packageName = pname;
+      attrPath = "libsigcxx";
+    };
+  };
+
   meta = with stdenv.lib; {
     homepage = https://libsigcplusplus.github.io/libsigcplusplus/;
     description = "A typesafe callback system for standard C++";
diff --git a/pkgs/development/libraries/menu-cache/default.nix b/pkgs/development/libraries/menu-cache/default.nix
index c92b6a4e728..d64b7f12312 100644
--- a/pkgs/development/libraries/menu-cache/default.nix
+++ b/pkgs/development/libraries/menu-cache/default.nix
@@ -14,9 +14,9 @@ stdenv.mkDerivation {
   buildInputs = [ glib libfm-extra ];
 
   meta = with stdenv.lib; {
-    homepage = http://blog.lxde.org/?tag=menu-cache;
-    license = licenses.gpl2Plus;
     description = "Library to read freedesktop.org menu files";
+    homepage = https://blog.lxde.org/tag/menu-cache/;
+    license = licenses.gpl2Plus;
     maintainers = [ maintainers.ttuegel ];
     platforms = platforms.linux ++ platforms.darwin;
   };
diff --git a/pkgs/development/libraries/opencv/4.x.nix b/pkgs/development/libraries/opencv/4.x.nix
index ecd320fe556..3f21ee15bf3 100644
--- a/pkgs/development/libraries/opencv/4.x.nix
+++ b/pkgs/development/libraries/opencv/4.x.nix
@@ -1,5 +1,5 @@
 { lib, stdenv
-, fetchurl, fetchFromGitHub, fetchpatch
+, fetchurl, fetchFromGitHub
 , cmake, pkgconfig, unzip, zlib, pcre, hdf5
 , glog, boost, google-gflags, protobuf
 , config
@@ -47,10 +47,8 @@ let
   contribSrc = fetchFromGitHub {
     owner  = "opencv";
     repo   = "opencv_contrib";
-    # TODO: set to `version` when opencv_contrib-4.0.1 is released;
-    # See: http://answers.opencv.org/question/205793/will-there-be-a-opencv_contrib-401-release-now-that-opencv-401-is-out/
-    rev    = "4.0.0";
-    sha256 = "1g4pzw7hv1v9jp1nrqjxqwpi1byl3mxkj6w6ibq6ydsn0138p66z";
+    rev    = version;
+    sha256 = "0svw8f6nvnzmrc0baj6priq4hbijla4kl6gzy8yif1jfvcwb1syy";
   };
 
   # Contrib must be built in order to enable Tesseract support:
@@ -162,16 +160,6 @@ stdenv.mkDerivation rec {
     cp --no-preserve=mode -r "${contribSrc}/modules" "$NIX_BUILD_TOP/source/opencv_contrib"
   '';
 
-  patches =
-    # Fixes issue: https://github.com/opencv/opencv_contrib/issues/1923
-    # PR: https://github.com/opencv/opencv_contrib/pull/1913
-    lib.optional buildContrib (fetchpatch {
-      url = https://github.com/opencv/opencv_contrib/commit/e068b62a1432d4d5688693a9e20bf175dfaa9a3e.patch;
-      sha256 = "102mq1qgmla40hhj8mda70inhakdazm9agyah98kq9931scvf0c9";
-      stripLen = 2;
-      extraPrefix = "opencv_contrib/";
-    });
-
   # This prevents cmake from using libraries in impure paths (which
   # causes build failure on non NixOS)
   # Also, work around https://github.com/NixOS/nixpkgs/issues/26304 with
diff --git a/pkgs/development/mobile/adb-sync/default.nix b/pkgs/development/mobile/adb-sync/default.nix
index ee6ff3cecd5..b6d35051733 100644
--- a/pkgs/development/mobile/adb-sync/default.nix
+++ b/pkgs/development/mobile/adb-sync/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchgit, python3, androidsdk, makeWrapper }:
+{ stdenv, fetchgit, python3, platform-tools, makeWrapper }:
 
 stdenv.mkDerivation rec {
   name = "adb-sync-${version}";
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
     sha256 = "1y016bjky5sn58v91jyqfz7vw8qfqnfhb9s9jd32k8y29hy5vy4d";
   };
 
-  buildInputs = [ python3 androidsdk makeWrapper ];
+  buildInputs = [ python3 platform-tools makeWrapper ];
 
   phases = "installPhase";
 
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
     mkdir -p $out/bin
     cp $src/adb-channel $src/adb-sync $out/bin/
     patchShebangs $out/bin
-    wrapProgram $out/bin/adb-sync --suffix PATH : ${androidsdk}/bin
+    wrapProgram $out/bin/adb-sync --suffix PATH : ${platform-tools}/bin
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/development/mobile/adbfs-rootless/default.nix b/pkgs/development/mobile/adbfs-rootless/default.nix
index 18ad3048d83..fffe2fbbcbe 100644
--- a/pkgs/development/mobile/adbfs-rootless/default.nix
+++ b/pkgs/development/mobile/adbfs-rootless/default.nix
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
 
   postPatch = ''
     # very ugly way of replacing the adb calls
-    sed -e 's|"adb |"${stdenv.lib.getBin adb}/bin/adb |g' \
+    sed -e 's|"adb |"${adb}/bin/adb |g' \
         -i adbfs.cpp
   '';
 
diff --git a/pkgs/development/mobile/androidenv/addon.xml b/pkgs/development/mobile/androidenv/addon.xml
deleted file mode 100644
index 68792038d00..00000000000
--- a/pkgs/development/mobile/androidenv/addon.xml
+++ /dev/null
@@ -1,1614 +0,0 @@
-<?xml version="1.0" ?>
-<sdk:sdk-addon xmlns:sdk="http://schemas.android.com/sdk/android/addon/7" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-	<!--Generated on 2018-09-27 12:07:52.862255 with ADRT.-->
-	<sdk:license id="android-sdk-license" type="text">Terms and Conditions
-
-This is the Android Software Development Kit License Agreement
-
-1. Introduction
-
-1.1 The Android Software Development Kit (referred to in the License Agreement as the &quot;SDK&quot; and specifically including the Android system files, packaged APIs, and Google APIs add-ons) is licensed to you subject to the terms of the License Agreement. The License Agreement forms a legally binding contract between you and Google in relation to your use of the SDK.
-
-1.2 &quot;Android&quot; means the Android software stack for devices, as made available under the Android Open Source Project, which is located at the following URL: http://source.android.com/, as updated from time to time.
-
-1.3 A &quot;compatible implementation&quot; means any Android device that (i) complies with the Android Compatibility Definition document, which can be found at the Android compatibility website (http://source.android.com/compatibility) and which may be updated from time to time; and (ii) successfully passes the Android Compatibility Test Suite (CTS).
-
-1.4 &quot;Google&quot; means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States.
-
-
-2. Accepting the License Agreement
-
-2.1 In order to use the SDK, you must first agree to the License Agreement. You may not use the SDK if you do not accept the License Agreement.
-
-2.2 By clicking to accept, you hereby agree to the terms of the License Agreement.
-
-2.3 You may not use the SDK and may not accept the License Agreement if you are a person barred from receiving the SDK under the laws of the United States or other countries, including the country in which you are resident or from which you use the SDK.
-
-2.4 If you are agreeing to be bound by the License Agreement on behalf of your employer or other entity, you represent and warrant that you have full legal authority to bind your employer or such entity to the License Agreement. If you do not have the requisite authority, you may not accept the License Agreement or use the SDK on behalf of your employer or other entity.
-
-
-3. SDK License from Google
-
-3.1 Subject to the terms of the License Agreement, Google grants you a limited, worldwide, royalty-free, non-assignable, non-exclusive, and non-sublicensable license to use the SDK solely to develop applications for compatible implementations of Android.
-
-3.2 You may not use this SDK to develop applications for other platforms (including non-compatible implementations of Android) or to develop another SDK. You are of course free to develop applications for other platforms, including non-compatible implementations of Android, provided that this SDK is not used for that purpose.
-
-3.3 You agree that Google or third parties own all legal right, title and interest in and to the SDK, including any Intellectual Property Rights that subsist in the SDK. &quot;Intellectual Property Rights&quot; means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Google reserves all rights not expressly granted to you.
-
-3.4 You may not use the SDK for any purpose not expressly permitted by the License Agreement.  Except to the extent required by applicable third party licenses, you may not copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the SDK or any part of the SDK.
-
-3.5 Use, reproduction and distribution of components of the SDK licensed under an open source software license are governed solely by the terms of that open source software license and not the License Agreement.
-
-3.6 You agree that the form and nature of the SDK that Google provides may change without prior notice to you and that future versions of the SDK may be incompatible with applications developed on previous versions of the SDK. You agree that Google may stop (permanently or temporarily) providing the SDK (or any features within the SDK) to you or to users generally at Google's sole discretion, without prior notice to you.
-
-3.7 Nothing in the License Agreement gives you a right to use any of Google's trade names, trademarks, service marks, logos, domain names, or other distinctive brand features.
-
-3.8 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the SDK.
-
-
-4. Use of the SDK by You
-
-4.1 Google agrees that it obtains no right, title or interest from you (or your licensors) under the License Agreement in or to any software applications that you develop using the SDK, including any intellectual property rights that subsist in those applications.
-
-4.2 You agree to use the SDK and write applications only for purposes that are permitted by (a) the License Agreement and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries).
-
-4.3 You agree that if you use the SDK to develop applications for general public users, you will protect the privacy and legal rights of those users. If the users provide you with user names, passwords, or other login information or personal information, you must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. If the user provides your application with Google Account information, your application may only use that information to access the user's Google Account when, and for the limited purposes for which, the user has given you permission to do so.
-
-4.4 You agree that you will not engage in any activity with the SDK, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of any third party including, but not limited to, Google or any mobile communications carrier.
-
-4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through Android and/or applications for Android, and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so.
-
-4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under the License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Google or any third party may suffer) of any such breach.
-
-5. Your Developer Credentials
-
-5.1 You agree that you are responsible for maintaining the confidentiality of any developer credentials that may be issued to you by Google or which you may choose yourself and that you will be solely responsible for all applications that are developed under your developer credentials.
-
-6. Privacy and Information
-
-6.1 In order to continually innovate and improve the SDK, Google may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in the SDK are being used and how they are being used. Before any of this information is collected, the SDK will notify you and seek your consent. If you withhold consent, the information will not be collected.
-
-6.2 The data collected is examined in the aggregate to improve the SDK and is maintained in accordance with Google's Privacy Policy.
-
-
-7. Third Party Applications
-
-7.1 If you use the SDK to run applications developed by a third party or that access data, content or resources provided by a third party, you agree that Google is not responsible for those applications, data, content, or resources. You understand that all data, content or resources which you may access through such third party applications are the sole responsibility of the person from which they originated and that Google is not liable for any loss or damage that you may experience as a result of the use or access of any of those third party applications, data, content, or resources.
-
-7.2 You should be aware the data, content, and resources presented to you through such a third party application may be protected by intellectual property rights which are owned by the providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on these data, content, or resources (either in whole or in part) unless you have been specifically given permission to do so by the relevant owners.
-
-7.3 You acknowledge that your use of such third party applications, data, content, or resources may be subject to separate terms between you and the relevant third party. In that case, the License Agreement does not affect your legal relationship with these third parties.
-
-
-8. Using Android APIs
-
-8.1 Google Data APIs
-
-8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be protected by intellectual property rights which are owned by Google or those parties that provide the data (or by other persons or companies on their behalf). Your use of any such API may be subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this data (either in whole or in part) unless allowed by the relevant Terms of Service.
-
-8.1.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree that you shall retrieve data only with the user's explicit consent and only when, and for the limited purposes for which, the user has given you permission to do so.
-
-
-9. Terminating the License Agreement
-
-9.1 The License Agreement will continue to apply until terminated by either you or Google as set out below.
-
-9.2 If you want to terminate the License Agreement, you may do so by ceasing your use of the SDK and any relevant developer credentials.
-
-9.3 Google may at any time, terminate the License Agreement with you if:
-(A) you have breached any provision of the License Agreement; or
-(B) Google is required to do so by law; or
-(C) the partner with whom Google offered certain parts of SDK (such as APIs) to you has terminated its relationship with Google or ceased to offer certain parts of the SDK to you; or
-(D) Google decides to no longer provide the SDK or certain parts of the SDK to users in the country in which you are resident or from which you use the service, or the provision of the SDK or certain SDK services to you by Google is, in Google's sole discretion, no longer commercially viable.
-
-9.4 When the License Agreement comes to an end, all of the legal rights, obligations and liabilities that you and Google have benefited from, been subject to (or which have accrued over time whilst the License Agreement has been in force) or which are expressed to continue indefinitely, shall be unaffected by this cessation, and the provisions of paragraph 14.7 shall continue to apply to such rights, obligations and liabilities indefinitely.
-
-
-10. DISCLAIMER OF WARRANTIES
-
-10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE SDK IS AT YOUR SOLE RISK AND THAT THE SDK IS PROVIDED &quot;AS IS&quot; AND &quot;AS AVAILABLE&quot; WITHOUT WARRANTY OF ANY KIND FROM GOOGLE.
-
-10.2 YOUR USE OF THE SDK AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE SDK IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE.
-
-10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-
-
-11. LIMITATION OF LIABILITY
-
-11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.
-
-
-12. Indemnification
-
-12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Google, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys fees) arising out of or accruing from (a) your use of the SDK, (b) any application you develop on the SDK that infringes any copyright, trademark, trade secret, trade dress, patent or other intellectual property right of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you with the License Agreement.
-
-
-13. Changes to the License Agreement
-
-13.1 Google may make changes to the License Agreement as it distributes new versions of the SDK. When these changes are made, Google will make a new version of the License Agreement available on the website where the SDK is made available.
-
-
-14. General Legal Terms
-
-14.1 The License Agreement constitutes the whole legal agreement between you and Google and governs your use of the SDK (excluding any services which Google may provide to you under a separate written agreement), and completely replaces any prior agreements between you and Google in relation to the SDK.
-
-14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in the License Agreement (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google's rights and that those rights or remedies will still be available to Google.
-
-14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of the License Agreement is invalid, then that provision will be removed from the License Agreement without affecting the rest of the License Agreement. The remaining provisions of the License Agreement will continue to be valid and enforceable.
-
-14.4 You acknowledge and agree that each member of the group of companies of which Google is the parent shall be third party beneficiaries to the License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of the License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to the License Agreement.
-
-14.5 EXPORT RESTRICTIONS. THE SDK IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE SDK. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.
-
-14.6 The rights granted in the License Agreement may not be assigned or transferred by either you or Google without the prior written approval of the other party. Neither you nor Google shall be permitted to delegate their responsibilities or obligations under the License Agreement without the prior written approval of the other party.
-
-14.7 The License Agreement, and your relationship with Google under the License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from the License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.
-
-
-November 20, 2015</sdk:license>
-	<sdk:license id="android-sdk-preview-license" type="text">To get started with the Android SDK Preview, you must agree to the following terms and conditions.
-As described below, please note that this is a preview version of the Android SDK, subject to change, that you use at your own risk.  The Android SDK Preview is not a stable release, and may contain errors and defects that can result in serious damage to your computer systems, devices and data.
-
-This is the Android SDK Preview License Agreement (the &quot;License Agreement&quot;).
-
-1. Introduction
-
-1.1 The Android SDK Preview (referred to in the License Agreement as the “Preview” and specifically including the Android system files, packaged APIs, and Preview library files, if and when they are made available) is licensed to you subject to the terms of the License Agreement. The License Agreement forms a legally binding contract between you and Google in relation to your use of the Preview.
-
-1.2 &quot;Android&quot; means the Android software stack for devices, as made available under the Android Open Source Project, which is located at the following URL: http://source.android.com/, as updated from time to time.
-
-1.3 &quot;Google&quot; means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States.
-
-2. Accepting the License Agreement
-
-2.1 In order to use the Preview, you must first agree to the License Agreement. You may not use the Preview if you do not accept the License Agreement.
-
-2.2 By clicking to accept and/or using the Preview, you hereby agree to the terms of the License Agreement.
-
-2.3 You may not use the Preview and may not accept the License Agreement if you are a person barred from receiving the Preview under the laws of the United States or other countries including the country in which you are resident or from which you use the Preview.
-
-2.4 If you will use the Preview internally within your company or organization you agree to be bound by the License Agreement on behalf of your employer or other entity, and you represent and warrant that you have full legal authority to bind your employer or such entity to the License Agreement. If you do not have the requisite authority, you may not accept the License Agreement or use the Preview on behalf of your employer or other entity.
-
-3. Preview License from Google
-
-3.1 Subject to the terms of the License Agreement, Google grants you a royalty-free, non-assignable, non-exclusive, non-sublicensable, limited, revocable license to use the Preview, personally or internally within your company or organization, solely to develop applications to run on the Android platform.
-
-3.2 You agree that Google or third parties owns all legal right, title and interest in and to the Preview, including any Intellectual Property Rights that subsist in the Preview. &quot;Intellectual Property Rights&quot; means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Google reserves all rights not expressly granted to you.
-
-3.3 You may not use the Preview for any purpose not expressly permitted by the License Agreement. Except to the extent required by applicable third party licenses, you may not: (a) copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the Preview or any part of the Preview; or (b) load any part of the Preview onto a mobile handset or any other hardware device except a personal computer, combine any part of the Preview with other software, or distribute any software or device incorporating a part of the Preview.
-
-3.4 You agree that you will not take any actions that may cause or result in the fragmentation of Android, including but not limited to distributing, participating in the creation of, or promoting in any way a software development kit derived from the Preview.
-
-3.5 Use, reproduction and distribution of components of the Preview licensed under an open source software license are governed solely by the terms of that open source software license and not the License Agreement. You agree to remain a licensee in good standing in regard to such open source software licenses under all the rights granted and to refrain from any actions that may terminate, suspend, or breach such rights.
-
-3.6 You agree that the form and nature of the Preview that Google provides may change without prior notice to you and that future versions of the Preview may be incompatible with applications developed on previous versions of the Preview. You agree that Google may stop (permanently or temporarily) providing the Preview (or any features within the Preview) to you or to users generally at Google's sole discretion, without prior notice to you.
-
-3.7 Nothing in the License Agreement gives you a right to use any of Google's trade names, trademarks, service marks, logos, domain names, or other distinctive brand features.
-
-3.8 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the Preview.
-
-4. Use of the Preview by You
-
-4.1 Google agrees that nothing in the License Agreement gives Google any right, title or interest from you (or your licensors) under the License Agreement in or to any software applications that you develop using the Preview, including any intellectual property rights that subsist in those applications.
-
-4.2 You agree to use the Preview and write applications only for purposes that are permitted by (a) the License Agreement, and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries).
-
-4.3 You agree that if you use the Preview to develop applications, you will protect the privacy and legal rights of users. If users provide you with user names, passwords, or other login information or personal information, you must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. If users provide you with Google Account information, your application may only use that information to access the user's Google Account when, and for the limited purposes for which, each user has given you permission to do so.
-
-4.4 You agree that you will not engage in any activity with the Preview, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of Google or any third party.
-
-4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through Android and/or applications for Android, and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so.
-
-4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under the License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Google or any third party may suffer) of any such breach.
-
-4.7 The Preview is in development, and your testing and feedback are an important part of the development process. By using the Preview, you acknowledge that implementation of some features are still under development and that you should not rely on the Preview having the full functionality of a stable release. You agree not to publicly distribute or ship any application using this Preview as this Preview will no longer be supported after the official Android SDK is released.
-
-5. Your Developer Credentials
-
-5.1 You agree that you are responsible for maintaining the confidentiality of any developer credentials that may be issued to you by Google or which you may choose yourself and that you will be solely responsible for all applications that are developed under your developer credentials.
-
-6. Privacy and Information
-
-6.1 In order to continually innovate and improve the Preview, Google may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in the Preview are being used and how they are being used. Before any of this information is collected, the Preview will notify you and seek your consent. If you withhold consent, the information will not be collected.
-
-6.2 The data collected is examined in the aggregate to improve the Preview and is maintained in accordance with Google's Privacy Policy located at http://www.google.com/policies/privacy/.
-
-7. Third Party Applications
-
-7.1 If you use the Preview to run applications developed by a third party or that access data, content or resources provided by a third party, you agree that Google is not responsible for those applications, data, content, or resources. You understand that all data, content or resources which you may access through such third party applications are the sole responsibility of the person from which they originated and that Google is not liable for any loss or damage that you may experience as a result of the use or access of any of those third party applications, data, content, or resources.
-
-7.2 You should be aware the data, content, and resources presented to you through such a third party application may be protected by intellectual property rights which are owned by the providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on these data, content, or resources (either in whole or in part) unless you have been specifically given permission to do so by the relevant owners.
-
-7.3 You acknowledge that your use of such third party applications, data, content, or resources may be subject to separate terms between you and the relevant third party.
-
-8. Using Google APIs
-
-8.1 Google APIs
-
-8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be protected by intellectual property rights which are owned by Google or those parties that provide the data (or by other persons or companies on their behalf). Your use of any such API may be subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this data (either in whole or in part) unless allowed by the relevant Terms of Service.
-
-8.1.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree that you shall retrieve data only with the user's explicit consent and only when, and for the limited purposes for which, the user has given you permission to do so.
-
-9. Terminating the License Agreement
-
-9.1 the License Agreement will continue to apply until terminated by either you or Google as set out below.
-
-9.2 If you want to terminate the License Agreement, you may do so by ceasing your use of the Preview and any relevant developer credentials.
-
-9.3 Google may at any time, terminate the License Agreement, with or without cause, upon notice to you.
-
-9.4 The License Agreement will automatically terminate without notice or other action upon the earlier of:
-(A) when Google ceases to provide the Preview or certain parts of the Preview to users in the country in which you are resident or from which you use the service; and
-(B) Google issues a final release version of the Android SDK.
-
-9.5 When the License Agreement is terminated, the license granted to you in the License Agreement will terminate, you will immediately cease all use of the Preview, and the provisions of paragraphs 10, 11, 12 and 14 shall survive indefinitely.
-
-10. DISCLAIMERS
-
-10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE PREVIEW IS AT YOUR SOLE RISK AND THAT THE PREVIEW IS PROVIDED &quot;AS IS&quot; AND &quot;AS AVAILABLE&quot; WITHOUT WARRANTY OF ANY KIND FROM GOOGLE.
-
-10.2 YOUR USE OF THE PREVIEW AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE PREVIEW IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE. WITHOUT LIMITING THE FOREGOING, YOU UNDERSTAND THAT THE PREVIEW IS NOT A STABLE RELEASE AND MAY CONTAIN ERRORS, DEFECTS AND SECURITY VULNERABILITIES THAT CAN RESULT IN SIGNIFICANT DAMAGE, INCLUDING THE COMPLETE, IRRECOVERABLE LOSS OF USE OF YOUR COMPUTER SYSTEM OR OTHER DEVICE.
-
-10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-
-11. LIMITATION OF LIABILITY
-
-11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.
-
-12. Indemnification
-
-12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Google, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys’ fees) arising out of or accruing from (a) your use of the Preview, (b) any application you develop on the Preview that infringes any Intellectual Property Rights of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you of the License Agreement.
-
-13. Changes to the License Agreement
-
-13.1 Google may make changes to the License Agreement as it distributes new versions of the Preview. When these changes are made, Google will make a new version of the License Agreement available on the website where the Preview is made available.
-
-14. General Legal Terms
-
-14.1 the License Agreement constitutes the whole legal agreement between you and Google and governs your use of the Preview (excluding any services which Google may provide to you under a separate written agreement), and completely replaces any prior agreements between you and Google in relation to the Preview.
-
-14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in the License Agreement (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google's rights and that those rights or remedies will still be available to Google.
-
-14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of the License Agreement is invalid, then that provision will be removed from the License Agreement without affecting the rest of the License Agreement. The remaining provisions of the License Agreement will continue to be valid and enforceable.
-
-14.4 You acknowledge and agree that each member of the group of companies of which Google is the parent shall be third party beneficiaries to the License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of the License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to the License Agreement.
-
-14.5 EXPORT RESTRICTIONS. THE PREVIEW IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE PREVIEW. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.
-
-14.6 The License Agreement may not be assigned or transferred by you without the prior written approval of Google, and any attempted assignment without such approval will be void. You shall not delegate your responsibilities or obligations under the License Agreement without the prior written approval of Google.
-
-14.7 The License Agreement, and your relationship with Google under the License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from the License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.
-
-June 2014.</sdk:license>
-	<sdk:license id="android-googletv-license" type="text">Terms and Conditions
-
-This is the Google TV Add-on for the Android Software Development Kit License Agreement.
-
-1. Introduction
-
-1.1 The Google TV Add-on for the Android Software Development Kit (referred to in this License Agreement as the &quot;Google TV Add-on&quot; and specifically including the Android system files, packaged APIs, and Google APIs add-ons) is licensed to you subject to the terms of this License Agreement. This License Agreement forms a legally binding contract between you and Google in relation to your use of the Google TV Add-on.
-
-1.2 &quot;Google&quot; means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States.
-
-2. Accepting this License Agreement
-
-2.1 In order to use the Google TV Add-on, you must first agree to this License Agreement. You may not use the Google TV Add-on if you do not accept this License Agreement.
-
-2.2 You can accept this License Agreement by:
-
-(A) clicking to accept or agree to this License Agreement, where this option is made available to you; or
-
-(B) by actually using the Google TV Add-on.  In this case, you agree that use of the Google TV Add-on constitutes acceptance of the License Agreement from that point onwards.
-
-2.3 You may not use the Google TV Add-on and may not accept the Licensing Agreement if you are a person barred from receiving the Google TV Add-on under the laws of the United States or other countries including the country in which you are resident or from which you use the Google TV Add-on.
-
-2.4 If you are agreeing to be bound by this License Agreement on behalf of your employer or other entity, you represent and warrant that you have full legal authority to bind your employer or such entity to this License Agreement. If you do not have the requisite authority, you may not accept the Licensing Agreement or use the Google TV Add-on on behalf of your employer or other entity.
-
-3. Google TV Add-on License from Google
-
-3.1 Subject to the terms of this License Agreement, Google grants you a limited, worldwide, royalty-free, non- assignable and non-exclusive license to use the Google TV Add-on solely to develop applications to run on the Google TV platform.
-
-3.2 You agree that Google or third parties own all legal right, title and interest in and to the Google TV Add-on, including any Intellectual Property Rights that subsist in the Google TV Add-on. &quot;Intellectual Property Rights&quot; means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Google reserves all rights not expressly granted to you.
-
-3.3 Except to the extent required by applicable third party licenses, you may not copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the Google TV Add-on or any part of the Google TV Add-on. Except to the extent required by applicable third party licenses, you may not load any part of the Google TV Add-on onto a mobile handset, television, or any other hardware device except a personal computer, combine any part of the Google TV Add-on with other software, or distribute any software or device incorporating a part of the Google TV Add-on.
-
-3.4 Use, reproduction and distribution of components of the Google TV Add-on licensed under an open source software license are governed solely by the terms of that open source software license and not this License Agreement.
-
-3.5 You agree that the form and nature of the Google TV Add-on that Google provides may change without prior notice to you and that future versions of the Google TV Add-on may be incompatible with applications developed on previous versions of the Google TV Add-on. You agree that Google may stop (permanently or temporarily) providing the Google TV Add-on (or any features within the Google TV Add-on) to you or to users generally at Google's sole discretion, without prior notice to you.
-
-3.6 Nothing in this License Agreement gives you a right to use any of Google's or it’s licensors’ trade names, trademarks, service marks, logos, domain names, or other distinctive brand features.
-
-3.7 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the Google TV Add-on.
-
-4. Use of the Google TV Add-on by You
-
-4.1 Google agrees that it obtains no right, title or interest from you (or your licensors) under this License Agreement in or to any software applications that you develop using the Google TV Add-on, including any intellectual property rights that subsist in those applications.
-
-4.2 You agree to use the Google TV Add-on and write applications only for purposes that are permitted by (a) this License Agreement and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries).
-
-4.3 You agree that if you use the Google TV Add-on to develop applications for general public users, you will protect the privacy and legal rights of those users. If the users provide you with user names, passwords, or other login information or personal information, your must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. If the user provides your application with Google Account information, your application may only use that information to access the user's Google Account when, and for the limited purposes for which, the user has given you explicit permission to do so.
-
-4.4 You agree that you will not engage in any activity with the Google TV Add-on, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of any third party including, but not limited to, Google, Multichannel Video Program Distributors or any mobile communications carrier.
-
-4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through the Google TV platform and/or applications for the Google TV platform, and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so.
-
-4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under this License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Google or any third party may suffer) of any such breach.
-
-5. Your Developer Credentials
-
-5.1 You agree that you are responsible for maintaining the confidentiality of any developer credentials that may be issued to you by Google or which you may choose yourself and that you will be solely responsible for all applications that are developed under your developer credentials.
-
-6. Privacy and Information
-
-6.1 In order to continually innovate and improve the Google TV Add-on, Google may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in the Google TV Add-on are being used and how they are being used. Before any of this information is collected, the Google TV Add-on will notify you and seek your consent. If you withhold consent, the information will not be collected.
-
-6.2 The data collected is examined in the aggregate to improve the Google TV Add-on and is maintained in accordance with Google's Privacy Policy.
-
-7. Third Party Applications for the Google TV Platform
-
-7.1 If you use the Google TV Add-on to run applications developed by a third party or that access data, content or resources provided by a third party, you agree that Google is not responsible for those applications, data, content, or resources. You understand that all data, content or resources which you may access through such third party applications are the sole responsibility of the person from which they originated and that Google is not liable for any loss or damage that you may experience as a result of the use or access of any of those third party applications, data, content, or resources.
-
-7.2 You should be aware the data, content, and resources presented to you through such a third party application may be protected by intellectual property rights which are owned by the providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on these data, content, or resources (either in whole or in part) unless you have been specifically given permission to do so by the relevant owners.
-
-7.3 You acknowledge that your use of such third party applications, data, content, or resources may be subject to separate terms between you and the relevant third party. In that case, this License Agreement does not affect your legal relationship with these third parties.
-
-8. Using Google TV APIs
-
-8.1 If you use any Google TV API to retrieve data from Google, you acknowledge that the data (“Google TV API Content”) may be protected by intellectual property rights which are owned by Google or those parties that provide the data (or by other persons or companies on their behalf). Your use of any such API may be subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this data (either in whole or in part) unless allowed by the relevant Terms of Service.  Some portions of the Google TV API Content are licensed to Google by third parties, including but not limited to Tribune Media Services
-
-8.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree that you shall retrieve data only with the user's explicit consent and only when, and for the limited purposes for which, the user has given you permission to do so.
-
-8.3 Except as explicitly permitted in Section 3 (Google TV Add-on License from Google), you must:
-
-(a) not modify nor format the Google TV API Content except to the extent reasonably and technically necessary to optimize the display such Google TV API Content in your application;
-
-(b) not edit the Google TV API Content in a manner that renders the Google TV API Content inaccurate of alters its inherent meaning (provided that displaying excerpts will not violate the foregoing); or
-
-(c)  not create any commercial audience measurement tool or service using the Google TV API Content
-
-9. Terminating this License Agreement
-
-9.1 This License Agreement will continue to apply until terminated by either you or Google as set out below.
-
-9.2 If you want to terminate this License Agreement, you may do so by ceasing your use of the Google TV Add-on and any relevant developer credentials.
-
-9.3 Google may at any time, terminate this License Agreement with you if:
-
-(A) you have breached any provision of this License Agreement; or
-
-(B) Google is required to do so by law; or
-
-(C) the partner with whom Google offered certain parts of Google TV Add-on (such as APIs) to you has terminated its relationship with Google or ceased to offer certain parts of the Google TV Add-on to you; or
-
-(D) Google decides to no longer providing the Google TV Add-on or certain parts of the Google TV Add-on to users in the country in which you are resident or from which you use the service, or the provision of the Google TV Add-on or certain Google TV Add-on services to you by Google is, in Google's sole discretion, no longer commercially viable.
-
-9.4 When this License Agreement comes to an end, all of the legal rights, obligations and liabilities that you and Google have benefited from, been subject to (or which have accrued over time whilst this License Agreement has been in force) or which are expressed to continue indefinitely, shall be unaffected by this cessation, and the provisions of paragraph 14.7 shall continue to apply to such rights, obligations and liabilities indefinitely.
-
-10. DISCLAIMER OF WARRANTIES
-
-10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE GOOGLE TV ADD-ON IS AT YOUR SOLE RISK AND THAT THE GOOGLE TV ADD-ON IS PROVIDED &quot;AS IS&quot; AND &quot;AS AVAILABLE&quot; WITHOUT WARRANTY OF ANY KIND FROM GOOGLE.
-
-10.2 YOUR USE OF THE GOOGLE TV ADD-ON AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE GOOGLE TV ADD-ON IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE.
-
-10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-
-11. LIMITATION OF LIABILITY
-
-11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.
-
-12. Indemnification
-
-12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Google, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys fees) arising out of or accruing from (a) your use of the Google TV Add-on, (b) any application you develop on the Google TV Add-on that infringes any copyright, trademark, trade secret, trade dress, patent or other intellectual property right of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you with this License Agreement.
-
-13. Changes to the License Agreement
-
-13.1 Google may make changes to the License Agreement as it distributes new versions of the Google TV Add-on.
-
-14. General Legal Terms
-
-14.1 This License Agreement constitute the whole legal agreement between you and Google and govern your use of the Google TV Add-on (excluding any services which Google may provide to you under a separate written agreement), and completely replace any prior agreements between you and Google in relation to the Google TV Add-on.
-
-14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in this License Agreement (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google's rights and that those rights or remedies will still be available to Google.
-
-14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of this License Agreement is invalid, then that provision will be removed from this License Agreement without affecting the rest of this License Agreement. The remaining provisions of this License Agreement will continue to be valid and enforceable.
-
-14.4 You acknowledge and agree that Google’s API data licensors and each member of the group of companies of which Google is the parent shall be third party beneficiaries to this License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of this License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to this License Agreement.
-
-14.5 EXPORT RESTRICTIONS. THE GOOGLE TV ADD-ON IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE GOOGLE TV ADD-ON. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.
-
-14.6 The rights granted in this License Agreement may not be assigned or transferred by either you or Google without the prior written approval of the other party. Neither you nor Google shall be permitted to delegate their responsibilities or obligations under this License Agreement without the prior written approval of the other party.
-
-14.7 This License Agreement, and your relationship with Google under this License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from this License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.
-
-
-August 15, 2011</sdk:license>
-	<sdk:license id="google-gdk-license" type="text">This is a Developer Preview of the GDK that is subject to change.
-
-Terms and Conditions
-
-This is the Glass Development Kit License Agreement.
-
-1. Introduction
-
-1.1 The Glass Development Kit (referred to in this License Agreement as the &quot;GDK&quot; and specifically including the Android system files, packaged APIs, and GDK library files, if and when they are made available) is licensed to you subject to the terms of this License Agreement. This License Agreement forms a legally binding contract between you and Google in relation to your use of the GDK.
-
-1.2 &quot;Glass&quot; means Glass devices and the Glass software stack for use on Glass devices.
-
-
-1.3 &quot;Android&quot; means the Android software stack for devices, as made available under the Android Open Source Project, which is located at the following URL: http://source.android.com/, as updated from time to time.
-
-1.4 &quot;Google&quot; means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States.
-
-2. Accepting this License Agreement
-
-2.1 In order to use the GDK, you must first agree to this License Agreement. You may not use the GDK if you do not accept this License Agreement.
-
-2.2 By clicking to accept, you hereby agree to the terms of this License Agreement.
-
-2.3 You may not use the GDK and may not accept the License Agreement if you are a person barred from receiving the GDK under the laws of the United States or other countries including the country in which you are resident or from which you use the GDK.
-
-2.4 If you are agreeing to be bound by this License Agreement on behalf of your employer or other entity, you represent and warrant that you have full legal authority to bind your employer or such entity to this License Agreement. If you do not have the requisite authority, you may not accept the License Agreement or use the GDK on behalf of your employer or other entity.
-
-3. GDK License from Google
-
-3.1 Subject to the terms of this License Agreement, Google grants you a limited, worldwide, royalty-free, non-assignable and non-exclusive license to use the GDK solely to develop applications to run on the Glass platform for Glass devices.
-
-3.2 You agree that Google or third parties own all legal right, title and interest in and to the GDK, including any Intellectual Property Rights that subsist in the GDK. &quot;Intellectual Property Rights&quot; means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Google reserves all rights not expressly granted to you.
-
-3.3 You may not use the GDK for any purpose not expressly permitted by this License Agreement.  Except to the extent required by applicable third party licenses, you may not: (a) copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the GDK or any part of the GDK; or (b) load any part of the GDK onto a mobile handset or wearable computing device or any other hardware device except a Glass device personal computer, combine any part of the GDK with other software, or distribute any software or device incorporating a part of the GDK.
-
-3.4 You agree that you will not take any actions that may cause or result in the fragmentation of Glass, including but not limited to distributing, participating in the creation of, or promoting in any way a software development kit derived from the GDK.
-
-3.5 Use, reproduction and distribution of components of the GDK licensed under an open source software license are governed solely by the terms of that open source software license and not this License Agreement.
-
-3.6 You agree that the form and nature of the GDK that Google provides may change without prior notice to you and that future versions of the GDK may be incompatible with applications developed on previous versions of the GDK. You agree that Google may stop (permanently or temporarily) providing the GDK (or any features within the GDK) to you or to users generally at Google's sole discretion, without prior notice to you.
-
-3.7 Nothing in this License Agreement gives you a right to use any of Google's trade names, trademarks, service marks, logos, domain names, or other distinctive brand features.
-
-3.8 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the GDK.
-
-
-3.9 Your use of any Android system files, packaged APIs, or other components of the GDK which are part of the Android Software Development Kit is subject to the terms of the Android Software Development Kit License Agreement located at http://developer.android.com/sdk/terms.html. These terms are hereby incorporated by reference into this License Agreement.
-
-4. Use of the GDK by You
-
-4.1 Google agrees that it obtains no right, title or interest from you (or your licensors) under this License Agreement in or to any software applications that you develop using the GDK, including any intellectual property rights that subsist in those applications.
-
-4.2 You agree to use the GDK and write applications only for purposes that are permitted by (a) this License Agreement, (b) the Glass Platform Developer Policies (located at https://developers.google.com/glass/policies, and hereby incorporated into this License Agreement by reference), and (c) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries).
-
-4.3 You agree that if you use the GDK to develop applications for general public users, you will protect the privacy and legal rights of those users. If the users provide you with user names, passwords, or other login information or personal information, you must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. If the user provides your application with Google Account information, your application may only use that information to access the user's Google Account when, and for the limited purposes for which, the user has given you permission to do so.
-
-4.4 You agree that you will not engage in any activity with the GDK, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of any third party including, but not limited to, Google.
-
-4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through Glass and/or applications for Glass, and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so.
-
-4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under this License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Google or any third party may suffer) of any such breach.
-
-
-4.7 The GDK is in development, and your testing and feedback are an important part of the development process. By using the GDK, you acknowledge that implementation of some features are still under development and that you should not rely on the GDK, Glass devices, Glass system software, Google Mirror API, or Glass services having the full functionality of a stable release.
-
-5. Your Developer Credentials
-
-5.1 You agree that you are responsible for maintaining the confidentiality of any developer credentials that may be issued to you by Google or which you may choose yourself and that you will be solely responsible for all applications that are developed under your developer credentials.
-
-6. Privacy and Information
-
-
-6.1 In order to continually innovate and improve the GDK, Google may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in the GDK are being used and how they are being used. Before any of this information is collected, the GDK will notify you and seek your consent. If you withhold consent, the information will not be collected.
-
-6.2 The data collected is examined in the aggregate to improve the GDK and is maintained in accordance with Google's Privacy Policy.
-
-7. Third Party Applications
-
-7.1 If you use the GDK to run applications developed by a third party or that access data, content or resources provided by a third party, you agree that Google is not responsible for those applications, data, content, or resources. You understand that all data, content or resources which you may access through such third party applications are the sole responsibility of the person from which they originated and that Google is not liable for any loss or damage that you may experience as a result of the use or access of any of those third party applications, data, content, or resources.
-
-7.2 You should be aware the data, content, and resources presented to you through such a third party application may be protected by intellectual property rights which are owned by the providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on these data, content, or resources (either in whole or in part) unless you have been specifically given permission to do so by the relevant owners.
-
-7.3 You acknowledge that your use of such third party applications, data, content, or resources may be subject to separate terms between you and the relevant third party. In that case, this License Agreement does not affect your legal relationship with these third parties.
-
-8. Using Google APIs
-
-8.1 Google APIs
-
-8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be protected by intellectual property rights which are owned by Google or those parties that provide the data (or by other persons or companies on their behalf). Your use of any such API may be subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this data (either in whole or in part) unless allowed by the relevant Terms of Service.
-
-8.1.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree that you shall retrieve data only with the user's explicit consent and only when, and for the limited purposes for which, the user has given you permission to do so.
-
-9. Terminating this License Agreement
-
-9.1 This License Agreement will continue to apply until terminated by either you or Google as set out below.
-
-9.2 If you want to terminate this License Agreement, you may do so by ceasing your use of the GDK and any relevant developer credentials.
-
-9.3 Google may at any time, terminate this License Agreement with you if:
-(A) you have breached any provision of this License Agreement; or
-(B) Google is required to do so by law; or
-(C) the partner with whom Google offered certain parts of GDK (such as APIs) to you has terminated its relationship with Google or ceased to offer certain parts of the GDK to you; or
-(D) Google decides to no longer provide the GDK or certain parts of the GDK to users in the country in which you are resident or from which you use the service, or the provision of the GDK or certain GDK services to you by Google is, in Google's sole discretion, no longer commercially viable.
-
-9.4 When this License Agreement comes to an end, all of the legal rights, obligations and liabilities that you and Google have benefited from, been subject to (or which have accrued over time whilst this License Agreement has been in force) or which are expressed to continue indefinitely, shall be unaffected by this cessation, and the provisions of paragraph 14.7 shall continue to apply to such rights, obligations and liabilities indefinitely.
-
-10. DISCLAIMER OF WARRANTIES
-
-10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE GDK IS AT YOUR SOLE RISK AND THAT THE GDK IS PROVIDED &quot;AS IS&quot; AND &quot;AS AVAILABLE&quot; WITHOUT WARRANTY OF ANY KIND FROM GOOGLE.
-
-10.2 YOUR USE OF THE GDK AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE GDK IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE.
-
-10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-
-11. LIMITATION OF LIABILITY
-
-11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.
-
-12. Indemnification
-
-12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Google, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys fees) arising out of or accruing from (a) your use of the GDK, (b) any application you develop on the GDK that infringes any copyright, trademark, trade secret, trade dress, patent or other intellectual property right of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you with this License Agreement.
-
-13. Changes to the License Agreement
-
-13.1 Google may make changes to the License Agreement as it distributes new versions of the GDK. When these changes are made, Google will make a new version of the License Agreement available on the website where the GDK is made available.
-
-14. General Legal Terms
-
-14.1 This License Agreement constitutes the whole legal agreement between you and Google and governs your use of the GDK (excluding any services which Google may provide to you under a separate written agreement), and completely replaces any prior agreements between you and Google in relation to the GDK.
-
-14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in this License Agreement (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google's rights and that those rights or remedies will still be available to Google.
-
-14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of this License Agreement is invalid, then that provision will be removed from this License Agreement without affecting the rest of this License Agreement. The remaining provisions of this License Agreement will continue to be valid and enforceable.
-
-14.4 You acknowledge and agree that each member of the group of companies of which Google is the parent shall be third party beneficiaries to this License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of this License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to this License Agreement.
-
-14.5 EXPORT RESTRICTIONS. THE GDK IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE GDK. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.
-
-14.6 The rights granted in this License Agreement may not be assigned or transferred by either you or Google without the prior written approval of the other party. Neither you nor Google shall be permitted to delegate their responsibilities or obligations under this License Agreement without the prior written approval of the other party.
-
-14.7 This License Agreement, and your relationship with Google under this License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from this License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.
-
-November 19, 2013</sdk:license>
-	<sdk:license id="intel-android-extra-license" type="text">Intel (R) Hardware Accelerated Execution Manager
-End-User License Agreement
-
-Copyright (c) 2012 Intel Corporation.
-All rights reserved.
-
-Redistribution. Redistribution and use in binary form, without modification, are permitted provided that the following conditions are met:
-
-1.Redistributions must reproduce the above copyright notice and the following disclaimer in the  documentation and/or other materials provided with the distribution.
-
-2.Neither the name of Intel Corporation nor the names of its suppliers may be used to endorse or promote  products derived from this software without specific prior written permission.
-
-3.No reverse engineering, de-compilation, or disassembly of this software is permitted. Limited patent license. Intel Corporation grants a world-wide, royalty-free, non-exclusive license under  patents it now or hereafter owns or controls to make, have made, use, import, offer to sell and sell (&quot;Utilize&quot;) this software, but solely to the extent that any such patent is necessary to Utilize the  software alone. The patent license shall not apply to any combinations which include this software. No  hardware per se is licensed hereunder.
-
-DISCLAIMER.
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot; AND ANY EXPRESS OR  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE  POSSIBILITY OF SUCH DAMAGE.</sdk:license>
-	<sdk:add-on>
-		<!--Generated from bid:12617722, branch:perforce-->
-		<sdk:obsolete/>
-		<sdk:revision>3</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sat May 19 22:41:19 2018.-->
-				<sdk:size>34908058</sdk:size>
-				<sdk:checksum type="sha1">1f92abf3a76be66ae8032257fc7620acbd2b2e3a</sdk:checksum>
-				<sdk:url>google_apis-3-r03.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:name-id>google_apis</sdk:name-id>
-		<sdk:name-display>Google APIs</sdk:name-display>
-		<sdk:api-level>3</sdk:api-level>
-		<sdk:description>Android + Google APIs</sdk:description>
-		<sdk:desc-url>http://developer.android.com/</sdk:desc-url>
-		<sdk:libs>
-			<sdk:lib>
-				<sdk:name>com.google.android.maps</sdk:name>
-				<sdk:description>API for Google Maps</sdk:description>
-			</sdk:lib>
-		</sdk:libs>
-	</sdk:add-on>
-	<sdk:add-on>
-		<!--Generated from bid:13752552, branch:perforce-->
-		<sdk:obsolete/>
-		<sdk:revision>2</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sun Jun  3 14:03:04 2018.-->
-				<sdk:size>42435735</sdk:size>
-				<sdk:checksum type="sha1">9b6e86d8568558de4d606a7debc4f6049608dbd0</sdk:checksum>
-				<sdk:url>google_apis-4_r02.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:name-id>google_apis</sdk:name-id>
-		<sdk:name-display>Google APIs</sdk:name-display>
-		<sdk:api-level>4</sdk:api-level>
-		<sdk:description>Android + Google APIs</sdk:description>
-		<sdk:desc-url>http://developer.android.com/</sdk:desc-url>
-		<sdk:libs>
-			<sdk:lib>
-				<sdk:name>com.google.android.maps</sdk:name>
-				<sdk:description>API for Google Maps</sdk:description>
-			</sdk:lib>
-		</sdk:libs>
-	</sdk:add-on>
-	<sdk:add-on>
-		<!--Generated from bid:13245770, branch:perforce-->
-		<sdk:obsolete/>
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Tue Jun  5 17:50:33 2018.-->
-				<sdk:size>49123776</sdk:size>
-				<sdk:checksum type="sha1">46eaeb56b645ee7ffa24ede8fa17f3df70db0503</sdk:checksum>
-				<sdk:url>google_apis-5_r01.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:name-id>google_apis</sdk:name-id>
-		<sdk:name-display>Google APIs</sdk:name-display>
-		<sdk:api-level>5</sdk:api-level>
-		<sdk:description>Android + Google APIs</sdk:description>
-		<sdk:desc-url>http://developer.android.com/</sdk:desc-url>
-		<sdk:libs>
-			<sdk:lib>
-				<sdk:name>com.google.android.maps</sdk:name>
-				<sdk:description>API for Google Maps</sdk:description>
-			</sdk:lib>
-		</sdk:libs>
-	</sdk:add-on>
-	<sdk:add-on>
-		<!--Generated from bid:13752552, branch:perforce-->
-		<sdk:obsolete/>
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sun Jun 10 12:37:49 2018.-->
-				<sdk:size>53382941</sdk:size>
-				<sdk:checksum type="sha1">5ff545d96e031e09580a6cf55713015c7d4936b2</sdk:checksum>
-				<sdk:url>google_apis-6_r01.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:name-id>google_apis</sdk:name-id>
-		<sdk:name-display>Google APIs</sdk:name-display>
-		<sdk:api-level>6</sdk:api-level>
-		<sdk:description>Android + Google APIs</sdk:description>
-		<sdk:desc-url>http://developer.android.com/</sdk:desc-url>
-		<sdk:libs>
-			<sdk:lib>
-				<sdk:name>com.google.android.maps</sdk:name>
-				<sdk:description>API for Google Maps</sdk:description>
-			</sdk:lib>
-		</sdk:libs>
-	</sdk:add-on>
-	<sdk:add-on>
-		<!--Generated from bid:14140606, branch:perforce-->
-		<sdk:obsolete/>
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Wed May 30 22:32:20 2018.-->
-				<sdk:size>53691339</sdk:size>
-				<sdk:checksum type="sha1">2e7f91e0fe34fef7f58aeced973c6ae52361b5ac</sdk:checksum>
-				<sdk:url>google_apis-7_r01.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:name-id>google_apis</sdk:name-id>
-		<sdk:name-display>Google APIs</sdk:name-display>
-		<sdk:api-level>7</sdk:api-level>
-		<sdk:description>Android + Google APIs</sdk:description>
-		<sdk:desc-url>http://developer.android.com/</sdk:desc-url>
-		<sdk:libs>
-			<sdk:lib>
-				<sdk:name>com.google.android.maps</sdk:name>
-				<sdk:description>API for Google Maps</sdk:description>
-			</sdk:lib>
-		</sdk:libs>
-	</sdk:add-on>
-	<sdk:add-on>
-		<!--Generated from bid:16286500, branch:perforce-->
-		<sdk:obsolete/>
-		<sdk:revision>2</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Mon Jun 11 03:39:55 2018.-->
-				<sdk:size>59505020</sdk:size>
-				<sdk:checksum type="sha1">3079958e7ec87222cac1e6b27bc471b27bf2c352</sdk:checksum>
-				<sdk:url>google_apis-8_r02.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:name-id>google_apis</sdk:name-id>
-		<sdk:name-display>Google APIs</sdk:name-display>
-		<sdk:api-level>8</sdk:api-level>
-		<sdk:description>Android + Google APIs</sdk:description>
-		<sdk:desc-url>http://developer.android.com/</sdk:desc-url>
-		<sdk:libs>
-			<sdk:lib>
-				<sdk:name>com.google.android.maps</sdk:name>
-				<sdk:description>API for Google Maps</sdk:description>
-			</sdk:lib>
-		</sdk:libs>
-	</sdk:add-on>
-	<sdk:add-on>
-		<!--Generated from bid:19092731, branch:perforce-->
-		<sdk:obsolete/>
-		<sdk:revision>2</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Wed May 23 15:52:14 2018.-->
-				<sdk:size>63401546</sdk:size>
-				<sdk:checksum type="sha1">78664645a1e9accea4430814f8694291a7f1ea5d</sdk:checksum>
-				<sdk:url>google_apis-9_r02.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:name-id>google_apis</sdk:name-id>
-		<sdk:name-display>Google APIs</sdk:name-display>
-		<sdk:api-level>9</sdk:api-level>
-		<sdk:description>Android + Google APIs</sdk:description>
-		<sdk:desc-url>http://developer.android.com/</sdk:desc-url>
-		<sdk:libs>
-			<sdk:lib>
-				<sdk:name>com.google.android.maps</sdk:name>
-				<sdk:description>API for Google Maps</sdk:description>
-			</sdk:lib>
-		</sdk:libs>
-	</sdk:add-on>
-	<sdk:add-on>
-		<!--Generated from bid:21121559, branch:perforce-->
-		<sdk:obsolete/>
-		<sdk:revision>2</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Tue May 29 03:55:38 2018.-->
-				<sdk:size>65781578</sdk:size>
-				<sdk:checksum type="sha1">cc0711857c881fa7534f90cf8cc09b8fe985484d</sdk:checksum>
-				<sdk:url>google_apis-10_r02.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:name-id>google_apis</sdk:name-id>
-		<sdk:name-display>Google APIs</sdk:name-display>
-		<sdk:api-level>10</sdk:api-level>
-		<sdk:description>Android + Google APIs</sdk:description>
-		<sdk:desc-url>http://developer.android.com/</sdk:desc-url>
-		<sdk:libs>
-			<sdk:lib>
-				<sdk:name>com.google.android.maps</sdk:name>
-				<sdk:description>API for Google Maps</sdk:description>
-			</sdk:lib>
-			<sdk:lib>
-				<sdk:name>com.android.future.usb.accessory</sdk:name>
-				<sdk:description>API for USB Accessories</sdk:description>
-			</sdk:lib>
-		</sdk:libs>
-	</sdk:add-on>
-	<sdk:add-on>
-		<!--Generated from bid:19633933, branch:perforce-->
-		<sdk:obsolete/>
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Thu Jun 14 15:13:30 2018.-->
-				<sdk:size>83477179</sdk:size>
-				<sdk:checksum type="sha1">5eab5e81addee9f3576d456d205208314b5146a5</sdk:checksum>
-				<sdk:url>google_apis-11_r01.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:name-id>google_apis</sdk:name-id>
-		<sdk:name-display>Google APIs</sdk:name-display>
-		<sdk:api-level>11</sdk:api-level>
-		<sdk:description>Android + Google APIs</sdk:description>
-		<sdk:desc-url>http://developer.android.com/</sdk:desc-url>
-		<sdk:libs>
-			<sdk:lib>
-				<sdk:name>com.google.android.maps</sdk:name>
-				<sdk:description>API for Google Maps</sdk:description>
-			</sdk:lib>
-		</sdk:libs>
-	</sdk:add-on>
-	<sdk:add-on>
-		<!--Generated from bid:21121559, branch:perforce-->
-		<sdk:obsolete/>
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Mon Jun 11 10:52:20 2018.-->
-				<sdk:size>86099835</sdk:size>
-				<sdk:checksum type="sha1">e9999f4fa978812174dfeceec0721c793a636e5d</sdk:checksum>
-				<sdk:url>google_apis-12_r01.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:name-id>google_apis</sdk:name-id>
-		<sdk:name-display>Google APIs</sdk:name-display>
-		<sdk:api-level>12</sdk:api-level>
-		<sdk:description>Android + Google APIs</sdk:description>
-		<sdk:desc-url>http://developer.android.com/</sdk:desc-url>
-		<sdk:libs>
-			<sdk:lib>
-				<sdk:name>com.google.android.maps</sdk:name>
-				<sdk:description>API for Google Maps</sdk:description>
-			</sdk:lib>
-			<sdk:lib>
-				<sdk:name>com.android.future.usb.accessory</sdk:name>
-				<sdk:description>API for USB Accessories</sdk:description>
-			</sdk:lib>
-		</sdk:libs>
-	</sdk:add-on>
-	<sdk:add-on>
-		<!--Generated from bid:22531000, branch:perforce-->
-		<sdk:obsolete/>
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sun May 27 03:09:43 2018.-->
-				<sdk:size>88615525</sdk:size>
-				<sdk:checksum type="sha1">3b153edd211c27dc736c893c658418a4f9041417</sdk:checksum>
-				<sdk:url>google_apis-13_r01.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:name-id>google_apis</sdk:name-id>
-		<sdk:name-display>Google APIs</sdk:name-display>
-		<sdk:api-level>13</sdk:api-level>
-		<sdk:description>Android + Google APIs</sdk:description>
-		<sdk:desc-url>http://developer.android.com/</sdk:desc-url>
-		<sdk:libs>
-			<sdk:lib>
-				<sdk:name>com.google.android.maps</sdk:name>
-				<sdk:description>API for Google Maps</sdk:description>
-			</sdk:lib>
-			<sdk:lib>
-				<sdk:name>com.android.future.usb.accessory</sdk:name>
-				<sdk:description>API for USB Accessories</sdk:description>
-			</sdk:lib>
-		</sdk:libs>
-	</sdk:add-on>
-	<sdk:add-on>
-		<!--Generated from bid:26085354, branch:perforce-->
-		<sdk:obsolete/>
-		<sdk:revision>2</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Wed Jun 13 22:44:43 2018.-->
-				<sdk:size>106533714</sdk:size>
-				<sdk:checksum type="sha1">f8eb4d96ad0492b4c0db2d7e4f1a1a3836664d39</sdk:checksum>
-				<sdk:url>google_apis-14_r02.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:name-id>google_apis</sdk:name-id>
-		<sdk:name-display>Google APIs</sdk:name-display>
-		<sdk:api-level>14</sdk:api-level>
-		<sdk:description>Android + Google APIs</sdk:description>
-		<sdk:libs>
-			<sdk:lib>
-				<sdk:name>com.google.android.maps</sdk:name>
-				<sdk:description>API for Google Maps</sdk:description>
-			</sdk:lib>
-			<sdk:lib>
-				<sdk:name>com.android.future.usb.accessory</sdk:name>
-				<sdk:description>API for USB Accessories</sdk:description>
-			</sdk:lib>
-		</sdk:libs>
-	</sdk:add-on>
-	<sdk:add-on>
-		<!--Generated from bid:95160078, branch:perforce-->
-		<sdk:revision>3</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Fri Jun 15 19:37:58 2018.-->
-				<sdk:size>106624396</sdk:size>
-				<sdk:checksum type="sha1">d0d2bf26805eb271693570a1aaec33e7dc3f45e9</sdk:checksum>
-				<sdk:url>google_apis-15_r03.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:name-id>google_apis</sdk:name-id>
-		<sdk:name-display>Google APIs</sdk:name-display>
-		<sdk:api-level>15</sdk:api-level>
-		<sdk:description>Android + Google APIs</sdk:description>
-		<sdk:libs>
-			<sdk:lib>
-				<sdk:name>com.google.android.maps</sdk:name>
-				<sdk:description>API for Google Maps</sdk:description>
-			</sdk:lib>
-			<sdk:lib>
-				<sdk:name>com.android.future.usb.accessory</sdk:name>
-				<sdk:description>API for USB Accessories</sdk:description>
-			</sdk:lib>
-			<sdk:lib>
-				<sdk:name>com.google.android.media.effects</sdk:name>
-				<sdk:description>Collection of video effects</sdk:description>
-			</sdk:lib>
-		</sdk:libs>
-	</sdk:add-on>
-	<sdk:add-on>
-		<!--Generated from bid:95160078, branch:perforce-->
-		<sdk:revision>4</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sun Jun 10 20:07:39 2018.-->
-				<sdk:size>127341982</sdk:size>
-				<sdk:checksum type="sha1">ee6acf1b01020bfa8a8e24725dbc4478bee5e792</sdk:checksum>
-				<sdk:url>google_apis-16_r04.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:name-id>google_apis</sdk:name-id>
-		<sdk:name-display>Google APIs</sdk:name-display>
-		<sdk:api-level>16</sdk:api-level>
-		<sdk:description>Android + Google APIs</sdk:description>
-		<sdk:libs>
-			<sdk:lib>
-				<sdk:name>com.google.android.maps</sdk:name>
-				<sdk:description>API for Google Maps</sdk:description>
-			</sdk:lib>
-			<sdk:lib>
-				<sdk:name>com.android.future.usb.accessory</sdk:name>
-				<sdk:description>API for USB Accessories</sdk:description>
-			</sdk:lib>
-			<sdk:lib>
-				<sdk:name>com.google.android.media.effects</sdk:name>
-				<sdk:description>Collection of video effects</sdk:description>
-			</sdk:lib>
-		</sdk:libs>
-	</sdk:add-on>
-	<sdk:add-on>
-		<!--Generated from bid:94805340, branch:perforce-->
-		<sdk:revision>4</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Wed May 30 17:17:51 2018.-->
-				<sdk:size>137231243</sdk:size>
-				<sdk:checksum type="sha1">a076be0677f38df8ca5536b44dfb411a0c808c4f</sdk:checksum>
-				<sdk:url>google_apis-17_r04.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:name-id>google_apis</sdk:name-id>
-		<sdk:name-display>Google APIs</sdk:name-display>
-		<sdk:api-level>17</sdk:api-level>
-		<sdk:description>Android + Google APIs</sdk:description>
-		<sdk:libs>
-			<sdk:lib>
-				<sdk:name>com.google.android.maps</sdk:name>
-				<sdk:description>API for Google Maps</sdk:description>
-			</sdk:lib>
-			<sdk:lib>
-				<sdk:name>com.android.future.usb.accessory</sdk:name>
-				<sdk:description>API for USB Accessories</sdk:description>
-			</sdk:lib>
-			<sdk:lib>
-				<sdk:name>com.google.android.media.effects</sdk:name>
-				<sdk:description>Collection of video effects</sdk:description>
-			</sdk:lib>
-		</sdk:libs>
-	</sdk:add-on>
-	<sdk:add-on>
-		<!--Generated from bid:94805340, branch:perforce-->
-		<sdk:revision>4</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sun May 27 23:13:56 2018.-->
-				<sdk:size>143195183</sdk:size>
-				<sdk:checksum type="sha1">6109603409debdd40854d4d4a92eaf8481462c8b</sdk:checksum>
-				<sdk:url>google_apis-18_r04.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:name-id>google_apis</sdk:name-id>
-		<sdk:name-display>Google APIs</sdk:name-display>
-		<sdk:api-level>18</sdk:api-level>
-		<sdk:description>Android + Google APIs</sdk:description>
-		<sdk:libs>
-			<sdk:lib>
-				<sdk:name>com.google.android.maps</sdk:name>
-				<sdk:description>API for Google Maps</sdk:description>
-			</sdk:lib>
-			<sdk:lib>
-				<sdk:name>com.android.future.usb.accessory</sdk:name>
-				<sdk:description>API for USB Accessories</sdk:description>
-			</sdk:lib>
-			<sdk:lib>
-				<sdk:name>com.google.android.media.effects</sdk:name>
-				<sdk:description>Collection of video effects</sdk:description>
-			</sdk:lib>
-		</sdk:libs>
-	</sdk:add-on>
-	<sdk:add-on>
-		<!--Generated from bid:2884604, branch:git_klp-emu-release-->
-		<sdk:revision>20</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sat Jun  2 14:21:02 2018.-->
-				<sdk:size>147081</sdk:size>
-				<sdk:checksum type="sha1">5b933abe830b2f25b4c0f171d45e9e0651e56311</sdk:checksum>
-				<sdk:url>google_apis-19_r20.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:name-id>google_apis</sdk:name-id>
-		<sdk:name-display>Google APIs</sdk:name-display>
-		<sdk:api-level>19</sdk:api-level>
-		<sdk:description>Android + Google APIs</sdk:description>
-		<sdk:libs>
-			<sdk:lib>
-				<sdk:name>com.google.android.maps</sdk:name>
-				<sdk:description>API for Google Maps</sdk:description>
-			</sdk:lib>
-			<sdk:lib>
-				<sdk:name>com.android.future.usb.accessory</sdk:name>
-				<sdk:description>API for USB Accessories</sdk:description>
-			</sdk:lib>
-			<sdk:lib>
-				<sdk:name>com.google.android.media.effects</sdk:name>
-				<sdk:description>Collection of video effects</sdk:description>
-			</sdk:lib>
-		</sdk:libs>
-	</sdk:add-on>
-	<sdk:add-on>
-		<!--Generated from bid:3249234, branch:git_nyc-emu-release-->
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Fri Jun  1 04:12:18 2018.-->
-				<sdk:size>154865</sdk:size>
-				<sdk:checksum type="sha1">31361c2868f27343ee917fbd259c1463821b6145</sdk:checksum>
-				<sdk:url>google_apis-24_r1.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:name-id>google_apis</sdk:name-id>
-		<sdk:name-display>Google APIs</sdk:name-display>
-		<sdk:api-level>24</sdk:api-level>
-		<sdk:description>Android + Google APIs</sdk:description>
-		<sdk:libs>
-			<sdk:lib>
-				<sdk:name>com.google.android.maps</sdk:name>
-				<sdk:description>API for Google Maps</sdk:description>
-			</sdk:lib>
-			<sdk:lib>
-				<sdk:name>com.android.future.usb.accessory</sdk:name>
-				<sdk:description>API for USB Accessories</sdk:description>
-			</sdk:lib>
-			<sdk:lib>
-				<sdk:name>com.google.android.media.effects</sdk:name>
-				<sdk:description>Collection of video effects</sdk:description>
-			</sdk:lib>
-		</sdk:libs>
-	</sdk:add-on>
-	<sdk:add-on>
-		<!--Generated from bid:3756122, branch:git_nyc-mr1-emu-release-->
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Tue Jun 12 20:09:06 2018.-->
-				<sdk:size>154871</sdk:size>
-				<sdk:checksum type="sha1">550e83eea9513ab11c44919ac6da54b36084a9f3</sdk:checksum>
-				<sdk:url>google_apis-25_r1.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:name-id>google_apis</sdk:name-id>
-		<sdk:name-display>Google APIs</sdk:name-display>
-		<sdk:api-level>23</sdk:api-level>
-		<sdk:description>Android + Google APIs</sdk:description>
-		<sdk:libs>
-			<sdk:lib>
-				<sdk:name>com.google.android.maps</sdk:name>
-				<sdk:description>API for Google Maps</sdk:description>
-			</sdk:lib>
-			<sdk:lib>
-				<sdk:name>com.android.future.usb.accessory</sdk:name>
-				<sdk:description>API for USB Accessories</sdk:description>
-			</sdk:lib>
-			<sdk:lib>
-				<sdk:name>com.google.android.media.effects</sdk:name>
-				<sdk:description>Collection of video effects</sdk:description>
-			</sdk:lib>
-		</sdk:libs>
-	</sdk:add-on>
-	<sdk:add-on>
-		<!--Generated from bid:77907680, branch:perforce-->
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Mon Jun 11 05:08:59 2018.-->
-				<sdk:size>179499</sdk:size>
-				<sdk:checksum type="sha1">66a754efb24e9bb07cc51648426443c7586c9d4a</sdk:checksum>
-				<sdk:url>google_apis-21_r01.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:name-id>google_apis</sdk:name-id>
-		<sdk:name-display>Google APIs</sdk:name-display>
-		<sdk:api-level>21</sdk:api-level>
-		<sdk:description>Android + Google APIs</sdk:description>
-		<sdk:libs>
-			<sdk:lib>
-				<sdk:name>com.google.android.maps</sdk:name>
-				<sdk:description>API for Google Maps</sdk:description>
-			</sdk:lib>
-			<sdk:lib>
-				<sdk:name>com.android.future.usb.accessory</sdk:name>
-				<sdk:description>API for USB Accessories</sdk:description>
-			</sdk:lib>
-			<sdk:lib>
-				<sdk:name>com.google.android.media.effects</sdk:name>
-				<sdk:description>Collection of video effects</sdk:description>
-			</sdk:lib>
-		</sdk:libs>
-	</sdk:add-on>
-	<sdk:add-on>
-		<!--Generated from bid:87569863, branch:perforce-->
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Fri Jun 15 06:11:24 2018.-->
-				<sdk:size>179259</sdk:size>
-				<sdk:checksum type="sha1">5def0f42160cba8acff51b9c0c7e8be313de84f5</sdk:checksum>
-				<sdk:url>google_apis-22_r01.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:name-id>google_apis</sdk:name-id>
-		<sdk:name-display>Google APIs</sdk:name-display>
-		<sdk:api-level>22</sdk:api-level>
-		<sdk:description>Android + Google APIs</sdk:description>
-		<sdk:libs>
-			<sdk:lib>
-				<sdk:name>com.google.android.maps</sdk:name>
-				<sdk:description>API for Google Maps</sdk:description>
-			</sdk:lib>
-			<sdk:lib>
-				<sdk:name>com.android.future.usb.accessory</sdk:name>
-				<sdk:description>API for USB Accessories</sdk:description>
-			</sdk:lib>
-			<sdk:lib>
-				<sdk:name>com.google.android.media.effects</sdk:name>
-				<sdk:description>Collection of video effects</sdk:description>
-			</sdk:lib>
-		</sdk:libs>
-	</sdk:add-on>
-	<sdk:add-on>
-		<!--Generated from bid:100722913, branch:perforce-->
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sun Jun 10 08:57:09 2018.-->
-				<sdk:size>179900</sdk:size>
-				<sdk:checksum type="sha1">04c5cc1a7c88967250ebba9561d81e24104167db</sdk:checksum>
-				<sdk:url>google_apis-23_r01.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:name-id>google_apis</sdk:name-id>
-		<sdk:name-display>Google APIs</sdk:name-display>
-		<sdk:api-level>23</sdk:api-level>
-		<sdk:description>Android + Google APIs</sdk:description>
-		<sdk:libs>
-			<sdk:lib>
-				<sdk:name>com.google.android.maps</sdk:name>
-				<sdk:description>API for Google Maps</sdk:description>
-			</sdk:lib>
-			<sdk:lib>
-				<sdk:name>com.android.future.usb.accessory</sdk:name>
-				<sdk:description>API for USB Accessories</sdk:description>
-			</sdk:lib>
-			<sdk:lib>
-				<sdk:name>com.google.android.media.effects</sdk:name>
-				<sdk:description>Collection of video effects</sdk:description>
-			</sdk:lib>
-		</sdk:libs>
-	</sdk:add-on>
-	<sdk:add-on>
-		<!--Generated from bid:24379226, branch:perforce-->
-		<sdk:obsolete/>
-		<sdk:revision>2</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sun May 27 03:16:19 2018.-->
-				<sdk:size>78266751</sdk:size>
-				<sdk:checksum type="sha1">92128a12e7e8b0fb5bac59153d7779b717e7b840</sdk:checksum>
-				<sdk:url>google_tv-12_r02.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-googletv-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:name-id>google_tv_addon</sdk:name-id>
-		<sdk:name-display>Google TV Addon</sdk:name-display>
-		<sdk:api-level>12</sdk:api-level>
-		<sdk:description></sdk:description>
-		<sdk:desc-url>http://developer.android.com/</sdk:desc-url>
-		<sdk:libs/>
-	</sdk:add-on>
-	<sdk:add-on>
-		<!--Generated from bid:41196280, branch:perforce-->
-		<sdk:obsolete/>
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Tue Jun 19 05:04:20 2018.-->
-				<sdk:size>87721879</sdk:size>
-				<sdk:checksum type="sha1">b73f7c66011ac8180b44aa4e83b8d78c66ea9a09</sdk:checksum>
-				<sdk:url>google_tv-13_r01.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-googletv-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:name-id>google_tv_addon</sdk:name-id>
-		<sdk:name-display>Google TV Addon</sdk:name-display>
-		<sdk:api-level>13</sdk:api-level>
-		<sdk:description></sdk:description>
-		<sdk:desc-url>http://developer.android.com/</sdk:desc-url>
-		<sdk:libs/>
-	</sdk:add-on>
-	<sdk:extra>
-		<!--Generated from bid:3841166, branch:git_nyc-support-release-->
-		<sdk:revision>
-			<sdk:major>47</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>0</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Mon Jun 11 04:51:54 2018.-->
-				<sdk:size>355529608</sdk:size>
-				<sdk:checksum type="sha1">a0d22beacc106a6977321f2b07d692ce4979e96a</sdk:checksum>
-				<sdk:url>android_m2repository_r47.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>android</sdk:vendor-id>
-		<sdk:vendor-display>Android</sdk:vendor-display>
-		<sdk:description>Local Maven repository for Support Libraries</sdk:description>
-		<sdk:name-display>Android Support Repository</sdk:name-display>
-		<sdk:path>m2repository</sdk:path>
-	</sdk:extra>
-	<sdk:extra>
-		<!--Generated from bid:167710051, branch:perforce-->
-		<sdk:revision>
-			<sdk:major>58</sdk:major>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Mon Jun 11 11:10:27 2018.-->
-				<sdk:size>215426029</sdk:size>
-				<sdk:checksum type="sha1">05086add9e3a0eb1b67111108d7757a4337c3f10</sdk:checksum>
-				<sdk:url>google_m2repository_gms_v11_3_rc05_wear_2_0_5.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:description>Local Maven repository for Support Libraries</sdk:description>
-		<sdk:name-display>Google Repository</sdk:name-display>
-		<sdk:path>m2repository</sdk:path>
-	</sdk:extra>
-	<sdk:extra>
-		<!--Generated from bid:28113395, branch:perforce-->
-		<sdk:revision>
-			<sdk:major>1</sdk:major>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sun Jun 10 01:20:16 2018.-->
-				<sdk:size>75109</sdk:size>
-				<sdk:checksum type="sha1">355e8dc304a92a5616db235af8ee7bd554356254</sdk:checksum>
-				<sdk:url>market_licensing-r02.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display></sdk:vendor-display>
-		<sdk:description>Android Market Licensing client library</sdk:description>
-		<sdk:desc-url>http://developer.android.com/guide/publishing/licensing.html</sdk:desc-url>
-		<sdk:name-display>Google Play Licensing Library</sdk:name-display>
-		<sdk:path>market_licensing</sdk:path>
-	</sdk:extra>
-	<sdk:extra>
-		<!--Generated from bid:42096985, branch:perforce-->
-		<sdk:revision>
-			<sdk:major>1</sdk:major>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sun Jun 17 19:31:02 2018.-->
-				<sdk:size>110201</sdk:size>
-				<sdk:checksum type="sha1">5305399dc1a56814e86b8459ce24871916f78b8c</sdk:checksum>
-				<sdk:url>market_apk_expansion-r03.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:description>Android Market APK Expansion library</sdk:description>
-		<sdk:desc-url>http://developer.android.com/guide/market/expansion-files.html</sdk:desc-url>
-		<sdk:name-display>Google Play APK Expansion library</sdk:name-display>
-		<sdk:path>market_apk_expansion</sdk:path>
-	</sdk:extra>
-	<sdk:extra>
-		<!--Generated from bid:52571120, branch:perforce-->
-		<sdk:obsolete/>
-		<sdk:revision>
-			<sdk:major>12</sdk:major>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sun May 27 10:44:16 2018.-->
-				<sdk:size>5265389</sdk:size>
-				<sdk:checksum type="sha1">92558dbc380bba3d55d0ec181167fb05ce7c79d9</sdk:checksum>
-				<sdk:url>google_play_services_3265130_r12.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:description>Google Play services client library and sample code</sdk:description>
-		<sdk:desc-url>https://developers.google.com/android/google-play-services/index</sdk:desc-url>
-		<sdk:name-display>Google Play services for Froyo</sdk:name-display>
-		<sdk:path>google_play_services_froyo</sdk:path>
-	</sdk:extra>
-	<sdk:extra>
-		<!--Generated from bid:189640690, branch:perforce-->
-		<sdk:revision>
-			<sdk:major>49</sdk:major>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Mon Jun 11 08:08:54 2018.-->
-				<sdk:size>15456884</sdk:size>
-				<sdk:checksum type="sha1">f95bf19634e2ab0430923247fe2c50246432d2e9</sdk:checksum>
-				<sdk:url>google_play_services_v16_1_rc09.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:description>Google Play services Javadocs and sample code</sdk:description>
-		<sdk:desc-url>https://developers.google.com/android/google-play-services/index</sdk:desc-url>
-		<sdk:name-display>Google Play services</sdk:name-display>
-		<sdk:path>google_play_services</sdk:path>
-	</sdk:extra>
-	<sdk:extra>
-		<!--Generated from bid:75820409, branch:perforce-->
-		<sdk:revision>
-			<sdk:major>11</sdk:major>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Thu Jun  7 01:53:27 2018.-->
-				<sdk:size>8682859</sdk:size>
-				<sdk:checksum type="sha1">dc8a2ed2fbd7246d4caf9ab10ffe7749dc35d1cc</sdk:checksum>
-				<sdk:url>usb_driver_r11-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:description>USB Driver for Windows, revision 11</sdk:description>
-		<sdk:desc-url>http://developer.android.com/</sdk:desc-url>
-		<sdk:name-display>Google USB Driver</sdk:name-display>
-		<sdk:path>usb_driver</sdk:path>
-	</sdk:extra>
-	<sdk:extra>
-		<!--Generated from bid:45484492, branch:perforce-->
-		<sdk:obsolete/>
-		<sdk:revision>
-			<sdk:major>11</sdk:major>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Thu Jun  7 11:48:51 2018.-->
-				<sdk:size>704512</sdk:size>
-				<sdk:checksum type="sha1">0102859d9575baa0bf4fd5eb422af2ad0fe6cb82</sdk:checksum>
-				<sdk:url>GoogleAdMobAdsSdkAndroid-6.4.1.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:description>AdMob Ads SDK</sdk:description>
-		<sdk:desc-url>https://developers.google.com/mobile-ads-sdk/docs/</sdk:desc-url>
-		<sdk:name-display>Google AdMob Ads SDK</sdk:name-display>
-		<sdk:path>admob_ads_sdk</sdk:path>
-	</sdk:extra>
-	<sdk:extra>
-		<!--Generated from bid:44867123, branch:perforce-->
-		<sdk:obsolete/>
-		<sdk:revision>
-			<sdk:major>3</sdk:major>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Tue Jun  5 05:29:27 2018.-->
-				<sdk:size>211432</sdk:size>
-				<sdk:checksum type="sha1">dc14026bf0ce78315cb5dd00552607de0894de83</sdk:checksum>
-				<sdk:url>GoogleAnalyticsAndroid_2.0beta5.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:description>Analytics App Tracking SDK</sdk:description>
-		<sdk:desc-url>http://developers.google.com/analytics/devguides/collection/</sdk:desc-url>
-		<sdk:name-display>Google Analytics App Tracking SDK</sdk:name-display>
-		<sdk:path>analytics_sdk_v2</sdk:path>
-	</sdk:extra>
-	<sdk:extra>
-		<!--Generated from bid:25118237, branch:perforce-->
-		<sdk:revision>
-			<sdk:major>2</sdk:major>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Thu May 31 20:21:33 2018.-->
-				<sdk:size>4055193</sdk:size>
-				<sdk:checksum type="sha1">13f3a3b2670a5fc04a7342861644be9a01b07e38</sdk:checksum>
-				<sdk:url>webdriver_r02.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:description></sdk:description>
-		<sdk:desc-url>http://selenium.googlecode.com</sdk:desc-url>
-		<sdk:name-display>Google Web Driver</sdk:name-display>
-		<sdk:path>webdriver</sdk:path>
-	</sdk:extra>
-	<sdk:extra>
-		<!--Generated from bid:32432700, branch:perforce-->
-		<sdk:obsolete/>
-		<sdk:revision>
-			<sdk:major>3</sdk:major>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sun May 27 10:27:10 2018.-->
-				<sdk:size>5901400</sdk:size>
-				<sdk:checksum type="sha1">ad066fd0dc7fc99d8aadac09c65a3c2519fbc7bf</sdk:checksum>
-				<sdk:url>gcm_r03.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:description>GCM library has been moved to Google Play Services (com.google.android.gms.gcm) and this standalone version is no longer supported</sdk:description>
-		<sdk:desc-url>https://developers.google.com/android/gcm/index</sdk:desc-url>
-		<sdk:name-display>Google Cloud Messaging for Android Library</sdk:name-display>
-		<sdk:path>gcm</sdk:path>
-	</sdk:extra>
-	<sdk:extra>
-		<!--Generated from bid:80165500, branch:perforce-->
-		<sdk:revision>
-			<sdk:major>1</sdk:major>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Tue Jun  5 14:06:56 2018.-->
-				<sdk:size>2167286</sdk:size>
-				<sdk:checksum type="sha1">4fb5344e34e8faab4db18af07dace44c50db26a7</sdk:checksum>
-				<sdk:url>simulator_r01.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:description>Android Auto API testing simulators</sdk:description>
-		<sdk:desc-url>http://developer.android.com/auto</sdk:desc-url>
-		<sdk:name-display>Android Auto API Simulators</sdk:name-display>
-		<sdk:path>simulators</sdk:path>
-	</sdk:extra>
-	<sdk:extra>
-		<!--Generated from bid:107062527, branch:perforce-->
-		<sdk:revision>
-			<sdk:major>1</sdk:major>
-			<sdk:minor>1</sdk:minor>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sat Jun 16 20:44:31 2018.-->
-				<sdk:size>1346009</sdk:size>
-				<sdk:checksum type="sha1">202a6e1b3009a0eb815f8c672d2d5b3717de6169</sdk:checksum>
-				<sdk:url>desktop-head-unit-linux_r01.1.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Tue Jun 12 06:56:07 2018.-->
-				<sdk:size>2375533</sdk:size>
-				<sdk:checksum type="sha1">8179cbb3914493ebc5eb65b731cba061582f2e84</sdk:checksum>
-				<sdk:url>desktop-head-unit-macosx_r01.1.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Tue Jun 12 13:47:09 2018.-->
-				<sdk:size>2691901</sdk:size>
-				<sdk:checksum type="sha1">99c4a7172d73673552119347bc24c58b47da177b</sdk:checksum>
-				<sdk:url>desktop-head-unit-windows_r01.1.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:description>Head unit emulator for developers targeting the Android Auto platform.</sdk:description>
-		<sdk:desc-url>http://developer.android.com/tools/help/desktop-head-unit.html</sdk:desc-url>
-		<sdk:name-display>Android Auto Desktop Head Unit emulator</sdk:name-display>
-		<sdk:path>auto</sdk:path>
-	</sdk:extra>
-	<sdk:extra>
-		<!--Generated from bid:214678223, branch:perforce-->
-		<sdk:revision>
-			<sdk:major>1</sdk:major>
-			<sdk:minor>5</sdk:minor>
-			<sdk:micro>0</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Wed Sep 26 15:20:22 2018.-->
-				<sdk:size>33351418</sdk:size>
-				<sdk:checksum type="sha1">6c282b9c686e819fe7f5ac8f2249d2479acb63b4</sdk:checksum>
-				<sdk:url>iasdk-1.5.0-1538000167.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:vendor-id>google</sdk:vendor-id>
-		<sdk:vendor-display>Google Inc.</sdk:vendor-display>
-		<sdk:description>Google Play Instant Development SDK</sdk:description>
-		<sdk:desc-url>https://developer.android.com/topic/google-play-instant/</sdk:desc-url>
-		<sdk:name-display>Google Play Instant Development SDK</sdk:name-display>
-		<sdk:path>instantapps</sdk:path>
-	</sdk:extra>
-</sdk:sdk-addon>
diff --git a/pkgs/development/mobile/androidenv/addons.nix b/pkgs/development/mobile/androidenv/addons.nix
deleted file mode 100644
index 1a8e2d32a4b..00000000000
--- a/pkgs/development/mobile/androidenv/addons.nix
+++ /dev/null
@@ -1,321 +0,0 @@
-
-# This file is generated from generate-addons.sh. DO NOT EDIT.
-# Execute generate-addons.sh or fetch.sh to update the file.
-{stdenv, fetchurl, unzip}:
-
-let
-  buildGoogleApis = args:
-    stdenv.mkDerivation (args // {
-      buildInputs = [ unzip ];
-      buildCommand = ''
-        mkdir -p $out
-        cd $out
-        unzip $src
-      '';
-    });
-in
-{
-
-  google_apis_3 = buildGoogleApis {
-    name = "google_apis-3";
-      src = fetchurl {
-        url = https://dl.google.com/android/repository/google_apis-3-r03.zip;
-        sha1 = "1f92abf3a76be66ae8032257fc7620acbd2b2e3a";
-      };
-      meta = {
-        description = "Android + Google APIs";
-        url = http://developer.android.com/;
-      };
-    };
-
-  google_apis_4 = buildGoogleApis {
-    name = "google_apis-4";
-      src = fetchurl {
-        url = https://dl.google.com/android/repository/google_apis-4_r02.zip;
-        sha1 = "9b6e86d8568558de4d606a7debc4f6049608dbd0";
-      };
-      meta = {
-        description = "Android + Google APIs";
-        url = http://developer.android.com/;
-      };
-    };
-
-  google_apis_5 = buildGoogleApis {
-    name = "google_apis-5";
-      src = fetchurl {
-        url = https://dl.google.com/android/repository/google_apis-5_r01.zip;
-        sha1 = "46eaeb56b645ee7ffa24ede8fa17f3df70db0503";
-      };
-      meta = {
-        description = "Android + Google APIs";
-        url = http://developer.android.com/;
-      };
-    };
-
-  google_apis_6 = buildGoogleApis {
-    name = "google_apis-6";
-      src = fetchurl {
-        url = https://dl.google.com/android/repository/google_apis-6_r01.zip;
-        sha1 = "5ff545d96e031e09580a6cf55713015c7d4936b2";
-      };
-      meta = {
-        description = "Android + Google APIs";
-        url = http://developer.android.com/;
-      };
-    };
-
-  google_apis_7 = buildGoogleApis {
-    name = "google_apis-7";
-      src = fetchurl {
-        url = https://dl.google.com/android/repository/google_apis-7_r01.zip;
-        sha1 = "2e7f91e0fe34fef7f58aeced973c6ae52361b5ac";
-      };
-      meta = {
-        description = "Android + Google APIs";
-        url = http://developer.android.com/;
-      };
-    };
-
-  google_apis_8 = buildGoogleApis {
-    name = "google_apis-8";
-      src = fetchurl {
-        url = https://dl.google.com/android/repository/google_apis-8_r02.zip;
-        sha1 = "3079958e7ec87222cac1e6b27bc471b27bf2c352";
-      };
-      meta = {
-        description = "Android + Google APIs";
-        url = http://developer.android.com/;
-      };
-    };
-
-  google_apis_9 = buildGoogleApis {
-    name = "google_apis-9";
-      src = fetchurl {
-        url = https://dl.google.com/android/repository/google_apis-9_r02.zip;
-        sha1 = "78664645a1e9accea4430814f8694291a7f1ea5d";
-      };
-      meta = {
-        description = "Android + Google APIs";
-        url = http://developer.android.com/;
-      };
-    };
-
-  google_apis_10 = buildGoogleApis {
-    name = "google_apis-10";
-      src = fetchurl {
-        url = https://dl.google.com/android/repository/google_apis-10_r02.zip;
-        sha1 = "cc0711857c881fa7534f90cf8cc09b8fe985484d";
-      };
-      meta = {
-        description = "Android + Google APIs";
-        url = http://developer.android.com/;
-      };
-    };
-
-  google_apis_11 = buildGoogleApis {
-    name = "google_apis-11";
-      src = fetchurl {
-        url = https://dl.google.com/android/repository/google_apis-11_r01.zip;
-        sha1 = "5eab5e81addee9f3576d456d205208314b5146a5";
-      };
-      meta = {
-        description = "Android + Google APIs";
-        url = http://developer.android.com/;
-      };
-    };
-
-  google_apis_12 = buildGoogleApis {
-    name = "google_apis-12";
-      src = fetchurl {
-        url = https://dl.google.com/android/repository/google_apis-12_r01.zip;
-        sha1 = "e9999f4fa978812174dfeceec0721c793a636e5d";
-      };
-      meta = {
-        description = "Android + Google APIs";
-        url = http://developer.android.com/;
-      };
-    };
-
-  google_apis_13 = buildGoogleApis {
-    name = "google_apis-13";
-      src = fetchurl {
-        url = https://dl.google.com/android/repository/google_apis-13_r01.zip;
-        sha1 = "3b153edd211c27dc736c893c658418a4f9041417";
-      };
-      meta = {
-        description = "Android + Google APIs";
-        url = http://developer.android.com/;
-      };
-    };
-
-  google_apis_14 = buildGoogleApis {
-    name = "google_apis-14";
-      src = fetchurl {
-        url = https://dl.google.com/android/repository/google_apis-14_r02.zip;
-        sha1 = "f8eb4d96ad0492b4c0db2d7e4f1a1a3836664d39";
-      };
-      meta = {
-        description = "Android + Google APIs";
-
-      };
-    };
-
-  google_apis_15 = buildGoogleApis {
-    name = "google_apis-15";
-      src = fetchurl {
-        url = https://dl.google.com/android/repository/google_apis-15_r03.zip;
-        sha1 = "d0d2bf26805eb271693570a1aaec33e7dc3f45e9";
-      };
-      meta = {
-        description = "Android + Google APIs";
-
-      };
-    };
-
-  google_apis_16 = buildGoogleApis {
-    name = "google_apis-16";
-      src = fetchurl {
-        url = https://dl.google.com/android/repository/google_apis-16_r04.zip;
-        sha1 = "ee6acf1b01020bfa8a8e24725dbc4478bee5e792";
-      };
-      meta = {
-        description = "Android + Google APIs";
-
-      };
-    };
-
-  google_apis_17 = buildGoogleApis {
-    name = "google_apis-17";
-      src = fetchurl {
-        url = https://dl.google.com/android/repository/google_apis-17_r04.zip;
-        sha1 = "a076be0677f38df8ca5536b44dfb411a0c808c4f";
-      };
-      meta = {
-        description = "Android + Google APIs";
-
-      };
-    };
-
-  google_apis_18 = buildGoogleApis {
-    name = "google_apis-18";
-      src = fetchurl {
-        url = https://dl.google.com/android/repository/google_apis-18_r04.zip;
-        sha1 = "6109603409debdd40854d4d4a92eaf8481462c8b";
-      };
-      meta = {
-        description = "Android + Google APIs";
-
-      };
-    };
-
-  google_apis_19 = buildGoogleApis {
-    name = "google_apis-19";
-      src = fetchurl {
-        url = https://dl.google.com/android/repository/google_apis-19_r20.zip;
-        sha1 = "5b933abe830b2f25b4c0f171d45e9e0651e56311";
-      };
-      meta = {
-        description = "Android + Google APIs";
-
-      };
-    };
-
-  google_apis_21 = buildGoogleApis {
-    name = "google_apis-21";
-      src = fetchurl {
-        url = https://dl.google.com/android/repository/google_apis-21_r01.zip;
-        sha1 = "66a754efb24e9bb07cc51648426443c7586c9d4a";
-      };
-      meta = {
-        description = "Android + Google APIs";
-
-      };
-    };
-
-  google_apis_22 = buildGoogleApis {
-    name = "google_apis-22";
-      src = fetchurl {
-        url = https://dl.google.com/android/repository/google_apis-22_r01.zip;
-        sha1 = "5def0f42160cba8acff51b9c0c7e8be313de84f5";
-      };
-      meta = {
-        description = "Android + Google APIs";
-
-      };
-    };
-
-  google_apis_23 = buildGoogleApis {
-    name = "google_apis-23";
-      src = fetchurl {
-        url = https://dl.google.com/android/repository/google_apis-23_r01.zip;
-        sha1 = "04c5cc1a7c88967250ebba9561d81e24104167db";
-      };
-      meta = {
-        description = "Android + Google APIs";
-
-      };
-    };
-
-  google_apis_24 = buildGoogleApis {
-    name = "google_apis-24";
-      src = fetchurl {
-        url = https://dl.google.com/android/repository/google_apis-24_r1.zip;
-        sha1 = "31361c2868f27343ee917fbd259c1463821b6145";
-      };
-      meta = {
-        description = "Android + Google APIs";
-
-      };
-    };
-
-  google_apis_25 = buildGoogleApis {
-    name = "google_apis-25";
-      src = fetchurl {
-        url = https://dl.google.com/android/repository/google_apis-25_r1.zip;
-        sha1 = "550e83eea9513ab11c44919ac6da54b36084a9f3";
-      };
-      meta = {
-        description = "Android + Google APIs";
-
-      };
-    };
-
-  android_support_extra = buildGoogleApis {
-    name = "android_support_extra";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/support_r23.2.1.zip;
-      sha1 = "41121bbc412c2fce0be170d589d20cfa3e78e857";
-    };
-    meta = {
-      description = "Android Support Library";
-      url = http://developer.android.com/;
-    };
-  };
-
-
-  google_play_services = buildGoogleApis {
-    name = "google_play_services";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/google_play_services_v16_1_rc09.zip;
-      sha1 = "f95bf19634e2ab0430923247fe2c50246432d2e9";
-    };
-    meta = {
-      description = "Google Play services client library and sample code";
-      url = http://developer.android.com/;
-    };
-  };
-
-  instant_apps = buildGoogleApis {
-    name = "instant_apps_sdk";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/iasdk-1.5.0-1538000167.zip;
-      sha1 = "6c282b9c686e819fe7f5ac8f2249d2479acb63b4";
-    };
-    meta = {
-      description = "Android Instant Apps Development SDK";
-      url = "https://developer.android.com/";
-    };
-  };
-
-
-}
diff --git a/pkgs/development/mobile/androidenv/androidndk.nix b/pkgs/development/mobile/androidenv/androidndk.nix
deleted file mode 100644
index 23ae4378dc6..00000000000
--- a/pkgs/development/mobile/androidenv/androidndk.nix
+++ /dev/null
@@ -1,120 +0,0 @@
-{ stdenv, fetchurl, zlib, ncurses5, unzip, lib, makeWrapper
-, coreutils, file, findutils, gawk, gnugrep, gnused, jdk, which
-, platformTools, python3, libcxx, version, sha1s, bash, runCommand
-, fullNDK ? false # set to true if you want other parts of the NDK
-                  # that is not used by Nixpkgs like sources,
-                  # examples, docs, or LLVM toolchains
-}:
-
-let
-  makeStandaloneToolchain = api: arch: let
-      full_ndk = (ndk true);
-    in runCommand "makeStandaloneToolchain-${version}" {} ''
-      ${full_ndk}/libexec/${full_ndk.name}/build/tools/make_standalone_toolchain.py --api ${toString api} --arch ${arch} --install-dir $out
-    '';
-  ndk = fullNDK: stdenv.mkDerivation rec {
-    name = "android-ndk-r${version}";
-    inherit version;
-
-    src = fetchurl {
-      url = "https://dl.google.com/android/repository/${name}-${stdenv.hostPlatform.parsed.kernel.name}-${stdenv.hostPlatform.parsed.cpu.name}.zip";
-      sha1 = sha1s.${stdenv.hostPlatform.system} or (throw "platform ${stdenv.hostPlatform.system} not supported!");
-    };
-
-    phases = "buildPhase";
-
-    nativeBuildInputs = [ unzip makeWrapper file ];
-
-    buildCommand = let
-      bin_path = "$out/bin";
-      pkg_path = "$out/libexec/${name}";
-      sed_script_1 =
-        "'s|^PROGDIR=`dirname $0`" +
-        "|PROGDIR=`dirname $(readlink -f $(which $0))`|'";
-      runtime_paths = (lib.makeBinPath [
-        coreutils file findutils
-        gawk gnugrep gnused
-        jdk python3 which
-      ]) + ":${platformTools}/platform-tools";
-    in ''
-      mkdir -pv $out/libexec
-      cd $out/libexec
-      unzip -qq $src
-
-      # so that it doesn't fail because of read-only permissions set
-      cd -
-      ${if (version == "10e") then
-          ''
-            patch -p1 \
-              --no-backup-if-mismatch \
-              -d $out/libexec/${name} < ${ ./make-standalone-toolchain_r10e.patch }
-          ''
-        else
-          ''
-            patch -p1 \
-              --no-backup-if-mismatch \
-              -d $out/libexec/${name} < ${ ./. + "/make_standalone_toolchain.py_" + "${version}" + ".patch" }
-
-            sed -i 's,#!/usr/bin/env python,#!${python3}/bin/python,g' ${pkg_path}/build/tools/make_standalone_toolchain.py
-            sed -i 's,#!/bin/bash,#!${bash}/bin/bash,g' ${pkg_path}/build/tools/make_standalone_toolchain.py
-            wrapProgram ${pkg_path}/build/tools/make_standalone_toolchain.py --prefix PATH : "${runtime_paths}"
-          ''
-      }
-
-      patchShebangs ${pkg_path}
-
-      cd ${pkg_path}
-
-    '' + lib.optionalString (!fullNDK) ''
-      # Steps to reduce output size
-      rm -rf docs sources tests
-      # We only support cross compiling with gcc for now
-      rm -rf toolchains/*-clang* toolchains/llvm*
-    '' +
-
-    ''
-      find ${pkg_path}/toolchains \( \
-          \( -type f -a -name "*.so*" \) -o \
-          \( -type f -a -perm -0100 \) \
-          \) -exec patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-*so.? \
-                            --set-rpath ${stdenv.lib.makeLibraryPath [ libcxx zlib ncurses5 ]} {} \;
-      # fix ineffective PROGDIR / MYNDKDIR determination
-      for i in ndk-build ${lib.optionalString (version == "10e") "ndk-gdb ndk-gdb-py"}
-      do
-          sed -i -e ${sed_script_1} $i
-      done
-
-      # wrap
-      for i in ndk-build ${lib.optionalString (version == "10e") "ndk-gdb ndk-gdb-py ndk-which"}
-      do
-          wrapProgram "$(pwd)/$i" --prefix PATH : "${runtime_paths}"
-      done
-
-      ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") ''
-        for i in ${pkg_path}/prebuilt/linux-x86_64/bin/*
-        do
-            if ! isELF $i; then continue; fi
-            patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux-x86-64.so.2 $i
-            patchelf --set-rpath ${stdenv.cc.cc.lib}/lib64 $i
-        done
-      ''}
-
-      # make some executables available in PATH
-      mkdir -pv ${bin_path}
-      for i in \
-          ndk-build ${lib.optionalString (version == "10e") "ndk-depends ndk-gdb ndk-gdb-py ndk-gdb.py ndk-stack ndk-which"}
-      do
-          ln -sf ${pkg_path}/$i ${bin_path}/$i
-      done
-    '';
-
-    meta = {
-      platforms = builtins.attrNames sha1s;
-      hydraPlatforms = [];
-      license = stdenv.lib.licenses.asl20;
-    };
-  };
-  passthru = {
-    inherit makeStandaloneToolchain;
-  };
-in lib.extendDerivation true passthru (ndk fullNDK)
diff --git a/pkgs/development/mobile/androidenv/androidndk_r8e.nix b/pkgs/development/mobile/androidenv/androidndk_r8e.nix
deleted file mode 100644
index 68d2150f972..00000000000
--- a/pkgs/development/mobile/androidenv/androidndk_r8e.nix
+++ /dev/null
@@ -1,88 +0,0 @@
-{ stdenv, fetchurl, zlib, ncurses, lib, makeWrapper
-, coreutils, file, findutils, gawk, gnugrep, gnused, jdk, which
-, platformTools
-, fullNDK ? false # set to true if you want other parts of the NDK
-                  # that is not used by Nixpkgs like sources,
-                  # examples, docs, or LLVM toolchains
-}:
-
-stdenv.mkDerivation rec {
-  name = "android-ndk-r8e";
-
-  src = if stdenv.hostPlatform.system == "i686-linux"
-    then fetchurl {
-      url = "http://dl.google.com/android/ndk/${name}-linux-x86.tar.bz2";
-      sha256 = "c2c4e0c8b3037149a0f5dbb08d72f814a52af4da9fff9d80328c675457e95a98";
-    }
-    else if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl {
-      url = "http://dl.google.com/android/ndk/${name}-linux-x86_64.tar.bz2";
-      sha256 = "093gf55zbh38p2gk5bdykj1vg9p5l774wjdzw5mhk4144jm1wdq7";
-    }
-    else throw "platform ${stdenv.hostPlatform.system} not supported!";
-
-  phases = "buildPhase";
-
-  nativeBuildInputs = [ makeWrapper ];
-
-  buildCommand = let
-    bin_path = "$out/bin";
-    pkg_path = "$out/libexec/${name}";
-    sed_script_1 =
-      "'s|^PROGDIR=`dirname $0`" +
-      "|PROGDIR=`dirname $(readlink -f $(which $0))`|'";
-    sed_script_2 =
-      "'s|^MYNDKDIR=`dirname $0`" +
-      "|MYNDKDIR=`dirname $(readlink -f $(which $0))`|'";
-    runtime_paths = (lib.makeBinPath [
-      coreutils file findutils
-      gawk gnugrep gnused
-      jdk
-      which
-    ]) + ":${platformTools}/platform-tools";
-  in ''
-    set -x
-    mkdir -pv $out/libexec
-    cd $out/libexec
-    tar -xjf $src
-
-    # so that it doesn't fail because of read-only permissions set
-    cd -
-    patch -p1 \
-        --no-backup-if-mismatch \
-        -d $out/libexec/${name} < ${ ./make-standalone-toolchain_r8e.patch }
-    cd ${pkg_path}
-
-  '' + lib.optionalString (!fullNDK) ''
-    # Steps to reduce output size
-    rm -rf docs sources tests
-    # We only support cross compiling with gcc for now
-    rm -rf toolchains/*-clang* toolchains/llvm-*
-
-  '' + ''
-    find ${pkg_path}/toolchains \( \
-        \( -type f -a -name "*.so*" \) -o \
-        \( -type f -a -perm -0100 \) \
-        \) -exec patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-*so.? \
-                          --set-rpath ${stdenv.lib.makeLibraryPath [ zlib ncurses ]} {} \;
-    # fix ineffective PROGDIR / MYNDKDIR determination
-    for i in ndk-build ndk-gdb ndk-gdb-py
-    do
-        sed -i -e ${sed_script_1} $i
-    done
-    sed -i -e ${sed_script_2} ndk-which
-    # a bash script
-    patchShebangs ndk-which
-    # wrap
-    for i in ndk-build ndk-gdb ndk-gdb-py ndk-which
-    do
-        wrapProgram "$(pwd)/$i" --prefix PATH : "${runtime_paths}"
-    done
-    # make some executables available in PATH
-    mkdir -pv ${bin_path}
-    for i in \
-        ndk-build ndk-depends ndk-gdb ndk-gdb-py ndk-gdb.py ndk-stack ndk-which
-    do
-        ln -sf ${pkg_path}/$i ${bin_path}/$i
-    done
-  '';
-}
diff --git a/pkgs/development/mobile/androidenv/androidsdk.nix b/pkgs/development/mobile/androidenv/androidsdk.nix
deleted file mode 100644
index 26750aed6cf..00000000000
--- a/pkgs/development/mobile/androidenv/androidsdk.nix
+++ /dev/null
@@ -1,296 +0,0 @@
-{ stdenv, stdenv_32bit, fetchurl, fetchzip, unzip, makeWrapper
-, platformTools, buildTools, support, supportRepository, platforms, sysimages, addons, sources
-, libX11, libXext, libXrender, libxcb, libXau, libXdmcp, libXtst, libGLU_combined, alsaLib
-, freetype, fontconfig, glib, gtk2, atk, file, jdk, coreutils, libpulseaudio, dbus
-, zlib, glxinfo, xkeyboardconfig
-, includeSources
-, licenseAccepted
-}:
-{ platformVersions, abiVersions, useGoogleAPIs, buildToolsVersions ? [], useExtraSupportLibs ? false
-, useGooglePlayServices ? false, useInstantApps ? false }:
-
-if !licenseAccepted then throw ''
-    You must accept the Android Software Development Kit License Agreement at
-    https://developer.android.com/studio/terms
-    by setting nixpkgs config option 'android_sdk.accept_license = true;'
-  ''
-else assert licenseAccepted;
-
-let inherit (stdenv.lib) makeLibraryPath;
-
-    googleRepository = let version = "gms_v9_rc41_wear_2_0_rc6";
-      in fetchzip rec {
-        url = "https://dl-ssl.google.com/android/repository/google_m2repository_${version}.zip";
-        sha256 = "0k99xmynv0k62d301zx5jnjkddflr51i5lb02l9incg7m5cn8kzx";
-      };
-
-in
-
-stdenv.mkDerivation rec {
-  name = "android-sdk-${version}";
-  version = "26.1.1";
-
-  src = if (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux")
-    then fetchurl {
-      url = "https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip";
-      sha256 = "1yfy0qqxz1ixpsci1pizls1nrncmi8p16wcb9rimdn4q3mdfxzwj";
-    }
-    else if stdenv.hostPlatform.system == "x86_64-darwin" then fetchurl {
-      url = "https://dl.google.com/android/repository/sdk-tools-darwin-4333796.zip";
-      sha256 = "0gl5c30m40kx0vvrpbaa8cw8wq2vb89r14hgzb1df4qgpic97cpc";
-    }
-    else throw "platform not ${stdenv.hostPlatform.system} supported!";
-
-  emulator = fetchurl {
-     url = "https://dl.google.com/android/repository/emulator-linux-4969155.zip";
-     sha256 = "0iw0j6j3w9zpfalsa7xq2czz4vzgq96zk2zddjhanwwx4p8fhrfd";
-  };
-
-  buildCommand = ''
-    mkdir -p $out/libexec
-    cd $out/libexec
-    unpackFile $src
-    unpackFile $emulator
-    cd tools
-
-    for f in monitor bin/monkeyrunner bin/uiautomatorviewer
-    do
-        sed -i -e "s|/bin/ls|${coreutils}/bin/ls|" "$f"
-    done
-
-    ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux")
-    ''
-      # There are a number of native binaries. We must patch them to let them find the interpreter and libstdc++
-
-      for i in mksdcard
-      do
-          patchelf --set-interpreter ${stdenv_32bit.cc.libc.out}/lib/ld-linux.so.2 $i
-          patchelf --set-rpath ${stdenv_32bit.cc.cc.lib}/lib $i
-      done
-
-      # The following scripts used SWT and wants to dynamically load some GTK+ stuff.
-      # Creating these wrappers ensure that they can be found:
-
-      wrapProgram `pwd`/android \
-        --prefix PATH : ${jdk}/bin \
-        --prefix LD_LIBRARY_PATH : ${makeLibraryPath [ glib gtk2 libXtst ]}
-
-      wrapProgram `pwd`/bin/uiautomatorviewer \
-        --prefix PATH : ${jdk}/bin \
-        --prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ glib gtk2 libXtst ]}
-
-      # The emulators need additional libraries, which are dynamically loaded => let's wrap them
-
-      ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") ''
-        cd ..
-        for i in emulator/emulator* emulator/qemu/linux-x86_64/qemu-system-*
-        do
-            patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux-x86-64.so.2 $i
-            wrapProgram `pwd`/$i \
-              --prefix PATH : ${stdenv.lib.makeBinPath [ file glxinfo ]} \
-              --suffix LD_LIBRARY_PATH : `pwd`/lib:${makeLibraryPath [ stdenv.cc.cc libX11 libxcb libXau libXdmcp libXext libGLU_combined alsaLib zlib libpulseaudio dbus.lib ]} \
-              --suffix QT_XKB_CONFIG_ROOT : ${xkeyboardconfig}/share/X11/xkb
-        done
-        cd tools
-      ''}
-    ''}
-
-    patchShebangs .
-
-    ${if stdenv.hostPlatform.system == "i686-linux" then
-      ''
-        # The monitor requires some more patching
-
-        cd lib/monitor-x86
-        patchelf --set-interpreter ${stdenv_32bit.cc.libc.out}/lib/ld-linux.so.2 monitor
-        patchelf --set-rpath ${makeLibraryPath [ libX11 libXext libXrender freetype fontconfig ]} libcairo-swt.so
-
-        wrapProgram `pwd`/monitor \
-          --prefix LD_LIBRARY_PATH : ${makeLibraryPath [ gtk2 atk stdenv.cc.cc libXtst ]}
-
-        cd ../..
-      ''
-      else if stdenv.hostPlatform.system == "x86_64-linux" then
-      ''
-        # The monitor requires some more patching
-
-        cd lib/monitor-x86_64
-        patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux-x86-64.so.2 monitor
-        patchelf --set-rpath ${makeLibraryPath [ libX11 libXext libXrender freetype fontconfig ]} libcairo-swt.so
-
-        wrapProgram `pwd`/monitor \
-          --prefix LD_LIBRARY_PATH : ${makeLibraryPath [ gtk2 atk stdenv.cc.cc libXtst ]}
-
-        cd ../..
-      ''
-      else ""}
-
-    # Symlink the other sub packages
-
-    cd ..
-    ln -s ${platformTools}/platform-tools
-    ln -s ${support}/support
-
-    mkdir -p build-tools
-    cd build-tools
-
-    ${stdenv.lib.concatMapStrings
-       (v: "ln -s ${builtins.getAttr "v${builtins.replaceStrings ["."] ["_"] v}" buildTools}/build-tools/*")
-       (if (builtins.length buildToolsVersions) == 0 then platformVersions else buildToolsVersions)}
-
-    cd ..
-
-    # Symlink required Google API add-ons
-
-    mkdir -p add-ons
-    cd add-ons
-
-    ${if useGoogleAPIs then
-        stdenv.lib.concatMapStrings (platformVersion:
-        if (builtins.hasAttr ("google_apis_"+platformVersion) addons) then
-          let
-            googleApis = builtins.getAttr ("google_apis_"+platformVersion) addons;
-          in
-          "ln -s ${googleApis}/* addon-google_apis-${platformVersion}\n"
-        else "") platformVersions
-      else ""}
-
-    cd ..
-
-    # Symlink required extras
-
-    mkdir -p extras/android
-    cd extras/android
-
-    ln -s ${supportRepository}/m2repository
-
-    ${if useExtraSupportLibs then
-       "ln -s ${addons.android_support_extra}/support ."
-     else ""}
-
-    cd ..
-    mkdir -p google
-    cd google
-
-    ${if useGooglePlayServices then
-       "ln -s ${addons.google_play_services}/google-play-services google_play_services"
-     else ""}
-
-    ${stdenv.lib.optionalString useInstantApps
-       "ln -s ${addons.instant_apps}/whsdk instantapps"}
-
-    ln -s ${googleRepository} m2repository
-
-    cd ../..
-
-    # Symlink required sources
-    mkdir -p sources
-    cd sources
-
-    ${if includeSources then
-        stdenv.lib.concatMapStrings (platformVersion:
-        if (builtins.hasAttr ("source_"+platformVersion) sources) then
-          let
-            source = builtins.getAttr ("source_"+platformVersion) sources;
-          in
-          "ln -s ${source}/* android-${platformVersion}\n"
-        else "") platformVersions
-      else ""}
-
-    cd ..
-
-    # Symlink required platforms
-
-    mkdir -p platforms
-    cd platforms
-
-    ${stdenv.lib.concatMapStrings (platformVersion:
-      if (builtins.hasAttr ("platform_"+platformVersion) platforms) then
-        let
-          platform = builtins.getAttr ("platform_"+platformVersion) platforms;
-        in
-        "ln -s ${platform}/* android-${platformVersion}\n"
-      else ""
-    ) platformVersions}
-
-    cd ..
-
-    # Symlink required system images
-
-    mkdir -p system-images
-    cd system-images
-
-    ${stdenv.lib.concatMapStrings (abiVersion:
-      stdenv.lib.concatMapStrings (platformVersion:
-        if (builtins.hasAttr ("sysimg_" + abiVersion + "_" + platformVersion) sysimages) then
-          let
-            sysimg = builtins.getAttr ("sysimg_" + abiVersion + "_" + platformVersion) sysimages;
-          in
-          ''
-            mkdir -p android-${platformVersion}
-            cd android-${platformVersion}
-            ln -s ${sysimg}/*
-            cd ..
-          ''
-        else ""
-      ) platformVersions
-    ) abiVersions}
-
-    # Create wrappers to the most important tools and platform tools so that we can run them if the SDK is in our PATH
-
-    mkdir -p $out/bin
-
-    for i in $out/libexec/tools/*
-    do
-        if [ ! -d $i ] && [ -x $i ]
-        then
-            ln -sf $i $out/bin/$(basename $i)
-        fi
-    done
-
-    for i in $out/libexec/tools/bin/*
-    do
-        if [ ! -d $i ] && [ -x $i ]
-        then
-            ln -sf $i $out/bin/$(basename $i)
-        fi
-    done
-
-    for i in $out/libexec/platform-tools/*
-    do
-        if [ ! -d $i ] && [ -x $i ]
-        then
-            ln -sf $i $out/bin/$(basename $i)
-        fi
-    done
-
-    for i in $out/libexec/build-tools/*/*
-    do
-        if [ ! -d $i ] && [ -x $i ]
-        then
-            ln -sf $i $out/bin/$(basename $i)
-        fi
-    done
-
-    for i in $out/libexec/emulator/*
-    do
-        if [ ! -d $i ] && [ -x $i ]
-        then
-            ln -sf $i $out/bin/$(basename $i)
-        fi
-    done
-
-    wrapProgram $out/bin/sdkmanager \
-      --set JAVA_HOME ${jdk}
-
-    yes | ANDROID_SDK_HOME=$(mktemp -d) $out/bin/sdkmanager --licenses || true
-  '';
-
-  buildInputs = [ unzip makeWrapper ];
-
-  meta = {
-    platforms = stdenv.lib.platforms.unix;
-    hydraPlatforms = [];
-    license = stdenv.lib.licenses.unfree;
-  };
-}
diff --git a/pkgs/development/mobile/androidenv/build-app.nix b/pkgs/development/mobile/androidenv/build-app.nix
index 20b3ff3b8f5..62cdeb43032 100644
--- a/pkgs/development/mobile/androidenv/build-app.nix
+++ b/pkgs/development/mobile/androidenv/build-app.nix
@@ -1,28 +1,26 @@
-{ stdenv, androidsdk, jdk, ant, androidndk, gnumake, gawk, file, which }:
-args@{ name, src, platformVersions ? [ "8" ], useGoogleAPIs ? false, antFlags ? ""
+{ composeAndroidPackages, stdenv, ant, jdk, gnumake, gawk }:
+
+{ name
 , release ? false, keyStore ? null, keyAlias ? null, keyStorePassword ? null, keyAliasPassword ? null
-, useNDK ? false, ...
-}:
+, antFlags ? ""
+, ...
+}@args:
 
 assert release -> keyStore != null && keyAlias != null && keyStorePassword != null && keyAliasPassword != null;
 
 let
-  androidsdkComposition = androidsdk {
-    inherit platformVersions useGoogleAPIs;
-    abiVersions = [];
-  };
+  androidSdkFormalArgs = builtins.functionArgs composeAndroidPackages;
+  androidArgs = builtins.intersectAttrs androidSdkFormalArgs args;
+  androidsdk = (composeAndroidPackages androidArgs).androidsdk;
+
+  extraArgs = removeAttrs args ([ "name" ] ++ builtins.attrNames androidSdkFormalArgs);
 in
 stdenv.mkDerivation ({
-  name = stdenv.lib.replaceChars [" "] [""] name;
-
-  ANDROID_HOME = "${androidsdkComposition}/libexec";
-
-  buildInputs = [ jdk ant ] ++
-    stdenv.lib.optional useNDK [ androidndk gnumake gawk file which ];
-
+  name = stdenv.lib.replaceChars [" "] [""] name; # Android APKs may contain white spaces in their names, but Nix store paths cannot
+  ANDROID_HOME = "${androidsdk}/libexec/android-sdk";
+  buildInputs = [ jdk ant ];
   buildPhase = ''
     ${stdenv.lib.optionalString release ''
-    
       # Provide key singing attributes
       ( echo "key.store=${keyStore}"
         echo "key.alias=${keyAlias}"
@@ -32,20 +30,19 @@ stdenv.mkDerivation ({
     ''}
 
     export ANDROID_SDK_HOME=`pwd` # Key files cannot be stored in the user's home directory. This overrides it.
-    ${if useNDK then ''
-        export GNUMAKE=${gnumake}/bin/make
-        export NDK_HOST_AWK=${gawk}/bin/gawk
-        ${androidndk}/bin/ndk-build
-      '' else ""}
+
+    ${stdenv.lib.optionalString (args ? includeNDK && args.includeNDK) ''
+      export GNUMAKE=${gnumake}/bin/make
+      export NDK_HOST_AWK=${gawk}/bin/gawk
+      ${androidsdk}/libexec/android-sdk/ndk-bundle/ndk-build
+    ''}
     ant ${antFlags} ${if release then "release" else "debug"}
   '';
-
   installPhase = ''
     mkdir -p $out
     mv bin/*-${if release then "release" else "debug"}.apk $out
-    
+
     mkdir -p $out/nix-support
     echo "file binary-dist \"$(echo $out/*.apk)\"" > $out/nix-support/hydra-build-products
   '';
-} //
-builtins.removeAttrs args ["name"])
+} // extraArgs)
diff --git a/pkgs/development/mobile/androidenv/build-gradle-app.nix b/pkgs/development/mobile/androidenv/build-gradle-app.nix
deleted file mode 100644
index d6a39146324..00000000000
--- a/pkgs/development/mobile/androidenv/build-gradle-app.nix
+++ /dev/null
@@ -1,108 +0,0 @@
-{ stdenv, androidsdk, jdk, androidndk, gnumake, gawk, file
-, which, gradle, fetchurl, buildEnv, runCommand }:
-
-args@{ name, src, platformVersions ? [ "8" ], useGoogleAPIs ? false
-     , useExtraSupportLibs ? false, useGooglePlayServices ? false
-     , release ? false, keyStore ? null, keyAlias ? null
-     , keyStorePassword ? null, keyAliasPassword ? null
-     , useNDK ? false, buildInputs ? [], mavenDeps, gradleTask
-     , buildDirectory ? "./.", acceptAndroidSdkLicenses ? false }:
-
-assert release -> keyStore != null;
-assert release -> keyAlias != null;
-assert release -> keyStorePassword != null;
-assert release -> keyAliasPassword != null;
-assert acceptAndroidSdkLicenses;
-
-let
-  inherit (stdenv.lib) optionalString;
-
-  m2install = { repo, version, artifactId, groupId
-              , jarSha256, pomSha256, aarSha256, suffix ? "" }:
-    let m2Name = "${artifactId}-${version}";
-        m2Path = "${builtins.replaceStrings ["."] ["/"] groupId}/${artifactId}/${version}";
-    in runCommand m2Name {} (''
-         mkdir -p $out/m2/${m2Path}
-       '' + optionalString (jarSha256 != null) ''
-         install -D ${fetchurl {
-                        url = "${repo}${m2Path}/${m2Name}${suffix}.jar";
-                        sha256 = jarSha256;
-                      }} $out/m2/${m2Path}/${m2Name}${suffix}.jar
-       '' + optionalString (pomSha256 != null) ''
-         install -D ${fetchurl {
-                        url = "${repo}${m2Path}/${m2Name}${suffix}.pom";
-                        sha256 = pomSha256;
-                      }} $out/m2/${m2Path}/${m2Name}${suffix}.pom
-       '' + optionalString (aarSha256 != null) ''
-         install -D ${fetchurl {
-                        url = "${repo}${m2Path}/${m2Name}${suffix}.aar";
-                        sha256 = aarSha256;
-                      }} $out/m2/${m2Path}/${m2Name}${suffix}.aar
-       '');
-
-  androidsdkComposition = androidsdk {
-    inherit platformVersions useGoogleAPIs
-            useExtraSupportLibs useGooglePlayServices;
-    abiVersions = [ "armeabi-v7a" ];
-  };
-in
-stdenv.mkDerivation ({
-  name = stdenv.lib.replaceChars [" "] [""] name;
-
-  ANDROID_HOME = "${androidsdkComposition}/libexec";
-  ANDROID_NDK_HOME = "${androidndk}/libexec/${androidndk.name}";
-
-  buildInputs = [ jdk gradle ] ++
-    stdenv.lib.optional useNDK [ androidndk gnumake gawk file which ] ++
-      buildInputs;
-
-  DEPENDENCIES = buildEnv { name = "${name}-maven-deps";
-                            paths = map m2install mavenDeps;
-                          };
-
-  buildPhase = ''
-    ${optionalString release ''
-      # Provide key signing attributes
-      ( echo "RELEASE_STORE_FILE=${keyStore}"
-        echo "RELEASE_KEY_ALIAS=${keyAlias}"
-        echo "RELEASE_STORE_PASSWORD=${keyStorePassword}"
-        echo "RELEASE_KEY_PASSWORD=${keyAliasPassword}"
-      ) >> gradle.properties
-    ''}
-    buildDir=`pwd`
-    cp -r $ANDROID_HOME $buildDir/local_sdk
-    chmod -R 755 local_sdk
-    export ANDROID_HOME=$buildDir/local_sdk
-    # Key files cannot be stored in the user's home directory. This
-    # overrides it.
-    export ANDROID_SDK_HOME=`pwd`
-
-    mkdir -p "$ANDROID_HOME/licenses"
-    echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license"
-    echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/android-sdk-preview-license"
-
-    export APP_HOME=`pwd`
-
-    mkdir -p .m2/repository
-    if [ -d "$DEPENDENCIES/m2" ] ; then
-      cp -RL "$DEPENDENCIES"/m2/* .m2/repository/
-    fi
-    chmod -R 755 .m2
-    mkdir -p .m2/repository/com/android/support
-    cp -RL local_sdk/extras/android/m2repository/com/android/support/* .m2/repository/com/android/support/
-    cp -RL local_sdk/extras/google/m2repository/* .m2/repository/
-    gradle ${gradleTask} --offline --no-daemon -g ./tmp -Dmaven.repo.local=`pwd`/.m2/repository
-  '';
-
-  installPhase = ''
-    mkdir -p $out
-    mv ${buildDirectory}/build/outputs/apk/*.apk $out
-
-    mkdir -p $out/nix-support
-    echo "file binary-dist \"$(echo $out/*.apk)\"" > $out/nix-support/hydra-build-products
-  '';
-
-  meta = {
-    license = stdenv.lib.licenses.unfree;
-  };
-} // builtins.removeAttrs args ["name" "mavenDeps"])
diff --git a/pkgs/development/mobile/androidenv/build-tools-srcs-linux.nix b/pkgs/development/mobile/androidenv/build-tools-srcs-linux.nix
deleted file mode 100644
index 3c2960755e7..00000000000
--- a/pkgs/development/mobile/androidenv/build-tools-srcs-linux.nix
+++ /dev/null
@@ -1,376 +0,0 @@
-
-# This file is generated from generate-tools.sh. DO NOT EDIT.
-# Execute generate-tools.sh or fetch.sh to update the file.
-{ fetchurl }:
-
-{
-    
-  v17 = {
-    version = "17.0.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r17-linux.zip;
-      sha1 = "2c2872bc3806aabf16a12e3959c2183ddc866e6d";
-    };
-  };
-
-  v18_0_1 = {
-    version = "18.0.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r18.0.1-linux.zip;
-      sha1 = "f11618492b0d2270c332325d45d752d3656a9640";
-    };
-  };
-
-  v18_1_0 = {
-    version = "18.1.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r18.1-linux.zip;
-      sha1 = "f314a0599e51397f0886fe888b50dd98f2f050d8";
-    };
-  };
-
-  v18_1_1 = {
-    version = "18.1.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r18.1.1-linux.zip;
-      sha1 = "68c9acbfc0cec2d51b19efaed39831a17055d998";
-    };
-  };
-
-  v19 = {
-    version = "19.0.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r19-linux.zip;
-      sha1 = "55c1a6cf632e7d346f0002b275ec41fd3137fd83";
-    };
-  };
-
-  v19_0_1 = {
-    version = "19.0.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r19.0.1-linux.zip;
-      sha1 = "18d2312dc4368858914213087f4e61445aca4517";
-    };
-  };
-
-  v19_0_2 = {
-    version = "19.0.2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r19.0.2-linux.zip;
-      sha1 = "a03a6bdea0091aea32e1b35b90a7294c9f04e3dd";
-    };
-  };
-
-  v19_0_3 = {
-    version = "19.0.3";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r19.0.3-linux.zip;
-      sha1 = "c2d6055478e9d2d4fba476ee85f99181ddd1160c";
-    };
-  };
-
-  v19_1_0 = {
-    version = "19.1.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r19.1-linux.zip;
-      sha1 = "1ff20ac15fa47a75d00346ec12f180d531b3ca89";
-    };
-  };
-
-  v20 = {
-    version = "20.0.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r20-linux.zip;
-      sha1 = "b688905526a5584d1327a662d871a635ff502758";
-    };
-  };
-
-  v21 = {
-    version = "21.0.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r21-linux.zip;
-      sha1 = "4933328fdeecbd554a29528f254f4993468e1cf4";
-    };
-  };
-
-  v21_0_1 = {
-    version = "21.0.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r21.0.1-linux.zip;
-      sha1 = "e573069eea3e5255e7a65bedeb767f4fd0a5f49a";
-    };
-  };
-
-  v21_0_2 = {
-    version = "21.0.2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r21.0.2-linux.zip;
-      sha1 = "e1236ab8897b62b57414adcf04c132567b2612a5";
-    };
-  };
-
-  v21_1_0 = {
-    version = "21.1.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r21.1-linux.zip;
-      sha1 = "b7455e543784d52a8925f960bc880493ed1478cb";
-    };
-  };
-
-  v21_1_1 = {
-    version = "21.1.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r21.1.1-linux.zip;
-      sha1 = "1c712ee3a1ba5a8b0548f9c32f17d4a0ddfd727d";
-    };
-  };
-
-  v21_1_2 = {
-    version = "21.1.2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r21.1.2-linux.zip;
-      sha1 = "5e35259843bf2926113a38368b08458735479658";
-    };
-  };
-
-  v22 = {
-    version = "22.0.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r22-linux.zip;
-      sha1 = "a8a1619dd090e44fac957bce6842e62abf87965b";
-    };
-  };
-
-  v22_0_1 = {
-    version = "22.0.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r22.0.1-linux.zip;
-      sha1 = "da8b9c5c3ede39298e6cf0283c000c2ee9029646";
-    };
-  };
-
-  v23 = {
-    version = "23.0.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r23-linux.zip;
-      sha1 = "c1d6209212b01469f80fa804e0c1d39a06bc9060";
-    };
-  };
-
-  v23_0_1 = {
-    version = "23.0.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r23.0.1-linux.zip;
-      sha1 = "b6ba7c399d5fa487d95289d8832e4ad943aed556";
-    };
-  };
-
-  v23_0_2 = {
-    version = "23.0.2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r23.0.2-linux.zip;
-      sha1 = "8a9f2b37f6fcf7a9fa784dc21aeaeb41bbb9f2c3";
-    };
-  };
-
-  v23_0_3 = {
-    version = "23.0.3";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r23.0.3-linux.zip;
-      sha1 = "368f2600feac7e9b511b82f53d1f2240ae4a91a3";
-    };
-  };
-
-  v24 = {
-    version = "24.0.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r24-linux.zip;
-      sha1 = "c6271c4d78a5612ea6c7150688bcd5b7313de8d1";
-    };
-  };
-
-  v24_0_1 = {
-    version = "24.0.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r24.0.1-linux.zip;
-      sha1 = "84f18c392919a074fcbb9b1d967984e6b2fef8b4";
-    };
-  };
-
-  v24_0_2 = {
-    version = "24.0.2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r24.0.2-linux.zip;
-      sha1 = "f199a7a788c3fefbed102eea34d6007737b803cf";
-    };
-  };
-
-  v24_0_3 = {
-    version = "24.0.3";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r24.0.3-linux.zip;
-      sha1 = "9e8cc49d66e03fa1a8ecc1ac3e58f1324f5da304";
-    };
-  };
-
-  v25 = {
-    version = "25.0.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r25-linux.zip;
-      sha1 = "f2bbda60403e75cabd0f238598c3b4dfca56ea44";
-    };
-  };
-
-  v25_0_1 = {
-    version = "25.0.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r25.0.1-linux.zip;
-      sha1 = "ff063d252ab750d339f5947d06ff782836f22bac";
-    };
-  };
-
-  v25_0_2 = {
-    version = "25.0.2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r25.0.2-linux.zip;
-      sha1 = "ff953c0177e317618fda40516f3e9d95fd43c7ae";
-    };
-  };
-
-  v25_0_3 = {
-    version = "25.0.3";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r25.0.3-linux.zip;
-      sha1 = "db95f3a0ae376534d4d69f4cdb6fad20649f3509";
-    };
-  };
-
-  v26 = {
-    version = "26.0.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r26-linux.zip;
-      sha1 = "1cbe72929876f8a872ab1f1b1040a9f720261f59";
-    };
-  };
-
-  v26_rc1 = {
-    version = "26.0.0-rc1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r26-rc1-linux.zip;
-      sha1 = "8cd6388dc96db2d7a49d06159cf990d3bbc78d04";
-    };
-  };
-
-  v26_rc2 = {
-    version = "26.0.0-rc2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r26-rc2-linux.zip;
-      sha1 = "629bbd8d2e415bf64871fb0b4c0540fd6d0347a0";
-    };
-  };
-
-  v26_0_1 = {
-    version = "26.0.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r26.0.1-linux.zip;
-      sha1 = "5378c2c78091b414d0eac40a6bd37f2faa31a365";
-    };
-  };
-
-  v26_0_2 = {
-    version = "26.0.2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r26.0.2-linux.zip;
-      sha1 = "5b2b7b66c7bf2151f2af183b5b50a17808850592";
-    };
-  };
-
-  v26_0_3 = {
-    version = "26.0.3";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r26.0.3-linux.zip;
-      sha1 = "8a2e6c1bcd845844523a68aa17e5442f0dce328c";
-    };
-  };
-
-  v27 = {
-    version = "27.0.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r27-linux.zip;
-      sha1 = "28542332ba97cf4a08c3eddfcf5edd70e3cf1260";
-    };
-  };
-
-  v27_0_1 = {
-    version = "27.0.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r27.0.1-linux.zip;
-      sha1 = "7f4eedb1077ef948b848040dcd15de9e8a759f4a";
-    };
-  };
-
-  v27_0_2 = {
-    version = "27.0.2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r27.0.2-linux.zip;
-      sha1 = "b687ddf6be84f11607871138aad32cf857d0b837";
-    };
-  };
-
-  v27_0_3 = {
-    version = "27.0.3";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r27.0.3-linux.zip;
-      sha1 = "d85e7a6320eddffe7eeace3437605079dac938ca";
-    };
-  };
-
-  v28 = {
-    version = "28.0.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r28-linux.zip;
-      sha1 = "d9f8a754d833ccd334f56fcc6089c5925cd82abb";
-    };
-  };
-
-  v28_rc1 = {
-    version = "28.0.0-rc1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r28-rc1-linux.zip;
-      sha1 = "1601977fae25fd478bcfaa0481ca5ea3c609d840";
-    };
-  };
-
-  v28_rc2 = {
-    version = "28.0.0-rc2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r28-rc2-linux.zip;
-      sha1 = "efe9c0dde0646a07544c864276390ca6e96b24dc";
-    };
-  };
-
-  v28_0_1 = {
-    version = "28.0.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r28.0.1-linux.zip;
-      sha1 = "ee70dfa1fccb58b37cebc9544830511f36a137a0";
-    };
-  };
-
-  v28_0_2 = {
-    version = "28.0.2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r28.0.2-linux.zip;
-      sha1 = "b4492209810a3fd48deaa982f9852fef12433d55";
-    };
-  };
-
-  v28_0_3 = {
-    version = "28.0.3";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r28.0.3-linux.zip;
-      sha1 = "ea6f2f7103cd9da9ff0bdf6e37fbbba548fa4165";
-    };
-  };
-
-}
diff --git a/pkgs/development/mobile/androidenv/build-tools-srcs-macosx.nix b/pkgs/development/mobile/androidenv/build-tools-srcs-macosx.nix
deleted file mode 100644
index 1e15aa7c873..00000000000
--- a/pkgs/development/mobile/androidenv/build-tools-srcs-macosx.nix
+++ /dev/null
@@ -1,376 +0,0 @@
-
-# This file is generated from generate-tools.sh. DO NOT EDIT.
-# Execute generate-tools.sh or fetch.sh to update the file.
-{ fetchurl }:
-
-{
-    
-  v17 = {
-    version = "17.0.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r17-macosx.zip;
-      sha1 = "602ee709be9dbb8f179b1e4075148a57f9419930";
-    };
-  };
-
-  v18_0_1 = {
-    version = "18.0.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r18.0.1-macosx.zip;
-      sha1 = "d84f5692fb44d60fc53e5b2507cebf9f24626902";
-    };
-  };
-
-  v18_1_0 = {
-    version = "18.1.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r18.1-macosx.zip;
-      sha1 = "16ddb299b8b43063e5bb3387ec17147c5053dfd8";
-    };
-  };
-
-  v18_1_1 = {
-    version = "18.1.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r18.1.1-macosx.zip;
-      sha1 = "a9d9d37f6ddf859e57abc78802a77aaa166e48d4";
-    };
-  };
-
-  v19 = {
-    version = "19.0.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r19-macosx.zip;
-      sha1 = "86ec1c12db1bc446b7bcaefc5cc14eb361044e90";
-    };
-  };
-
-  v19_0_1 = {
-    version = "19.0.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r19.0.1-macosx.zip;
-      sha1 = "efaf50fb19a3edb8d03efbff76f89a249ad2920b";
-    };
-  };
-
-  v19_0_2 = {
-    version = "19.0.2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r19.0.2-macosx.zip;
-      sha1 = "145bc43065d45f756d99d87329d899052b9a9288";
-    };
-  };
-
-  v19_0_3 = {
-    version = "19.0.3";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r19.0.3-macosx.zip;
-      sha1 = "651cf8754373b2d52e7f6aab2c52eabffe4e9ea4";
-    };
-  };
-
-  v19_1_0 = {
-    version = "19.1.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r19.1-macosx.zip;
-      sha1 = "0d11aae3417de1efb4b9a0e0a7855904a61bcec1";
-    };
-  };
-
-  v20 = {
-    version = "20.0.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r20-macosx.zip;
-      sha1 = "1240f629411c108a714c4ddd756937c7fab93f83";
-    };
-  };
-
-  v21 = {
-    version = "21.0.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r21-macosx.zip;
-      sha1 = "9bef7989b51436bd4e5114d8a0330359f077cbfa";
-    };
-  };
-
-  v21_0_1 = {
-    version = "21.0.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r21.0.1-macosx.zip;
-      sha1 = "b60c8f9b810c980abafa04896706f3911be1ade7";
-    };
-  };
-
-  v21_0_2 = {
-    version = "21.0.2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r21.0.2-macosx.zip;
-      sha1 = "f17471c154058f3734729ef3cc363399b1cd3de1";
-    };
-  };
-
-  v21_1_0 = {
-    version = "21.1.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r21.1-macosx.zip;
-      sha1 = "df619356c2359aa5eacdd48699d15b335d9bd246";
-    };
-  };
-
-  v21_1_1 = {
-    version = "21.1.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r21.1.1-macosx.zip;
-      sha1 = "836a146eab0504aa9387a5132e986fe7c7381571";
-    };
-  };
-
-  v21_1_2 = {
-    version = "21.1.2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r21.1.2-macosx.zip;
-      sha1 = "e7c906b4ba0eea93b32ba36c610dbd6b204bff48";
-    };
-  };
-
-  v22 = {
-    version = "22.0.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r22-macosx.zip;
-      sha1 = "af95429b24088d704bc5db9bd606e34ac1b82c0d";
-    };
-  };
-
-  v22_0_1 = {
-    version = "22.0.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r22.0.1-macosx.zip;
-      sha1 = "53dad7f608e01d53b17176ba11165acbfccc5bbf";
-    };
-  };
-
-  v23 = {
-    version = "23.0.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r23-macosx.zip;
-      sha1 = "90ba6e716f7703a236cd44b2e71c5ff430855a03";
-    };
-  };
-
-  v23_0_1 = {
-    version = "23.0.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r23.0.1-macosx.zip;
-      sha1 = "d96ec1522721e9a179ae2c591c99f75d31d39718";
-    };
-  };
-
-  v23_0_2 = {
-    version = "23.0.2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r23.0.2-macosx.zip;
-      sha1 = "482c4cbceef8ff58aefd92d8155a38610158fdaf";
-    };
-  };
-
-  v23_0_3 = {
-    version = "23.0.3";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r23.0.3-macosx.zip;
-      sha1 = "fbc98cd303fd15a31d472de6c03bd707829f00b0";
-    };
-  };
-
-  v24 = {
-    version = "24.0.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r24-macosx.zip;
-      sha1 = "97fc4ed442f23989cc488d02c1d1de9bdde241de";
-    };
-  };
-
-  v24_0_1 = {
-    version = "24.0.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r24.0.1-macosx.zip;
-      sha1 = "5c6457fcdfa07724fb086d8ff4e8316fc0742848";
-    };
-  };
-
-  v24_0_2 = {
-    version = "24.0.2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r24.0.2-macosx.zip;
-      sha1 = "8bb8fc575477491d5957de743089df412de55cda";
-    };
-  };
-
-  v24_0_3 = {
-    version = "24.0.3";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r24.0.3-macosx.zip;
-      sha1 = "a01c15f1b105c34595681075e1895d58b3fff48c";
-    };
-  };
-
-  v25 = {
-    version = "25.0.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r25-macosx.zip;
-      sha1 = "273c5c29a65cbed00e44f3aa470bbd7dce556606";
-    };
-  };
-
-  v25_0_1 = {
-    version = "25.0.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r25.0.1-macosx.zip;
-      sha1 = "7bf7f22d7d48ef20b6ab0e3d7a2912e5c088340f";
-    };
-  };
-
-  v25_0_2 = {
-    version = "25.0.2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r25.0.2-macosx.zip;
-      sha1 = "12a5204bb3b6e39437535469fde7ddf42da46b16";
-    };
-  };
-
-  v25_0_3 = {
-    version = "25.0.3";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r25.0.3-macosx.zip;
-      sha1 = "160d2fefb5ce68e443427fc30a793a703b63e26e";
-    };
-  };
-
-  v26 = {
-    version = "26.0.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r26-macosx.zip;
-      sha1 = "d01a1aeca03747245f1f5936b3cb01759c66d086";
-    };
-  };
-
-  v26_rc1 = {
-    version = "26.0.0-rc1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r26-rc1-macosx.zip;
-      sha1 = "5c5a1de7d5f4f000d36ae349229fe0be846d6137";
-    };
-  };
-
-  v26_rc2 = {
-    version = "26.0.0-rc2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r26-rc2-macosx.zip;
-      sha1 = "cb1eb738a1f7003025af267a9b8cc2d259533c70";
-    };
-  };
-
-  v26_0_1 = {
-    version = "26.0.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r26.0.1-macosx.zip;
-      sha1 = "cbde59de198916b390777dd0227921bfa2120832";
-    };
-  };
-
-  v26_0_2 = {
-    version = "26.0.2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r26.0.2-macosx.zip;
-      sha1 = "d9ed7c7f149ce38be5dc08979aea8acec1459ca0";
-    };
-  };
-
-  v26_0_3 = {
-    version = "26.0.3";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r26.0.3-macosx.zip;
-      sha1 = "5bb90ed935d99e5bc90686f43b852e68c5ad40df";
-    };
-  };
-
-  v27 = {
-    version = "27.0.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r27-macosx.zip;
-      sha1 = "fb4e8d7e6b8d29a77090e34024077a80458d5ae1";
-    };
-  };
-
-  v27_0_1 = {
-    version = "27.0.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r27.0.1-macosx.zip;
-      sha1 = "1edd07bfdbadd95652d093040e16d858f7489594";
-    };
-  };
-
-  v27_0_2 = {
-    version = "27.0.2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r27.0.2-macosx.zip;
-      sha1 = "6d5d9cf2a47877f273f4b742b19e712a051a31be";
-    };
-  };
-
-  v27_0_3 = {
-    version = "27.0.3";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r27.0.3-macosx.zip;
-      sha1 = "61d9fb18790c68d66ff73bf1e7ad56bc1f1eef2d";
-    };
-  };
-
-  v28 = {
-    version = "28.0.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r28-macosx.zip;
-      sha1 = "72088d32d1d82cc3c2cf7cf6618b6130c0c84ade";
-    };
-  };
-
-  v28_rc1 = {
-    version = "28.0.0-rc1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r28-rc1-macosx.zip;
-      sha1 = "2c77821967a2330b7b227072d0b1c02ef19fe2fc";
-    };
-  };
-
-  v28_rc2 = {
-    version = "28.0.0-rc2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r28-rc2-macosx.zip;
-      sha1 = "0d0314b353589feb10e528b44c5a685b6658d797";
-    };
-  };
-
-  v28_0_1 = {
-    version = "28.0.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r28.0.1-macosx.zip;
-      sha1 = "aeef42ad953f1630dd6f5d71eefdc0b825211462";
-    };
-  };
-
-  v28_0_2 = {
-    version = "28.0.2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r28.0.2-macosx.zip;
-      sha1 = "c10dd5a7825578622fb362a8a34f76eb3ba0c0a9";
-    };
-  };
-
-  v28_0_3 = {
-    version = "28.0.3";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/build-tools_r28.0.3-macosx.zip;
-      sha1 = "f8c333a2991b1ab05a671bc6248b78e00edcd83a";
-    };
-  };
-
-}
diff --git a/pkgs/development/mobile/androidenv/build-tools.nix b/pkgs/development/mobile/androidenv/build-tools.nix
index b362dc2dca5..976ef141627 100644
--- a/pkgs/development/mobile/androidenv/build-tools.nix
+++ b/pkgs/development/mobile/androidenv/build-tools.nix
@@ -1,53 +1,19 @@
-{stdenv, lib, stdenv_32bit, fetchurl, unzip, zlib_32bit, ncurses_32bit, file, zlib, ncurses, coreutils, buildToolsSources}:
-
-let buildBuildTools = name: { version, src }:
-  stdenv.mkDerivation rec {
-    inherit version src;
-    name = "android-build-tools-r${version}";
-    buildCommand = ''
-      mkdir -p $out/build-tools
-      cd $out/build-tools
-      unzip $src
-      mv android-* ${version}
-
-      cd ${version}
-
-      for f in $(grep -Rl /bin/ls .); do
-        sed -i -e "s|/bin/ls|${coreutils}/bin/ls|" "$f"
-      done
-
-      ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux")
-        ''
-
-          ln -s ${ncurses.out}/lib/libncurses.so.5 `pwd`/lib64/libtinfo.so.5
-
-          find . -type f -print0 | while IFS= read -r -d "" file
-          do
-            type=$(file "$file")
-            ## Patch 64-bit binaries
-            if grep -q "ELF 64-bit" <<< "$type"
-            then
-              if grep -q "interpreter" <<< "$type"
-              then
-                patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux-x86-64.so.2 "$file"
-              fi
-              patchelf --set-rpath `pwd`/lib64:${stdenv.cc.cc.lib.out}/lib:${zlib.out}/lib:${ncurses.out}/lib "$file"
-            ## Patch 32-bit binaries
-            elif grep -q "ELF 32-bit" <<< "$type"
-            then
-              if grep -q "interpreter" <<< "$type"
-              then
-                patchelf --set-interpreter ${stdenv_32bit.cc.libc.out}/lib/ld-linux.so.2 "$file"
-              fi
-              patchelf --set-rpath ${stdenv_32bit.cc.cc.lib.out}/lib:${zlib_32bit.out}/lib:${ncurses_32bit.out}/lib "$file"
-            fi
-          done
-        ''}
-
-        patchShebangs .
-    '';
-
-    buildInputs = [ unzip file ];
-  };
-in
-  lib.mapAttrs buildBuildTools buildToolsSources
+{deployAndroidPackage, lib, package, os, autoPatchelfHook, makeWrapper, pkgs, pkgs_i686}:
+
+deployAndroidPackage {
+  inherit package os;
+  buildInputs = [ autoPatchelfHook makeWrapper ] ++
+    lib.optional (os == "linux") [ pkgs.glibc pkgs.zlib pkgs.ncurses5 pkgs_i686.glibc pkgs_i686.zlib pkgs_i686.ncurses5 ];
+  patchInstructions = ''
+    ${lib.optionalString (os == "linux") ''
+      addAutoPatchelfSearchPath $packageBaseDir/lib
+      addAutoPatchelfSearchPath $packageBaseDir/lib64
+      autoPatchelf --no-recurse $packageBaseDir/lib64
+      autoPatchelf --no-recurse $packageBaseDir
+    ''}
+
+    wrapProgram $PWD/mainDexClasses \
+      --prefix PATH : ${pkgs.jdk8}/bin
+  '';
+  noAuditTmpdir = true; # The checker script gets confused by the build-tools path that is incorrectly identified as a reference to /build
+}
diff --git a/pkgs/development/mobile/androidenv/cmake.nix b/pkgs/development/mobile/androidenv/cmake.nix
new file mode 100644
index 00000000000..1aeef467642
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/cmake.nix
@@ -0,0 +1,10 @@
+{deployAndroidPackage, lib, package, os, autoPatchelfHook, pkgs}:
+
+deployAndroidPackage {
+  inherit package os;
+  buildInputs = [ autoPatchelfHook ]
+    ++ lib.optional (os == "linux") [ pkgs.stdenv.glibc pkgs.stdenv.cc.cc ];
+  patchInstructions = lib.optionalString (os == "linux") ''
+    autoPatchelf $packageBaseDir/bin
+  '';
+}
diff --git a/pkgs/development/mobile/androidenv/compose-android-packages.nix b/pkgs/development/mobile/androidenv/compose-android-packages.nix
new file mode 100644
index 00000000000..690f9712a10
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/compose-android-packages.nix
@@ -0,0 +1,262 @@
+{stdenv, fetchurl, requireFile, makeWrapper, unzip, autoPatchelfHook, pkgs, pkgs_i686, licenseAccepted ? false}:
+
+{ toolsVersion ? "25.2.5"
+, platformToolsVersion ? "28.0.1"
+, buildToolsVersions ? [ "28.0.3" ]
+, includeEmulator ? false
+, emulatorVersion ? "28.0.14"
+, platformVersions ? []
+, includeSources ? false
+, includeDocs ? false
+, includeSystemImages ? false
+, systemImageTypes ? [ "default" ]
+, abiVersions ? [ "armeabi-v7a" ]
+, lldbVersions ? [ ]
+, cmakeVersions ? [ ]
+, includeNDK ? false
+, ndkVersion ? "18.1.5063045"
+, useGoogleAPIs ? false
+, useGoogleTVAddOns ? false
+, includeExtras ? []
+}:
+
+if !licenseAccepted then throw ''
+    You must accept the Android Software Development Kit License Agreement at
+    https://developer.android.com/studio/terms
+    by setting nixpkgs config option 'android_sdk.accept_license = true;'
+  ''
+else assert licenseAccepted;
+
+let
+  inherit (pkgs) stdenv fetchurl makeWrapper unzip;
+
+  # Determine the Android os identifier from Nix's system identifier
+  os = if stdenv.system == "x86_64-linux" then "linux"
+    else if stdenv.system == "x86_64-darwin" then "macosx"
+    else "No tarballs found for system architecture: ${stdenv.system}";
+
+  # Generated Nix packages
+  packages = import ./generated/packages.nix {
+    inherit fetchurl;
+  };
+
+  # Generated system images
+  system-images-packages-android = import ./generated/system-images-android.nix {
+    inherit fetchurl;
+  };
+
+  system-images-packages-android-tv = import ./generated/system-images-android-tv.nix {
+    inherit fetchurl;
+  };
+
+  system-images-packages-android-wear = import ./generated/system-images-android-wear.nix {
+    inherit fetchurl;
+  };
+
+  system-images-packages-android-wear-cn = import ./generated/system-images-android-wear-cn.nix {
+    inherit fetchurl;
+  };
+
+  system-images-packages-google_apis = import ./generated/system-images-google_apis.nix {
+    inherit fetchurl;
+  };
+
+  system-images-packages-google_apis_playstore = import ./generated/system-images-google_apis_playstore.nix {
+    inherit fetchurl;
+  };
+
+  system-images-packages =
+    stdenv.lib.recursiveUpdate
+      system-images-packages-android
+      (stdenv.lib.recursiveUpdate system-images-packages-android-tv
+        (stdenv.lib.recursiveUpdate system-images-packages-android-wear
+          (stdenv.lib.recursiveUpdate system-images-packages-android-wear-cn
+            (stdenv.lib.recursiveUpdate system-images-packages-google_apis system-images-packages-google_apis_playstore))));
+
+  # Generated addons
+  addons = import ./generated/addons.nix {
+    inherit fetchurl;
+  };
+in
+rec {
+  deployAndroidPackage = import ./deploy-androidpackage.nix {
+    inherit stdenv unzip;
+  };
+
+  platform-tools = import ./platform-tools.nix {
+    inherit deployAndroidPackage os autoPatchelfHook pkgs;
+    inherit (stdenv) lib;
+    package = packages.platform-tools."${platformToolsVersion}";
+  };
+
+  build-tools = map (version:
+    import ./build-tools.nix {
+      inherit deployAndroidPackage os autoPatchelfHook makeWrapper pkgs pkgs_i686;
+      inherit (stdenv) lib;
+      package = packages.build-tools."${version}";
+    }
+  ) buildToolsVersions;
+
+  docs = deployAndroidPackage {
+    inherit os;
+    package = packages.docs."1";
+  };
+
+  emulator = import ./emulator.nix {
+    inherit deployAndroidPackage os autoPatchelfHook makeWrapper pkgs pkgs_i686;
+    inherit (stdenv) lib;
+    package = packages.emulator."${emulatorVersion}"."${os}";
+  };
+
+  platforms = map (version:
+    deployAndroidPackage {
+      inherit os;
+      package = packages.platforms."${version}";
+    }
+  ) platformVersions;
+
+  sources = map (version:
+    deployAndroidPackage {
+      inherit os;
+      package = packages.sources."${version}";
+    }
+  ) platformVersions;
+
+  system-images = stdenv.lib.flatten (map (apiVersion:
+    map (type:
+      map (abiVersion:
+        deployAndroidPackage {
+          inherit os;
+          package = system-images-packages.${apiVersion}.${type}.${abiVersion};
+        }
+      ) abiVersions
+    ) systemImageTypes
+  ) platformVersions);
+
+  lldb = map (version:
+    import ./lldb.nix {
+      inherit deployAndroidPackage os autoPatchelfHook pkgs;
+      inherit (stdenv) lib;
+      package = packages.lldb."${version}";
+    }
+  ) lldbVersions;
+
+  cmake = map (version:
+    import ./cmake.nix {
+      inherit deployAndroidPackage os autoPatchelfHook pkgs;
+      inherit (stdenv) lib;
+      package = packages.cmake."${version}";
+    }
+  ) cmakeVersions;
+
+  ndk-bundle = import ./ndk-bundle {
+    inherit deployAndroidPackage os autoPatchelfHook makeWrapper pkgs platform-tools;
+    inherit (stdenv) lib;
+    package = packages.ndk-bundle."${ndkVersion}";
+  };
+
+  google-apis = map (version:
+    deployAndroidPackage {
+      inherit os;
+      package = addons.addons."${version}".google_apis;
+    }
+  ) (builtins.filter (platformVersion: platformVersion < "26") platformVersions); # API level 26 and higher include Google APIs by default
+
+  google-tv-addons = map (version:
+    deployAndroidPackage {
+      inherit os;
+      package = addons.addons."${version}".google_tv_addon;
+    }
+  ) platformVersions;
+
+  # Function that automatically links all plugins for which multiple versions can coexist
+  linkPlugins = {name, plugins}:
+    stdenv.lib.optionalString (plugins != []) ''
+      mkdir -p ${name}
+      ${stdenv.lib.concatMapStrings (plugin: ''
+        ln -s ${plugin}/libexec/android-sdk/${name}/* ${name}
+      '') plugins}
+    '';
+
+  # Function that automatically links a plugin for which only one version exists
+  linkPlugin = {name, plugin, check ? true}:
+    stdenv.lib.optionalString check ''
+      ln -s ${plugin}/libexec/android-sdk/* ${name}
+    '';
+
+  # Links all plugins related to a requested platform
+  linkPlatformPlugins = {name, plugins, check}:
+    stdenv.lib.optionalString check ''
+      mkdir -p ${name}
+      ${stdenv.lib.concatMapStrings (plugin: ''
+        ln -s ${plugin}/libexec/android-sdk/${name}/* ${name}
+      '') plugins}
+    ''; # */
+
+  # This derivation deploys the tools package and symlinks all the desired
+  # plugins that we want to use.
+
+  androidsdk = import ./tools.nix {
+    inherit deployAndroidPackage requireFile packages toolsVersion autoPatchelfHook makeWrapper os pkgs pkgs_i686;
+    inherit (stdenv) lib;
+
+    postInstall = ''
+      # Symlink all requested plugins
+
+      ${linkPlugin { name = "platform-tools"; plugin = platform-tools; }}
+      ${linkPlugins { name = "build-tools"; plugins = build-tools; }}
+      ${linkPlugin { name = "emulator"; plugin = emulator; check = includeEmulator; }}
+      ${linkPlugin { name = "docs"; plugin = docs; check = includeDocs; }}
+      ${linkPlugins { name = "platforms"; plugins = platforms; }}
+      ${linkPlatformPlugins { name = "sources"; plugins = sources; check = includeSources; }}
+      ${linkPlugins { name = "lldb"; plugins = lldb; }}
+      ${linkPlugins { name = "cmake"; plugins = cmake; }}
+      ${linkPlugin { name = "ndk-bundle"; plugin = ndk-bundle; check = includeNDK; }}
+
+      ${stdenv.lib.optionalString includeSystemImages ''
+        mkdir -p system-images
+        ${stdenv.lib.concatMapStrings (system-image: ''
+          apiVersion=$(basename $(echo ${system-image}/libexec/android-sdk/system-images/*))
+          type=$(basename $(echo ${system-image}/libexec/android-sdk/system-images/*/*))
+          mkdir -p system-images/$apiVersion/$type
+          ln -s ${system-image}/libexec/android-sdk/system-images/$apiVersion/$type/* system-images/$apiVersion/$type
+        '') system-images}
+      ''}
+
+      ${linkPlatformPlugins { name = "add-ons"; plugins = google-apis; check = useGoogleAPIs; }}
+      ${linkPlatformPlugins { name = "add-ons"; plugins = google-apis; check = useGoogleTVAddOns; }}
+
+      # Link extras
+      ${stdenv.lib.concatMapStrings (identifier:
+        let
+          path = addons.extras."${identifier}".path;
+          addon = deployAndroidPackage {
+            inherit os;
+            package = addons.extras."${identifier}";
+          };
+        in
+        ''
+          targetDir=$(dirname ${path})
+          mkdir -p $targetDir
+          ln -s ${addon}/libexec/android-sdk/${path} $targetDir
+        '') includeExtras}
+
+      # Expose common executables in bin/
+      mkdir -p $out/bin
+      find $PWD/tools -not -path '*/\.*' -type f -executable -mindepth 1 -maxdepth 1 | while read i
+      do
+          ln -s $i $out/bin
+      done
+
+      find $PWD/tools/bin -not -path '*/\.*' -type f -executable -mindepth 1 -maxdepth 1 | while read i
+      do
+          ln -s $i $out/bin
+      done
+
+      for i in ${platform-tools}/bin/*
+      do
+          ln -s $i $out/bin
+      done
+    '';
+  };
+}
diff --git a/pkgs/development/mobile/androidenv/convertaddons.xsl b/pkgs/development/mobile/androidenv/convertaddons.xsl
new file mode 100644
index 00000000000..73f58ff5cde
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/convertaddons.xsl
@@ -0,0 +1,128 @@
+<?xml version="1.0"?>
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:addon="http://schemas.android.com/sdk/android/repo/addon2/01"
+  xmlns:sdk="http://schemas.android.com/repository/android/common/01"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+  <xsl:output omit-xml-declaration="yes" indent="no" />
+
+  <!-- Template that puts a google HTTP prefix in front of relative URLs -->
+  <xsl:template name="repository-url">
+    <xsl:variable name="raw-url" select="complete/url"/>
+    <xsl:choose>
+      <xsl:when test="starts-with($raw-url, 'http')">
+        <xsl:value-of select="$raw-url"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:text>https://dl.google.com/android/repository/</xsl:text>
+        <xsl:value-of select="$raw-url"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template match="/addon:sdk-addon">
+{fetchurl}:
+
+{
+  addons = {
+    <!-- Convert all addons, but skip the entry for google APIs version 25 because it is inconsistent with the spec -->
+    <xsl:for-each select="remotePackage[type-details/@xsi:type='addon:addonDetailsType' and archives/archive/complete/url != 'google_apis-25_r1.zip' ]"><xsl:sort select="@path" />
+    "<xsl:value-of select="type-details/api-level" />"."<xsl:value-of select="type-details/tag/id" />" = {
+      name = "<xsl:value-of select="type-details/tag/id" />";
+      path = "<xsl:value-of select="translate(@path, ';', '/')" />";
+      revision = "<xsl:value-of select="type-details/api-level" />";
+      displayName = "<xsl:value-of select="display-name" />";
+      archives = {
+      <xsl:for-each select="archives/archive[not(host-os)]">
+        all = fetchurl {
+          url = <xsl:call-template name="repository-url"/>;
+          sha1 = "<xsl:value-of select="complete/checksum" />";
+        };
+      </xsl:for-each>
+      <xsl:for-each select="archives/archive[host-os and not(host-os = 'windows')]">
+        <xsl:value-of select="host-os" /> = fetchurl {
+          url = <xsl:call-template name="repository-url"/>;
+          sha1 = "<xsl:value-of select="complete/checksum" />";
+        };
+      </xsl:for-each>
+      };
+    };
+    </xsl:for-each>
+
+    <!-- Workaround to make google APIs version 25 work. Hopefully, we can get rid of this at some point -->
+    <xsl:for-each select="remotePackage[type-details/@xsi:type='addon:addonDetailsType' and archives/archive/complete/url = 'google_apis-25_r1.zip' ]">
+    "<xsl:value-of select="25" />"."<xsl:value-of select="type-details/tag/id" />" = {
+      name = "<xsl:value-of select="type-details/tag/id" />";
+      path = "add-ons/addon-google_apis-google-25";
+      revision = "<xsl:value-of select="25" />";
+      displayName = "<xsl:value-of select="display-name" />";
+      archives = {
+      <xsl:for-each select="archives/archive[not(host-os)]">
+        all = fetchurl {
+          url = <xsl:call-template name="repository-url"/>;
+          sha1 = "<xsl:value-of select="complete/checksum" />";
+        };
+      </xsl:for-each>
+      <xsl:for-each select="archives/archive[host-os and not(host-os = 'windows')]">
+        <xsl:value-of select="host-os" /> = fetchurl {
+          url = <xsl:call-template name="repository-url"/>;
+          sha1 = "<xsl:value-of select="complete/checksum" />";
+        };
+      </xsl:for-each>
+      };
+    };
+    </xsl:for-each>
+  };
+
+  extras = {
+    <!-- Convert all extras and maven artefacts -->
+    <xsl:for-each select="remotePackage[type-details/@xsi:type='addon:extraDetailsType' or type-details/@xsi:type='addon:mavenType']"><xsl:sort select="@path" />
+    
+    <!-- Compose revision string from revision attributes -->
+    <xsl:variable name="revision">
+      <xsl:choose>
+        <xsl:when test="revision/major">
+          <xsl:value-of select="revision/major" />
+        </xsl:when>
+      </xsl:choose>
+      <xsl:choose>
+        <xsl:when test="revision/minor">.<xsl:value-of select="revision/minor" />
+        </xsl:when>
+      </xsl:choose>
+      <xsl:choose>
+        <xsl:when test="revision/micro">.<xsl:value-of select="revision/micro" />
+        </xsl:when>
+      </xsl:choose>
+      <xsl:choose>
+        <xsl:when test="revision/preview">-rc<xsl:value-of select="revision/preview" />
+        </xsl:when>
+      </xsl:choose>
+    </xsl:variable>
+
+    "<xsl:value-of select="@path" />" = {
+      name = "<xsl:value-of select="translate(@path, ';', '-')" />";
+      path = "<xsl:value-of select="translate(@path, ';', '/')" />";
+      revision = "<xsl:value-of select="$revision" />";
+      displayName = "<xsl:value-of select="display-name" />";
+      archives = {
+      <xsl:for-each select="archives/archive[not(host-os)]">
+        all = fetchurl {
+          url = <xsl:call-template name="repository-url"/>;
+          sha1 = "<xsl:value-of select="complete/checksum" />";
+        };
+      </xsl:for-each>
+      <xsl:for-each select="archives/archive[host-os and not(host-os = 'windows')]">
+        <xsl:value-of select="host-os" /> = fetchurl {
+          url = <xsl:call-template name="repository-url"/>;
+          sha1 = "<xsl:value-of select="complete/checksum" />";
+        };
+      </xsl:for-each>
+      };
+    };
+    </xsl:for-each>
+  };
+}
+  </xsl:template>
+
+</xsl:stylesheet>
diff --git a/pkgs/development/mobile/androidenv/convertpackages.xsl b/pkgs/development/mobile/androidenv/convertpackages.xsl
new file mode 100644
index 00000000000..9623e01abcd
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/convertpackages.xsl
@@ -0,0 +1,116 @@
+<?xml version="1.0"?>
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:common="http://schemas.android.com/repository/android/common/01"
+  xmlns:generic="http://schemas.android.com/repository/android/generic/01"
+  xmlns:sdk="http://schemas.android.com/sdk/android/repo/repository2/01"
+  xmlns:sdk-common="http://schemas.android.com/sdk/android/repo/common/01"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+  <xsl:output omit-xml-declaration="yes" indent="no" />
+
+  <!-- Template that puts a google HTTP prefix in front of relative URLs -->
+  <xsl:template name="repository-url">
+    <xsl:variable name="raw-url" select="complete/url"/>
+    <xsl:choose>
+      <xsl:when test="starts-with($raw-url, 'http')">
+        <xsl:value-of select="$raw-url"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:text>https://dl.google.com/android/repository/</xsl:text>
+        <xsl:value-of select="$raw-url"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template match="/sdk:sdk-repository">
+{fetchurl}:
+
+{
+  <!-- Convert all remote packages -->
+  <xsl:for-each select="remotePackage"><xsl:sort select="@path" />
+
+  <!-- Extract the package name from the path -->
+  <xsl:variable name="name">
+    <xsl:choose>
+      <xsl:when test="contains(@path, ';')">
+        <xsl:value-of select="substring-before(@path, ';')" />
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="@path" />
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <!-- Compose version string from version attributes -->
+  <xsl:variable name="revision">
+    <xsl:choose>
+      <!-- Compose revision for a generic package from the revision attributes -->
+      <xsl:when test="type-details/@xsi:type='generic:genericDetailsType'">
+        <xsl:choose>
+          <xsl:when test="revision/major">
+            <xsl:value-of select="revision/major" />
+          </xsl:when>
+        </xsl:choose>
+        <xsl:choose>
+          <xsl:when test="revision/minor">.<xsl:value-of select="revision/minor" />
+          </xsl:when>
+        </xsl:choose>
+        <xsl:choose>
+          <xsl:when test="revision/micro">.<xsl:value-of select="revision/micro" />
+          </xsl:when>
+        </xsl:choose>
+        <xsl:choose>
+          <xsl:when test="revision/preview">-rc<xsl:value-of select="revision/preview" />
+          </xsl:when>
+        </xsl:choose>
+      </xsl:when>
+      <!-- Compose revision of a platform SDK from the API-level or codename if the latter exists -->
+      <xsl:when test="type-details/@xsi:type='sdk:platformDetailsType'">
+        <xsl:choose>
+          <xsl:when test="not(type-details/codename='')">
+            <xsl:value-of select="type-details/codename" />
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="type-details/api-level" />
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+      <!-- Compose revision of a source SDK from the API-level -->
+      <xsl:when test="type-details/@xsi:type='sdk:sourceDetailsType'">
+        <xsl:value-of select="type-details/api-level" />
+      </xsl:when>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="@path='emulator'"> <!-- An emulator package provides one archive per operating system but the same versions -->
+  "<xsl:value-of select="$name" />"."<xsl:value-of select="$revision" />".<xsl:value-of select="archives/archive/host-os" /> = {
+    </xsl:when>
+    <xsl:otherwise>
+  "<xsl:value-of select="$name" />"."<xsl:value-of select="$revision" />" = {
+    </xsl:otherwise>
+  </xsl:choose>
+    name = "<xsl:value-of select="$name" />";
+    path = "<xsl:value-of select="translate(@path, ';', '/')" />";
+    revision = "<xsl:value-of select="$revision" />";
+    displayName = "<xsl:value-of select="display-name" />";
+    archives = {
+      <xsl:for-each select="archives/archive[not(host-os)]">
+        all = fetchurl {
+          url = <xsl:call-template name="repository-url"/>;
+          sha1 = "<xsl:value-of select="complete/checksum" />";
+        };
+      </xsl:for-each>
+      <xsl:for-each select="archives/archive[host-os and not(host-os = 'windows')]">
+        <xsl:value-of select="host-os" /> = fetchurl {
+        url = <xsl:call-template name="repository-url"/>;
+        sha1 = "<xsl:value-of select="complete/checksum" />";
+      };
+      </xsl:for-each>
+    };
+  };
+  </xsl:for-each>
+}
+  </xsl:template>
+</xsl:stylesheet>
diff --git a/pkgs/development/mobile/androidenv/convertsystemimages.xsl b/pkgs/development/mobile/androidenv/convertsystemimages.xsl
new file mode 100644
index 00000000000..42d19cb6965
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/convertsystemimages.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:sys-img="http://schemas.android.com/sdk/android/repo/sys-img2/01"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+  <xsl:param name="imageType" />
+
+  <xsl:output omit-xml-declaration="yes" indent="no" />
+
+  <xsl:template name="repository-url">
+    <xsl:variable name="raw-url" select="complete/url"/>
+    <xsl:choose>
+      <xsl:when test="starts-with($raw-url, 'http')">
+        <xsl:value-of select="$raw-url"/>
+      </xsl:when>
+      <xsl:otherwise>
+        https://dl.google.com/android/repository/sys-img/<xsl:value-of select="$imageType" />/<xsl:value-of select="$raw-url"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template match="/sys-img:sdk-sys-img">
+{fetchurl}:
+
+{
+  <xsl:for-each select="remotePackage[starts-with(@path, 'system-images;')]">
+    <xsl:variable name="revision">
+      <xsl:value-of select="type-details/api-level" />-<xsl:value-of select="type-details/tag/id" />-<xsl:value-of select="type-details/abi" />
+    </xsl:variable>
+
+    "<xsl:value-of select="type-details/api-level" />".<xsl:value-of select="type-details/tag/id" />."<xsl:value-of select="type-details/abi" />" = {
+      name = "system-image-<xsl:value-of select="$revision" />";
+      path = "<xsl:value-of select="translate(@path, ';', '/')" />";
+      revision = "<xsl:value-of select="$revision" />";
+      displayName = "<xsl:value-of select="display-name" />";
+      archives.all = fetchurl {
+      <xsl:for-each select="archives/archive">
+        url = <xsl:call-template name="repository-url"/>;
+        sha1 = "<xsl:value-of select="complete/checksum" />";
+      </xsl:for-each>
+      };
+  };
+  </xsl:for-each>
+}
+  </xsl:template>
+</xsl:stylesheet>
diff --git a/pkgs/development/mobile/androidenv/default.nix b/pkgs/development/mobile/androidenv/default.nix
index 282924047aa..92560105422 100644
--- a/pkgs/development/mobile/androidenv/default.nix
+++ b/pkgs/development/mobile/androidenv/default.nix
@@ -1,380 +1,26 @@
-{ buildPackages, pkgs, pkgs_i686, targetPackages
-, includeSources ? true, licenseAccepted ? false
+{ pkgs ? import <nixpkgs> {}
+, pkgs_i686 ? import <nixpkgs> { system = "i686-linux"; }
+, licenseAccepted ? false
 }:
 
-# TODO: use callPackage instead of import to avoid so many inherits
-
 rec {
-  platformTools = import ./platform-tools.nix {
-    inherit buildPackages pkgs;
-  };
-
-  buildToolsSources = let
-    system = pkgs.stdenv.hostPlatform.system;
-    path = if (system == "i686-linux" || system == "x86_64-linux")
-      then ./build-tools-srcs-linux.nix
-      else if system == "x86_64-darwin"
-      then ./build-tools-srcs-macosx.nix
-      else throw "System: ${system} not supported!";
-  in
-    import path { inherit (pkgs) fetchurl; };
-
-  buildTools = import ./build-tools.nix {
-    inherit (pkgs) stdenv lib fetchurl unzip zlib file coreutils;
-    inherit buildToolsSources;
-    stdenv_32bit = pkgs_i686.stdenv;
-    zlib_32bit = pkgs_i686.zlib;
-    ncurses_32bit = pkgs_i686.ncurses5;
-    ncurses = pkgs.ncurses5;
-  };
-
-  support = import ./support.nix {
-    inherit (pkgs) stdenv fetchurl unzip;
-  };
-
-  supportRepository = import ./support-repository.nix {
-    inherit (pkgs) stdenv fetchurl unzip;
-  };
-
-  platforms = if (pkgs.stdenv.hostPlatform.system == "i686-linux" || pkgs.stdenv.hostPlatform.system == "x86_64-linux")
-    then import ./platforms-linux.nix {
-      inherit (pkgs) stdenv fetchurl unzip;
-    }
-    else if pkgs.stdenv.hostPlatform.system == "x86_64-darwin"
-    then import ./platforms-macosx.nix {
-      inherit (pkgs) stdenv fetchurl unzip;
-    }
-    else throw "Platform: ${pkgs.stdenv.hostPlatform.system} not supported!";
-
-  sysimages = import ./sysimages.nix {
-    inherit (pkgs) stdenv fetchurl unzip;
-  };
-
-  addons = import ./addons.nix {
-    inherit (pkgs) stdenv fetchurl unzip;
-  };
-
-  sources = import ./sources.nix {
-    inherit (pkgs) stdenv fetchurl unzip;
-  };
-
-  androidsdk = import ./androidsdk.nix {
-    inherit (pkgs) stdenv fetchurl unzip makeWrapper zlib
-                   glxinfo freetype fontconfig glib gtk2 atk
-                   libGLU_combined file alsaLib jdk coreutils
-                   libpulseaudio dbus fetchzip;
-    inherit (pkgs.xorg) libX11 libXext libXrender
-                        libxcb libXau libXdmcp libXtst xkeyboardconfig;
-
-    inherit platformTools buildTools support
-            supportRepository platforms sysimages
-            addons sources includeSources licenseAccepted;
-
-    stdenv_32bit = pkgs_i686.stdenv;
-  };
-
-  androidsdk_2_1 = androidsdk {
-    platformVersions = [ "7" ];
-    abiVersions = [ "armeabi-v7a" ];
-    useGoogleAPIs = true;
-  };
-
-  androidsdk_2_2 = androidsdk {
-    platformVersions = [ "8" ];
-    abiVersions = [ "armeabi-v7a" ];
-    useGoogleAPIs = true;
-  };
-
-  androidsdk_2_3_3 = androidsdk {
-    platformVersions = [ "10" ];
-    abiVersions = [ "armeabi-v7a" ];
-    useGoogleAPIs = true;
-  };
-
-  androidsdk_3_0 = androidsdk {
-    platformVersions = [ "11" ];
-    abiVersions = [ "armeabi-v7a" ];
-    useGoogleAPIs = true;
-  };
-
-  androidsdk_3_1 = androidsdk {
-    platformVersions = [ "12" ];
-    abiVersions = [ "armeabi-v7a" ];
-    useGoogleAPIs = true;
-  };
-
-  androidsdk_3_2 = androidsdk {
-    platformVersions = [ "13" ];
-    abiVersions = [ "armeabi-v7a" ];
-    useGoogleAPIs = true;
-  };
-
-  androidsdk_4_0 = androidsdk {
-    platformVersions = [ "14" ];
-    abiVersions = [ "armeabi-v7a" ];
-    useGoogleAPIs = true;
-  };
-
-  androidsdk_4_0_3 = androidsdk {
-    platformVersions = [ "15" ];
-    abiVersions = [ "armeabi-v7a" ];
-    useGoogleAPIs = true;
-  };
-
-  androidsdk_4_1 = androidsdk {
-    platformVersions = [ "16" ];
-    abiVersions = [ "armeabi-v7a" ];
-    useGoogleAPIs = true;
-  };
-
-  androidsdk_4_2 = androidsdk {
-    platformVersions = [ "17" ];
-    abiVersions = [ "armeabi-v7a" ];
-    useGoogleAPIs = true;
-  };
-
-  androidsdk_4_3 = androidsdk {
-    platformVersions = [ "18" ];
-    abiVersions = [ "armeabi-v7a" "x86" ];
-    useGoogleAPIs = true;
-  };
-
-  androidsdk_4_4 = androidsdk {
-    platformVersions = [ "19" ];
-    abiVersions = [ "armeabi-v7a" "x86" ];
-    useGoogleAPIs = true;
-  };
-
-  androidsdk_5_0_1 = androidsdk {
-    platformVersions = [ "21" ];
-    abiVersions = [ "armeabi-v7a" "x86" ];
-    useGoogleAPIs = true;
-  };
-
-  androidsdk_5_0_1_extras = androidsdk {
-    platformVersions = [ "21" ];
-    abiVersions = [ "armeabi-v7a" "x86" ];
-    useGoogleAPIs = true;
-    useExtraSupportLibs = true;
-    useGooglePlayServices = true;
-  };
-
-  androidsdk_5_1_1 = androidsdk {
-    platformVersions = [ "22" ];
-    abiVersions = [ "armeabi-v7a" "x86" "x86_64"];
-    useGoogleAPIs = true;
-  };
-
-  androidsdk_5_1_1_extras = androidsdk {
-    platformVersions = [ "22" ];
-    abiVersions = [ "armeabi-v7a" "x86" "x86_64"];
-    useGoogleAPIs = true;
-    useExtraSupportLibs = true;
-    useGooglePlayServices = true;
-  };
-
-  androidsdk_6_0 = androidsdk {
-    platformVersions = [ "23" ];
-    abiVersions = [ "armeabi-v7a" "x86" "x86_64"];
-    useGoogleAPIs = true;
-  };
-
-  androidsdk_6_0_extras = androidsdk {
-    platformVersions = [ "23" ];
-    abiVersions = [ "armeabi-v7a" "x86" "x86_64"];
-    useGoogleAPIs = true;
-    useExtraSupportLibs = true;
-    useGooglePlayServices = true;
-    useInstantApps = true;
-  };
-
-  androidsdk_7_0 = androidsdk {
-    platformVersions = [ "24" ];
-    abiVersions = [ "x86" "x86_64"];
-    useGoogleAPIs = true;
-  };
-
-  androidsdk_7_0_extras = androidsdk {
-    platformVersions = [ "24" ];
-    abiVersions = [ "x86" "x86_64"];
-    useGoogleAPIs = true;
-    useExtraSupportLibs = true;
-    useGooglePlayServices = true;
-    useInstantApps = true;
-  };
-
-  androidsdk_7_1_1 = androidsdk {
-    platformVersions = [ "25" ];
-    abiVersions = [ "x86" "x86_64"];
-    useGoogleAPIs = true;
-  };
-
-  androidsdk_7_1_1_extras = androidsdk {
-    platformVersions = [ "25" ];
-    abiVersions = [ "x86" "x86_64"];
-    useGoogleAPIs = true;
-    useExtraSupportLibs = true;
-    useGooglePlayServices = true;
-    useInstantApps = true;
-  };
-
-  androidsdk_8_0 = androidsdk {
-    platformVersions = [ "26" ];
-    abiVersions = [ "x86" "x86_64"];
-    useGoogleAPIs = true;
-  };
-
-  androidsdk_8_0_extras = androidsdk {
-    platformVersions = [ "26" ];
-    abiVersions = [ "x86" "x86_64"];
-    useGoogleAPIs = true;
-    useExtraSupportLibs = true;
-    useGooglePlayServices = true;
-    useInstantApps = true;
-  };
-
-  androidsdk_8_1 = androidsdk {
-    platformVersions = [ "27" ];
-    abiVersions = [ "x86" "x86_64"];
-    useGoogleAPIs = true;
-  };
-
-  androidsdk_8_1_extras = androidsdk {
-    platformVersions = [ "27" ];
-    abiVersions = [ "x86" "x86_64"];
-    useGoogleAPIs = true;
-    useExtraSupportLibs = true;
-    useGooglePlayServices = true;
-    useInstantApps = true;
-  };
-
-  androidsdk_9_0 = androidsdk {
-    platformVersions = [ "28" ];
-    abiVersions = [ "x86" "x86_64"];
-    useGoogleAPIs = true;
-  };
-
-  androidsdk_9_0_extras = androidsdk {
-    platformVersions = [ "28" ];
-    abiVersions = [ "x86" "x86_64"];
-    useGoogleAPIs = true;
-    useExtraSupportLibs = true;
-    useGooglePlayServices = true;
-    useInstantApps = true;
-  };
-
-  androidsdk_latest = androidsdk_9_0;
-
-  androidndk_10e = pkgs.callPackage ./androidndk.nix {
-    inherit (buildPackages)
-      unzip makeWrapper;
-    inherit (pkgs)
-      stdenv fetchurl zlib ncurses5 lib python3 libcxx
-      coreutils file findutils gawk gnugrep gnused jdk which;
-    inherit platformTools;
-    version = "10e";
-    sha1s = {
-      x86_64-darwin = "6be8598e4ed3d9dd42998c8cb666f0ee502b1294";
-      x86_64-linux = "f692681b007071103277f6edc6f91cb5c5494a32";
-    };
-  };
-
-  androidndk_16b = pkgs.callPackage ./androidndk.nix {
-    inherit (buildPackages)
-       unzip makeWrapper;
-    inherit (pkgs)
-      stdenv fetchurl zlib ncurses5 lib python3 libcxx
-      coreutils file findutils gawk gnugrep gnused jdk which;
-    inherit platformTools;
-    version = "16b";
-    sha1s = {
-      x86_64-darwin = "e51e615449b98c716cf912057e2682e75d55e2de";
-      x86_64-linux = "42aa43aae89a50d1c66c3f9fdecd676936da6128";
-    };
-  };
-
-  androidndk_17c = pkgs.callPackage ./androidndk.nix {
-    inherit (buildPackages)
-      unzip makeWrapper;
-    inherit (pkgs)
-      stdenv fetchurl zlib ncurses5 lib python3 libcxx
-      coreutils file findutils gawk gnugrep gnused jdk which;
-    inherit platformTools;
-    version = "17c";
-    sha1s = {
-      x86_64-darwin = "f97e3d7711497e3b4faf9e7b3fa0f0da90bb649c";
-      x86_64-linux = "12cacc70c3fd2f40574015631c00f41fb8a39048";
-    };
-  };
-
-  androidndk_18b = pkgs.callPackage ./androidndk.nix {
-    inherit (buildPackages)
-      unzip makeWrapper;
-    inherit (pkgs)
-      stdenv fetchurl zlib ncurses5 lib python3 libcxx
-      coreutils file findutils gawk gnugrep gnused jdk which;
-    inherit platformTools;
-    version = "18b";
-    sha1s = {
-      x86_64-darwin = "98cb9909aa8c2dab32db188bbdc3ac6207e09440";
-      x86_64-linux = "500679655da3a86aecf67007e8ab230ea9b4dd7b";
-    };
-  };
-  androidndk = androidndk_18b;
-
-  androidndk_r8e = import ./androidndk_r8e.nix {
-    inherit (buildPackages)
-      makeWrapper;
-    inherit (pkgs)
-      stdenv fetchurl zlib ncurses lib
-      coreutils file findutils gawk gnugrep gnused jdk which;
-    inherit platformTools;
+  composeAndroidPackages = import ./compose-android-packages.nix {
+    inherit (pkgs) stdenv fetchurl requireFile makeWrapper unzip autoPatchelfHook;
+    inherit pkgs pkgs_i686 licenseAccepted;
   };
 
   buildApp = import ./build-app.nix {
-    inherit (pkgs) stdenv jdk ant gnumake gawk file which;
-    inherit androidsdk androidndk;
+    inherit (pkgs) stdenv jdk ant gnumake gawk;
+    inherit composeAndroidPackages;
   };
 
   emulateApp = import ./emulate-app.nix {
     inherit (pkgs) stdenv;
-    inherit androidsdk;
+    inherit composeAndroidPackages;
   };
 
-  androidndkPkgs_17c = import ./androidndk-pkgs.nix {
-    inherit (buildPackages)
-      makeWrapper;
-    inherit (pkgs)
-      lib stdenv
-      runCommand wrapBintoolsWith wrapCCWith;
-    # buildPackages.foo rather than buildPackages.buildPackages.foo would work,
-    # but for splicing messing up on infinite recursion for the variants we
-    # *dont't* use. Using this workaround, but also making a test to ensure
-    # these two really are the same.
-    buildAndroidndk = buildPackages.buildPackages.androidenv.androidndk_17c;
-    androidndk = androidndk_17c;
-    targetAndroidndkPkgs = targetPackages.androidenv.androidndkPkgs_17c;
-  };
-  androidndkPkgs = androidndkPkgs_17c;
-
-  androidndkPkgs_10e = import ./androidndk-pkgs.nix {
-    inherit (buildPackages)
-      makeWrapper;
-    inherit (pkgs)
-      lib stdenv
-      runCommand wrapBintoolsWith wrapCCWith;
-    # buildPackages.foo rather than buildPackages.buildPackages.foo would work,
-    # but for splicing messing up on infinite recursion for the variants we
-    # *dont't* use. Using this workaround, but also making a test to ensure
-    # these two really are the same.
-    buildAndroidndk = buildPackages.buildPackages.androidenv.androidndk_10e;
-    androidndk = androidndk_10e;
-    targetAndroidndkPkgs = targetPackages.androidenv.androidndkPkgs_10e;
-  };
-
-  buildGradleApp = import ./build-gradle-app.nix {
-    inherit (pkgs) stdenv jdk gnumake gawk file runCommand
-                   which gradle fetchurl buildEnv;
-    inherit androidsdk androidndk;
+  androidPkgs_9_0 = composeAndroidPackages {
+    platformVersions = [ "28" ];
+    abiVersions = [ "x86" "x86_64"];
   };
 }
diff --git a/pkgs/development/mobile/androidenv/deploy-androidpackage.nix b/pkgs/development/mobile/androidenv/deploy-androidpackage.nix
new file mode 100644
index 00000000000..97fd197cb7d
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/deploy-androidpackage.nix
@@ -0,0 +1,44 @@
+{stdenv, unzip}:
+{package, os ? null, buildInputs ? [], patchInstructions ? "", meta ? {}, ...}@args:
+
+let
+  extraParams = removeAttrs args [ "package" "os" "buildInputs" "patchInstructions" ];
+in
+stdenv.mkDerivation ({
+  name = package.name + "-" + package.revision;
+  src = if os != null && builtins.hasAttr os package.archives then package.archives.${os} else package.archives.all;
+  buildInputs = [ unzip ] ++ buildInputs;
+
+  # Most Android Zip packages have a root folder, but some don't. We unpack
+  # the zip file in a folder and we try to discover whether it has a single root
+  # folder. If this is the case, we adjust the current working folder.
+  unpackPhase = ''
+    mkdir extractedzip
+    cd extractedzip
+    unpackFile "$src"
+    if [ "$(find . -mindepth 1 -maxdepth 1 -type d | wc -l)" -eq 1 ]
+    then
+        cd "$(find . -mindepth 1 -maxdepth 1 -type d)"
+    fi
+    sourceRoot="$PWD"
+  '';
+
+  installPhase = ''
+    packageBaseDir=$out/libexec/android-sdk/${package.path}
+    mkdir -p $packageBaseDir
+    cd $packageBaseDir
+    cp -av $sourceRoot/* .
+    ${patchInstructions}
+  '';
+
+  # We never attempt to strip. This is not required since we're doing binary
+  # deployments. Moreover, some executables that have been patched with patchelf
+  # may not work any longer after they have been stripped.
+  dontStrip = true;
+  dontPatchELF = true;
+  dontAutoPatchelf = true;
+
+  meta = {
+    description = package.displayName;
+  } // meta;
+} // extraParams)
diff --git a/pkgs/development/mobile/androidenv/emulate-app.nix b/pkgs/development/mobile/androidenv/emulate-app.nix
index 2fc753c047a..01669024b3b 100644
--- a/pkgs/development/mobile/androidenv/emulate-app.nix
+++ b/pkgs/development/mobile/androidenv/emulate-app.nix
@@ -1,33 +1,41 @@
-{stdenv, androidsdk}:
+{ composeAndroidPackages, stdenv }:
 { name, app ? null
-, platformVersion ? "8", abiVersion ? "armeabi-v7a", useGoogleAPIs ? false
+, platformVersion ? "16", abiVersion ? "armeabi-v7a", systemImageType ? "default", useGoogleAPIs ? false
 , enableGPU ? false, extraAVDFiles ? []
 , package ? null, activity ? null
 , avdHomeDir ? null
-}:
+}@args:
 
 let
-  androidsdkComposition = androidsdk {
-    inherit useGoogleAPIs;
+  androidSdkArgNames = builtins.attrNames (builtins.functionArgs composeAndroidPackages);
+  extraParams = removeAttrs args ([ "name" ] ++ androidSdkArgNames);
+
+  # Extract the parameters meant for the Android SDK
+  androidParams = {
     platformVersions = [ platformVersion ];
+    includeEmulator = true;
+    includeSystemImages = true;
+    systemImageTypes = [ systemImageType ];
     abiVersions = [ abiVersion ];
   };
+
+  androidsdkComposition = (composeAndroidPackages androidParams).androidsdk;
 in
 stdenv.mkDerivation {
   inherit name;
-  
+
   buildCommand = ''
     mkdir -p $out/bin
-    
+
     cat > $out/bin/run-test-emulator << "EOF"
     #! ${stdenv.shell} -e
-    
+
     # We need a TMPDIR
     if [ "$TMPDIR" = "" ]
     then
         export TMPDIR=/tmp
     fi
-    
+
     ${if avdHomeDir == null then ''
       # Store the virtual devices somewhere else, instead of polluting a user's HOME directory
       export ANDROID_SDK_HOME=$(mktemp -d $TMPDIR/nix-android-vm-XXXX)
@@ -35,20 +43,23 @@ stdenv.mkDerivation {
       mkdir -p "${avdHomeDir}"
       export ANDROID_SDK_HOME="${avdHomeDir}"
     ''}
-    
+
+    # We need to specify the location of the Android SDK root folder
+    export ANDROID_SDK_ROOT=${androidsdkComposition}/libexec/android-sdk
+
     # We have to look for a free TCP port
-    
+
     echo "Looking for a free TCP port in range 5554-5584" >&2
-    
+
     for i in $(seq 5554 2 5584)
     do
-        if [ -z "$(${androidsdkComposition}/libexec/platform-tools/adb devices | grep emulator-$i)" ]
+        if [ -z "$(${androidsdkComposition}/libexec/android-sdk/platform-tools/adb devices | grep emulator-$i)" ]
         then
             port=$i
             break
         fi
     done
-    
+
     if [ -z "$port" ]
     then
         echo "Unfortunately, the emulator port space is exhausted!" >&2
@@ -56,57 +67,57 @@ stdenv.mkDerivation {
     else
         echo "We have a free TCP port: $port" >&2
     fi
-    
+
     export ANDROID_SERIAL="emulator-$port"
-    
+
     # Create a virtual android device for testing if it does not exists
-    
-    if [ "$(${androidsdkComposition}/libexec/tools/android list avd | grep 'Name: device')" = "" ]
+    ${androidsdkComposition}/libexec/android-sdk/tools/android list targets
+
+    if [ "$(${androidsdkComposition}/libexec/android-sdk/tools/android list avd | grep 'Name: device')" = "" ]
     then
         # Create a virtual android device
-        yes "" | ${androidsdkComposition}/libexec/tools/android create avd -n device -t ${if useGoogleAPIs then "'Google Inc.:Google APIs:"+platformVersion+"'" else "android-"+platformVersion} $NIX_ANDROID_AVD_FLAGS
-    
+        yes "" | ${androidsdkComposition}/libexec/android-sdk/tools/android create avd -n device -t 1 --abi ${systemImageType}/${abiVersion} $NIX_ANDROID_AVD_FLAGS
+
         ${stdenv.lib.optionalString enableGPU ''
           # Enable GPU acceleration
           echo "hw.gpu.enabled=yes" >> $ANDROID_SDK_HOME/.android/avd/device.avd/config.ini
         ''}
-    
+
         ${stdenv.lib.concatMapStrings (extraAVDFile: ''
           ln -sf ${extraAVDFile} $ANDROID_SDK_HOME/.android/avd/device.avd
         '') extraAVDFiles}
     fi
-    
+
     # Launch the emulator
-    ${androidsdkComposition}/libexec/tools/emulator -avd device -no-boot-anim -port $port $NIX_ANDROID_EMULATOR_FLAGS &
+    ${androidsdkComposition}/libexec/android-sdk/emulator/emulator -avd device -no-boot-anim -port $port $NIX_ANDROID_EMULATOR_FLAGS &
 
     # Wait until the device has completely booted
-    
     echo "Waiting until the emulator has booted the device and the package manager is ready..." >&2
-    
-    ${androidsdkComposition}/libexec/platform-tools/adb -s emulator-$port wait-for-device
-    
+
+    ${androidsdkComposition}/libexec/android-sdk/platform-tools/adb -s emulator-$port wait-for-device
+
     echo "Device state has been reached" >&2
-    
-    while [ -z "$(${androidsdkComposition}/libexec/platform-tools/adb -s emulator-$port shell getprop dev.bootcomplete | grep 1)" ]
+
+    while [ -z "$(${androidsdkComposition}/libexec/android-sdk/platform-tools/adb -s emulator-$port shell getprop dev.bootcomplete | grep 1)" ]
     do
         sleep 5
     done
-    
+
     echo "dev.bootcomplete property is 1" >&2
-    
-    #while [ -z "$(${androidsdkComposition}/libexec/platform-tools/adb -s emulator-$port shell getprop sys.boot_completed | grep 1)" ]
+
+    #while [ -z "$(${androidsdkComposition}/libexec/android-sdk/platform-tools/adb -s emulator-$port shell getprop sys.boot_completed | grep 1)" ]
     #do
         #sleep 5
     #done
-    
+
     #echo "sys.boot_completed property is 1" >&2
-    
+
     echo "ready" >&2
-    
+
     ${stdenv.lib.optionalString (app != null) ''
       # Install the App through the debugger, if it has not been installed yet
-      
-      if [ -z "${package}" ] || [ "$(${androidsdkComposition}/libexec/platform-tools/adb -s emulator-$port shell pm list packages | grep package:${package})" = "" ]
+
+      if [ -z "${package}" ] || [ "$(${androidsdkComposition}/libexec/android-sdk/platform-tools/adb -s emulator-$port shell pm list packages | grep package:${package})" = "" ]
       then
           if [ -d "${app}" ]
           then
@@ -114,13 +125,13 @@ stdenv.mkDerivation {
           else
               appPath="${app}"
           fi
-          
-          ${androidsdkComposition}/libexec/platform-tools/adb -s emulator-$port install "$appPath"
+
+          ${androidsdkComposition}/libexec/android-sdk/platform-tools/adb -s emulator-$port install "$appPath"
       fi
-    
+
       # Start the application
       ${stdenv.lib.optionalString (package != null && activity != null) ''
-          ${androidsdkComposition}/libexec/platform-tools/adb -s emulator-$port shell am start -a android.intent.action.MAIN -n ${package}/${activity}
+          ${androidsdkComposition}/libexec/android-sdk/platform-tools/adb -s emulator-$port shell am start -a android.intent.action.MAIN -n ${package}/${activity}
       ''}
     ''}
     EOF
diff --git a/pkgs/development/mobile/androidenv/emulator.nix b/pkgs/development/mobile/androidenv/emulator.nix
new file mode 100644
index 00000000000..7ba74eb900f
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/emulator.nix
@@ -0,0 +1,20 @@
+{deployAndroidPackage, lib, package, os, autoPatchelfHook, makeWrapper, pkgs, pkgs_i686}:
+
+deployAndroidPackage {
+  inherit package os;
+  buildInputs = [ autoPatchelfHook makeWrapper ]
+    ++ lib.optional (os == "linux") [ pkgs.glibc pkgs.xlibs.libX11 pkgs.xlibs.libXext pkgs.xlibs.libXdamage pkgs.xlibs.libXfixes pkgs.xlibs.libxcb pkgs.libGL pkgs.libpulseaudio pkgs.zlib pkgs.ncurses5 pkgs.stdenv.cc.cc pkgs_i686.glibc ];
+  patchInstructions = lib.optionalString (os == "linux") ''
+    addAutoPatchelfSearchPath $packageBaseDir/lib
+    addAutoPatchelfSearchPath $packageBaseDir/lib64
+    addAutoPatchelfSearchPath $packageBaseDir/lib64/qt/lib
+    autoPatchelf $out
+
+    # Wrap emulator so that it can load libdbus-1.so at runtime and it no longer complains about XKB keymaps
+    wrapProgram $out/libexec/android-sdk/emulator/emulator \
+      --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ pkgs.dbus ]} \
+      --set QT_XKB_CONFIG_ROOT ${pkgs.xkeyboard_config}/share/X11/xkb \
+      --set QTCOMPOSE ${pkgs.xorg.libX11.out}/share/X11/locale
+  '';
+  dontMoveLib64 = true;
+}
diff --git a/pkgs/development/mobile/androidenv/fetch.sh b/pkgs/development/mobile/androidenv/fetch.sh
deleted file mode 100755
index ef15e8eaeda..00000000000
--- a/pkgs/development/mobile/androidenv/fetch.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /usr/bin/env nix-shell
-#! nix-shell -i bash --pure -p curl libxslt
-
-# we skip the intel addons, as they are Windows+osX only
-# we skip the default sys-img (arm?) because it is empty
-curl -o repository-11.xml https://dl.google.com/android/repository/repository-11.xml
-curl -o addon.xml         https://dl.google.com/android/repository/addon.xml
-curl -o sys-img.xml       https://dl.google.com/android/repository/sys-img/android/sys-img.xml
-
-./generate-addons.sh
-./generate-platforms.sh
-./generate-sysimages.sh
-./generate-sources.sh
-./generate-tools.sh
diff --git a/pkgs/development/mobile/androidenv/generate-addons.sh b/pkgs/development/mobile/androidenv/generate-addons.sh
deleted file mode 100755
index 9b2cf34eabc..00000000000
--- a/pkgs/development/mobile/androidenv/generate-addons.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh -e
-
-xsltproc generate-addons.xsl addon.xml > addons.nix
diff --git a/pkgs/development/mobile/androidenv/generate-addons.xsl b/pkgs/development/mobile/androidenv/generate-addons.xsl
deleted file mode 100644
index d32ad717cd7..00000000000
--- a/pkgs/development/mobile/androidenv/generate-addons.xsl
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0"?>
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:sdk="http://schemas.android.com/sdk/android/addon/7">
-
-  <xsl:output omit-xml-declaration="yes" indent="no" />
-  <xsl:template match="/sdk:sdk-addon">
-# This file is generated from generate-addons.sh. DO NOT EDIT.
-# Execute generate-addons.sh or fetch.sh to update the file.
-{stdenv, fetchurl, unzip}:
-
-let
-  buildGoogleApis = args:
-    stdenv.mkDerivation (args // {
-      buildInputs = [ unzip ];
-      buildCommand = ''
-        mkdir -p $out
-        cd $out
-        unzip $src
-      '';
-    });
-in
-{
-<xsl:for-each select="sdk:add-on[sdk:name-id='google_apis']"><xsl:sort select="sdk:api-level" data-type="number"/><xsl:sort select="sdk:revision" data-type="number"/>
-  google_apis_<xsl:value-of select="sdk:api-level" /> = buildGoogleApis {
-    name = "<xsl:value-of select="sdk:name-id" />-<xsl:value-of select="sdk:api-level" />";
-      src = fetchurl {
-        url = https://dl.google.com/android/repository/<xsl:value-of select="sdk:archives/sdk:archive/sdk:url" />;
-        sha1 = "<xsl:value-of select="sdk:archives/sdk:archive/sdk:checksum[@type='sha1']" />";
-      };
-      meta = {
-        description = "<xsl:value-of select="sdk:description" />";
-<xsl:for-each select="sdk:desc-url">        url = <xsl:value-of select="." />;</xsl:for-each>
-      };
-    };
-</xsl:for-each>
-
-<xsl:for-each select="sdk:extra[sdk:path='support']">
-  android_support_extra = buildGoogleApis {
-    name = "android_support_extra";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/<xsl:value-of select="sdk:archives/sdk:archive/sdk:url"/>;
-      sha1 = "<xsl:value-of select="sdk:archives/sdk:archive/sdk:checksum[@type='sha1']" />";
-    };
-    meta = {
-      description = "Android Support Library";
-      url = http://developer.android.com/;
-    };
-  };
-</xsl:for-each><xsl:for-each select="sdk:extra[sdk:path='google_play_services']">
-  google_play_services = buildGoogleApis {
-    name = "google_play_services";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/<xsl:value-of select="sdk:archives/sdk:archive/sdk:url"/>;
-      sha1 = "<xsl:value-of select="sdk:archives/sdk:archive/sdk:checksum[@type='sha1']" />";
-    };
-    meta = {
-      description = "Google Play services client library and sample code";
-      url = http://developer.android.com/;
-    };
-  };
-</xsl:for-each>
-
-<!-- Instant apps -->
-<xsl:for-each select="sdk:extra[sdk:path='instantapps']">
-  instant_apps = buildGoogleApis {
-    name = "instant_apps_sdk";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/<xsl:value-of select="sdk:archives/sdk:archive/sdk:url"/>;
-      sha1 = "<xsl:value-of select="sdk:archives/sdk:archive/sdk:checksum[@type='sha1']" />";
-    };
-    meta = {
-      description = "Android Instant Apps Development SDK";
-      url = "https://developer.android.com/";
-    };
-  };
-</xsl:for-each>
-
-}
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/pkgs/development/mobile/androidenv/generate-platforms.sh b/pkgs/development/mobile/androidenv/generate-platforms.sh
deleted file mode 100755
index ce89f6a8036..00000000000
--- a/pkgs/development/mobile/androidenv/generate-platforms.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh -e
-
-xsltproc --stringparam os linux generate-platforms.xsl repository-11.xml > platforms-linux.nix
-xsltproc --stringparam os macosx generate-platforms.xsl repository-11.xml > platforms-macosx.nix
diff --git a/pkgs/development/mobile/androidenv/generate-platforms.xsl b/pkgs/development/mobile/androidenv/generate-platforms.xsl
deleted file mode 100644
index 54a165d21e4..00000000000
--- a/pkgs/development/mobile/androidenv/generate-platforms.xsl
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0"?>
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:sdk="http://schemas.android.com/sdk/android/repository/11">
-
-  <xsl:param name="os" />
-  <xsl:output omit-xml-declaration="yes" indent="no" />
-
-  <xsl:template name="repository-url">
-    <xsl:variable name="raw-url" select="sdk:archives/sdk:archive[sdk:host-os=$os or count(sdk:host-os) = 0]/sdk:url"/>
-    <xsl:choose>
-      <xsl:when test="starts-with($raw-url, 'http')">
-        <xsl:value-of select="$raw-url"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:text>https://dl.google.com/android/repository/</xsl:text>
-        <xsl:value-of select="$raw-url"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-  <xsl:template match="/sdk:sdk-repository">
-# This file is generated from generate-platforms.sh. DO NOT EDIT.
-# Execute generate-platforms.sh or fetch.sh to update the file.
-{stdenv, fetchurl, unzip}:
-
-let
-  buildPlatform = args:
-    stdenv.mkDerivation (args // {
-      buildInputs = [ unzip ];
-      buildCommand = ''
-        mkdir -p $out
-        cd $out
-        unzip $src
-    '';
-  });
-in
-{
-    <xsl:for-each select="sdk:platform"><xsl:sort select="sdk:api-level" data-type="number"/>
-  platform_<xsl:value-of select="sdk:api-level" /> = buildPlatform {
-    name = "android-platform-<xsl:value-of select="sdk:version" />";
-    src = fetchurl {
-      url = <xsl:call-template name="repository-url"/>;
-      sha1 = "<xsl:value-of select="sdk:archives/sdk:archive[sdk:host-os=$os or count(sdk:host-os) = 0]/sdk:checksum[@type='sha1']" />";
-    };
-    meta = {
-      description = "<xsl:value-of select="sdk:description" />";
-<xsl:for-each select="sdk:desc-url">      homepage = <xsl:value-of select="." />;</xsl:for-each>
-    };
-  };
-</xsl:for-each>
-}
-</xsl:template>
-</xsl:stylesheet>
diff --git a/pkgs/development/mobile/androidenv/generate-sources.sh b/pkgs/development/mobile/androidenv/generate-sources.sh
deleted file mode 100755
index 861fbbf9d2e..00000000000
--- a/pkgs/development/mobile/androidenv/generate-sources.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh -e
-
-xsltproc generate-sources.xsl repository-11.xml > sources.nix
diff --git a/pkgs/development/mobile/androidenv/generate-sources.xsl b/pkgs/development/mobile/androidenv/generate-sources.xsl
deleted file mode 100644
index ad76369b2be..00000000000
--- a/pkgs/development/mobile/androidenv/generate-sources.xsl
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0"?>
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:sdk="http://schemas.android.com/sdk/android/repository/11">
-
-  <xsl:output omit-xml-declaration="yes" indent="no" />
-
-  <xsl:template name="repository-url">
-    <xsl:variable name="raw-url" select="sdk:archives/sdk:archive/sdk:url"/>
-    <xsl:choose>
-      <xsl:when test="starts-with($raw-url, 'http')">
-        <xsl:value-of select="$raw-url"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:text>https://dl.google.com/android/repository/</xsl:text>
-        <xsl:value-of select="$raw-url"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-  <xsl:template match="/sdk:sdk-repository">
-# This file is generated from generate-sources.sh. DO NOT EDIT.
-# Execute generate-sources.sh or fetch.sh to update the file.
-{stdenv, fetchurl, unzip}:
-
-let
-  buildSource = args:
-    stdenv.mkDerivation (args // {
-      buildInputs = [ unzip ];
-      buildCommand = ''
-        mkdir -p $out
-        cd $out
-        unzip $src
-    '';
-  });
-in
-{
-<xsl:for-each select="sdk:source"><xsl:sort select="sdk:api-level" data-type="number"/>
-  source_<xsl:value-of select="sdk:api-level" /> = buildSource {
-    name = "android-source-<xsl:value-of select="sdk:api-level" />";
-    src = fetchurl {
-      url = <xsl:call-template name="repository-url"/>;
-      sha1 = "<xsl:value-of select="sdk:archives/sdk:archive/sdk:checksum[@type='sha1']" />";
-    };
-    meta = {
-      description = "Source code for Android API <xsl:value-of select="sdk:api-level" />";
-    };
-  };
-</xsl:for-each>
-}
-</xsl:template>
-</xsl:stylesheet>
diff --git a/pkgs/development/mobile/androidenv/generate-sysimages.sh b/pkgs/development/mobile/androidenv/generate-sysimages.sh
deleted file mode 100755
index 586381e8ba6..00000000000
--- a/pkgs/development/mobile/androidenv/generate-sysimages.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh -e
-
-cat > sysimages.nix << "EOF"
-# This file is generated from generate-sysimages.sh. DO NOT EDIT.
-# Execute generate-sysimages.sh or fetch.sh to update the file.
-{stdenv, fetchurl, unzip}:
-
-let
-  buildSystemImage = args:
-    stdenv.mkDerivation (args // {
-      buildInputs = [ unzip ];
-      buildCommand = ''
-        mkdir -p $out
-        cd $out
-        unzip $src
-    '';
-  });
-in
-{
-EOF
-
-xsltproc generate-sysimages.xsl sys-img.xml >> sysimages.nix
-
-cat >> sysimages.nix << "EOF"
-}
-EOF
diff --git a/pkgs/development/mobile/androidenv/generate-sysimages.xsl b/pkgs/development/mobile/androidenv/generate-sysimages.xsl
deleted file mode 100644
index 302c7d9deea..00000000000
--- a/pkgs/development/mobile/androidenv/generate-sysimages.xsl
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0"?>
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:str="http://exslt.org/strings"
-  xmlns:sdk="http://schemas.android.com/sdk/android/sys-img/3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-
-  <xsl:output omit-xml-declaration="yes" indent="no" />
-
-  <xsl:template match="/sdk:sdk-sys-img">
-    <xsl:for-each select="sdk:system-image"><xsl:sort select="sdk:api-level" data-type="number"/><xsl:sort select="sdk:abi"/>
-  sysimg_<xsl:value-of select="sdk:abi" />_<xsl:value-of select="sdk:api-level" /> = buildSystemImage {
-    name = "sysimg-<xsl:value-of select="sdk:abi" />-<xsl:value-of select="sdk:api-level" />";
-    src = fetchurl {
-      url = <xsl:if test="not(starts-with(sdk:archives/sdk:archive/sdk:url, 'https://'))">https://dl.google.com/android/repository/sys-img/android/</xsl:if><xsl:value-of select="sdk:archives/sdk:archive/sdk:url" />;
-      sha1 = "<xsl:value-of select="sdk:archives/sdk:archive/sdk:checksum[@type='sha1']" />";
-    };
-  };
-</xsl:for-each>
-  </xsl:template>
-</xsl:stylesheet>
diff --git a/pkgs/development/mobile/androidenv/generate-tools.sh b/pkgs/development/mobile/androidenv/generate-tools.sh
deleted file mode 100755
index 5799894fd45..00000000000
--- a/pkgs/development/mobile/androidenv/generate-tools.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh -e
-
-xsltproc --stringparam os linux generate-tools.xsl repository-11.xml > build-tools-srcs-linux.nix
-xsltproc --stringparam os macosx generate-tools.xsl repository-11.xml > build-tools-srcs-macosx.nix
diff --git a/pkgs/development/mobile/androidenv/generate-tools.xsl b/pkgs/development/mobile/androidenv/generate-tools.xsl
deleted file mode 100644
index 814bad12988..00000000000
--- a/pkgs/development/mobile/androidenv/generate-tools.xsl
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0"?>
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:sdk="http://schemas.android.com/sdk/android/repository/11">
-
-  <xsl:param name="os" />
-  <xsl:output omit-xml-declaration="yes" indent="no" />
-
-  <xsl:template name="repository-url">
-    <xsl:variable name="raw-url" select="sdk:archives/sdk:archive[sdk:host-os=$os or count(sdk:host-os) = 0]/sdk:url"/>
-    <xsl:choose>
-      <xsl:when test="starts-with($raw-url, 'http')">
-        <xsl:value-of select="$raw-url"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:text>https://dl.google.com/android/repository/</xsl:text>
-        <xsl:value-of select="$raw-url"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-  <xsl:template match="/sdk:sdk-repository">
-# This file is generated from generate-tools.sh. DO NOT EDIT.
-# Execute generate-tools.sh or fetch.sh to update the file.
-{ fetchurl }:
-
-{
-    <xsl:for-each select="sdk:build-tool">
-      <xsl:sort select="sdk:revision/sdk:major" data-type="number"/>
-      <xsl:sort select="sdk:revision/sdk:minor" data-type="number"/>
-      <xsl:sort select="sdk:revision/sdk:micro" data-type="number"/>
-      <xsl:sort select="sdk:revision/sdk:preview" data-type="number"/>
-  v<xsl:value-of select="sdk:revision/sdk:major"/><xsl:if test="sdk:revision/sdk:minor + sdk:revision/sdk:micro > 0">_<xsl:value-of select="sdk:revision/sdk:minor" />_<xsl:value-of select="sdk:revision/sdk:micro"/></xsl:if><xsl:if test="sdk:revision/sdk:preview > 0">_rc<xsl:value-of select="sdk:revision/sdk:preview"/></xsl:if> = {
-    version = "<xsl:value-of select="sdk:revision/sdk:major"/>.<xsl:value-of select="sdk:revision/sdk:minor" />.<xsl:value-of select="sdk:revision/sdk:micro"/><xsl:if test="sdk:revision/sdk:preview > 0">-rc<xsl:value-of select="sdk:revision/sdk:preview"/></xsl:if>";
-    src = fetchurl {
-      url = <xsl:call-template name="repository-url"/>;
-      sha1 = "<xsl:value-of select="sdk:archives/sdk:archive[sdk:host-os=$os or count(sdk:host-os) = 0]/sdk:checksum[@type='sha1']" />";
-    };
-  };
-</xsl:for-each>
-}
-</xsl:template>
-</xsl:stylesheet>
diff --git a/pkgs/development/mobile/androidenv/generate.sh b/pkgs/development/mobile/androidenv/generate.sh
new file mode 100644
index 00000000000..1c55734f5f4
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/generate.sh
@@ -0,0 +1,16 @@
+#!/bin/sh -e
+
+# Convert base packages
+curl https://dl.google.com/android/repository/repository2-1.xml -o xml/repository2-1.xml
+xsltproc convertpackages.xsl xml/repository2-1.xml > generated/packages.nix
+
+# Convert system images
+for img in android android-tv android-wear android-wear-cn google_apis google_apis_playstore
+do
+    curl https://dl.google.com/android/repository/sys-img/$img/sys-img2-1.xml -o xml/$img-sys-img2-1.xml
+    xsltproc --stringparam imageType $img convertsystemimages.xsl xml/$img-sys-img2-1.xml > generated/system-images-$img.nix
+done
+
+# Convert system addons
+curl https://dl.google.com/android/repository/addon2-1.xml -o xml/addon2-1.xml
+xsltproc convertaddons.xsl xml/addon2-1.xml > generated/addons.nix
diff --git a/pkgs/development/mobile/androidenv/generated/addons.nix b/pkgs/development/mobile/androidenv/generated/addons.nix
new file mode 100644
index 00000000000..d902b111665
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/generated/addons.nix
@@ -0,0 +1,1145 @@
+
+{fetchurl}:
+
+{
+  addons = {
+    
+    "10"."google_apis" = {
+      name = "google_apis";
+      path = "add-ons/addon-google_apis-google-10";
+      revision = "10";
+      displayName = "Google APIs";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/google_apis-10_r02.zip;
+          sha1 = "cc0711857c881fa7534f90cf8cc09b8fe985484d";
+        };
+      
+      };
+    };
+    
+    "11"."google_apis" = {
+      name = "google_apis";
+      path = "add-ons/addon-google_apis-google-11";
+      revision = "11";
+      displayName = "Google APIs";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/google_apis-11_r01.zip;
+          sha1 = "5eab5e81addee9f3576d456d205208314b5146a5";
+        };
+      
+      };
+    };
+    
+    "12"."google_apis" = {
+      name = "google_apis";
+      path = "add-ons/addon-google_apis-google-12";
+      revision = "12";
+      displayName = "Google APIs";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/google_apis-12_r01.zip;
+          sha1 = "e9999f4fa978812174dfeceec0721c793a636e5d";
+        };
+      
+      };
+    };
+    
+    "13"."google_apis" = {
+      name = "google_apis";
+      path = "add-ons/addon-google_apis-google-13";
+      revision = "13";
+      displayName = "Google APIs";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/google_apis-13_r01.zip;
+          sha1 = "3b153edd211c27dc736c893c658418a4f9041417";
+        };
+      
+      };
+    };
+    
+    "14"."google_apis" = {
+      name = "google_apis";
+      path = "add-ons/addon-google_apis-google-14";
+      revision = "14";
+      displayName = "Google APIs";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/google_apis-14_r02.zip;
+          sha1 = "f8eb4d96ad0492b4c0db2d7e4f1a1a3836664d39";
+        };
+      
+      };
+    };
+    
+    "15"."google_apis" = {
+      name = "google_apis";
+      path = "add-ons/addon-google_apis-google-15";
+      revision = "15";
+      displayName = "Google APIs";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/google_apis-15_r03.zip;
+          sha1 = "d0d2bf26805eb271693570a1aaec33e7dc3f45e9";
+        };
+      
+      };
+    };
+    
+    "16"."google_apis" = {
+      name = "google_apis";
+      path = "add-ons/addon-google_apis-google-16";
+      revision = "16";
+      displayName = "Google APIs";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/google_apis-16_r04.zip;
+          sha1 = "ee6acf1b01020bfa8a8e24725dbc4478bee5e792";
+        };
+      
+      };
+    };
+    
+    "17"."google_apis" = {
+      name = "google_apis";
+      path = "add-ons/addon-google_apis-google-17";
+      revision = "17";
+      displayName = "Google APIs";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/google_apis-17_r04.zip;
+          sha1 = "a076be0677f38df8ca5536b44dfb411a0c808c4f";
+        };
+      
+      };
+    };
+    
+    "18"."google_apis" = {
+      name = "google_apis";
+      path = "add-ons/addon-google_apis-google-18";
+      revision = "18";
+      displayName = "Google APIs";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/google_apis-18_r04.zip;
+          sha1 = "6109603409debdd40854d4d4a92eaf8481462c8b";
+        };
+      
+      };
+    };
+    
+    "19"."google_apis" = {
+      name = "google_apis";
+      path = "add-ons/addon-google_apis-google-19";
+      revision = "19";
+      displayName = "Google APIs";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/google_apis-19_r20.zip;
+          sha1 = "5b933abe830b2f25b4c0f171d45e9e0651e56311";
+        };
+      
+      };
+    };
+    
+    "21"."google_apis" = {
+      name = "google_apis";
+      path = "add-ons/addon-google_apis-google-21";
+      revision = "21";
+      displayName = "Google APIs";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/google_apis-21_r01.zip;
+          sha1 = "66a754efb24e9bb07cc51648426443c7586c9d4a";
+        };
+      
+      };
+    };
+    
+    "22"."google_apis" = {
+      name = "google_apis";
+      path = "add-ons/addon-google_apis-google-22";
+      revision = "22";
+      displayName = "Google APIs";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/google_apis-22_r01.zip;
+          sha1 = "5def0f42160cba8acff51b9c0c7e8be313de84f5";
+        };
+      
+      };
+    };
+    
+    "23"."google_apis" = {
+      name = "google_apis";
+      path = "add-ons/addon-google_apis-google-23";
+      revision = "23";
+      displayName = "Google APIs";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/google_apis-23_r01.zip;
+          sha1 = "04c5cc1a7c88967250ebba9561d81e24104167db";
+        };
+      
+      };
+    };
+    
+    "24"."google_apis" = {
+      name = "google_apis";
+      path = "add-ons/addon-google_apis-google-24";
+      revision = "24";
+      displayName = "Google APIs";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/google_apis-24_r1.zip;
+          sha1 = "31361c2868f27343ee917fbd259c1463821b6145";
+        };
+      
+      };
+    };
+    
+    "3"."google_apis" = {
+      name = "google_apis";
+      path = "add-ons/addon-google_apis-google-3";
+      revision = "3";
+      displayName = "Google APIs";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/google_apis-3-r03.zip;
+          sha1 = "1f92abf3a76be66ae8032257fc7620acbd2b2e3a";
+        };
+      
+      };
+    };
+    
+    "4"."google_apis" = {
+      name = "google_apis";
+      path = "add-ons/addon-google_apis-google-4";
+      revision = "4";
+      displayName = "Google APIs";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/google_apis-4_r02.zip;
+          sha1 = "9b6e86d8568558de4d606a7debc4f6049608dbd0";
+        };
+      
+      };
+    };
+    
+    "5"."google_apis" = {
+      name = "google_apis";
+      path = "add-ons/addon-google_apis-google-5";
+      revision = "5";
+      displayName = "Google APIs";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/google_apis-5_r01.zip;
+          sha1 = "46eaeb56b645ee7ffa24ede8fa17f3df70db0503";
+        };
+      
+      };
+    };
+    
+    "6"."google_apis" = {
+      name = "google_apis";
+      path = "add-ons/addon-google_apis-google-6";
+      revision = "6";
+      displayName = "Google APIs";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/google_apis-6_r01.zip;
+          sha1 = "5ff545d96e031e09580a6cf55713015c7d4936b2";
+        };
+      
+      };
+    };
+    
+    "7"."google_apis" = {
+      name = "google_apis";
+      path = "add-ons/addon-google_apis-google-7";
+      revision = "7";
+      displayName = "Google APIs";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/google_apis-7_r01.zip;
+          sha1 = "2e7f91e0fe34fef7f58aeced973c6ae52361b5ac";
+        };
+      
+      };
+    };
+    
+    "8"."google_apis" = {
+      name = "google_apis";
+      path = "add-ons/addon-google_apis-google-8";
+      revision = "8";
+      displayName = "Google APIs";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/google_apis-8_r02.zip;
+          sha1 = "3079958e7ec87222cac1e6b27bc471b27bf2c352";
+        };
+      
+      };
+    };
+    
+    "9"."google_apis" = {
+      name = "google_apis";
+      path = "add-ons/addon-google_apis-google-9";
+      revision = "9";
+      displayName = "Google APIs";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/google_apis-9_r02.zip;
+          sha1 = "78664645a1e9accea4430814f8694291a7f1ea5d";
+        };
+      
+      };
+    };
+    
+    "12"."google_tv_addon" = {
+      name = "google_tv_addon";
+      path = "add-ons/addon-google_tv_addon-google-12";
+      revision = "12";
+      displayName = "Google TV Addon";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/google_tv-12_r02.zip;
+          sha1 = "92128a12e7e8b0fb5bac59153d7779b717e7b840";
+        };
+      
+      };
+    };
+    
+    "13"."google_tv_addon" = {
+      name = "google_tv_addon";
+      path = "add-ons/addon-google_tv_addon-google-13";
+      revision = "13";
+      displayName = "Google TV Addon";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/google_tv-13_r01.zip;
+          sha1 = "b73f7c66011ac8180b44aa4e83b8d78c66ea9a09";
+        };
+      
+      };
+    };
+    
+    "25"."google_apis" = {
+      name = "google_apis";
+      path = "add-ons/addon-google_apis-google-25";
+      revision = "25";
+      displayName = "Google APIs";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/google_apis-25_r1.zip;
+          sha1 = "550e83eea9513ab11c44919ac6da54b36084a9f3";
+        };
+      
+      };
+    };
+    
+  };
+
+  extras = {
+    
+
+    "extras;android;gapid;1" = {
+      name = "extras-android-gapid-1";
+      path = "extras/android/gapid/1";
+      revision = "1.0.3";
+      displayName = "GPU Debugging tools";
+      archives = {
+      linux = fetchurl {
+          url = https://dl.google.com/android/repository/gapid_r01_linux.zip;
+          sha1 = "7c9ef7544cf0aea030bcc29bd8e12c04fd53e653";
+        };
+      macosx = fetchurl {
+          url = https://dl.google.com/android/repository/gapid_r01_osx.zip;
+          sha1 = "597eb271349d890566274861eba2770a84ee4c69";
+        };
+      
+      };
+    };
+    
+
+    "extras;android;gapid;3" = {
+      name = "extras-android-gapid-3";
+      path = "extras/android/gapid/3";
+      revision = "3.1.0";
+      displayName = "GPU Debugging tools";
+      archives = {
+      linux = fetchurl {
+          url = https://dl.google.com/android/repository/gapid_2994895_linux.zip;
+          sha1 = "e40371ba191f617e4e79bc760d0ab2948ba8cf46";
+        };
+      macosx = fetchurl {
+          url = https://dl.google.com/android/repository/gapid_2994895_osx.zip;
+          sha1 = "ad86a2350b7b9908300277bf03d41649659de384";
+        };
+      
+      };
+    };
+    
+
+    "extras;android;m2repository" = {
+      name = "extras-android-m2repository";
+      path = "extras/android/m2repository";
+      revision = "47.0.0";
+      displayName = "Android Support Repository";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/android_m2repository_r47.zip;
+          sha1 = "a0d22beacc106a6977321f2b07d692ce4979e96a";
+        };
+      
+      };
+    };
+    
+
+    "extras;google;admob_ads_sdk" = {
+      name = "extras-google-admob_ads_sdk";
+      path = "extras/google/admob_ads_sdk";
+      revision = "11";
+      displayName = "Google AdMob Ads SDK";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/GoogleAdMobAdsSdkAndroid-6.4.1.zip;
+          sha1 = "0102859d9575baa0bf4fd5eb422af2ad0fe6cb82";
+        };
+      
+      };
+    };
+    
+
+    "extras;google;analytics_sdk_v2" = {
+      name = "extras-google-analytics_sdk_v2";
+      path = "extras/google/analytics_sdk_v2";
+      revision = "3";
+      displayName = "Google Analytics App Tracking SDK";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/GoogleAnalyticsAndroid_2.0beta5.zip;
+          sha1 = "dc14026bf0ce78315cb5dd00552607de0894de83";
+        };
+      
+      };
+    };
+    
+
+    "extras;google;auto" = {
+      name = "extras-google-auto";
+      path = "extras/google/auto";
+      revision = "1.1";
+      displayName = "Android Auto Desktop Head Unit emulator";
+      archives = {
+      linux = fetchurl {
+          url = https://dl.google.com/android/repository/desktop-head-unit-linux_r01.1.zip;
+          sha1 = "202a6e1b3009a0eb815f8c672d2d5b3717de6169";
+        };
+      macosx = fetchurl {
+          url = https://dl.google.com/android/repository/desktop-head-unit-macosx_r01.1.zip;
+          sha1 = "8179cbb3914493ebc5eb65b731cba061582f2e84";
+        };
+      
+      };
+    };
+    
+
+    "extras;google;gcm" = {
+      name = "extras-google-gcm";
+      path = "extras/google/gcm";
+      revision = "3";
+      displayName = "Google Cloud Messaging for Android Library";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/gcm_r03.zip;
+          sha1 = "ad066fd0dc7fc99d8aadac09c65a3c2519fbc7bf";
+        };
+      
+      };
+    };
+    
+
+    "extras;google;google_play_services" = {
+      name = "extras-google-google_play_services";
+      path = "extras/google/google_play_services";
+      revision = "49";
+      displayName = "Google Play services";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/google_play_services_v16_1_rc09.zip;
+          sha1 = "f95bf19634e2ab0430923247fe2c50246432d2e9";
+        };
+      
+      };
+    };
+    
+
+    "extras;google;google_play_services_froyo" = {
+      name = "extras-google-google_play_services_froyo";
+      path = "extras/google/google_play_services_froyo";
+      revision = "12";
+      displayName = "Google Play services for Froyo";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/google_play_services_3265130_r12.zip;
+          sha1 = "92558dbc380bba3d55d0ec181167fb05ce7c79d9";
+        };
+      
+      };
+    };
+    
+
+    "extras;google;instantapps" = {
+      name = "extras-google-instantapps";
+      path = "extras/google/instantapps";
+      revision = "1.5.0";
+      displayName = "Google Play Instant Development SDK";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/iasdk-1.5.0-1538000167.zip;
+          sha1 = "6c282b9c686e819fe7f5ac8f2249d2479acb63b4";
+        };
+      
+      };
+    };
+    
+
+    "extras;google;m2repository" = {
+      name = "extras-google-m2repository";
+      path = "extras/google/m2repository";
+      revision = "58";
+      displayName = "Google Repository";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/google_m2repository_gms_v11_3_rc05_wear_2_0_5.zip;
+          sha1 = "05086add9e3a0eb1b67111108d7757a4337c3f10";
+        };
+      
+      };
+    };
+    
+
+    "extras;google;market_apk_expansion" = {
+      name = "extras-google-market_apk_expansion";
+      path = "extras/google/market_apk_expansion";
+      revision = "1";
+      displayName = "Google Play APK Expansion library";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/market_apk_expansion-r03.zip;
+          sha1 = "5305399dc1a56814e86b8459ce24871916f78b8c";
+        };
+      
+      };
+    };
+    
+
+    "extras;google;market_licensing" = {
+      name = "extras-google-market_licensing";
+      path = "extras/google/market_licensing";
+      revision = "1";
+      displayName = "Google Play Licensing Library";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/market_licensing-r02.zip;
+          sha1 = "355e8dc304a92a5616db235af8ee7bd554356254";
+        };
+      
+      };
+    };
+    
+
+    "extras;google;simulators" = {
+      name = "extras-google-simulators";
+      path = "extras/google/simulators";
+      revision = "1";
+      displayName = "Android Auto API Simulators";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/simulator_r01.zip;
+          sha1 = "4fb5344e34e8faab4db18af07dace44c50db26a7";
+        };
+      
+      };
+    };
+    
+
+    "extras;google;usb_driver" = {
+      name = "extras-google-usb_driver";
+      path = "extras/google/usb_driver";
+      revision = "11";
+      displayName = "Google USB Driver";
+      archives = {
+      
+      };
+    };
+    
+
+    "extras;google;webdriver" = {
+      name = "extras-google-webdriver";
+      path = "extras/google/webdriver";
+      revision = "2";
+      displayName = "Google Web Driver";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/webdriver_r02.zip;
+          sha1 = "13f3a3b2670a5fc04a7342861644be9a01b07e38";
+        };
+      
+      };
+    };
+    
+
+    "extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0" = {
+      name = "extras-m2repository-com-android-support-constraint-constraint-layout-solver-1.0.0";
+      path = "extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.0";
+      revision = "1";
+      displayName = "Solver for ConstraintLayout 1.0.0";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/com.android.support.constraint-constraint-layout-solver-1.0.0.zip;
+          sha1 = "b621b9d5adf273bb0725948589863e60e96eeaf1";
+        };
+      
+      };
+    };
+    
+
+    "extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-alpha2" = {
+      name = "extras-m2repository-com-android-support-constraint-constraint-layout-solver-1.0.0-alpha2";
+      path = "extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha2";
+      revision = "1";
+      displayName = "com.android.support.constraint:constraint-layout-solver:1.0.0-alpha2";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/com.android.support.constraint-constraint-layout-solver-1.0.0-alpha2.zip;
+          sha1 = "2e7fd5d8d158f4517ba52af824f84466ffede879";
+        };
+      
+      };
+    };
+    
+
+    "extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-alpha3" = {
+      name = "extras-m2repository-com-android-support-constraint-constraint-layout-solver-1.0.0-alpha3";
+      path = "extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha3";
+      revision = "1";
+      displayName = "com.android.support.constraint:constraint-layout-solver:1.0.0-alpha3";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/com.android.support.constraint-constraint-layout-solver-1.0.0-alpha3.zip;
+          sha1 = "cd1cbbb2621c9034b835e9b69243dc558cdee4dc";
+        };
+      
+      };
+    };
+    
+
+    "extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-alpha4" = {
+      name = "extras-m2repository-com-android-support-constraint-constraint-layout-solver-1.0.0-alpha4";
+      path = "extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha4";
+      revision = "1";
+      displayName = "com.android.support.constraint:constraint-layout-solver:1.0.0-alpha4";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/com.android.support.constraint-constraint-layout-solver-1.0.0-alpha4.zip;
+          sha1 = "2aa2aceecc6ba172742d0af0b43f11d03924eeb8";
+        };
+      
+      };
+    };
+    
+
+    "extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-alpha5" = {
+      name = "extras-m2repository-com-android-support-constraint-constraint-layout-solver-1.0.0-alpha5";
+      path = "extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha5";
+      revision = "1";
+      displayName = "Solver for ConstraintLayout 1.0.0-alpha5";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/com.android.support.constraint-constraint-layout-solver-1.0.0-alpha5.zip;
+          sha1 = "7ba6c82c7645ac023cf45c1e27a6ae3added308a";
+        };
+      
+      };
+    };
+    
+
+    "extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-alpha6" = {
+      name = "extras-m2repository-com-android-support-constraint-constraint-layout-solver-1.0.0-alpha6";
+      path = "extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha6";
+      revision = "1";
+      displayName = "Solver for ConstraintLayout 1.0.0-alpha6";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/com.android.support.constraint-constraint-layout-solver-1.0.0-alpha6.zip;
+          sha1 = "b7e390f940704f4f78e1eaa5f5a5dba3bc3e81ad";
+        };
+      
+      };
+    };
+    
+
+    "extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-alpha7" = {
+      name = "extras-m2repository-com-android-support-constraint-constraint-layout-solver-1.0.0-alpha7";
+      path = "extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha7";
+      revision = "1";
+      displayName = "Solver for ConstraintLayout 1.0.0-alpha7";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/com.android.support.constraint-constraint-layout-solver-1.0.0-alpha7.zip;
+          sha1 = "f08be3c306bf878de31c465e46a266c52014a13f";
+        };
+      
+      };
+    };
+    
+
+    "extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-alpha8" = {
+      name = "extras-m2repository-com-android-support-constraint-constraint-layout-solver-1.0.0-alpha8";
+      path = "extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha8";
+      revision = "1";
+      displayName = "Solver for ConstraintLayout 1.0.0-alpha8";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/com.android.support.constraint-constraint-layout-solver-1.0.0-alpha8.zip;
+          sha1 = "cd13d16a8f0198c1d6040ec8b1d0d4e5bb7feb6a";
+        };
+      
+      };
+    };
+    
+
+    "extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-alpha9" = {
+      name = "extras-m2repository-com-android-support-constraint-constraint-layout-solver-1.0.0-alpha9";
+      path = "extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha9";
+      revision = "1";
+      displayName = "Solver for ConstraintLayout 1.0.0-alpha9";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/com.android.support.constraint-constraint-layout-solver-1.0.0-alpha9.zip;
+          sha1 = "2c52ddd883d83230a17042b8f4ba03669f0f5f40";
+        };
+      
+      };
+    };
+    
+
+    "extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-beta1" = {
+      name = "extras-m2repository-com-android-support-constraint-constraint-layout-solver-1.0.0-beta1";
+      path = "extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.0-beta1";
+      revision = "1";
+      displayName = "Solver for ConstraintLayout 1.0.0-beta1";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/com.android.support.constraint-constraint-layout-solver-1.0.0-beta1.zip;
+          sha1 = "042c25575e7650e96f0f5f5d1d3c54ed38eb821a";
+        };
+      
+      };
+    };
+    
+
+    "extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-beta2" = {
+      name = "extras-m2repository-com-android-support-constraint-constraint-layout-solver-1.0.0-beta2";
+      path = "extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.0-beta2";
+      revision = "1";
+      displayName = "Solver for ConstraintLayout 1.0.0-beta2";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/com.android.support.constraint-constraint-layout-solver-1.0.0-beta2.zip;
+          sha1 = "28492fd42b20ae1586591ff906556d459cfdaae8";
+        };
+      
+      };
+    };
+    
+
+    "extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-beta3" = {
+      name = "extras-m2repository-com-android-support-constraint-constraint-layout-solver-1.0.0-beta3";
+      path = "extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.0-beta3";
+      revision = "1";
+      displayName = "Solver for ConstraintLayout 1.0.0-beta3";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/com.android.support.constraint-constraint-layout-solver-1.0.0-beta3.zip;
+          sha1 = "268e763fa64bd217d8d830e59ce76be19aaba631";
+        };
+      
+      };
+    };
+    
+
+    "extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-beta4" = {
+      name = "extras-m2repository-com-android-support-constraint-constraint-layout-solver-1.0.0-beta4";
+      path = "extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.0-beta4";
+      revision = "1";
+      displayName = "Solver for ConstraintLayout 1.0.0-beta4";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/com.android.support.constraint-constraint-layout-solver-1.0.0-beta4.zip;
+          sha1 = "2213bf37e7a2869db2635895b8e90ca6841e79d2";
+        };
+      
+      };
+    };
+    
+
+    "extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-beta5" = {
+      name = "extras-m2repository-com-android-support-constraint-constraint-layout-solver-1.0.0-beta5";
+      path = "extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.0-beta5";
+      revision = "1";
+      displayName = "Solver for ConstraintLayout 1.0.0-beta5";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/com.android.support.constraint-constraint-layout-solver-1.0.0-beta5.zip;
+          sha1 = "3918cfef73e64048d0b3e048068e208b414e7e91";
+        };
+      
+      };
+    };
+    
+
+    "extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.1" = {
+      name = "extras-m2repository-com-android-support-constraint-constraint-layout-solver-1.0.1";
+      path = "extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.1";
+      revision = "1";
+      displayName = "Solver for ConstraintLayout 1.0.1";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/com.android.support.constraint-constraint-layout-solver-1.0.1.zip;
+          sha1 = "76f8823def9a6da8954a54737762a6820bc1d043";
+        };
+      
+      };
+    };
+    
+
+    "extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.2" = {
+      name = "extras-m2repository-com-android-support-constraint-constraint-layout-solver-1.0.2";
+      path = "extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.2";
+      revision = "1";
+      displayName = "Solver for ConstraintLayout 1.0.2";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/com.android.support.constraint-constraint-layout-solver-1.0.2.zip;
+          sha1 = "96d7ff669f0e808e9833b2c2e320702826ccc8be";
+        };
+      
+      };
+    };
+    
+
+    "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.0" = {
+      name = "extras-m2repository-com-android-support-constraint-constraint-layout-1.0.0";
+      path = "extras/m2repository/com/android/support/constraint/constraint-layout/1.0.0";
+      revision = "1";
+      displayName = "ConstraintLayout for Android 1.0.0";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/com.android.support.constraint-constraint-layout-1.0.0.zip;
+          sha1 = "70acf99689b933bc6735645d5c3d92b91954b6cb";
+        };
+      
+      };
+    };
+    
+
+    "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.0-alpha2" = {
+      name = "extras-m2repository-com-android-support-constraint-constraint-layout-1.0.0-alpha2";
+      path = "extras/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha2";
+      revision = "1";
+      displayName = "com.android.support.constraint:constraint-layout:1.0.0-alpha2";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/com.android.support.constraint-constraint-layout-1.0.0-alpha2.zip;
+          sha1 = "2edb4fc33745cc9d69d985f29fd48fefcd0aa9f0";
+        };
+      
+      };
+    };
+    
+
+    "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.0-alpha3" = {
+      name = "extras-m2repository-com-android-support-constraint-constraint-layout-1.0.0-alpha3";
+      path = "extras/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha3";
+      revision = "1";
+      displayName = "com.android.support.constraint:constraint-layout:1.0.0-alpha3";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/com.android.support.constraint-constraint-layout-1.0.0-alpha3.zip;
+          sha1 = "1a26fb79d98421f315ead7ad15be167727533026";
+        };
+      
+      };
+    };
+    
+
+    "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.0-alpha4" = {
+      name = "extras-m2repository-com-android-support-constraint-constraint-layout-1.0.0-alpha4";
+      path = "extras/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha4";
+      revision = "1";
+      displayName = "com.android.support.constraint:constraint-layout:1.0.0-alpha4";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/com.android.support.constraint-constraint-layout-1.0.0-alpha4.zip;
+          sha1 = "645a9be1f0c1177301e71cd0ddccf1dd67c554fe";
+        };
+      
+      };
+    };
+    
+
+    "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.0-alpha5" = {
+      name = "extras-m2repository-com-android-support-constraint-constraint-layout-1.0.0-alpha5";
+      path = "extras/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha5";
+      revision = "1";
+      displayName = "ConstraintLayout for Android 1.0.0-alpha5";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/com.android.support.constraint-constraint-layout-1.0.0-alpha5.zip;
+          sha1 = "24f78daf491dcad74bcb2acfa79ea2d8e906f53b";
+        };
+      
+      };
+    };
+    
+
+    "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.0-alpha6" = {
+      name = "extras-m2repository-com-android-support-constraint-constraint-layout-1.0.0-alpha6";
+      path = "extras/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha6";
+      revision = "1";
+      displayName = "ConstraintLayout for Android 1.0.0-alpha6";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/com.android.support.constraint-constraint-layout-1.0.0-alpha6.zip;
+          sha1 = "cb60e9ad4f6d3cc3c5b1b98cd3610c8d3204e651";
+        };
+      
+      };
+    };
+    
+
+    "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.0-alpha7" = {
+      name = "extras-m2repository-com-android-support-constraint-constraint-layout-1.0.0-alpha7";
+      path = "extras/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha7";
+      revision = "1";
+      displayName = "ConstraintLayout for Android 1.0.0-alpha7";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/com.android.support.constraint-constraint-layout-1.0.0-alpha7.zip;
+          sha1 = "17ac210c85d24d7e8ace62847f05e4e45b640b73";
+        };
+      
+      };
+    };
+    
+
+    "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.0-alpha8" = {
+      name = "extras-m2repository-com-android-support-constraint-constraint-layout-1.0.0-alpha8";
+      path = "extras/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha8";
+      revision = "1";
+      displayName = "ConstraintLayout for Android 1.0.0-alpha8";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/com.android.support.constraint-constraint-layout-1.0.0-alpha8.zip;
+          sha1 = "7912ba03b04831f918f523648f118c4ee4da7604";
+        };
+      
+      };
+    };
+    
+
+    "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.0-alpha9" = {
+      name = "extras-m2repository-com-android-support-constraint-constraint-layout-1.0.0-alpha9";
+      path = "extras/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha9";
+      revision = "1";
+      displayName = "ConstraintLayout for Android 1.0.0-alpha9";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/com.android.support.constraint-constraint-layout-1.0.0-alpha9.zip;
+          sha1 = "89c2bbc005d4731c7a830a4d5aa98dae121a46a4";
+        };
+      
+      };
+    };
+    
+
+    "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.0-beta1" = {
+      name = "extras-m2repository-com-android-support-constraint-constraint-layout-1.0.0-beta1";
+      path = "extras/m2repository/com/android/support/constraint/constraint-layout/1.0.0-beta1";
+      revision = "1";
+      displayName = "ConstraintLayout for Android 1.0.0-beta1";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/com.android.support.constraint-constraint-layout-1.0.0-beta1.zip;
+          sha1 = "11f2f5cec4ff02986bad75435e5be77b704b4c64";
+        };
+      
+      };
+    };
+    
+
+    "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.0-beta2" = {
+      name = "extras-m2repository-com-android-support-constraint-constraint-layout-1.0.0-beta2";
+      path = "extras/m2repository/com/android/support/constraint/constraint-layout/1.0.0-beta2";
+      revision = "1";
+      displayName = "ConstraintLayout for Android 1.0.0-beta2";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/com.android.support.constraint-constraint-layout-1.0.0-beta2.zip;
+          sha1 = "623939865ede2e5c2c975dc55963e0d182bcce95";
+        };
+      
+      };
+    };
+    
+
+    "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.0-beta3" = {
+      name = "extras-m2repository-com-android-support-constraint-constraint-layout-1.0.0-beta3";
+      path = "extras/m2repository/com/android/support/constraint/constraint-layout/1.0.0-beta3";
+      revision = "1";
+      displayName = "ConstraintLayout for Android 1.0.0-beta3";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/com.android.support.constraint-constraint-layout-1.0.0-beta3.zip;
+          sha1 = "d78bb6a8ce92005fb1e4ed55d892a65b4258c60b";
+        };
+      
+      };
+    };
+    
+
+    "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.0-beta4" = {
+      name = "extras-m2repository-com-android-support-constraint-constraint-layout-1.0.0-beta4";
+      path = "extras/m2repository/com/android/support/constraint/constraint-layout/1.0.0-beta4";
+      revision = "1";
+      displayName = "ConstraintLayout for Android 1.0.0-beta4";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/com.android.support.constraint-constraint-layout-1.0.0-beta4.zip;
+          sha1 = "dc60844aab93a09a54a3c107685a77b18d7c1c39";
+        };
+      
+      };
+    };
+    
+
+    "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.0-beta5" = {
+      name = "extras-m2repository-com-android-support-constraint-constraint-layout-1.0.0-beta5";
+      path = "extras/m2repository/com/android/support/constraint/constraint-layout/1.0.0-beta5";
+      revision = "1";
+      displayName = "ConstraintLayout for Android 1.0.0-beta5";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/com.android.support.constraint-constraint-layout-1.0.0-beta5.zip;
+          sha1 = "4660f6c7a576ea1364f0c3225db71c29ca660d9a";
+        };
+      
+      };
+    };
+    
+
+    "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.1" = {
+      name = "extras-m2repository-com-android-support-constraint-constraint-layout-1.0.1";
+      path = "extras/m2repository/com/android/support/constraint/constraint-layout/1.0.1";
+      revision = "1";
+      displayName = "ConstraintLayout for Android 1.0.1";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/com.android.support.constraint-constraint-layout-1.0.1.zip;
+          sha1 = "342b0894b8651fff37586f80f383733e97aba9f9";
+        };
+      
+      };
+    };
+    
+
+    "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.2" = {
+      name = "extras-m2repository-com-android-support-constraint-constraint-layout-1.0.2";
+      path = "extras/m2repository/com/android/support/constraint/constraint-layout/1.0.2";
+      revision = "1";
+      displayName = "ConstraintLayout for Android 1.0.2";
+      archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/com.android.support.constraint-constraint-layout-1.0.2.zip;
+          sha1 = "3d9688a50fe0ed7348275f85d1b02278f616d8a4";
+        };
+      
+      };
+    };
+    
+  };
+}
+  
\ No newline at end of file
diff --git a/pkgs/development/mobile/androidenv/generated/packages.nix b/pkgs/development/mobile/androidenv/generated/packages.nix
new file mode 100644
index 00000000000..db1f7f1b8d3
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/generated/packages.nix
@@ -0,0 +1,1910 @@
+
+{fetchurl}:
+
+{
+  
+  "build-tools"."17.0.0" = {
+    
+    name = "build-tools";
+    path = "build-tools/17.0.0";
+    revision = "17.0.0";
+    displayName = "Android SDK Build-Tools 17";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r17-linux.zip;
+        sha1 = "2c2872bc3806aabf16a12e3959c2183ddc866e6d";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r17-macosx.zip;
+        sha1 = "602ee709be9dbb8f179b1e4075148a57f9419930";
+      };
+      
+    };
+  };
+  
+  "build-tools"."18.0.1" = {
+    
+    name = "build-tools";
+    path = "build-tools/18.0.1";
+    revision = "18.0.1";
+    displayName = "Android SDK Build-Tools 18.0.1";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r18.0.1-linux.zip;
+        sha1 = "f11618492b0d2270c332325d45d752d3656a9640";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r18.0.1-macosx.zip;
+        sha1 = "d84f5692fb44d60fc53e5b2507cebf9f24626902";
+      };
+      
+    };
+  };
+  
+  "build-tools"."18.1.0" = {
+    
+    name = "build-tools";
+    path = "build-tools/18.1.0";
+    revision = "18.1.0";
+    displayName = "Android SDK Build-Tools 18.1";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r18.1-linux.zip;
+        sha1 = "f314a0599e51397f0886fe888b50dd98f2f050d8";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r18.1-macosx.zip;
+        sha1 = "16ddb299b8b43063e5bb3387ec17147c5053dfd8";
+      };
+      
+    };
+  };
+  
+  "build-tools"."18.1.1" = {
+    
+    name = "build-tools";
+    path = "build-tools/18.1.1";
+    revision = "18.1.1";
+    displayName = "Android SDK Build-Tools 18.1.1";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r18.1.1-linux.zip;
+        sha1 = "68c9acbfc0cec2d51b19efaed39831a17055d998";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r18.1.1-macosx.zip;
+        sha1 = "a9d9d37f6ddf859e57abc78802a77aaa166e48d4";
+      };
+      
+    };
+  };
+  
+  "build-tools"."19.0.0" = {
+    
+    name = "build-tools";
+    path = "build-tools/19.0.0";
+    revision = "19.0.0";
+    displayName = "Android SDK Build-Tools 19";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r19-linux.zip;
+        sha1 = "55c1a6cf632e7d346f0002b275ec41fd3137fd83";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r19-macosx.zip;
+        sha1 = "86ec1c12db1bc446b7bcaefc5cc14eb361044e90";
+      };
+      
+    };
+  };
+  
+  "build-tools"."19.0.1" = {
+    
+    name = "build-tools";
+    path = "build-tools/19.0.1";
+    revision = "19.0.1";
+    displayName = "Android SDK Build-Tools 19.0.1";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r19.0.1-linux.zip;
+        sha1 = "18d2312dc4368858914213087f4e61445aca4517";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r19.0.1-macosx.zip;
+        sha1 = "efaf50fb19a3edb8d03efbff76f89a249ad2920b";
+      };
+      
+    };
+  };
+  
+  "build-tools"."19.0.2" = {
+    
+    name = "build-tools";
+    path = "build-tools/19.0.2";
+    revision = "19.0.2";
+    displayName = "Android SDK Build-Tools 19.0.2";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r19.0.2-linux.zip;
+        sha1 = "a03a6bdea0091aea32e1b35b90a7294c9f04e3dd";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r19.0.2-macosx.zip;
+        sha1 = "145bc43065d45f756d99d87329d899052b9a9288";
+      };
+      
+    };
+  };
+  
+  "build-tools"."19.0.3" = {
+    
+    name = "build-tools";
+    path = "build-tools/19.0.3";
+    revision = "19.0.3";
+    displayName = "Android SDK Build-Tools 19.0.3";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r19.0.3-linux.zip;
+        sha1 = "c2d6055478e9d2d4fba476ee85f99181ddd1160c";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r19.0.3-macosx.zip;
+        sha1 = "651cf8754373b2d52e7f6aab2c52eabffe4e9ea4";
+      };
+      
+    };
+  };
+  
+  "build-tools"."19.1.0" = {
+    
+    name = "build-tools";
+    path = "build-tools/19.1.0";
+    revision = "19.1.0";
+    displayName = "Android SDK Build-Tools 19.1";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r19.1-linux.zip;
+        sha1 = "1ff20ac15fa47a75d00346ec12f180d531b3ca89";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r19.1-macosx.zip;
+        sha1 = "0d11aae3417de1efb4b9a0e0a7855904a61bcec1";
+      };
+      
+    };
+  };
+  
+  "build-tools"."20.0.0" = {
+    
+    name = "build-tools";
+    path = "build-tools/20.0.0";
+    revision = "20.0.0";
+    displayName = "Android SDK Build-Tools 20";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r20-linux.zip;
+        sha1 = "b688905526a5584d1327a662d871a635ff502758";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r20-macosx.zip;
+        sha1 = "1240f629411c108a714c4ddd756937c7fab93f83";
+      };
+      
+    };
+  };
+  
+  "build-tools"."21.0.0" = {
+    
+    name = "build-tools";
+    path = "build-tools/21.0.0";
+    revision = "21.0.0";
+    displayName = "Android SDK Build-Tools 21";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r21-linux.zip;
+        sha1 = "4933328fdeecbd554a29528f254f4993468e1cf4";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r21-macosx.zip;
+        sha1 = "9bef7989b51436bd4e5114d8a0330359f077cbfa";
+      };
+      
+    };
+  };
+  
+  "build-tools"."21.0.1" = {
+    
+    name = "build-tools";
+    path = "build-tools/21.0.1";
+    revision = "21.0.1";
+    displayName = "Android SDK Build-Tools 21.0.1";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r21.0.1-linux.zip;
+        sha1 = "e573069eea3e5255e7a65bedeb767f4fd0a5f49a";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r21.0.1-macosx.zip;
+        sha1 = "b60c8f9b810c980abafa04896706f3911be1ade7";
+      };
+      
+    };
+  };
+  
+  "build-tools"."21.0.2" = {
+    
+    name = "build-tools";
+    path = "build-tools/21.0.2";
+    revision = "21.0.2";
+    displayName = "Android SDK Build-Tools 21.0.2";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r21.0.2-linux.zip;
+        sha1 = "e1236ab8897b62b57414adcf04c132567b2612a5";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r21.0.2-macosx.zip;
+        sha1 = "f17471c154058f3734729ef3cc363399b1cd3de1";
+      };
+      
+    };
+  };
+  
+  "build-tools"."21.1.0" = {
+    
+    name = "build-tools";
+    path = "build-tools/21.1.0";
+    revision = "21.1.0";
+    displayName = "Android SDK Build-Tools 21.1";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r21.1-linux.zip;
+        sha1 = "b7455e543784d52a8925f960bc880493ed1478cb";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r21.1-macosx.zip;
+        sha1 = "df619356c2359aa5eacdd48699d15b335d9bd246";
+      };
+      
+    };
+  };
+  
+  "build-tools"."21.1.1" = {
+    
+    name = "build-tools";
+    path = "build-tools/21.1.1";
+    revision = "21.1.1";
+    displayName = "Android SDK Build-Tools 21.1.1";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r21.1.1-linux.zip;
+        sha1 = "1c712ee3a1ba5a8b0548f9c32f17d4a0ddfd727d";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r21.1.1-macosx.zip;
+        sha1 = "836a146eab0504aa9387a5132e986fe7c7381571";
+      };
+      
+    };
+  };
+  
+  "build-tools"."21.1.2" = {
+    
+    name = "build-tools";
+    path = "build-tools/21.1.2";
+    revision = "21.1.2";
+    displayName = "Android SDK Build-Tools 21.1.2";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r21.1.2-linux.zip;
+        sha1 = "5e35259843bf2926113a38368b08458735479658";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r21.1.2-macosx.zip;
+        sha1 = "e7c906b4ba0eea93b32ba36c610dbd6b204bff48";
+      };
+      
+    };
+  };
+  
+  "build-tools"."22.0.0" = {
+    
+    name = "build-tools";
+    path = "build-tools/22.0.0";
+    revision = "22.0.0";
+    displayName = "Android SDK Build-Tools 22";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r22-linux.zip;
+        sha1 = "a8a1619dd090e44fac957bce6842e62abf87965b";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r22-macosx.zip;
+        sha1 = "af95429b24088d704bc5db9bd606e34ac1b82c0d";
+      };
+      
+    };
+  };
+  
+  "build-tools"."22.0.1" = {
+    
+    name = "build-tools";
+    path = "build-tools/22.0.1";
+    revision = "22.0.1";
+    displayName = "Android SDK Build-Tools 22.0.1";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r22.0.1-linux.zip;
+        sha1 = "da8b9c5c3ede39298e6cf0283c000c2ee9029646";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r22.0.1-macosx.zip;
+        sha1 = "53dad7f608e01d53b17176ba11165acbfccc5bbf";
+      };
+      
+    };
+  };
+  
+  "build-tools"."23.0.0" = {
+    
+    name = "build-tools";
+    path = "build-tools/23.0.0";
+    revision = "23.0.0";
+    displayName = "Android SDK Build-Tools 23";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r23-linux.zip;
+        sha1 = "c1d6209212b01469f80fa804e0c1d39a06bc9060";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r23-macosx.zip;
+        sha1 = "90ba6e716f7703a236cd44b2e71c5ff430855a03";
+      };
+      
+    };
+  };
+  
+  "build-tools"."23.0.1" = {
+    
+    name = "build-tools";
+    path = "build-tools/23.0.1";
+    revision = "23.0.1";
+    displayName = "Android SDK Build-Tools 23.0.1";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r23.0.1-linux.zip;
+        sha1 = "b6ba7c399d5fa487d95289d8832e4ad943aed556";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r23.0.1-macosx.zip;
+        sha1 = "d96ec1522721e9a179ae2c591c99f75d31d39718";
+      };
+      
+    };
+  };
+  
+  "build-tools"."23.0.2" = {
+    
+    name = "build-tools";
+    path = "build-tools/23.0.2";
+    revision = "23.0.2";
+    displayName = "Android SDK Build-Tools 23.0.2";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r23.0.2-linux.zip;
+        sha1 = "8a9f2b37f6fcf7a9fa784dc21aeaeb41bbb9f2c3";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r23.0.2-macosx.zip;
+        sha1 = "482c4cbceef8ff58aefd92d8155a38610158fdaf";
+      };
+      
+    };
+  };
+  
+  "build-tools"."23.0.3" = {
+    
+    name = "build-tools";
+    path = "build-tools/23.0.3";
+    revision = "23.0.3";
+    displayName = "Android SDK Build-Tools 23.0.3";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r23.0.3-linux.zip;
+        sha1 = "368f2600feac7e9b511b82f53d1f2240ae4a91a3";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r23.0.3-macosx.zip;
+        sha1 = "fbc98cd303fd15a31d472de6c03bd707829f00b0";
+      };
+      
+    };
+  };
+  
+  "build-tools"."24.0.0" = {
+    
+    name = "build-tools";
+    path = "build-tools/24.0.0";
+    revision = "24.0.0";
+    displayName = "Android SDK Build-Tools 24";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r24-linux.zip;
+        sha1 = "c6271c4d78a5612ea6c7150688bcd5b7313de8d1";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r24-macosx.zip;
+        sha1 = "97fc4ed442f23989cc488d02c1d1de9bdde241de";
+      };
+      
+    };
+  };
+  
+  "build-tools"."24.0.1" = {
+    
+    name = "build-tools";
+    path = "build-tools/24.0.1";
+    revision = "24.0.1";
+    displayName = "Android SDK Build-Tools 24.0.1";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r24.0.1-linux.zip;
+        sha1 = "84f18c392919a074fcbb9b1d967984e6b2fef8b4";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r24.0.1-macosx.zip;
+        sha1 = "5c6457fcdfa07724fb086d8ff4e8316fc0742848";
+      };
+      
+    };
+  };
+  
+  "build-tools"."24.0.2" = {
+    
+    name = "build-tools";
+    path = "build-tools/24.0.2";
+    revision = "24.0.2";
+    displayName = "Android SDK Build-Tools 24.0.2";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r24.0.2-linux.zip;
+        sha1 = "f199a7a788c3fefbed102eea34d6007737b803cf";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r24.0.2-macosx.zip;
+        sha1 = "8bb8fc575477491d5957de743089df412de55cda";
+      };
+      
+    };
+  };
+  
+  "build-tools"."24.0.3" = {
+    
+    name = "build-tools";
+    path = "build-tools/24.0.3";
+    revision = "24.0.3";
+    displayName = "Android SDK Build-Tools 24.0.3";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r24.0.3-linux.zip;
+        sha1 = "9e8cc49d66e03fa1a8ecc1ac3e58f1324f5da304";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r24.0.3-macosx.zip;
+        sha1 = "a01c15f1b105c34595681075e1895d58b3fff48c";
+      };
+      
+    };
+  };
+  
+  "build-tools"."25.0.0" = {
+    
+    name = "build-tools";
+    path = "build-tools/25.0.0";
+    revision = "25.0.0";
+    displayName = "Android SDK Build-Tools 25";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r25-linux.zip;
+        sha1 = "f2bbda60403e75cabd0f238598c3b4dfca56ea44";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r25-macosx.zip;
+        sha1 = "273c5c29a65cbed00e44f3aa470bbd7dce556606";
+      };
+      
+    };
+  };
+  
+  "build-tools"."25.0.1" = {
+    
+    name = "build-tools";
+    path = "build-tools/25.0.1";
+    revision = "25.0.1";
+    displayName = "Android SDK Build-Tools 25.0.1";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r25.0.1-linux.zip;
+        sha1 = "ff063d252ab750d339f5947d06ff782836f22bac";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r25.0.1-macosx.zip;
+        sha1 = "7bf7f22d7d48ef20b6ab0e3d7a2912e5c088340f";
+      };
+      
+    };
+  };
+  
+  "build-tools"."25.0.2" = {
+    
+    name = "build-tools";
+    path = "build-tools/25.0.2";
+    revision = "25.0.2";
+    displayName = "Android SDK Build-Tools 25.0.2";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r25.0.2-linux.zip;
+        sha1 = "ff953c0177e317618fda40516f3e9d95fd43c7ae";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r25.0.2-macosx.zip;
+        sha1 = "12a5204bb3b6e39437535469fde7ddf42da46b16";
+      };
+      
+    };
+  };
+  
+  "build-tools"."25.0.3" = {
+    
+    name = "build-tools";
+    path = "build-tools/25.0.3";
+    revision = "25.0.3";
+    displayName = "Android SDK Build-Tools 25.0.3";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r25.0.3-linux.zip;
+        sha1 = "db95f3a0ae376534d4d69f4cdb6fad20649f3509";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r25.0.3-macosx.zip;
+        sha1 = "160d2fefb5ce68e443427fc30a793a703b63e26e";
+      };
+      
+    };
+  };
+  
+  "build-tools"."26.0.0" = {
+    
+    name = "build-tools";
+    path = "build-tools/26.0.0";
+    revision = "26.0.0";
+    displayName = "Android SDK Build-Tools 26";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r26-linux.zip;
+        sha1 = "1cbe72929876f8a872ab1f1b1040a9f720261f59";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r26-macosx.zip;
+        sha1 = "d01a1aeca03747245f1f5936b3cb01759c66d086";
+      };
+      
+    };
+  };
+  
+  "build-tools"."26.0.0-rc1" = {
+    
+    name = "build-tools";
+    path = "build-tools/26.0.0-rc1";
+    revision = "26.0.0-rc1";
+    displayName = "Android SDK Build-Tools 26-rc1";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r26-rc1-linux.zip;
+        sha1 = "8cd6388dc96db2d7a49d06159cf990d3bbc78d04";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r26-rc1-macosx.zip;
+        sha1 = "5c5a1de7d5f4f000d36ae349229fe0be846d6137";
+      };
+      
+    };
+  };
+  
+  "build-tools"."26.0.0-rc2" = {
+    
+    name = "build-tools";
+    path = "build-tools/26.0.0-rc2";
+    revision = "26.0.0-rc2";
+    displayName = "Android SDK Build-Tools 26-rc2";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r26-rc2-linux.zip;
+        sha1 = "629bbd8d2e415bf64871fb0b4c0540fd6d0347a0";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r26-rc2-macosx.zip;
+        sha1 = "cb1eb738a1f7003025af267a9b8cc2d259533c70";
+      };
+      
+    };
+  };
+  
+  "build-tools"."26.0.1" = {
+    
+    name = "build-tools";
+    path = "build-tools/26.0.1";
+    revision = "26.0.1";
+    displayName = "Android SDK Build-Tools 26.0.1";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r26.0.1-linux.zip;
+        sha1 = "5378c2c78091b414d0eac40a6bd37f2faa31a365";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r26.0.1-macosx.zip;
+        sha1 = "cbde59de198916b390777dd0227921bfa2120832";
+      };
+      
+    };
+  };
+  
+  "build-tools"."26.0.2" = {
+    
+    name = "build-tools";
+    path = "build-tools/26.0.2";
+    revision = "26.0.2";
+    displayName = "Android SDK Build-Tools 26.0.2";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r26.0.2-linux.zip;
+        sha1 = "5b2b7b66c7bf2151f2af183b5b50a17808850592";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r26.0.2-macosx.zip;
+        sha1 = "d9ed7c7f149ce38be5dc08979aea8acec1459ca0";
+      };
+      
+    };
+  };
+  
+  "build-tools"."26.0.3" = {
+    
+    name = "build-tools";
+    path = "build-tools/26.0.3";
+    revision = "26.0.3";
+    displayName = "Android SDK Build-Tools 26.0.3";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r26.0.3-linux.zip;
+        sha1 = "8a2e6c1bcd845844523a68aa17e5442f0dce328c";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r26.0.3-macosx.zip;
+        sha1 = "5bb90ed935d99e5bc90686f43b852e68c5ad40df";
+      };
+      
+    };
+  };
+  
+  "build-tools"."27.0.0" = {
+    
+    name = "build-tools";
+    path = "build-tools/27.0.0";
+    revision = "27.0.0";
+    displayName = "Android SDK Build-Tools 27";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r27-linux.zip;
+        sha1 = "28542332ba97cf4a08c3eddfcf5edd70e3cf1260";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r27-macosx.zip;
+        sha1 = "fb4e8d7e6b8d29a77090e34024077a80458d5ae1";
+      };
+      
+    };
+  };
+  
+  "build-tools"."27.0.1" = {
+    
+    name = "build-tools";
+    path = "build-tools/27.0.1";
+    revision = "27.0.1";
+    displayName = "Android SDK Build-Tools 27.0.1";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r27.0.1-linux.zip;
+        sha1 = "7f4eedb1077ef948b848040dcd15de9e8a759f4a";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r27.0.1-macosx.zip;
+        sha1 = "1edd07bfdbadd95652d093040e16d858f7489594";
+      };
+      
+    };
+  };
+  
+  "build-tools"."27.0.2" = {
+    
+    name = "build-tools";
+    path = "build-tools/27.0.2";
+    revision = "27.0.2";
+    displayName = "Android SDK Build-Tools 27.0.2";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r27.0.2-linux.zip;
+        sha1 = "b687ddf6be84f11607871138aad32cf857d0b837";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r27.0.2-macosx.zip;
+        sha1 = "6d5d9cf2a47877f273f4b742b19e712a051a31be";
+      };
+      
+    };
+  };
+  
+  "build-tools"."27.0.3" = {
+    
+    name = "build-tools";
+    path = "build-tools/27.0.3";
+    revision = "27.0.3";
+    displayName = "Android SDK Build-Tools 27.0.3";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r27.0.3-linux.zip;
+        sha1 = "d85e7a6320eddffe7eeace3437605079dac938ca";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r27.0.3-macosx.zip;
+        sha1 = "61d9fb18790c68d66ff73bf1e7ad56bc1f1eef2d";
+      };
+      
+    };
+  };
+  
+  "build-tools"."28.0.0" = {
+    
+    name = "build-tools";
+    path = "build-tools/28.0.0";
+    revision = "28.0.0";
+    displayName = "Android SDK Build-Tools 28";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r28-linux.zip;
+        sha1 = "d9f8a754d833ccd334f56fcc6089c5925cd82abb";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r28-macosx.zip;
+        sha1 = "72088d32d1d82cc3c2cf7cf6618b6130c0c84ade";
+      };
+      
+    };
+  };
+  
+  "build-tools"."28.0.0-rc1" = {
+    
+    name = "build-tools";
+    path = "build-tools/28.0.0-rc1";
+    revision = "28.0.0-rc1";
+    displayName = "Android SDK Build-Tools 28-rc1";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r28-rc1-linux.zip;
+        sha1 = "1601977fae25fd478bcfaa0481ca5ea3c609d840";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r28-rc1-macosx.zip;
+        sha1 = "2c77821967a2330b7b227072d0b1c02ef19fe2fc";
+      };
+      
+    };
+  };
+  
+  "build-tools"."28.0.0-rc2" = {
+    
+    name = "build-tools";
+    path = "build-tools/28.0.0-rc2";
+    revision = "28.0.0-rc2";
+    displayName = "Android SDK Build-Tools 28-rc2";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r28-rc2-linux.zip;
+        sha1 = "efe9c0dde0646a07544c864276390ca6e96b24dc";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r28-rc2-macosx.zip;
+        sha1 = "0d0314b353589feb10e528b44c5a685b6658d797";
+      };
+      
+    };
+  };
+  
+  "build-tools"."28.0.1" = {
+    
+    name = "build-tools";
+    path = "build-tools/28.0.1";
+    revision = "28.0.1";
+    displayName = "Android SDK Build-Tools 28.0.1";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r28.0.1-linux.zip;
+        sha1 = "ee70dfa1fccb58b37cebc9544830511f36a137a0";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r28.0.1-macosx.zip;
+        sha1 = "aeef42ad953f1630dd6f5d71eefdc0b825211462";
+      };
+      
+    };
+  };
+  
+  "build-tools"."28.0.2" = {
+    
+    name = "build-tools";
+    path = "build-tools/28.0.2";
+    revision = "28.0.2";
+    displayName = "Android SDK Build-Tools 28.0.2";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r28.0.2-linux.zip;
+        sha1 = "b4492209810a3fd48deaa982f9852fef12433d55";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r28.0.2-macosx.zip;
+        sha1 = "c10dd5a7825578622fb362a8a34f76eb3ba0c0a9";
+      };
+      
+    };
+  };
+  
+  "build-tools"."28.0.3" = {
+    
+    name = "build-tools";
+    path = "build-tools/28.0.3";
+    revision = "28.0.3";
+    displayName = "Android SDK Build-Tools 28.0.3";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r28.0.3-linux.zip;
+        sha1 = "ea6f2f7103cd9da9ff0bdf6e37fbbba548fa4165";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/build-tools_r28.0.3-macosx.zip;
+        sha1 = "f8c333a2991b1ab05a671bc6248b78e00edcd83a";
+      };
+      
+    };
+  };
+  
+  "cmake"."3.10.2" = {
+    
+    name = "cmake";
+    path = "cmake/3.10.2.4988404";
+    revision = "3.10.2";
+    displayName = "CMake 3.10.2.4988404";
+    archives = {
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/cmake-3.10.2-darwin-x86_64.zip;
+        sha1 = "f227a85cb53dcb927ac52a5a717f647c4a29bf3b";
+      };
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/cmake-3.10.2-linux-x86_64.zip;
+        sha1 = "439e8799bf59f724f104bf62784b2985f1bfe561";
+      };
+      
+    };
+  };
+  
+  "cmake"."3.6.4111459" = {
+    
+    name = "cmake";
+    path = "cmake/3.6.4111459";
+    revision = "3.6.4111459";
+    displayName = "CMake 3.6.4111459";
+    archives = {
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/cmake-3.6.4111459-darwin-x86_64.zip;
+        sha1 = "c9b02d630079783c6d67cb91488b622cfcd9765c";
+      };
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/cmake-3.6.4111459-linux-x86_64.zip;
+        sha1 = "71c539b9c33f0943e9ad6251fea0b161c0b70782";
+      };
+      
+    };
+  };
+  
+  "docs"."1" = {
+    
+    name = "docs";
+    path = "docs";
+    revision = "1";
+    displayName = "Documentation for Android SDK";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/docs-24_r01.zip;
+          sha1 = "eef58238949ee9544876cb3e002f2d58e4ee7b5d";
+        };
+      
+    };
+  };
+  
+  "emulator"."27.3.10".linux = {
+    
+    name = "emulator";
+    path = "emulator";
+    revision = "27.3.10";
+    displayName = "Android Emulator";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/emulator-linux-4969155.zip;
+        sha1 = "5b037b25bc6567fda3071457f0009c057670d9e8";
+      };
+      
+    };
+  };
+  
+  "emulator"."27.3.10".macosx = {
+    
+    name = "emulator";
+    path = "emulator";
+    revision = "27.3.10";
+    displayName = "Android Emulator";
+    archives = {
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/emulator-darwin-4969155.zip;
+        sha1 = "28d2b51ee5c84bc544deee433419f33dc9e05b66";
+      };
+      
+    };
+  };
+  
+  "emulator"."27.3.10".windows = {
+    
+    name = "emulator";
+    path = "emulator";
+    revision = "27.3.10";
+    displayName = "Android Emulator";
+    archives = {
+      
+    };
+  };
+  
+  "emulator"."28.0.14".linux = {
+    
+    name = "emulator";
+    path = "emulator";
+    revision = "28.0.14";
+    displayName = "Android Emulator";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/emulator-linux-5092175.zip;
+        sha1 = "062ef9a1f6759481de897d6c5602d9d66e958a0b";
+      };
+      
+    };
+  };
+  
+  "emulator"."28.0.14".macosx = {
+    
+    name = "emulator";
+    path = "emulator";
+    revision = "28.0.14";
+    displayName = "Android Emulator";
+    archives = {
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/emulator-darwin-5092175.zip;
+        sha1 = "6dc13599bddd5c2acdb559b25201c92a801d157c";
+      };
+      
+    };
+  };
+  
+  "emulator"."28.0.14".windows = {
+    
+    name = "emulator";
+    path = "emulator";
+    revision = "28.0.14";
+    displayName = "Android Emulator";
+    archives = {
+      
+    };
+  };
+  
+  "lldb"."2.0.2558144" = {
+    
+    name = "lldb";
+    path = "lldb/2.0";
+    revision = "2.0.2558144";
+    displayName = "LLDB 2.0";
+    archives = {
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/lldb-2.0.2558144-darwin-x86_64.zip;
+        sha1 = "d92e2f4c8284413eed4f27986e62b167d947033c";
+      };
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/lldb-2.0.2558144-linux-x86_64.zip;
+        sha1 = "e7060d9b2ba58b28fd7b1a0ea85a151c8371a326";
+      };
+      
+    };
+  };
+  
+  "lldb"."2.1.2852477" = {
+    
+    name = "lldb";
+    path = "lldb/2.1";
+    revision = "2.1.2852477";
+    displayName = "LLDB 2.1";
+    archives = {
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/lldb-2.1.2852477-darwin-x86_64.zip;
+        sha1 = "d1e33880a53f1aa8c7e73534adef83a06f091185";
+      };
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/lldb-2.1.2852477-linux-x86_64.zip;
+        sha1 = "eb9b96d320210fdfe82495b0597ad43e77f1c240";
+      };
+      
+    };
+  };
+  
+  "lldb"."2.2.3271982" = {
+    
+    name = "lldb";
+    path = "lldb/2.2";
+    revision = "2.2.3271982";
+    displayName = "LLDB 2.2";
+    archives = {
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/lldb-2.2.3271982-darwin-x86_64.zip;
+        sha1 = "62089f4e35775e6cedb82d1fa377fdc1de898005";
+      };
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/lldb-2.2.3271982-linux-x86_64.zip;
+        sha1 = "413649617d97dd9ef163528f64c0500e1b7c4113";
+      };
+      
+    };
+  };
+  
+  "lldb"."2.3.3614996" = {
+    
+    name = "lldb";
+    path = "lldb/2.3";
+    revision = "2.3.3614996";
+    displayName = "LLDB 2.3";
+    archives = {
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/lldb-2.3.3614996-darwin-x86_64.zip;
+        sha1 = "6b0df112c7b9fa41654497fde2fcce990c831e52";
+      };
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/lldb-2.3.3614996-linux-x86_64.zip;
+        sha1 = "d7abe655650efe9f6989df31835fa3b3f95c2d13";
+      };
+      
+    };
+  };
+  
+  "lldb"."3.0.4213617" = {
+    
+    name = "lldb";
+    path = "lldb/3.0";
+    revision = "3.0.4213617";
+    displayName = "LLDB 3.0";
+    archives = {
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/lldb-3.0.4213617-darwin-x86_64.zip;
+        sha1 = "2492651690a215317b86c755cd4d584ec9838677";
+      };
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/lldb-3.0.4213617-linux-x86_64.zip;
+        sha1 = "61d49b6a58953faa61546d631409af5f60d8d9db";
+      };
+      
+    };
+  };
+  
+  "lldb"."3.1.4508709" = {
+    
+    name = "lldb";
+    path = "lldb/3.1";
+    revision = "3.1.4508709";
+    displayName = "LLDB 3.1";
+    archives = {
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/lldb-3.1.4508709-darwin-x86_64.zip;
+        sha1 = "2b37aa55b81a7e5b8a369febf1ac0bad6c7c5d58";
+      };
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/lldb-3.1.4508709-linux-x86_64.zip;
+        sha1 = "462711c9ee94fec9ff8be5fa8180afec04d1af6f";
+      };
+      
+    };
+  };
+  
+  "ndk-bundle"."18.1.5063045" = {
+    
+    name = "ndk-bundle";
+    path = "ndk-bundle";
+    revision = "18.1.5063045";
+    displayName = "NDK";
+    archives = {
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/android-ndk-r18b-darwin-x86_64.zip;
+        sha1 = "98cb9909aa8c2dab32db188bbdc3ac6207e09440";
+      };
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/android-ndk-r18b-linux-x86_64.zip;
+        sha1 = "500679655da3a86aecf67007e8ab230ea9b4dd7b";
+      };
+      
+    };
+  };
+  
+  "patcher"."1" = {
+    
+    name = "patcher";
+    path = "patcher/v4";
+    revision = "1";
+    displayName = "SDK Patch Applier v4";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/3534162-studio.sdk-patcher.zip.bak;
+          sha1 = "046699c5e2716ae11d77e0bad814f7f33fab261e";
+        };
+      
+    };
+  };
+  
+  "platform-tools"."28.0.1" = {
+    
+    name = "platform-tools";
+    path = "platform-tools";
+    revision = "28.0.1";
+    displayName = "Android SDK Platform-Tools";
+    archives = {
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/platform-tools_r28.0.1-darwin.zip;
+        sha1 = "ed1edad4a48c27655ce98d0a5821e7296e9de145";
+      };
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/platform-tools_r28.0.1-linux.zip;
+        sha1 = "74ff83bc203f01c4f04bd9316ab5a2573f023fd1";
+      };
+      
+    };
+  };
+  
+  "platforms"."10" = {
+    
+    name = "platforms";
+    path = "platforms/android-10";
+    revision = "10";
+    displayName = "Android SDK Platform 10";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/android-2.3.3_r02.zip;
+          sha1 = "887e37783ec32f541ea33c2c649dda648e8e6fb3";
+        };
+      
+    };
+  };
+  
+  "platforms"."11" = {
+    
+    name = "platforms";
+    path = "platforms/android-11";
+    revision = "11";
+    displayName = "Android SDK Platform 11";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/android-3.0_r02.zip;
+          sha1 = "2c7d4bd13f276e76f6bbd87315fe27aba351dd37";
+        };
+      
+    };
+  };
+  
+  "platforms"."12" = {
+    
+    name = "platforms";
+    path = "platforms/android-12";
+    revision = "12";
+    displayName = "Android SDK Platform 12";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/android-3.1_r03.zip;
+          sha1 = "4a50a6679cd95bb68bb5fc032e754cd7c5e2b1bf";
+        };
+      
+    };
+  };
+  
+  "platforms"."13" = {
+    
+    name = "platforms";
+    path = "platforms/android-13";
+    revision = "13";
+    displayName = "Android SDK Platform 13";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/android-3.2_r01.zip;
+          sha1 = "6189a500a8c44ae73a439604363de93591163cd9";
+        };
+      
+    };
+  };
+  
+  "platforms"."14" = {
+    
+    name = "platforms";
+    path = "platforms/android-14";
+    revision = "14";
+    displayName = "Android SDK Platform 14";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/android-14_r04.zip;
+          sha1 = "d4f1d8fbca25225b5f0e7a0adf0d39c3d6e60b3c";
+        };
+      
+    };
+  };
+  
+  "platforms"."15" = {
+    
+    name = "platforms";
+    path = "platforms/android-15";
+    revision = "15";
+    displayName = "Android SDK Platform 15";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/android-15_r05.zip;
+          sha1 = "69ab4c443b37184b2883af1fd38cc20cbeffd0f3";
+        };
+      
+    };
+  };
+  
+  "platforms"."16" = {
+    
+    name = "platforms";
+    path = "platforms/android-16";
+    revision = "16";
+    displayName = "Android SDK Platform 16";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/android-16_r05.zip;
+          sha1 = "12a5ce6235a76bc30f62c26bda1b680e336abd07";
+        };
+      
+    };
+  };
+  
+  "platforms"."17" = {
+    
+    name = "platforms";
+    path = "platforms/android-17";
+    revision = "17";
+    displayName = "Android SDK Platform 17";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/android-17_r03.zip;
+          sha1 = "dbe14101c06e6cdb34e300393e64e64f8c92168a";
+        };
+      
+    };
+  };
+  
+  "platforms"."18" = {
+    
+    name = "platforms";
+    path = "platforms/android-18";
+    revision = "18";
+    displayName = "Android SDK Platform 18";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/android-18_r03.zip;
+          sha1 = "e6b09b3505754cbbeb4a5622008b907262ee91cb";
+        };
+      
+    };
+  };
+  
+  "platforms"."19" = {
+    
+    name = "platforms";
+    path = "platforms/android-19";
+    revision = "19";
+    displayName = "Android SDK Platform 19";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/android-19_r04.zip;
+          sha1 = "2ff20d89e68f2f5390981342e009db5a2d456aaa";
+        };
+      
+    };
+  };
+  
+  "platforms"."2" = {
+    
+    name = "platforms";
+    path = "platforms/android-2";
+    revision = "2";
+    displayName = "Android SDK Platform 2";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/android-1.1_r1-linux.zip;
+        sha1 = "c054d25c9b4c6251fa49c2f9c54336998679d3fe";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/android-1.1_r1-macosx.zip;
+        sha1 = "e21dbcff45b7356657449ebb3c7e941be2bb5ebe";
+      };
+      
+    };
+  };
+  
+  "platforms"."20" = {
+    
+    name = "platforms";
+    path = "platforms/android-20";
+    revision = "20";
+    displayName = "Android SDK Platform 20";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/android-20_r02.zip;
+          sha1 = "a9251f8a3f313ab05834a07a963000927637e01d";
+        };
+      
+    };
+  };
+  
+  "platforms"."21" = {
+    
+    name = "platforms";
+    path = "platforms/android-21";
+    revision = "21";
+    displayName = "Android SDK Platform 21";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/android-21_r02.zip;
+          sha1 = "53536556059bb29ae82f414fd2e14bc335a4eb4c";
+        };
+      
+    };
+  };
+  
+  "platforms"."22" = {
+    
+    name = "platforms";
+    path = "platforms/android-22";
+    revision = "22";
+    displayName = "Android SDK Platform 22";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/android-22_r02.zip;
+          sha1 = "5d1bd10fea962b216a0dece1247070164760a9fc";
+        };
+      
+    };
+  };
+  
+  "platforms"."23" = {
+    
+    name = "platforms";
+    path = "platforms/android-23";
+    revision = "23";
+    displayName = "Android SDK Platform 23";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/platform-23_r03.zip;
+          sha1 = "027fede3de6aa1649115bbd0bffff30ccd51c9a0";
+        };
+      
+    };
+  };
+  
+  "platforms"."24" = {
+    
+    name = "platforms";
+    path = "platforms/android-24";
+    revision = "24";
+    displayName = "Android SDK Platform 24";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/platform-24_r02.zip;
+          sha1 = "8912da3d4bfe7a9f28f0e5ce92d3a8dc96342aee";
+        };
+      
+    };
+  };
+  
+  "platforms"."25" = {
+    
+    name = "platforms";
+    path = "platforms/android-25";
+    revision = "25";
+    displayName = "Android SDK Platform 25";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/platform-25_r03.zip;
+          sha1 = "00c2c5765e8988504be10a1eb66ed71fcdbd7fe8";
+        };
+      
+    };
+  };
+  
+  "platforms"."26" = {
+    
+    name = "platforms";
+    path = "platforms/android-26";
+    revision = "26";
+    displayName = "Android SDK Platform 26";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/platform-26_r02.zip;
+          sha1 = "e4ae5d7aa557a3c827135838ee400da8443ac4ef";
+        };
+      
+    };
+  };
+  
+  "platforms"."27" = {
+    
+    name = "platforms";
+    path = "platforms/android-27";
+    revision = "27";
+    displayName = "Android SDK Platform 27";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/platform-27_r03.zip;
+          sha1 = "35f747e7e70b2d16e0e4246876be28d15ea1c353";
+        };
+      
+    };
+  };
+  
+  "platforms"."28" = {
+    
+    name = "platforms";
+    path = "platforms/android-28";
+    revision = "28";
+    displayName = "Android SDK Platform 28";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/platform-28_r06.zip;
+          sha1 = "9a4e52b1d55bd2e24216b150aafae2503d3efba6";
+        };
+      
+    };
+  };
+  
+  "platforms"."3" = {
+    
+    name = "platforms";
+    path = "platforms/android-3";
+    revision = "3";
+    displayName = "Android SDK Platform 3";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/android-1.5_r04-linux.zip;
+        sha1 = "5c134b7df5f4b8bd5b61ba93bdaebada8fa3468c";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/android-1.5_r04-macosx.zip;
+        sha1 = "d3a67c2369afa48b6c3c7624de5031c262018d1e";
+      };
+      
+    };
+  };
+  
+  "platforms"."4" = {
+    
+    name = "platforms";
+    path = "platforms/android-4";
+    revision = "4";
+    displayName = "Android SDK Platform 4";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/android-1.6_r03-linux.zip;
+        sha1 = "483ed088e45bbdf3444baaf9250c8b02e5383cb0";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/android-1.6_r03-macosx.zip;
+        sha1 = "bdafad44f5df9f127979bdb21a1fdd87ee3cd625";
+      };
+      
+    };
+  };
+  
+  "platforms"."5" = {
+    
+    name = "platforms";
+    path = "platforms/android-5";
+    revision = "5";
+    displayName = "Android SDK Platform 5";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/android-2.0_r01-linux.zip;
+        sha1 = "be9be6a99ca32875c96ec7f91160ca9fce7e3c7d";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/android-2.0_r01-macosx.zip;
+        sha1 = "2a866d0870dbba18e0503cd41e5fae988a21b314";
+      };
+      
+    };
+  };
+  
+  "platforms"."6" = {
+    
+    name = "platforms";
+    path = "platforms/android-6";
+    revision = "6";
+    displayName = "Android SDK Platform 6";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/android-2.0.1_r01-linux.zip;
+        sha1 = "ce2c971dce352aa28af06bda92a070116aa5ae1a";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/android-2.0.1_r01-macosx.zip;
+        sha1 = "c3096f80d75a6fc8cb38ef8a18aec920e53d42c0";
+      };
+      
+    };
+  };
+  
+  "platforms"."7" = {
+    
+    name = "platforms";
+    path = "platforms/android-7";
+    revision = "7";
+    displayName = "Android SDK Platform 7";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/android-2.1_r03.zip;
+          sha1 = "5ce51b023ac19f8738500b1007a1da5de2349a1e";
+        };
+      
+    };
+  };
+  
+  "platforms"."8" = {
+    
+    name = "platforms";
+    path = "platforms/android-8";
+    revision = "8";
+    displayName = "Android SDK Platform 8";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/android-2.2_r03.zip;
+          sha1 = "231262c63eefdff8fd0386e9ccfefeb27a8f9202";
+        };
+      
+    };
+  };
+  
+  "platforms"."9" = {
+    
+    name = "platforms";
+    path = "platforms/android-9";
+    revision = "9";
+    displayName = "Android SDK Platform 9";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/android-2.3.1_r02.zip;
+          sha1 = "209f8a7a8b2cb093fce858b8b55fed3ba5206773";
+        };
+      
+    };
+  };
+  
+  "sources"."14" = {
+    
+    name = "sources";
+    path = "sources/android-14";
+    revision = "14";
+    displayName = "Sources for Android 14";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/sources-14_r01.zip;
+          sha1 = "eaf4ed7dcac46e68516a1b4aa5b0d9e5a39a7555";
+        };
+      
+    };
+  };
+  
+  "sources"."15" = {
+    
+    name = "sources";
+    path = "sources/android-15";
+    revision = "15";
+    displayName = "Sources for Android 15";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/sources-15_r02.zip;
+          sha1 = "e5992a5747c9590783fbbdd700337bf0c9f6b1fa";
+        };
+      
+    };
+  };
+  
+  "sources"."16" = {
+    
+    name = "sources";
+    path = "sources/android-16";
+    revision = "16";
+    displayName = "Sources for Android 16";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/sources-16_r02.zip;
+          sha1 = "0f83c14ed333c45d962279ab5d6bc98a0269ef84";
+        };
+      
+    };
+  };
+  
+  "sources"."17" = {
+    
+    name = "sources";
+    path = "sources/android-17";
+    revision = "17";
+    displayName = "Sources for Android 17";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/sources-17_r01.zip;
+          sha1 = "6f1f18cd2d2b1852d7f6892df9cee3823349d43a";
+        };
+      
+    };
+  };
+  
+  "sources"."18" = {
+    
+    name = "sources";
+    path = "sources/android-18";
+    revision = "18";
+    displayName = "Sources for Android 18";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/sources-18_r01.zip;
+          sha1 = "8b49fdf7433f4881a2bfb559b5dd05d8ec65fb78";
+        };
+      
+    };
+  };
+  
+  "sources"."19" = {
+    
+    name = "sources";
+    path = "sources/android-19";
+    revision = "19";
+    displayName = "Sources for Android 19";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/sources-19_r02.zip;
+          sha1 = "433a1d043ef77561571250e94cb7a0ef24a202e7";
+        };
+      
+    };
+  };
+  
+  "sources"."20" = {
+    
+    name = "sources";
+    path = "sources/android-20";
+    revision = "20";
+    displayName = "Sources for Android 20";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/sources-20_r01.zip;
+          sha1 = "8da3e40f2625f9f7ef38b7e403f49f67226c0d76";
+        };
+      
+    };
+  };
+  
+  "sources"."21" = {
+    
+    name = "sources";
+    path = "sources/android-21";
+    revision = "21";
+    displayName = "Sources for Android 21";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/sources-21_r01.zip;
+          sha1 = "137a5044915d32bea297a8c1552684802bbc2e25";
+        };
+      
+    };
+  };
+  
+  "sources"."22" = {
+    
+    name = "sources";
+    path = "sources/android-22";
+    revision = "22";
+    displayName = "Sources for Android 22";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/sources-22_r01.zip;
+          sha1 = "98320e13976d11597a4a730a8d203ac9a03ed5a6";
+        };
+      
+    };
+  };
+  
+  "sources"."23" = {
+    
+    name = "sources";
+    path = "sources/android-23";
+    revision = "23";
+    displayName = "Sources for Android 23";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/sources-23_r01.zip;
+          sha1 = "b0f15da2762b42f543c5e364c2b15b198cc99cc2";
+        };
+      
+    };
+  };
+  
+  "sources"."24" = {
+    
+    name = "sources";
+    path = "sources/android-24";
+    revision = "24";
+    displayName = "Sources for Android 24";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/sources-24_r01.zip;
+          sha1 = "6b96115830a83d654479f32ce4b724ca9011148b";
+        };
+      
+    };
+  };
+  
+  "sources"."25" = {
+    
+    name = "sources";
+    path = "sources/android-25";
+    revision = "25";
+    displayName = "Sources for Android 25";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/sources-25_r01.zip;
+          sha1 = "bbc72efd1a9bad87cc507e308f0d29aad438c52c";
+        };
+      
+    };
+  };
+  
+  "sources"."26" = {
+    
+    name = "sources";
+    path = "sources/android-26";
+    revision = "26";
+    displayName = "Sources for Android 26";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/sources-26_r01.zip;
+          sha1 = "2af701ee3223d580409288540b1d06932fd8f9b9";
+        };
+      
+    };
+  };
+  
+  "sources"."27" = {
+    
+    name = "sources";
+    path = "sources/android-27";
+    revision = "27";
+    displayName = "Sources for Android 27";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/sources-27_r01.zip;
+          sha1 = "7b714670561d08f54751af42aca929867b806596";
+        };
+      
+    };
+  };
+  
+  "sources"."28" = {
+    
+    name = "sources";
+    path = "sources/android-28";
+    revision = "28";
+    displayName = "Sources for Android 28";
+    archives = {
+      
+        all = fetchurl {
+          url = https://dl.google.com/android/repository/sources-28_r01.zip;
+          sha1 = "5610e0c24235ee3fa343c899ddd551be30315255";
+        };
+      
+    };
+  };
+  
+  "tools"."25.2.5" = {
+    
+    name = "tools";
+    path = "tools";
+    revision = "25.2.5";
+    displayName = "Android SDK Tools 25.2.5";
+    archives = {
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/tools_r25.2.5-linux.zip;
+        sha1 = "72df3aa1988c0a9003ccdfd7a13a7b8bd0f47fc1";
+      };
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/tools_r25.2.5-macosx.zip;
+        sha1 = "d2168d963ac5b616e3d3ddaf21511d084baf3659";
+      };
+      
+    };
+  };
+  
+  "tools"."26.1.1" = {
+    
+    name = "tools";
+    path = "tools";
+    revision = "26.1.1";
+    displayName = "Android SDK Tools";
+    archives = {
+      macosx = fetchurl {
+        url = https://dl.google.com/android/repository/sdk-tools-darwin-4333796.zip;
+        sha1 = "ed85ea7b59bc3483ce0af4c198523ba044e083ad";
+      };
+      linux = fetchurl {
+        url = https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip;
+        sha1 = "8c7c28554a32318461802c1291d76fccfafde054";
+      };
+      
+    };
+  };
+  
+}
+  
\ No newline at end of file
diff --git a/pkgs/development/mobile/androidenv/generated/system-images-android-tv.nix b/pkgs/development/mobile/androidenv/generated/system-images-android-tv.nix
new file mode 100644
index 00000000000..1aa49545254
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/generated/system-images-android-tv.nix
@@ -0,0 +1,157 @@
+
+{fetchurl}:
+
+{
+  
+
+    "21".android-tv."x86" = {
+      name = "system-image-21-android-tv-x86";
+      path = "system-images/android-21/android-tv/x86";
+      revision = "21-android-tv-x86";
+      displayName = "Android TV Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android-tv/x86-21_r03.zip;
+        sha1 = "2f8a1988188d6abfd6c6395baeb4471a034dc1e8";
+      
+      };
+  };
+  
+
+    "21".android-tv."armeabi-v7a" = {
+      name = "system-image-21-android-tv-armeabi-v7a";
+      path = "system-images/android-21/android-tv/armeabi-v7a";
+      revision = "21-android-tv-armeabi-v7a";
+      displayName = "Android TV ARM EABI v7a System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android-tv/armeabi-v7a-21_r03.zip;
+        sha1 = "b63e28a47f11b639dd94981a458b7abfa89ac331";
+      
+      };
+  };
+  
+
+    "22".android-tv."x86" = {
+      name = "system-image-22-android-tv-x86";
+      path = "system-images/android-22/android-tv/x86";
+      revision = "22-android-tv-x86";
+      displayName = "Android TV Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android-tv/x86-22_r03.zip;
+        sha1 = "c78efd5a155622eb490be9d326f5783993375c35";
+      
+      };
+  };
+  
+
+    "23".android-tv."x86" = {
+      name = "system-image-23-android-tv-x86";
+      path = "system-images/android-23/android-tv/x86";
+      revision = "23-android-tv-x86";
+      displayName = "Android TV Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android-tv/x86-23_r17.zip;
+        sha1 = "6d42eb8f07e1c49c000e530fdb7de894144ea19b";
+      
+      };
+  };
+  
+
+    "23".android-tv."armeabi-v7a" = {
+      name = "system-image-23-android-tv-armeabi-v7a";
+      path = "system-images/android-23/android-tv/armeabi-v7a";
+      revision = "23-android-tv-armeabi-v7a";
+      displayName = "Android TV ARM EABI v7a System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android-tv/armeabi-v7a-23_r12.zip;
+        sha1 = "bd84678ae8caf71d584f5210e866b2807e7b4b52";
+      
+      };
+  };
+  
+
+    "24".android-tv."x86" = {
+      name = "system-image-24-android-tv-x86";
+      path = "system-images/android-24/android-tv/x86";
+      revision = "24-android-tv-x86";
+      displayName = "Android TV Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android-tv/x86-24_r19.zip;
+        sha1 = "478e7073f9fcd588bcce89946aa632fbf302ac6a";
+      
+      };
+  };
+  
+
+    "25".android-tv."x86" = {
+      name = "system-image-25-android-tv-x86";
+      path = "system-images/android-25/android-tv/x86";
+      revision = "25-android-tv-x86";
+      displayName = "Android TV Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android-tv/x86-25_r13.zip;
+        sha1 = "fda1743a87331b43b1ff35cd70f3276ae0b1836d";
+      
+      };
+  };
+  
+
+    "26".android-tv."x86" = {
+      name = "system-image-26-android-tv-x86";
+      path = "system-images/android-26/android-tv/x86";
+      revision = "26-android-tv-x86";
+      displayName = "Android TV Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android-tv/x86-26_r11.zip;
+        sha1 = "5c4b0b3c0b9d04a3364956a7ba31d30c33ea57e7";
+      
+      };
+  };
+  
+
+    "27".android-tv."x86" = {
+      name = "system-image-27-android-tv-x86";
+      path = "system-images/android-27/android-tv/x86";
+      revision = "27-android-tv-x86";
+      displayName = "Android TV Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android-tv/x86-27_r06.zip;
+        sha1 = "6b69f1e95a3db3d973e19a95ab5da1adc7750d54";
+      
+      };
+  };
+  
+
+    "28".android-tv."x86" = {
+      name = "system-image-28-android-tv-x86";
+      path = "system-images/android-28/android-tv/x86";
+      revision = "28-android-tv-x86";
+      displayName = "Android TV Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android-tv/x86-28_r07.zip;
+        sha1 = "3ed7e51036957cf350db7fa128cb485b61cbd061";
+      
+      };
+  };
+  
+}
+  
\ No newline at end of file
diff --git a/pkgs/development/mobile/androidenv/generated/system-images-android-wear-cn.nix b/pkgs/development/mobile/androidenv/generated/system-images-android-wear-cn.nix
new file mode 100644
index 00000000000..372a751f41c
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/generated/system-images-android-wear-cn.nix
@@ -0,0 +1,67 @@
+
+{fetchurl}:
+
+{
+  
+
+    "25".android-wear."armeabi-v7a" = {
+      name = "system-image-25-android-wear-armeabi-v7a";
+      path = "system-images/android-25/android-wear-cn/armeabi-v7a";
+      revision = "25-android-wear-armeabi-v7a";
+      displayName = "China version of Android Wear ARM EABI v7a System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android-wear-cn/armeabi-v7a-25_r04.zip;
+        sha1 = "02d7bc86df054d1e89fe5856b3af1d2c142cab41";
+      
+      };
+  };
+  
+
+    "25".android-wear."x86" = {
+      name = "system-image-25-android-wear-x86";
+      path = "system-images/android-25/android-wear-cn/x86";
+      revision = "25-android-wear-x86";
+      displayName = "China version of Android Wear Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android-wear-cn/x86-25_r04.zip;
+        sha1 = "73eab14c7cf2f6941e1fee61e0038ead7a2c7f4d";
+      
+      };
+  };
+  
+
+    "26".android-wear."x86" = {
+      name = "system-image-26-android-wear-x86";
+      path = "system-images/android-26/android-wear-cn/x86";
+      revision = "26-android-wear-x86";
+      displayName = "China version of Android Wear Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android-wear-cn/x86-26_r04.zip;
+        sha1 = "fdc8a313f889a2d6522de1fbc00ee9e13547d096";
+      
+      };
+  };
+  
+
+    "28".android-wear."x86" = {
+      name = "system-image-28-android-wear-x86";
+      path = "system-images/android-P/android-wear-cn/x86";
+      revision = "28-android-wear-x86";
+      displayName = "China version of Wear OS Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android-wear-cn/x86-P_r02.zip;
+        sha1 = "a61a2e453a11f77ab15b3e0bf1e017e0bb9d1bcc";
+      
+      };
+  };
+  
+}
+  
\ No newline at end of file
diff --git a/pkgs/development/mobile/androidenv/generated/system-images-android-wear.nix b/pkgs/development/mobile/androidenv/generated/system-images-android-wear.nix
new file mode 100644
index 00000000000..0c45a1162fe
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/generated/system-images-android-wear.nix
@@ -0,0 +1,97 @@
+
+{fetchurl}:
+
+{
+  
+
+    "23".android-wear."armeabi-v7a" = {
+      name = "system-image-23-android-wear-armeabi-v7a";
+      path = "system-images/android-23/android-wear/armeabi-v7a";
+      revision = "23-android-wear-armeabi-v7a";
+      displayName = "Android Wear ARM EABI v7a System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android-wear/armeabi-v7a-23_r06.zip;
+        sha1 = "0df5d34b1cdaaaa3805a2f06bb889901eabe2e71";
+      
+      };
+  };
+  
+
+    "23".android-wear."x86" = {
+      name = "system-image-23-android-wear-x86";
+      path = "system-images/android-23/android-wear/x86";
+      revision = "23-android-wear-x86";
+      displayName = "Android Wear Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android-wear/x86-23_r06.zip;
+        sha1 = "3b15c123f3f71459d5b60c1714d49c5d90a5525e";
+      
+      };
+  };
+  
+
+    "25".android-wear."armeabi-v7a" = {
+      name = "system-image-25-android-wear-armeabi-v7a";
+      path = "system-images/android-25/android-wear/armeabi-v7a";
+      revision = "25-android-wear-armeabi-v7a";
+      displayName = "Android Wear ARM EABI v7a System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android-wear/armeabi-v7a-25_r03.zip;
+        sha1 = "76d3568a4e08023047af7d13025a35c9bf1d7e5c";
+      
+      };
+  };
+  
+
+    "25".android-wear."x86" = {
+      name = "system-image-25-android-wear-x86";
+      path = "system-images/android-25/android-wear/x86";
+      revision = "25-android-wear-x86";
+      displayName = "Android Wear Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android-wear/x86-25_r03.zip;
+        sha1 = "693fce7b487a65491a4e88e9f740959688c9dbe6";
+      
+      };
+  };
+  
+
+    "26".android-wear."x86" = {
+      name = "system-image-26-android-wear-x86";
+      path = "system-images/android-26/android-wear/x86";
+      revision = "26-android-wear-x86";
+      displayName = "Android Wear Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android-wear/x86-26_r04.zip;
+        sha1 = "fbffa91b936ca18fcc1e0bab2b52a8b0835cbb1c";
+      
+      };
+  };
+  
+
+    "28".android-wear."x86" = {
+      name = "system-image-28-android-wear-x86";
+      path = "system-images/android-P/android-wear/x86";
+      revision = "28-android-wear-x86";
+      displayName = "Wear OS Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android-wear/x86-P_r02.zip;
+        sha1 = "cd0d3a56e114dbb0a2a77d58942d344db464b514";
+      
+      };
+  };
+  
+}
+  
\ No newline at end of file
diff --git a/pkgs/development/mobile/androidenv/generated/system-images-android.nix b/pkgs/development/mobile/androidenv/generated/system-images-android.nix
new file mode 100644
index 00000000000..915cceec546
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/generated/system-images-android.nix
@@ -0,0 +1,547 @@
+
+{fetchurl}:
+
+{
+  
+
+    "10".default."armeabi-v7a" = {
+      name = "system-image-10-default-armeabi-v7a";
+      path = "system-images/android-10/default/armeabi-v7a";
+      revision = "10-default-armeabi-v7a";
+      displayName = "ARM EABI v7a System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/armv7-10_r04.zip;
+        sha1 = "54680383118eb5c95a11e1cc2a14aa572c86ee69";
+      
+      };
+  };
+  
+
+    "14".default."armeabi-v7a" = {
+      name = "system-image-14-default-armeabi-v7a";
+      path = "system-images/android-14/default/armeabi-v7a";
+      revision = "14-default-armeabi-v7a";
+      displayName = "ARM EABI v7a System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/sysimg_armv7a-14_r02.zip;
+        sha1 = "d8991b0c06b18d7d6ed4169d67460ee1add6661b";
+      
+      };
+  };
+  
+
+    "15".default."armeabi-v7a" = {
+      name = "system-image-15-default-armeabi-v7a";
+      path = "system-images/android-15/default/armeabi-v7a";
+      revision = "15-default-armeabi-v7a";
+      displayName = "ARM EABI v7a System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/armeabi-v7a-15_r04.zip;
+        sha1 = "363223bd62f5afc0b2bd760b54ce9d26b31eacf1";
+      
+      };
+  };
+  
+
+    "16".default."armeabi-v7a" = {
+      name = "system-image-16-default-armeabi-v7a";
+      path = "system-images/android-16/default/armeabi-v7a";
+      revision = "16-default-armeabi-v7a";
+      displayName = "ARM EABI v7a System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/sysimg_armv7a-16_r04.zip;
+        sha1 = "39c093ea755098f0ee79f607be7df9e54ba4943f";
+      
+      };
+  };
+  
+
+    "17".default."armeabi-v7a" = {
+      name = "system-image-17-default-armeabi-v7a";
+      path = "system-images/android-17/default/armeabi-v7a";
+      revision = "17-default-armeabi-v7a";
+      displayName = "ARM EABI v7a System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/armeabi-v7a-17_r05.zip;
+        sha1 = "7460e8110f4a87f9644f1bdb5511a66872d50fd9";
+      
+      };
+  };
+  
+
+    "18".default."armeabi-v7a" = {
+      name = "system-image-18-default-armeabi-v7a";
+      path = "system-images/android-18/default/armeabi-v7a";
+      revision = "18-default-armeabi-v7a";
+      displayName = "ARM EABI v7a System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/armeabi-v7a-18_r04.zip;
+        sha1 = "0bf34ecf4ddd53f6b1b7fe7dfa12f2887c17e642";
+      
+      };
+  };
+  
+
+    "19".default."armeabi-v7a" = {
+      name = "system-image-19-default-armeabi-v7a";
+      path = "system-images/android-19/default/armeabi-v7a";
+      revision = "19-default-armeabi-v7a";
+      displayName = "ARM EABI v7a System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/armeabi-v7a-19_r05.zip;
+        sha1 = "d1a5fd4f2e1c013c3d3d9bfe7e9db908c3ed56fa";
+      
+      };
+  };
+  
+
+    "21".default."armeabi-v7a" = {
+      name = "system-image-21-default-armeabi-v7a";
+      path = "system-images/android-21/default/armeabi-v7a";
+      revision = "21-default-armeabi-v7a";
+      displayName = "ARM EABI v7a System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/armeabi-v7a-21_r04.zip;
+        sha1 = "8c606f81306564b65e41303d2603e4c42ded0d10";
+      
+      };
+  };
+  
+
+    "22".default."armeabi-v7a" = {
+      name = "system-image-22-default-armeabi-v7a";
+      path = "system-images/android-22/default/armeabi-v7a";
+      revision = "22-default-armeabi-v7a";
+      displayName = "ARM EABI v7a System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/armeabi-v7a-22_r02.zip;
+        sha1 = "2114ec015dbf3a16cbcb4f63e8a84a1b206a07a1";
+      
+      };
+  };
+  
+
+    "23".default."armeabi-v7a" = {
+      name = "system-image-23-default-armeabi-v7a";
+      path = "system-images/android-23/default/armeabi-v7a";
+      revision = "23-default-armeabi-v7a";
+      displayName = "ARM EABI v7a System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/armeabi-v7a-23_r06.zip;
+        sha1 = "7cf2ad756e54a3acfd81064b63cb0cb9dff2798d";
+      
+      };
+  };
+  
+
+    "24".default."armeabi-v7a" = {
+      name = "system-image-24-default-armeabi-v7a";
+      path = "system-images/android-24/default/armeabi-v7a";
+      revision = "24-default-armeabi-v7a";
+      displayName = "ARM EABI v7a System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/armeabi-v7a-24_r07.zip;
+        sha1 = "3454546b4eed2d6c3dd06d47757d6da9f4176033";
+      
+      };
+  };
+  
+
+    "24".default."arm64-v8a" = {
+      name = "system-image-24-default-arm64-v8a";
+      path = "system-images/android-24/default/arm64-v8a";
+      revision = "24-default-arm64-v8a";
+      displayName = "ARM 64 v8a System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/arm64-v8a-24_r07.zip;
+        sha1 = "e8ab2e49e4efe4b064232b33b5eeaded61437d7f";
+      
+      };
+  };
+  
+
+    "16".default."mips" = {
+      name = "system-image-16-default-mips";
+      path = "system-images/android-16/default/mips";
+      revision = "16-default-mips";
+      displayName = "MIPS System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/sysimg_mips-16_r04.zip;
+        sha1 = "67943c54fb3943943ffeb05fdd39c0b753681f6e";
+      
+      };
+  };
+  
+
+    "17".default."mips" = {
+      name = "system-image-17-default-mips";
+      path = "system-images/android-17/default/mips";
+      revision = "17-default-mips";
+      displayName = "MIPS System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/sysimg_mips-17_r01.zip;
+        sha1 = "f0c6e153bd584c29e51b5c9723cfbf30f996a05d";
+      
+      };
+  };
+  
+
+    "10".default."x86" = {
+      name = "system-image-10-default-x86";
+      path = "system-images/android-10/default/x86";
+      revision = "10-default-x86";
+      displayName = "Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/x86-10_r04.zip;
+        sha1 = "655ffc5cc89dd45a3aca154b254009016e473aeb";
+      
+      };
+  };
+  
+
+    "15".default."x86" = {
+      name = "system-image-15-default-x86";
+      path = "system-images/android-15/default/x86";
+      revision = "15-default-x86";
+      displayName = "Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/x86-15_r04.zip;
+        sha1 = "e45c728b64881c0e86529a8f7ea9c103a3cd14c1";
+      
+      };
+  };
+  
+
+    "16".default."x86" = {
+      name = "system-image-16-default-x86";
+      path = "system-images/android-16/default/x86";
+      revision = "16-default-x86";
+      displayName = "Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/x86-16_r06.zip;
+        sha1 = "bf1bf8c5591346118d2235da1ad20e7be8a3e9cd";
+      
+      };
+  };
+  
+
+    "17".default."x86" = {
+      name = "system-image-17-default-x86";
+      path = "system-images/android-17/default/x86";
+      revision = "17-default-x86";
+      displayName = "Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/x86-17_r04.zip;
+        sha1 = "03c6d022ab2dcbbcf655d78ba5ccb0431cadcaec";
+      
+      };
+  };
+  
+
+    "18".default."x86" = {
+      name = "system-image-18-default-x86";
+      path = "system-images/android-18/default/x86";
+      revision = "18-default-x86";
+      displayName = "Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/x86-18_r03.zip;
+        sha1 = "03a0cb23465c3de15215934a1dbc9715b56e9458";
+      
+      };
+  };
+  
+
+    "19".default."x86" = {
+      name = "system-image-19-default-x86";
+      path = "system-images/android-19/default/x86";
+      revision = "19-default-x86";
+      displayName = "Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/x86-19_r06.zip;
+        sha1 = "2ac82153aae97f7eae4c5a0761224fe04321d03d";
+      
+      };
+  };
+  
+
+    "21".default."x86" = {
+      name = "system-image-21-default-x86";
+      path = "system-images/android-21/default/x86";
+      revision = "21-default-x86";
+      displayName = "Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/x86-21_r05.zip;
+        sha1 = "00f0eb0a1003efe3316347f762e20a85d8749cff";
+      
+      };
+  };
+  
+
+    "22".default."x86" = {
+      name = "system-image-22-default-x86";
+      path = "system-images/android-22/default/x86";
+      revision = "22-default-x86";
+      displayName = "Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/x86-22_r06.zip;
+        sha1 = "e33e2a6cc3f1cc56b2019dbef3917d2eeb26f54e";
+      
+      };
+  };
+  
+
+    "23".default."x86" = {
+      name = "system-image-23-default-x86";
+      path = "system-images/android-23/default/x86";
+      revision = "23-default-x86";
+      displayName = "Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/x86-23_r10.zip;
+        sha1 = "f6c3e3dd7bd951454795aa75c3a145fd05ac25bb";
+      
+      };
+  };
+  
+
+    "24".default."x86" = {
+      name = "system-image-24-default-x86";
+      path = "system-images/android-24/default/x86";
+      revision = "24-default-x86";
+      displayName = "Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/x86-24_r08.zip;
+        sha1 = "c1cae7634b0216c0b5990f2c144eb8ca948e3511";
+      
+      };
+  };
+  
+
+    "25".default."x86" = {
+      name = "system-image-25-default-x86";
+      path = "system-images/android-25/default/x86";
+      revision = "25-default-x86";
+      displayName = "Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/x86-25_r01.zip;
+        sha1 = "78ce7eb1387d598685633b9f7cbb300c3d3aeb5f";
+      
+      };
+  };
+  
+
+    "26".default."x86" = {
+      name = "system-image-26-default-x86";
+      path = "system-images/android-26/default/x86";
+      revision = "26-default-x86";
+      displayName = "Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/x86-26_r01.zip;
+        sha1 = "e613d6e0da668e30daf547f3c6627a6352846f90";
+      
+      };
+  };
+  
+
+    "27".default."x86" = {
+      name = "system-image-27-default-x86";
+      path = "system-images/android-27/default/x86";
+      revision = "27-default-x86";
+      displayName = "Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/x86-27_r01.zip;
+        sha1 = "4ec990fac7b62958decd12e18a4cd389dfe7c582";
+      
+      };
+  };
+  
+
+    "28".default."x86" = {
+      name = "system-image-28-default-x86";
+      path = "system-images/android-28/default/x86";
+      revision = "28-default-x86";
+      displayName = "Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/x86-28_r04.zip;
+        sha1 = "ce03c42d80c0fc6dc47f6455dbee7aa275d02780";
+      
+      };
+  };
+  
+
+    "21".default."x86_64" = {
+      name = "system-image-21-default-x86_64";
+      path = "system-images/android-21/default/x86_64";
+      revision = "21-default-x86_64";
+      displayName = "Intel x86 Atom_64 System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/x86_64-21_r05.zip;
+        sha1 = "9078a095825a69e5e215713f0866c83cef65a342";
+      
+      };
+  };
+  
+
+    "22".default."x86_64" = {
+      name = "system-image-22-default-x86_64";
+      path = "system-images/android-22/default/x86_64";
+      revision = "22-default-x86_64";
+      displayName = "Intel x86 Atom_64 System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/x86_64-22_r06.zip;
+        sha1 = "5db3b27f78cd9c4c5092b1cad5a5dd479fb5b2e4";
+      
+      };
+  };
+  
+
+    "23".default."x86_64" = {
+      name = "system-image-23-default-x86_64";
+      path = "system-images/android-23/default/x86_64";
+      revision = "23-default-x86_64";
+      displayName = "Intel x86 Atom_64 System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/x86_64-23_r10.zip;
+        sha1 = "7cbc291483ca07dc67b71268c5f08a5755f50f51";
+      
+      };
+  };
+  
+
+    "24".default."x86_64" = {
+      name = "system-image-24-default-x86_64";
+      path = "system-images/android-24/default/x86_64";
+      revision = "24-default-x86_64";
+      displayName = "Intel x86 Atom_64 System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/x86_64-24_r08.zip;
+        sha1 = "f6559e1949a5879f31a9662f4f0e50ad60181684";
+      
+      };
+  };
+  
+
+    "25".default."x86_64" = {
+      name = "system-image-25-default-x86_64";
+      path = "system-images/android-25/default/x86_64";
+      revision = "25-default-x86_64";
+      displayName = "Intel x86 Atom_64 System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/x86_64-25_r01.zip;
+        sha1 = "7093d7b39216020226ff430a3b7b81c94d31ad37";
+      
+      };
+  };
+  
+
+    "26".default."x86_64" = {
+      name = "system-image-26-default-x86_64";
+      path = "system-images/android-26/default/x86_64";
+      revision = "26-default-x86_64";
+      displayName = "Intel x86 Atom_64 System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/x86_64-26_r01.zip;
+        sha1 = "432f149c048bffce7f9de526ec65b336daf7a0a3";
+      
+      };
+  };
+  
+
+    "27".default."x86_64" = {
+      name = "system-image-27-default-x86_64";
+      path = "system-images/android-27/default/x86_64";
+      revision = "27-default-x86_64";
+      displayName = "Intel x86 Atom_64 System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/x86_64-27_r01.zip;
+        sha1 = "2878261011a59ca3de29dc5b457a495fdb268d60";
+      
+      };
+  };
+  
+
+    "28".default."x86_64" = {
+      name = "system-image-28-default-x86_64";
+      path = "system-images/android-28/default/x86_64";
+      revision = "28-default-x86_64";
+      displayName = "Intel x86 Atom_64 System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/android/x86_64-28_r04.zip;
+        sha1 = "d47a85c8f4e9fd57df97814ad8884eeb0f3a0ef0";
+      
+      };
+  };
+  
+}
+  
\ No newline at end of file
diff --git a/pkgs/development/mobile/androidenv/generated/system-images-google_apis.nix b/pkgs/development/mobile/androidenv/generated/system-images-google_apis.nix
new file mode 100644
index 00000000000..3b0303b86b4
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/generated/system-images-google_apis.nix
@@ -0,0 +1,502 @@
+
+{fetchurl}:
+
+{
+  
+
+    "10".google_apis."armeabi-v7a" = {
+      name = "system-image-10-google_apis-armeabi-v7a";
+      path = "system-images/android-10/google_apis/armeabi-v7a";
+      revision = "10-google_apis-armeabi-v7a";
+      displayName = "Google APIs ARM EABI v7a System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis/armeabi-v7a-10_r05.zip;
+        sha1 = "cb60221d4ff6686ae96560970d48d9aa60e80b3f";
+      
+      };
+  };
+  
+
+    "10".google_apis."x86" = {
+      name = "system-image-10-google_apis-x86";
+      path = "system-images/android-10/google_apis/x86";
+      revision = "10-google_apis-x86";
+      displayName = "Google APIs Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis/x86-10_r05.zip;
+        sha1 = "b8e8a4ab26890c4a395fb796bf9cb7ceb51c880e";
+      
+      };
+  };
+  
+
+    "15".google_apis."armeabi-v7a" = {
+      name = "system-image-15-google_apis-armeabi-v7a";
+      path = "system-images/android-15/google_apis/armeabi-v7a";
+      revision = "15-google_apis-armeabi-v7a";
+      displayName = "Google APIs ARM EABI v7a System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis/armeabi-v7a-15_r05.zip;
+        sha1 = "1ec4e6f9014fcbe694511280f5b497aaf7dd750f";
+      
+      };
+  };
+  
+
+    "15".google_apis."x86" = {
+      name = "system-image-15-google_apis-x86";
+      path = "system-images/android-15/google_apis/x86";
+      revision = "15-google_apis-x86";
+      displayName = "Google APIs Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis/x86-15_r05.zip;
+        sha1 = "f2b98baaf847ff5b82b82fdc6c396b229067307b";
+      
+      };
+  };
+  
+
+    "16".google_apis."x86" = {
+      name = "system-image-16-google_apis-x86";
+      path = "system-images/android-16/google_apis/x86";
+      revision = "16-google_apis-x86";
+      displayName = "Google APIs Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis/x86-16_r05.zip;
+        sha1 = "7edc5c0836fa32f8d453788c002ca0ee1bc5a0a2";
+      
+      };
+  };
+  
+
+    "17".google_apis."armeabi-v7a" = {
+      name = "system-image-17-google_apis-armeabi-v7a";
+      path = "system-images/android-17/google_apis/armeabi-v7a";
+      revision = "17-google_apis-armeabi-v7a";
+      displayName = "Google APIs ARM EABI v7a System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis/armeabi-v7a-17_r05.zip;
+        sha1 = "c990f2a81c24a61f9f1da5d5d205f2924ce548ae";
+      
+      };
+  };
+  
+
+    "17".google_apis."x86" = {
+      name = "system-image-17-google_apis-x86";
+      path = "system-images/android-17/google_apis/x86";
+      revision = "17-google_apis-x86";
+      displayName = "Google APIs Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis/x86-17_r06.zip;
+        sha1 = "7864c34faf0402b8923d8c6e609a5339f74cc8d6";
+      
+      };
+  };
+  
+
+    "18".google_apis."armeabi-v7a" = {
+      name = "system-image-18-google_apis-armeabi-v7a";
+      path = "system-images/android-18/google_apis/armeabi-v7a";
+      revision = "18-google_apis-armeabi-v7a";
+      displayName = "Google APIs ARM EABI v7a System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis/armeabi-v7a-18_r05.zip;
+        sha1 = "c4e69a96d4584f7e311e358fe4ad0e5d1bf1605b";
+      
+      };
+  };
+  
+
+    "18".google_apis."x86" = {
+      name = "system-image-18-google_apis-x86";
+      path = "system-images/android-18/google_apis/x86";
+      revision = "18-google_apis-x86";
+      displayName = "Google APIs Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis/x86-18_r05.zip;
+        sha1 = "2b34741693eba9419cb6bf1a467596783234d37a";
+      
+      };
+  };
+  
+
+    "19".google_apis."x86" = {
+      name = "system-image-19-google_apis-x86";
+      path = "system-images/android-19/google_apis/x86";
+      revision = "19-google_apis-x86";
+      displayName = "Google APIs Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis/x86-19_r37.zip;
+        sha1 = "f02473420a166b3df7821d8ae5a623524058b4b8";
+      
+      };
+  };
+  
+
+    "19".google_apis."armeabi-v7a" = {
+      name = "system-image-19-google_apis-armeabi-v7a";
+      path = "system-images/android-19/google_apis/armeabi-v7a";
+      revision = "19-google_apis-armeabi-v7a";
+      displayName = "Google APIs ARM EABI v7a System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis/armeabi-v7a-19_r37.zip;
+        sha1 = "b388072493ed010fe2ddf607c8c4239f54ce1a0b";
+      
+      };
+  };
+  
+
+    "21".google_apis."x86" = {
+      name = "system-image-21-google_apis-x86";
+      path = "system-images/android-21/google_apis/x86";
+      revision = "21-google_apis-x86";
+      displayName = "Google APIs Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis/x86-21_r29.zip;
+        sha1 = "1f5ac49e0ae603b0bfeda0c94cd7e0b850b9b50e";
+      
+      };
+  };
+  
+
+    "21".google_apis."x86_64" = {
+      name = "system-image-21-google_apis-x86_64";
+      path = "system-images/android-21/google_apis/x86_64";
+      revision = "21-google_apis-x86_64";
+      displayName = "Google APIs Intel x86 Atom_64 System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis/x86_64-21_r29.zip;
+        sha1 = "74ac387aec286fcee01259dcccd4762cbdb4b517";
+      
+      };
+  };
+  
+
+    "21".google_apis."armeabi-v7a" = {
+      name = "system-image-21-google_apis-armeabi-v7a";
+      path = "system-images/android-21/google_apis/armeabi-v7a";
+      revision = "21-google_apis-armeabi-v7a";
+      displayName = "Google APIs ARM EABI v7a System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis/armeabi-v7a-21_r29.zip;
+        sha1 = "1d0c428ac7f5eb49c7389ad0beb09f07cb989b45";
+      
+      };
+  };
+  
+
+    "22".google_apis."x86" = {
+      name = "system-image-22-google_apis-x86";
+      path = "system-images/android-22/google_apis/x86";
+      revision = "22-google_apis-x86";
+      displayName = "Google APIs Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis/x86-22_r23.zip;
+        sha1 = "4ceda9ffd69d5b827a8cc2f56ccac62e72982b33";
+      
+      };
+  };
+  
+
+    "22".google_apis."armeabi-v7a" = {
+      name = "system-image-22-google_apis-armeabi-v7a";
+      path = "system-images/android-22/google_apis/armeabi-v7a";
+      revision = "22-google_apis-armeabi-v7a";
+      displayName = "Google APIs ARM EABI v7a System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis/armeabi-v7a-22_r23.zip;
+        sha1 = "0a11bdffa6132303baf87e4a531987a74d5f0792";
+      
+      };
+  };
+  
+
+    "22".google_apis."x86_64" = {
+      name = "system-image-22-google_apis-x86_64";
+      path = "system-images/android-22/google_apis/x86_64";
+      revision = "22-google_apis-x86_64";
+      displayName = "Google APIs Intel x86 Atom_64 System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis/x86_64-22_r23.zip;
+        sha1 = "1dfee1c382574c18e3aa2bc2047793169f3ab125";
+      
+      };
+  };
+  
+
+    "23".google_apis."x86" = {
+      name = "system-image-23-google_apis-x86";
+      path = "system-images/android-23/google_apis/x86";
+      revision = "23-google_apis-x86";
+      displayName = "Google APIs Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis/x86-23_r30.zip;
+        sha1 = "1b8fd61e7e7c76d8c05a41b19370edfb015ed240";
+      
+      };
+  };
+  
+
+    "23".google_apis."x86_64" = {
+      name = "system-image-23-google_apis-x86_64";
+      path = "system-images/android-23/google_apis/x86_64";
+      revision = "23-google_apis-x86_64";
+      displayName = "Google APIs Intel x86 Atom_64 System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis/x86_64-23_r30.zip;
+        sha1 = "69a17c23c4e05e81a2820fe49884807fcebba546";
+      
+      };
+  };
+  
+
+    "23".google_apis."armeabi-v7a" = {
+      name = "system-image-23-google_apis-armeabi-v7a";
+      path = "system-images/android-23/google_apis/armeabi-v7a";
+      revision = "23-google_apis-armeabi-v7a";
+      displayName = "Google APIs ARM EABI v7a System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis/armeabi-v7a-23_r30.zip;
+        sha1 = "c3966e3a25623a915902d879f90f6d9253dbb619";
+      
+      };
+  };
+  
+
+    "24".google_apis."x86" = {
+      name = "system-image-24-google_apis-x86";
+      path = "system-images/android-24/google_apis/x86";
+      revision = "24-google_apis-x86";
+      displayName = "Google APIs Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis/x86-24_r24.zip;
+        sha1 = "7a1adb4aa13946830763644d014fc9c6cc1f921d";
+      
+      };
+  };
+  
+
+    "24".google_apis."x86_64" = {
+      name = "system-image-24-google_apis-x86_64";
+      path = "system-images/android-24/google_apis/x86_64";
+      revision = "24-google_apis-x86_64";
+      displayName = "Google APIs Intel x86 Atom_64 System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis/x86_64-24_r24.zip;
+        sha1 = "53b26e8868c7cd27dda31c71ee2bcf999d6b9ce2";
+      
+      };
+  };
+  
+
+    "24".google_apis."armeabi-v7a" = {
+      name = "system-image-24-google_apis-armeabi-v7a";
+      path = "system-images/android-24/google_apis/armeabi-v7a";
+      revision = "24-google_apis-armeabi-v7a";
+      displayName = "Google APIs ARM EABI v7a System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis/armeabi-v7a-24_r24.zip;
+        sha1 = "85068d55673bbf9417db8d70107ceed0952b5a28";
+      
+      };
+  };
+  
+
+    "24".google_apis."arm64-v8a" = {
+      name = "system-image-24-google_apis-arm64-v8a";
+      path = "system-images/android-24/google_apis/arm64-v8a";
+      revision = "24-google_apis-arm64-v8a";
+      displayName = "Google APIs ARM 64 v8a System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis/arm64-v8a-24_r24.zip;
+        sha1 = "93ab33d90fcdbb30ca2e927cd3eea447e933dfd9";
+      
+      };
+  };
+  
+
+    "25".google_apis."x86" = {
+      name = "system-image-25-google_apis-x86";
+      path = "system-images/android-25/google_apis/x86";
+      revision = "25-google_apis-x86";
+      displayName = "Google APIs Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis/x86-25_r15.zip;
+        sha1 = "5948473077341265a0b21a53a7e0afc2f980187c";
+      
+      };
+  };
+  
+
+    "25".google_apis."x86_64" = {
+      name = "system-image-25-google_apis-x86_64";
+      path = "system-images/android-25/google_apis/x86_64";
+      revision = "25-google_apis-x86_64";
+      displayName = "Google APIs Intel x86 Atom_64 System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis/x86_64-25_r15.zip;
+        sha1 = "5a81fc218a7fe82cc6af01f7fae54a8000900443";
+      
+      };
+  };
+  
+
+    "25".google_apis."armeabi-v7a" = {
+      name = "system-image-25-google_apis-armeabi-v7a";
+      path = "system-images/android-25/google_apis/armeabi-v7a";
+      revision = "25-google_apis-armeabi-v7a";
+      displayName = "Google APIs ARM EABI v7a System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis/armeabi-v7a-25_r15.zip;
+        sha1 = "813e25f9a5f6d775670ed6c5e67a39bffa1411bf";
+      
+      };
+  };
+  
+
+    "25".google_apis."arm64-v8a" = {
+      name = "system-image-25-google_apis-arm64-v8a";
+      path = "system-images/android-25/google_apis/arm64-v8a";
+      revision = "25-google_apis-arm64-v8a";
+      displayName = "Google APIs ARM 64 v8a System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis/arm64-v8a-25_r15.zip;
+        sha1 = "c3049e32f031140757f71acb5b8f0179e6f27303";
+      
+      };
+  };
+  
+
+    "26".google_apis."x86" = {
+      name = "system-image-26-google_apis-x86";
+      path = "system-images/android-26/google_apis/x86";
+      revision = "26-google_apis-x86";
+      displayName = "Google APIs Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis/x86-26_r12.zip;
+        sha1 = "167c83bcfd87127c7376ce986b34701f74fe87ff";
+      
+      };
+  };
+  
+
+    "26".google_apis."x86_64" = {
+      name = "system-image-26-google_apis-x86_64";
+      path = "system-images/android-26/google_apis/x86_64";
+      revision = "26-google_apis-x86_64";
+      displayName = "Google APIs Intel x86 Atom_64 System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis/x86_64-26_r12.zip;
+        sha1 = "fcd46121c3486e2a759d0707c015e0b12bbab9db";
+      
+      };
+  };
+  
+
+    "27".google_apis."x86" = {
+      name = "system-image-27-google_apis-x86";
+      path = "system-images/android-27/google_apis/x86";
+      revision = "27-google_apis-x86";
+      displayName = "Google APIs Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis/x86-27_r08.zip;
+        sha1 = "623ee2638713b7dfde8044c91280c2afad5a1ade";
+      
+      };
+  };
+  
+
+    "28".google_apis."x86" = {
+      name = "system-image-28-google_apis-x86";
+      path = "system-images/android-28/google_apis/x86";
+      revision = "28-google_apis-x86";
+      displayName = "Google APIs Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis/x86-28_r07.zip;
+        sha1 = "fe5d58355545ae82b0e6a55adc1d41573ac7dec1";
+      
+      };
+  };
+  
+
+    "28".google_apis."x86_64" = {
+      name = "system-image-28-google_apis-x86_64";
+      path = "system-images/android-28/google_apis/x86_64";
+      revision = "28-google_apis-x86_64";
+      displayName = "Google APIs Intel x86 Atom_64 System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis/x86_64-28_r07.zip;
+        sha1 = "068468683a56725326f741f75b6913ee1e7955ff";
+      
+      };
+  };
+  
+}
+  
\ No newline at end of file
diff --git a/pkgs/development/mobile/androidenv/generated/system-images-google_apis_playstore.nix b/pkgs/development/mobile/androidenv/generated/system-images-google_apis_playstore.nix
new file mode 100644
index 00000000000..a8bea61ff54
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/generated/system-images-google_apis_playstore.nix
@@ -0,0 +1,97 @@
+
+{fetchurl}:
+
+{
+  
+
+    "24".google_apis_playstore."x86" = {
+      name = "system-image-24-google_apis_playstore-x86";
+      path = "system-images/android-24/google_apis_playstore/x86";
+      revision = "24-google_apis_playstore-x86";
+      displayName = "Google Play Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis_playstore/x86-24_r19.zip;
+        sha1 = "b52e9593ffdde65c1a0970256a32e8967c89cc22";
+      
+      };
+  };
+  
+
+    "25".google_apis_playstore."x86" = {
+      name = "system-image-25-google_apis_playstore-x86";
+      path = "system-images/android-25/google_apis_playstore/x86";
+      revision = "25-google_apis_playstore-x86";
+      displayName = "Google Play Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis_playstore/x86-25_r09.zip;
+        sha1 = "6f6668954f7fd52f896fe7528aa122028c9b026c";
+      
+      };
+  };
+  
+
+    "26".google_apis_playstore."x86" = {
+      name = "system-image-26-google_apis_playstore-x86";
+      path = "system-images/android-26/google_apis_playstore/x86";
+      revision = "26-google_apis_playstore-x86";
+      displayName = "Google Play Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis_playstore/x86-26_r07.zip;
+        sha1 = "2c8bee7b97a309f099941532e63c42a7d4a06e19";
+      
+      };
+  };
+  
+
+    "27".google_apis_playstore."x86" = {
+      name = "system-image-27-google_apis_playstore-x86";
+      path = "system-images/android-27/google_apis_playstore/x86";
+      revision = "27-google_apis_playstore-x86";
+      displayName = "Google Play Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis_playstore/x86-27_r03.zip;
+        sha1 = "eb5a944ceb691ca0648d0a6f0d93893a47223b5d";
+      
+      };
+  };
+  
+
+    "28".google_apis_playstore."x86" = {
+      name = "system-image-28-google_apis_playstore-x86";
+      path = "system-images/android-28/google_apis_playstore/x86";
+      revision = "28-google_apis_playstore-x86";
+      displayName = "Google Play Intel x86 Atom System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis_playstore/x86-28_r05.zip;
+        sha1 = "4c570d259e93b0b27f97bad1aca2ac47f1e9b51a";
+      
+      };
+  };
+  
+
+    "28".google_apis_playstore."x86_64" = {
+      name = "system-image-28-google_apis_playstore-x86_64";
+      path = "system-images/android-28/google_apis_playstore/x86_64";
+      revision = "28-google_apis_playstore-x86_64";
+      displayName = "Google Play Intel x86 Atom_64 System Image";
+      archives.all = fetchurl {
+      
+        url = 
+        https://dl.google.com/android/repository/sys-img/google_apis_playstore/x86_64-28_r05.zip;
+        sha1 = "5f6b238e4c7de41fd2a1c66841093bcf517255a1";
+      
+      };
+  };
+  
+}
+  
\ No newline at end of file
diff --git a/pkgs/development/mobile/androidenv/lldb.nix b/pkgs/development/mobile/androidenv/lldb.nix
new file mode 100644
index 00000000000..d812a679c02
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/lldb.nix
@@ -0,0 +1,12 @@
+{deployAndroidPackage, lib, package, os, autoPatchelfHook, pkgs}:
+
+deployAndroidPackage {
+  inherit package os;
+  buildInputs = [ autoPatchelfHook ]
+    ++ lib.optional (os == "linux") [ pkgs.glibc pkgs.stdenv.cc.cc pkgs.zlib pkgs.openssl.out pkgs.ncurses5 ];
+  patchInstructions = lib.optionalString (os == "linux") ''
+    addAutoPatchelfSearchPath $packageBaseDir/lib
+    autoPatchelf $packageBaseDir/lib
+    autoPatchelf $packageBaseDir/bin
+  '';
+}
diff --git a/pkgs/development/mobile/androidenv/make-standalone-toolchain_r10e.patch b/pkgs/development/mobile/androidenv/make-standalone-toolchain_r10e.patch
deleted file mode 100644
index 5eeadbbd12d..00000000000
--- a/pkgs/development/mobile/androidenv/make-standalone-toolchain_r10e.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -ru android-ndk-r10c.old/build/tools/make-standalone-toolchain.sh android-ndk-r10c/build/tools/make-standalone-toolchain.sh
---- android-ndk-r10c.old/build/tools/make-standalone-toolchain.sh	2014-10-16 03:46:32.000000000 +0200
-+++ android-ndk-r10c/build/tools/make-standalone-toolchain.sh	2014-10-24 23:46:22.544928306 +0200
-@@ -310,6 +310,9 @@
- # Now copy the GCC toolchain prebuilt binaries
- run copy_directory "$TOOLCHAIN_PATH" "$TMPDIR"
- 
-+# Making it writable again
-+chmod -R +w "$TMPDIR"
-+
- # Replace soft-link mcld by real file
- ALL_LDS=`find $TMPDIR -name "*mcld"`
- for LD in $ALL_LDS; do
diff --git a/pkgs/development/mobile/androidenv/make-standalone-toolchain_r8e.patch b/pkgs/development/mobile/androidenv/make-standalone-toolchain_r8e.patch
deleted file mode 100644
index 4a9f9a4a9dd..00000000000
--- a/pkgs/development/mobile/androidenv/make-standalone-toolchain_r8e.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -ru android-ndk-r8e.old/build/tools/make-standalone-toolchain.sh android-ndk-r8e/build/tools/make-standalone-toolchain.sh
---- android-ndk-r8e.old/build/tools/make-standalone-toolchain.sh	2014-10-16 03:46:32.000000000 +0200
-+++ android-ndk-r8e/build/tools/make-standalone-toolchain.sh	2014-10-24 23:46:22.544928306 +0200
-@@ -194,6 +194,9 @@
- # Now copy the GCC toolchain prebuilt binaries
- run copy_directory "$TOOLCHAIN_PATH" "$TMPDIR"
- 
-+# Making it writable again
-+chmod -R +w "$TMPDIR"
-+
- if [ -n "$LLVM_VERSION" ]; then
-   # Copy the clang/llvm toolchain prebuilt binaries
-   run copy_directory "$LLVM_TOOLCHAIN_PATH" "$TMPDIR"
diff --git a/pkgs/development/mobile/androidenv/make_standalone_toolchain.py_16b.patch b/pkgs/development/mobile/androidenv/make_standalone_toolchain.py_16b.patch
deleted file mode 100644
index 70b1f7e7f4a..00000000000
--- a/pkgs/development/mobile/androidenv/make_standalone_toolchain.py_16b.patch
+++ /dev/null
@@ -1,119 +0,0 @@
-diff --git a/build/tools/make_standalone_toolchain.py b/build/tools/make_standalone_toolchain.py
-index a6ae8448..2739912e 100755
---- a/build/tools/make_standalone_toolchain.py
-+++ b/build/tools/make_standalone_toolchain.py
-@@ -398,7 +398,9 @@ def create_toolchain(install_path, arch, api, gcc_path, clang_path,
-                      sysroot_path, stl, host_tag):
-     """Create a standalone toolchain."""
-     copy_directory_contents(gcc_path, install_path)
-+    os.system('chmod -R +w "{}"'.format(install_path))
-     copy_directory_contents(clang_path, install_path)
-+    os.system('chmod -R +w "{}"'.format(install_path))
-     triple = get_triple(arch)
-     make_clang_scripts(
-         install_path, triple, api, host_tag.startswith('windows'))
-@@ -406,23 +408,28 @@ def create_toolchain(install_path, arch, api, gcc_path, clang_path,
-     sysroot = os.path.join(NDK_DIR, 'sysroot')
-     install_sysroot = os.path.join(install_path, 'sysroot')
-     shutil.copytree(sysroot, install_sysroot)
-+    os.system('chmod -R +w "{}"'.format(install_path))
- 
-     arch_headers = os.path.join(sysroot, 'usr/include', triple)
-     copy_directory_contents(
-         arch_headers, os.path.join(install_sysroot, 'usr/include'))
-+    os.system('chmod -R +w "{}"'.format(install_path))
- 
-     lib_path = os.path.join(sysroot_path, 'usr/lib')
-     lib_install = os.path.join(install_sysroot, 'usr/lib')
-     if os.path.exists(lib_path):
-         shutil.copytree(lib_path, lib_install)
-+        os.system('chmod -R +w "{}"'.format(install_path))
- 
-     lib64_path = os.path.join(sysroot_path, 'usr/lib64')
-     lib64_install = os.path.join(install_sysroot, 'usr/lib64')
-     if os.path.exists(lib64_path):
-         shutil.copytree(lib64_path, lib64_install)
-+        os.system('chmod -R +w "{}"'.format(install_path))
- 
-     prebuilt_path = os.path.join(NDK_DIR, 'prebuilt', host_tag)
-     copy_directory_contents(prebuilt_path, install_path)
-+    os.system('chmod -R +w "{}"'.format(install_path))
- 
-     toolchain_lib_dir = os.path.join(gcc_path, 'lib/gcc', triple)
-     dirs = os.listdir(toolchain_lib_dir)
-@@ -444,29 +451,37 @@ def create_toolchain(install_path, arch, api, gcc_path, clang_path,
-     if stl == 'gnustl':
-         gnustl_dir = os.path.join(NDK_DIR, 'sources/cxx-stl/gnu-libstdc++/4.9')
-         shutil.copytree(os.path.join(gnustl_dir, 'include'), cxx_headers)
-+        os.system('chmod -R +w "{}"'.format(install_path))
- 
-         for abi in get_abis(arch):
-             copy_gnustl_abi_headers(gnustl_dir, install_path, gcc_ver, triple,
-                                     abi)
-+            os.system('chmod -R +w "{}"'.format(install_path))
-             copy_gnustl_libs(gnustl_dir, install_path, triple, abi)
-+            os.system('chmod -R +w "{}"'.format(install_path))
-             if arch == 'arm':
-                 copy_gnustl_abi_headers(gnustl_dir, install_path, gcc_ver,
-                                         triple, abi, thumb=True)
-+                os.system('chmod -R +w "{}"'.format(install_path))
-                 copy_gnustl_libs(gnustl_dir, install_path, triple, abi,
-                                  thumb=True)
-+                os.system('chmod -R +w "{}"'.format(install_path))
-     elif stl == 'libc++':
-         libcxx_dir = os.path.join(NDK_DIR, 'sources/cxx-stl/llvm-libc++')
-         libcxxabi_dir = os.path.join(NDK_DIR, 'sources/cxx-stl/llvm-libc++abi')
-         support_dir = os.path.join(NDK_DIR, 'sources/android/support')
-         copy_directory_contents(os.path.join(libcxx_dir, 'include'),
-                                 cxx_headers)
-+        os.system('chmod -R +w "{}"'.format(install_path))
-         copy_directory_contents(os.path.join(support_dir, 'include'),
-                                 support_headers)
-+        os.system('chmod -R +w "{}"'.format(install_path))
- 
-         # I have no idea why we need this, but the old one does it too.
-         copy_directory_contents(
-             os.path.join(libcxxabi_dir, 'include'),
-             os.path.join(install_path, 'include/llvm-libc++abi/include'))
-+        os.system('chmod -R +w "{}"'.format(install_path))
- 
-         headers = [
-             'cxxabi.h',
-@@ -482,21 +497,25 @@ def create_toolchain(install_path, arch, api, gcc_path, clang_path,
-             dest_libdir = get_dest_libdir(install_path, triple, abi)
-             include_libunwind = arch == 'arm'
-             copy_libcxx_libs(src_libdir, dest_libdir, include_libunwind)
-+            os.system('chmod -R +w "{}"'.format(install_path))
-             if arch == 'arm':
-                 thumb_libdir = os.path.join(dest_libdir, 'thumb')
-                 copy_libcxx_libs(src_libdir, thumb_libdir, include_libunwind)
-+                os.system('chmod -R +w "{}"'.format(install_path))
-     elif stl == 'stlport':
-         stlport_dir = os.path.join(NDK_DIR, 'sources/cxx-stl/stlport')
-         gabixx_dir = os.path.join(NDK_DIR, 'sources/cxx-stl/gabi++')
- 
-         copy_directory_contents(
-             os.path.join(stlport_dir, 'stlport'), cxx_headers)
-+        os.system('chmod -R +w "{}"'.format(install_path))
- 
-         # Same as for libc++. Not sure why we have this extra directory, but
-         # keep the cruft for diff.
-         copy_directory_contents(
-             os.path.join(gabixx_dir, 'include'),
-             os.path.join(install_path, 'include/gabi++/include'))
-+        os.system('chmod -R +w "{}"'.format(install_path))
- 
-         headers = [
-             'cxxabi.h',
-@@ -512,9 +531,11 @@ def create_toolchain(install_path, arch, api, gcc_path, clang_path,
- 
-         for abi in get_abis(arch):
-             copy_stlport_libs(stlport_dir, install_path, triple, abi)
-+            os.system('chmod -R +w "{}"'.format(install_path))
-             if arch == 'arm':
-                 copy_stlport_libs(stlport_dir, install_path, triple, abi,
-                                   thumb=True)
-+                os.system('chmod -R +w "{}"'.format(install_path))
-     else:
-         raise ValueError(stl)
- 
diff --git a/pkgs/development/mobile/androidenv/make_standalone_toolchain.py_17c.patch b/pkgs/development/mobile/androidenv/make_standalone_toolchain.py_17c.patch
deleted file mode 100644
index 88ce69be3e8..00000000000
--- a/pkgs/development/mobile/androidenv/make_standalone_toolchain.py_17c.patch
+++ /dev/null
@@ -1,119 +0,0 @@
-diff --git a/build/tools/make_standalone_toolchain.py b/build/tools/make_standalone_toolchain.py
-index daba3351..424b7fef 100755
---- a/build/tools/make_standalone_toolchain.py
-+++ b/build/tools/make_standalone_toolchain.py
-@@ -421,7 +421,9 @@ def create_toolchain(install_path, arch, api, gcc_path, clang_path,
-                      platforms_path, stl, host_tag):
-     """Create a standalone toolchain."""
-     copy_directory_contents(gcc_path, install_path)
-+    os.system('chmod -R +w "{}"'.format(install_path))
-     copy_directory_contents(clang_path, install_path)
-+    os.system('chmod -R +w "{}"'.format(install_path))
-     triple = get_triple(arch)
-     make_clang_scripts(
-         install_path, triple, api, host_tag.startswith('windows'))
-@@ -432,9 +434,11 @@ def create_toolchain(install_path, arch, api, gcc_path, clang_path,
-     install_headers = os.path.join(install_sysroot, 'usr/include')
-     os.makedirs(os.path.dirname(install_headers))
-     shutil.copytree(headers, install_headers)
-+    os.system('chmod -R +w "{}"'.format(install_path))
- 
-     arch_headers = os.path.join(sysroot, 'usr/include', triple)
-     copy_directory_contents(arch_headers, os.path.join(install_headers))
-+    os.system('chmod -R +w "{}"'.format(install_path))
- 
-     for lib_suffix in ('', '64'):
-         lib_path = os.path.join(platforms_path, 'usr/lib{}'.format(lib_suffix))
-@@ -442,20 +446,24 @@ def create_toolchain(install_path, arch, api, gcc_path, clang_path,
-             install_sysroot, 'usr/lib{}'.format(lib_suffix))
-         if os.path.exists(lib_path):
-             shutil.copytree(lib_path, lib_install)
-+            os.system('chmod -R +w "{}"'.format(install_path))
- 
-     static_lib_path = os.path.join(sysroot, 'usr/lib', triple)
-     static_lib_install = os.path.join(install_sysroot, 'usr/lib')
-     if arch == 'x86_64':
-         static_lib_install += '64'
-     copy_directory_contents(static_lib_path, static_lib_install)
-+    os.system('chmod -R +w "{}"'.format(install_path))
- 
-     prebuilt_path = os.path.join(NDK_DIR, 'prebuilt', host_tag)
-     copy_directory_contents(prebuilt_path, install_path)
-+    os.system('chmod -R +w "{}"'.format(install_path))
- 
-     gdbserver_path = os.path.join(
-         NDK_DIR, 'prebuilt', 'android-' + arch, 'gdbserver')
-     gdbserver_install = os.path.join(install_path, 'share', 'gdbserver')
-     shutil.copytree(gdbserver_path, gdbserver_install)
-+    os.system('chmod -R +w "{}"'.format(install_path))
- 
-     toolchain_lib_dir = os.path.join(gcc_path, 'lib/gcc', triple)
-     dirs = os.listdir(toolchain_lib_dir)
-@@ -481,26 +489,33 @@ def create_toolchain(install_path, arch, api, gcc_path, clang_path,
-         for abi in get_abis(arch):
-             copy_gnustl_abi_headers(gnustl_dir, install_path, gcc_ver, triple,
-                                     abi)
-+            os.system('chmod -R +w "{}"'.format(install_path))
-             copy_gnustl_libs(gnustl_dir, install_path, triple, abi)
-+            os.system('chmod -R +w "{}"'.format(install_path))
-             if arch == 'arm':
-                 copy_gnustl_abi_headers(gnustl_dir, install_path, gcc_ver,
-                                         triple, abi, thumb=True)
-+                os.system('chmod -R +w "{}"'.format(install_path))
-                 copy_gnustl_libs(gnustl_dir, install_path, triple, abi,
-                                  thumb=True)
-+                os.system('chmod -R +w "{}"'.format(install_path))
-     elif stl == 'libc++':
-         libcxx_dir = os.path.join(NDK_DIR, 'sources/cxx-stl/llvm-libc++')
-         libcxxabi_dir = os.path.join(NDK_DIR, 'sources/cxx-stl/llvm-libc++abi')
-         copy_directory_contents(os.path.join(libcxx_dir, 'include'),
-                                 cxx_headers)
-+        os.system('chmod -R +w "{}"'.format(install_path))
-         if api < 21:
-             support_dir = os.path.join(NDK_DIR, 'sources/android/support')
-             copy_directory_contents(os.path.join(support_dir, 'include'),
-                                     support_headers)
-+            os.system('chmod -R +w "{}"'.format(install_path))
- 
-         # I have no idea why we need this, but the old one does it too.
-         copy_directory_contents(
-             os.path.join(libcxxabi_dir, 'include'),
-             os.path.join(install_path, 'include/llvm-libc++abi/include'))
-+        os.system('chmod -R +w "{}"'.format(install_path))
- 
-         headers = [
-             'cxxabi.h',
-@@ -515,21 +530,25 @@ def create_toolchain(install_path, arch, api, gcc_path, clang_path,
-             src_libdir = get_src_libdir(libcxx_dir, abi)
-             dest_libdir = get_dest_libdir(install_path, triple, abi)
-             copy_libcxx_libs(src_libdir, dest_libdir, abi, api)
-+            os.system('chmod -R +w "{}"'.format(install_path))
-             if arch == 'arm':
-                 thumb_libdir = os.path.join(dest_libdir, 'thumb')
-                 copy_libcxx_libs(src_libdir, thumb_libdir, abi, api)
-+                os.system('chmod -R +w "{}"'.format(install_path))
-     elif stl == 'stlport':
-         stlport_dir = os.path.join(NDK_DIR, 'sources/cxx-stl/stlport')
-         gabixx_dir = os.path.join(NDK_DIR, 'sources/cxx-stl/gabi++')
- 
-         copy_directory_contents(
-             os.path.join(stlport_dir, 'stlport'), cxx_headers)
-+        os.system('chmod -R +w "{}"'.format(install_path))
- 
-         # Same as for libc++. Not sure why we have this extra directory, but
-         # keep the cruft for diff.
-         copy_directory_contents(
-             os.path.join(gabixx_dir, 'include'),
-             os.path.join(install_path, 'include/gabi++/include'))
-+        os.system('chmod -R +w "{}"'.format(install_path))
- 
-         headers = [
-             'cxxabi.h',
-@@ -548,6 +567,7 @@ def create_toolchain(install_path, arch, api, gcc_path, clang_path,
-             if arch == 'arm':
-                 copy_stlport_libs(stlport_dir, install_path, triple, abi,
-                                   thumb=True)
-+                os.system('chmod -R +w "{}"'.format(install_path))
-     else:
-         raise ValueError(stl)
- 
diff --git a/pkgs/development/mobile/androidenv/ndk-bundle/default.nix b/pkgs/development/mobile/androidenv/ndk-bundle/default.nix
new file mode 100644
index 00000000000..5d70a9f0a1c
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/ndk-bundle/default.nix
@@ -0,0 +1,51 @@
+{deployAndroidPackage, lib, package, os, autoPatchelfHook, makeWrapper, pkgs, platform-tools}:
+
+let
+  runtime_paths = lib.makeBinPath [ pkgs.coreutils pkgs.file pkgs.findutils pkgs.gawk pkgs.gnugrep pkgs.gnused pkgs.jdk pkgs.python3 pkgs.which ] + ":${platform-tools}/platform-tools";
+in
+deployAndroidPackage {
+  inherit package os;
+  buildInputs = [ autoPatchelfHook makeWrapper pkgs.python2 ]
+    ++ lib.optional (os == "linux") [ pkgs.glibc pkgs.stdenv.cc.cc pkgs.ncurses5 pkgs.zlib pkgs.libcxx.out ];
+  patchInstructions = lib.optionalString (os == "linux") ''
+    patchShebangs .
+
+    patch -p1 \
+      --no-backup-if-mismatch < ${./make_standalone_toolchain.py_18.patch}
+    wrapProgram $(pwd)/build/tools/make_standalone_toolchain.py --prefix PATH : "${runtime_paths}"
+
+    # TODO: allow this stuff
+    rm -rf docs tests
+
+    # Patch the executables of the toolchains, but not the libraries -- they are needed for crosscompiling
+
+    addAutoPatchelfSearchPath $out/libexec/android-sdk/ndk-bundle/toolchains/renderscript/prebuilt/linux-x86_64/lib64
+    find toolchains -type d -name bin | while read dir
+    do
+        autoPatchelf "$dir"
+    done
+
+    # fix ineffective PROGDIR / MYNDKDIR determination
+    for i in ndk-build
+    do
+        sed -i -e 's|^PROGDIR=`dirname $0`|PROGDIR=`dirname $(readlink -f $(which $0))`|' $i
+    done
+
+    # Patch executables
+    autoPatchelf prebuilt/linux-x86_64
+
+    # wrap
+    for i in ndk-build
+    do
+        wrapProgram "$(pwd)/$i" --prefix PATH : "${runtime_paths}"
+    done
+
+    # make some executables available in PATH
+    mkdir -p $out/bin
+    for i in ndk-build
+    do
+        ln -sf ../../libexec/android-sdk/ndk-bundle/$i $out/bin/$i
+    done
+  '';
+  noAuditTmpdir = true; # Audit script gets invoked by the build/ component in the path for the make standalone script
+}
diff --git a/pkgs/development/mobile/androidenv/ndk-bundle/make_standalone_toolchain.py_18.patch b/pkgs/development/mobile/androidenv/ndk-bundle/make_standalone_toolchain.py_18.patch
new file mode 100644
index 00000000000..7af2d44a0f2
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/ndk-bundle/make_standalone_toolchain.py_18.patch
@@ -0,0 +1,44 @@
+diff -Naur android-ndk-r18b/build/tools/make_standalone_toolchain.py android-ndk-r18b-new/build/tools/make_standalone_toolchain.py
+--- android-ndk-r18b/build/tools/make_standalone_toolchain.py	2018-10-11 12:49:38.000000000 +0200
++++ android-ndk-r18b-new/build/tools/make_standalone_toolchain.py	2018-11-20 21:55:52.689991420 +0100
+@@ -30,7 +30,7 @@
+ import sys
+ import tempfile
+ import textwrap
+-
++import subprocess
+ 
+ THIS_DIR = os.path.realpath(os.path.dirname(__file__))
+ NDK_DIR = os.path.realpath(os.path.join(THIS_DIR, '../..'))
+@@ -173,6 +173,7 @@
+                 logger().debug('Copying %s', src_file)
+                 shutil.copy2(src_file, dst_dir)
+ 
++    subprocess.check_call(["chmod", "-R", "+w", dst])
+ 
+ def make_clang_scripts(install_dir, triple, api, windows):
+     """Creates Clang wrapper scripts.
+@@ -365,6 +366,7 @@
+     install_headers = os.path.join(install_sysroot, 'usr/include')
+     os.makedirs(os.path.dirname(install_headers))
+     shutil.copytree(headers, install_headers)
++    subprocess.check_call(["chmod", "-R", "+w", install_path])
+ 
+     arch_headers = os.path.join(sysroot, 'usr/include', triple)
+     copy_directory_contents(arch_headers, os.path.join(install_headers))
+@@ -375,6 +377,7 @@
+             install_sysroot, 'usr/lib{}'.format(lib_suffix))
+         if os.path.exists(lib_path):
+             shutil.copytree(lib_path, lib_install)
++            subprocess.check_call(["chmod", "-R", "+w", install_path])
+ 
+     static_lib_path = os.path.join(sysroot, 'usr/lib', triple)
+     static_lib_install = os.path.join(install_sysroot, 'usr/lib')
+@@ -389,6 +392,7 @@
+         NDK_DIR, 'prebuilt', 'android-' + arch, 'gdbserver')
+     gdbserver_install = os.path.join(install_path, 'share', 'gdbserver')
+     shutil.copytree(gdbserver_path, gdbserver_install)
++    subprocess.check_call(["chmod", "-R", "+w", install_path])
+ 
+     toolchain_lib_dir = os.path.join(gcc_path, 'lib/gcc', triple)
+     dirs = os.listdir(toolchain_lib_dir)
diff --git a/pkgs/development/mobile/androidenv/platform-tools.nix b/pkgs/development/mobile/androidenv/platform-tools.nix
index 2cfb11bffbc..9d2f6eb6075 100644
--- a/pkgs/development/mobile/androidenv/platform-tools.nix
+++ b/pkgs/development/mobile/androidenv/platform-tools.nix
@@ -1,51 +1,19 @@
-{ buildPackages, pkgs }:
+{deployAndroidPackage, lib, package, os, autoPatchelfHook, pkgs}:
 
-let
-  inherit (buildPackages) fetchurl unzip;
-  inherit (pkgs) stdenv zlib;
-in
-
-stdenv.mkDerivation rec {
-  version = "28.0.1";
-  name = "android-platform-tools-r${version}";
-  src = if (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux")
-    then fetchurl {
-      url = "https://dl.google.com/android/repository/platform-tools_r${version}-linux.zip";
-      sha256 = "14kkr9xib5drjjd0bclm0jn3f5xlmlg652mbv4xd83cv7a53a49y";
-    }
-    else if stdenv.hostPlatform.system == "x86_64-darwin" then fetchurl {
-      url = "https://dl.google.com/android/repository/platform-tools_r${version}-darwin.zip";
-      sha256 = "117syrddq1haicwyjzd1p4pfphj0wldjs7w10fpk3n2b7yp37j1v";
-    }
-    else throw "System ${stdenv.hostPlatform.system} not supported!";
-
-  buildCommand = ''
-    mkdir -p $out
-    cd $out
-    unzip $src
-    cd platform-tools
-
-    ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux")
-      ''
-        for i in adb dmtracedump e2fsdroid fastboot hprof-conv make_f2fs mke2fs sload_f2fs sqlite3
-        do
-            patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux-x86-64.so.2 $i
-            patchelf --set-rpath ${stdenv.cc.cc.lib}/lib:`pwd`/lib64 $i
-        done
-
-        for i in etc1tool
-        do
-            patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux-x86-64.so.2 $i
-            patchelf --set-rpath ${stdenv.cc.cc.lib}/lib:${zlib.out}/lib:`pwd`/lib64 $i
-        done
-    ''}
+deployAndroidPackage {
+  inherit package os;
+  buildInputs = [ autoPatchelfHook ]
+    ++ lib.optional (os == "linux") [ pkgs.glibc pkgs.zlib pkgs.ncurses5 ];
+  patchInstructions = lib.optionalString (os == "linux") ''
+    addAutoPatchelfSearchPath $packageBaseDir/lib64
+    autoPatchelf --no-recurse $packageBaseDir/lib64
+    autoPatchelf --no-recurse $packageBaseDir
 
     mkdir -p $out/bin
-    for i in adb fastboot
+    cd $out/bin
+    find $out/libexec/android-sdk/platform-tools -type f -executable -mindepth 1 -maxdepth 1 -not -name sqlite3 | while read i
     do
-        ln -sf $out/platform-tools/$i $out/bin/$i
+        ln -s $i
     done
   '';
-
-  nativeBuildInputs = [ unzip ];
 }
diff --git a/pkgs/development/mobile/androidenv/platforms-linux.nix b/pkgs/development/mobile/androidenv/platforms-linux.nix
deleted file mode 100644
index dbb295f8cf5..00000000000
--- a/pkgs/development/mobile/androidenv/platforms-linux.nix
+++ /dev/null
@@ -1,343 +0,0 @@
-
-# This file is generated from generate-platforms.sh. DO NOT EDIT.
-# Execute generate-platforms.sh or fetch.sh to update the file.
-{stdenv, fetchurl, unzip}:
-
-let
-  buildPlatform = args:
-    stdenv.mkDerivation (args // {
-      buildInputs = [ unzip ];
-      buildCommand = ''
-        mkdir -p $out
-        cd $out
-        unzip $src
-    '';
-  });
-in
-{
-    
-  platform_2 = buildPlatform {
-    name = "android-platform-1.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-1.1_r1-linux.zip;
-      sha1 = "c054d25c9b4c6251fa49c2f9c54336998679d3fe";
-    };
-    meta = {
-      description = "Android SDK Platform 2";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_3 = buildPlatform {
-    name = "android-platform-1.5";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-1.5_r04-linux.zip;
-      sha1 = "5c134b7df5f4b8bd5b61ba93bdaebada8fa3468c";
-    };
-    meta = {
-      description = "Android SDK Platform 3";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_4 = buildPlatform {
-    name = "android-platform-1.6";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-1.6_r03-linux.zip;
-      sha1 = "483ed088e45bbdf3444baaf9250c8b02e5383cb0";
-    };
-    meta = {
-      description = "Android SDK Platform 4";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_5 = buildPlatform {
-    name = "android-platform-2.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-2.0_r01-linux.zip;
-      sha1 = "be9be6a99ca32875c96ec7f91160ca9fce7e3c7d";
-    };
-    meta = {
-      description = "Android SDK Platform 5";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_6 = buildPlatform {
-    name = "android-platform-2.0.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-2.0.1_r01-linux.zip;
-      sha1 = "ce2c971dce352aa28af06bda92a070116aa5ae1a";
-    };
-    meta = {
-      description = "Android SDK Platform 6";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_7 = buildPlatform {
-    name = "android-platform-2.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-2.1_r03.zip;
-      sha1 = "5ce51b023ac19f8738500b1007a1da5de2349a1e";
-    };
-    meta = {
-      description = "Android SDK Platform 7";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_8 = buildPlatform {
-    name = "android-platform-2.2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-2.2_r03.zip;
-      sha1 = "231262c63eefdff8fd0386e9ccfefeb27a8f9202";
-    };
-    meta = {
-      description = "Android SDK Platform 8";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_9 = buildPlatform {
-    name = "android-platform-2.3.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-2.3.1_r02.zip;
-      sha1 = "209f8a7a8b2cb093fce858b8b55fed3ba5206773";
-    };
-    meta = {
-      description = "Android SDK Platform 9";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_10 = buildPlatform {
-    name = "android-platform-2.3.3";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-2.3.3_r02.zip;
-      sha1 = "887e37783ec32f541ea33c2c649dda648e8e6fb3";
-    };
-    meta = {
-      description = "Android SDK Platform 10";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_11 = buildPlatform {
-    name = "android-platform-3.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-3.0_r02.zip;
-      sha1 = "2c7d4bd13f276e76f6bbd87315fe27aba351dd37";
-    };
-    meta = {
-      description = "Android SDK Platform 11";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_12 = buildPlatform {
-    name = "android-platform-3.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-3.1_r03.zip;
-      sha1 = "4a50a6679cd95bb68bb5fc032e754cd7c5e2b1bf";
-    };
-    meta = {
-      description = "Android SDK Platform 12";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_13 = buildPlatform {
-    name = "android-platform-3.2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-3.2_r01.zip;
-      sha1 = "6189a500a8c44ae73a439604363de93591163cd9";
-    };
-    meta = {
-      description = "Android SDK Platform 13";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_14 = buildPlatform {
-    name = "android-platform-4.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-14_r04.zip;
-      sha1 = "d4f1d8fbca25225b5f0e7a0adf0d39c3d6e60b3c";
-    };
-    meta = {
-      description = "Android SDK Platform 14";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_15 = buildPlatform {
-    name = "android-platform-4.0.3";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-15_r05.zip;
-      sha1 = "69ab4c443b37184b2883af1fd38cc20cbeffd0f3";
-    };
-    meta = {
-      description = "Android SDK Platform 15";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_16 = buildPlatform {
-    name = "android-platform-4.1.2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-16_r05.zip;
-      sha1 = "12a5ce6235a76bc30f62c26bda1b680e336abd07";
-    };
-    meta = {
-      description = "Android SDK Platform 16";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_17 = buildPlatform {
-    name = "android-platform-4.2.2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-17_r03.zip;
-      sha1 = "dbe14101c06e6cdb34e300393e64e64f8c92168a";
-    };
-    meta = {
-      description = "Android SDK Platform 17";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_18 = buildPlatform {
-    name = "android-platform-4.3.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-18_r03.zip;
-      sha1 = "e6b09b3505754cbbeb4a5622008b907262ee91cb";
-    };
-    meta = {
-      description = "Android SDK Platform 18";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_19 = buildPlatform {
-    name = "android-platform-4.4.2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-19_r04.zip;
-      sha1 = "2ff20d89e68f2f5390981342e009db5a2d456aaa";
-    };
-    meta = {
-      description = "Android SDK Platform 19";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_20 = buildPlatform {
-    name = "android-platform-4.4W.2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-20_r02.zip;
-      sha1 = "a9251f8a3f313ab05834a07a963000927637e01d";
-    };
-    meta = {
-      description = "Android SDK Platform 20";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_21 = buildPlatform {
-    name = "android-platform-5.0.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-21_r02.zip;
-      sha1 = "53536556059bb29ae82f414fd2e14bc335a4eb4c";
-    };
-    meta = {
-      description = "Android SDK Platform 21";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_22 = buildPlatform {
-    name = "android-platform-5.1.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-22_r02.zip;
-      sha1 = "5d1bd10fea962b216a0dece1247070164760a9fc";
-    };
-    meta = {
-      description = "Android SDK Platform 22";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_23 = buildPlatform {
-    name = "android-platform-6.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/platform-23_r03.zip;
-      sha1 = "027fede3de6aa1649115bbd0bffff30ccd51c9a0";
-    };
-    meta = {
-      description = "Android SDK Platform 23";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_24 = buildPlatform {
-    name = "android-platform-7.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/platform-24_r02.zip;
-      sha1 = "8912da3d4bfe7a9f28f0e5ce92d3a8dc96342aee";
-    };
-    meta = {
-      description = "Android SDK Platform 24";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_25 = buildPlatform {
-    name = "android-platform-7.1.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/platform-25_r03.zip;
-      sha1 = "00c2c5765e8988504be10a1eb66ed71fcdbd7fe8";
-    };
-    meta = {
-      description = "Android SDK Platform 25";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_26 = buildPlatform {
-    name = "android-platform-8.0.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/platform-26_r02.zip;
-      sha1 = "e4ae5d7aa557a3c827135838ee400da8443ac4ef";
-    };
-    meta = {
-      description = "Android SDK Platform 26";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_27 = buildPlatform {
-    name = "android-platform-8.1.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/platform-27_r03.zip;
-      sha1 = "35f747e7e70b2d16e0e4246876be28d15ea1c353";
-    };
-    meta = {
-      description = "Android SDK Platform 27";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_28 = buildPlatform {
-    name = "android-platform-9";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/platform-28_r06.zip;
-      sha1 = "9a4e52b1d55bd2e24216b150aafae2503d3efba6";
-    };
-    meta = {
-      description = "Android SDK Platform 28";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-}
diff --git a/pkgs/development/mobile/androidenv/platforms-macosx.nix b/pkgs/development/mobile/androidenv/platforms-macosx.nix
deleted file mode 100644
index 30ed94e516a..00000000000
--- a/pkgs/development/mobile/androidenv/platforms-macosx.nix
+++ /dev/null
@@ -1,343 +0,0 @@
-
-# This file is generated from generate-platforms.sh. DO NOT EDIT.
-# Execute generate-platforms.sh or fetch.sh to update the file.
-{stdenv, fetchurl, unzip}:
-
-let
-  buildPlatform = args:
-    stdenv.mkDerivation (args // {
-      buildInputs = [ unzip ];
-      buildCommand = ''
-        mkdir -p $out
-        cd $out
-        unzip $src
-    '';
-  });
-in
-{
-    
-  platform_2 = buildPlatform {
-    name = "android-platform-1.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-1.1_r1-macosx.zip;
-      sha1 = "e21dbcff45b7356657449ebb3c7e941be2bb5ebe";
-    };
-    meta = {
-      description = "Android SDK Platform 2";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_3 = buildPlatform {
-    name = "android-platform-1.5";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-1.5_r04-macosx.zip;
-      sha1 = "d3a67c2369afa48b6c3c7624de5031c262018d1e";
-    };
-    meta = {
-      description = "Android SDK Platform 3";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_4 = buildPlatform {
-    name = "android-platform-1.6";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-1.6_r03-macosx.zip;
-      sha1 = "bdafad44f5df9f127979bdb21a1fdd87ee3cd625";
-    };
-    meta = {
-      description = "Android SDK Platform 4";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_5 = buildPlatform {
-    name = "android-platform-2.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-2.0_r01-macosx.zip;
-      sha1 = "2a866d0870dbba18e0503cd41e5fae988a21b314";
-    };
-    meta = {
-      description = "Android SDK Platform 5";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_6 = buildPlatform {
-    name = "android-platform-2.0.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-2.0.1_r01-macosx.zip;
-      sha1 = "c3096f80d75a6fc8cb38ef8a18aec920e53d42c0";
-    };
-    meta = {
-      description = "Android SDK Platform 6";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_7 = buildPlatform {
-    name = "android-platform-2.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-2.1_r03.zip;
-      sha1 = "5ce51b023ac19f8738500b1007a1da5de2349a1e";
-    };
-    meta = {
-      description = "Android SDK Platform 7";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_8 = buildPlatform {
-    name = "android-platform-2.2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-2.2_r03.zip;
-      sha1 = "231262c63eefdff8fd0386e9ccfefeb27a8f9202";
-    };
-    meta = {
-      description = "Android SDK Platform 8";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_9 = buildPlatform {
-    name = "android-platform-2.3.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-2.3.1_r02.zip;
-      sha1 = "209f8a7a8b2cb093fce858b8b55fed3ba5206773";
-    };
-    meta = {
-      description = "Android SDK Platform 9";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_10 = buildPlatform {
-    name = "android-platform-2.3.3";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-2.3.3_r02.zip;
-      sha1 = "887e37783ec32f541ea33c2c649dda648e8e6fb3";
-    };
-    meta = {
-      description = "Android SDK Platform 10";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_11 = buildPlatform {
-    name = "android-platform-3.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-3.0_r02.zip;
-      sha1 = "2c7d4bd13f276e76f6bbd87315fe27aba351dd37";
-    };
-    meta = {
-      description = "Android SDK Platform 11";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_12 = buildPlatform {
-    name = "android-platform-3.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-3.1_r03.zip;
-      sha1 = "4a50a6679cd95bb68bb5fc032e754cd7c5e2b1bf";
-    };
-    meta = {
-      description = "Android SDK Platform 12";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_13 = buildPlatform {
-    name = "android-platform-3.2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-3.2_r01.zip;
-      sha1 = "6189a500a8c44ae73a439604363de93591163cd9";
-    };
-    meta = {
-      description = "Android SDK Platform 13";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_14 = buildPlatform {
-    name = "android-platform-4.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-14_r04.zip;
-      sha1 = "d4f1d8fbca25225b5f0e7a0adf0d39c3d6e60b3c";
-    };
-    meta = {
-      description = "Android SDK Platform 14";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_15 = buildPlatform {
-    name = "android-platform-4.0.3";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-15_r05.zip;
-      sha1 = "69ab4c443b37184b2883af1fd38cc20cbeffd0f3";
-    };
-    meta = {
-      description = "Android SDK Platform 15";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_16 = buildPlatform {
-    name = "android-platform-4.1.2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-16_r05.zip;
-      sha1 = "12a5ce6235a76bc30f62c26bda1b680e336abd07";
-    };
-    meta = {
-      description = "Android SDK Platform 16";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_17 = buildPlatform {
-    name = "android-platform-4.2.2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-17_r03.zip;
-      sha1 = "dbe14101c06e6cdb34e300393e64e64f8c92168a";
-    };
-    meta = {
-      description = "Android SDK Platform 17";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_18 = buildPlatform {
-    name = "android-platform-4.3.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-18_r03.zip;
-      sha1 = "e6b09b3505754cbbeb4a5622008b907262ee91cb";
-    };
-    meta = {
-      description = "Android SDK Platform 18";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_19 = buildPlatform {
-    name = "android-platform-4.4.2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-19_r04.zip;
-      sha1 = "2ff20d89e68f2f5390981342e009db5a2d456aaa";
-    };
-    meta = {
-      description = "Android SDK Platform 19";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_20 = buildPlatform {
-    name = "android-platform-4.4W.2";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-20_r02.zip;
-      sha1 = "a9251f8a3f313ab05834a07a963000927637e01d";
-    };
-    meta = {
-      description = "Android SDK Platform 20";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_21 = buildPlatform {
-    name = "android-platform-5.0.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-21_r02.zip;
-      sha1 = "53536556059bb29ae82f414fd2e14bc335a4eb4c";
-    };
-    meta = {
-      description = "Android SDK Platform 21";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_22 = buildPlatform {
-    name = "android-platform-5.1.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/android-22_r02.zip;
-      sha1 = "5d1bd10fea962b216a0dece1247070164760a9fc";
-    };
-    meta = {
-      description = "Android SDK Platform 22";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_23 = buildPlatform {
-    name = "android-platform-6.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/platform-23_r03.zip;
-      sha1 = "027fede3de6aa1649115bbd0bffff30ccd51c9a0";
-    };
-    meta = {
-      description = "Android SDK Platform 23";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_24 = buildPlatform {
-    name = "android-platform-7.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/platform-24_r02.zip;
-      sha1 = "8912da3d4bfe7a9f28f0e5ce92d3a8dc96342aee";
-    };
-    meta = {
-      description = "Android SDK Platform 24";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_25 = buildPlatform {
-    name = "android-platform-7.1.1";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/platform-25_r03.zip;
-      sha1 = "00c2c5765e8988504be10a1eb66ed71fcdbd7fe8";
-    };
-    meta = {
-      description = "Android SDK Platform 25";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_26 = buildPlatform {
-    name = "android-platform-8.0.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/platform-26_r02.zip;
-      sha1 = "e4ae5d7aa557a3c827135838ee400da8443ac4ef";
-    };
-    meta = {
-      description = "Android SDK Platform 26";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_27 = buildPlatform {
-    name = "android-platform-8.1.0";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/platform-27_r03.zip;
-      sha1 = "35f747e7e70b2d16e0e4246876be28d15ea1c353";
-    };
-    meta = {
-      description = "Android SDK Platform 27";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-  platform_28 = buildPlatform {
-    name = "android-platform-9";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/platform-28_r06.zip;
-      sha1 = "9a4e52b1d55bd2e24216b150aafae2503d3efba6";
-    };
-    meta = {
-      description = "Android SDK Platform 28";
-      homepage = http://developer.android.com/sdk/;
-    };
-  };
-
-}
diff --git a/pkgs/development/mobile/androidenv/querypackages.sh b/pkgs/development/mobile/androidenv/querypackages.sh
new file mode 100644
index 00000000000..0f31396b876
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/querypackages.sh
@@ -0,0 +1,27 @@
+#!/bin/sh -e
+
+if [ "$1" = "" ]
+then
+    echo "Please select a package set: 'packages', 'addons', 'system-images'" >&2
+    exit 1
+fi
+
+if [ "$2" = "" ]
+then
+    echo "Please select a package group:" >&2
+    ( cat <<EOF
+builtins.attrNames (import ./generated/$1.nix {
+  fetchurl = null;
+})
+EOF
+) | nix-instantiate --eval-only -
+
+    exit 1
+fi
+
+( cat <<EOF
+builtins.attrNames (import ./generated/$1.nix {
+  fetchurl = null;
+}).$2
+EOF
+) | nix-instantiate --eval-only -
diff --git a/pkgs/development/mobile/androidenv/repository-11.xml b/pkgs/development/mobile/androidenv/repository-11.xml
deleted file mode 100644
index 45ad16be57b..00000000000
--- a/pkgs/development/mobile/androidenv/repository-11.xml
+++ /dev/null
@@ -1,2834 +0,0 @@
-<?xml version="1.0" ?>
-<!--
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
--->
-<sdk:sdk-repository xmlns:sdk="http://schemas.android.com/sdk/android/repository/11" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-	<!--Generated on 2018-10-17 16:21:19.063228 with ADRT.-->
-	<sdk:license id="android-sdk-license" type="text">Terms and Conditions
-
-This is the Android Software Development Kit License Agreement
-
-1. Introduction
-
-1.1 The Android Software Development Kit (referred to in the License Agreement as the &quot;SDK&quot; and specifically including the Android system files, packaged APIs, and Google APIs add-ons) is licensed to you subject to the terms of the License Agreement. The License Agreement forms a legally binding contract between you and Google in relation to your use of the SDK.
-
-1.2 &quot;Android&quot; means the Android software stack for devices, as made available under the Android Open Source Project, which is located at the following URL: http://source.android.com/, as updated from time to time.
-
-1.3 A &quot;compatible implementation&quot; means any Android device that (i) complies with the Android Compatibility Definition document, which can be found at the Android compatibility website (http://source.android.com/compatibility) and which may be updated from time to time; and (ii) successfully passes the Android Compatibility Test Suite (CTS).
-
-1.4 &quot;Google&quot; means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States.
-
-
-2. Accepting the License Agreement
-
-2.1 In order to use the SDK, you must first agree to the License Agreement. You may not use the SDK if you do not accept the License Agreement.
-
-2.2 By clicking to accept, you hereby agree to the terms of the License Agreement.
-
-2.3 You may not use the SDK and may not accept the License Agreement if you are a person barred from receiving the SDK under the laws of the United States or other countries, including the country in which you are resident or from which you use the SDK.
-
-2.4 If you are agreeing to be bound by the License Agreement on behalf of your employer or other entity, you represent and warrant that you have full legal authority to bind your employer or such entity to the License Agreement. If you do not have the requisite authority, you may not accept the License Agreement or use the SDK on behalf of your employer or other entity.
-
-
-3. SDK License from Google
-
-3.1 Subject to the terms of the License Agreement, Google grants you a limited, worldwide, royalty-free, non-assignable, non-exclusive, and non-sublicensable license to use the SDK solely to develop applications for compatible implementations of Android.
-
-3.2 You may not use this SDK to develop applications for other platforms (including non-compatible implementations of Android) or to develop another SDK. You are of course free to develop applications for other platforms, including non-compatible implementations of Android, provided that this SDK is not used for that purpose.
-
-3.3 You agree that Google or third parties own all legal right, title and interest in and to the SDK, including any Intellectual Property Rights that subsist in the SDK. &quot;Intellectual Property Rights&quot; means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Google reserves all rights not expressly granted to you.
-
-3.4 You may not use the SDK for any purpose not expressly permitted by the License Agreement.  Except to the extent required by applicable third party licenses, you may not copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the SDK or any part of the SDK.
-
-3.5 Use, reproduction and distribution of components of the SDK licensed under an open source software license are governed solely by the terms of that open source software license and not the License Agreement.
-
-3.6 You agree that the form and nature of the SDK that Google provides may change without prior notice to you and that future versions of the SDK may be incompatible with applications developed on previous versions of the SDK. You agree that Google may stop (permanently or temporarily) providing the SDK (or any features within the SDK) to you or to users generally at Google's sole discretion, without prior notice to you.
-
-3.7 Nothing in the License Agreement gives you a right to use any of Google's trade names, trademarks, service marks, logos, domain names, or other distinctive brand features.
-
-3.8 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the SDK.
-
-
-4. Use of the SDK by You
-
-4.1 Google agrees that it obtains no right, title or interest from you (or your licensors) under the License Agreement in or to any software applications that you develop using the SDK, including any intellectual property rights that subsist in those applications.
-
-4.2 You agree to use the SDK and write applications only for purposes that are permitted by (a) the License Agreement and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries).
-
-4.3 You agree that if you use the SDK to develop applications for general public users, you will protect the privacy and legal rights of those users. If the users provide you with user names, passwords, or other login information or personal information, you must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. If the user provides your application with Google Account information, your application may only use that information to access the user's Google Account when, and for the limited purposes for which, the user has given you permission to do so.
-
-4.4 You agree that you will not engage in any activity with the SDK, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of any third party including, but not limited to, Google or any mobile communications carrier.
-
-4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through Android and/or applications for Android, and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so.
-
-4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under the License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Google or any third party may suffer) of any such breach.
-
-5. Your Developer Credentials
-
-5.1 You agree that you are responsible for maintaining the confidentiality of any developer credentials that may be issued to you by Google or which you may choose yourself and that you will be solely responsible for all applications that are developed under your developer credentials.
-
-6. Privacy and Information
-
-6.1 In order to continually innovate and improve the SDK, Google may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in the SDK are being used and how they are being used. Before any of this information is collected, the SDK will notify you and seek your consent. If you withhold consent, the information will not be collected.
-
-6.2 The data collected is examined in the aggregate to improve the SDK and is maintained in accordance with Google's Privacy Policy.
-
-
-7. Third Party Applications
-
-7.1 If you use the SDK to run applications developed by a third party or that access data, content or resources provided by a third party, you agree that Google is not responsible for those applications, data, content, or resources. You understand that all data, content or resources which you may access through such third party applications are the sole responsibility of the person from which they originated and that Google is not liable for any loss or damage that you may experience as a result of the use or access of any of those third party applications, data, content, or resources.
-
-7.2 You should be aware the data, content, and resources presented to you through such a third party application may be protected by intellectual property rights which are owned by the providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on these data, content, or resources (either in whole or in part) unless you have been specifically given permission to do so by the relevant owners.
-
-7.3 You acknowledge that your use of such third party applications, data, content, or resources may be subject to separate terms between you and the relevant third party. In that case, the License Agreement does not affect your legal relationship with these third parties.
-
-
-8. Using Android APIs
-
-8.1 Google Data APIs
-
-8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be protected by intellectual property rights which are owned by Google or those parties that provide the data (or by other persons or companies on their behalf). Your use of any such API may be subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this data (either in whole or in part) unless allowed by the relevant Terms of Service.
-
-8.1.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree that you shall retrieve data only with the user's explicit consent and only when, and for the limited purposes for which, the user has given you permission to do so.
-
-
-9. Terminating the License Agreement
-
-9.1 The License Agreement will continue to apply until terminated by either you or Google as set out below.
-
-9.2 If you want to terminate the License Agreement, you may do so by ceasing your use of the SDK and any relevant developer credentials.
-
-9.3 Google may at any time, terminate the License Agreement with you if:
-(A) you have breached any provision of the License Agreement; or
-(B) Google is required to do so by law; or
-(C) the partner with whom Google offered certain parts of SDK (such as APIs) to you has terminated its relationship with Google or ceased to offer certain parts of the SDK to you; or
-(D) Google decides to no longer provide the SDK or certain parts of the SDK to users in the country in which you are resident or from which you use the service, or the provision of the SDK or certain SDK services to you by Google is, in Google's sole discretion, no longer commercially viable.
-
-9.4 When the License Agreement comes to an end, all of the legal rights, obligations and liabilities that you and Google have benefited from, been subject to (or which have accrued over time whilst the License Agreement has been in force) or which are expressed to continue indefinitely, shall be unaffected by this cessation, and the provisions of paragraph 14.7 shall continue to apply to such rights, obligations and liabilities indefinitely.
-
-
-10. DISCLAIMER OF WARRANTIES
-
-10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE SDK IS AT YOUR SOLE RISK AND THAT THE SDK IS PROVIDED &quot;AS IS&quot; AND &quot;AS AVAILABLE&quot; WITHOUT WARRANTY OF ANY KIND FROM GOOGLE.
-
-10.2 YOUR USE OF THE SDK AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE SDK IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE.
-
-10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-
-
-11. LIMITATION OF LIABILITY
-
-11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.
-
-
-12. Indemnification
-
-12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Google, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys fees) arising out of or accruing from (a) your use of the SDK, (b) any application you develop on the SDK that infringes any copyright, trademark, trade secret, trade dress, patent or other intellectual property right of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you with the License Agreement.
-
-
-13. Changes to the License Agreement
-
-13.1 Google may make changes to the License Agreement as it distributes new versions of the SDK. When these changes are made, Google will make a new version of the License Agreement available on the website where the SDK is made available.
-
-
-14. General Legal Terms
-
-14.1 The License Agreement constitutes the whole legal agreement between you and Google and governs your use of the SDK (excluding any services which Google may provide to you under a separate written agreement), and completely replaces any prior agreements between you and Google in relation to the SDK.
-
-14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in the License Agreement (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google's rights and that those rights or remedies will still be available to Google.
-
-14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of the License Agreement is invalid, then that provision will be removed from the License Agreement without affecting the rest of the License Agreement. The remaining provisions of the License Agreement will continue to be valid and enforceable.
-
-14.4 You acknowledge and agree that each member of the group of companies of which Google is the parent shall be third party beneficiaries to the License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of the License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to the License Agreement.
-
-14.5 EXPORT RESTRICTIONS. THE SDK IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE SDK. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.
-
-14.6 The rights granted in the License Agreement may not be assigned or transferred by either you or Google without the prior written approval of the other party. Neither you nor Google shall be permitted to delegate their responsibilities or obligations under the License Agreement without the prior written approval of the other party.
-
-14.7 The License Agreement, and your relationship with Google under the License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from the License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.
-
-
-November 20, 2015</sdk:license>
-	<sdk:license id="android-sdk-preview-license" type="text">To get started with the Android SDK Preview, you must agree to the following terms and conditions.
-As described below, please note that this is a preview version of the Android SDK, subject to change, that you use at your own risk.  The Android SDK Preview is not a stable release, and may contain errors and defects that can result in serious damage to your computer systems, devices and data.
-
-This is the Android SDK Preview License Agreement (the &quot;License Agreement&quot;).
-
-1. Introduction
-
-1.1 The Android SDK Preview (referred to in the License Agreement as the “Preview” and specifically including the Android system files, packaged APIs, and Preview library files, if and when they are made available) is licensed to you subject to the terms of the License Agreement. The License Agreement forms a legally binding contract between you and Google in relation to your use of the Preview.
-
-1.2 &quot;Android&quot; means the Android software stack for devices, as made available under the Android Open Source Project, which is located at the following URL: http://source.android.com/, as updated from time to time.
-
-1.3 &quot;Google&quot; means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States.
-
-2. Accepting the License Agreement
-
-2.1 In order to use the Preview, you must first agree to the License Agreement. You may not use the Preview if you do not accept the License Agreement.
-
-2.2 By clicking to accept and/or using the Preview, you hereby agree to the terms of the License Agreement.
-
-2.3 You may not use the Preview and may not accept the License Agreement if you are a person barred from receiving the Preview under the laws of the United States or other countries including the country in which you are resident or from which you use the Preview.
-
-2.4 If you will use the Preview internally within your company or organization you agree to be bound by the License Agreement on behalf of your employer or other entity, and you represent and warrant that you have full legal authority to bind your employer or such entity to the License Agreement. If you do not have the requisite authority, you may not accept the License Agreement or use the Preview on behalf of your employer or other entity.
-
-3. Preview License from Google
-
-3.1 Subject to the terms of the License Agreement, Google grants you a royalty-free, non-assignable, non-exclusive, non-sublicensable, limited, revocable license to use the Preview, personally or internally within your company or organization, solely to develop applications to run on the Android platform.
-
-3.2 You agree that Google or third parties owns all legal right, title and interest in and to the Preview, including any Intellectual Property Rights that subsist in the Preview. &quot;Intellectual Property Rights&quot; means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Google reserves all rights not expressly granted to you.
-
-3.3 You may not use the Preview for any purpose not expressly permitted by the License Agreement. Except to the extent required by applicable third party licenses, you may not: (a) copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the Preview or any part of the Preview; or (b) load any part of the Preview onto a mobile handset or any other hardware device except a personal computer, combine any part of the Preview with other software, or distribute any software or device incorporating a part of the Preview.
-
-3.4 You agree that you will not take any actions that may cause or result in the fragmentation of Android, including but not limited to distributing, participating in the creation of, or promoting in any way a software development kit derived from the Preview.
-
-3.5 Use, reproduction and distribution of components of the Preview licensed under an open source software license are governed solely by the terms of that open source software license and not the License Agreement. You agree to remain a licensee in good standing in regard to such open source software licenses under all the rights granted and to refrain from any actions that may terminate, suspend, or breach such rights.
-
-3.6 You agree that the form and nature of the Preview that Google provides may change without prior notice to you and that future versions of the Preview may be incompatible with applications developed on previous versions of the Preview. You agree that Google may stop (permanently or temporarily) providing the Preview (or any features within the Preview) to you or to users generally at Google's sole discretion, without prior notice to you.
-
-3.7 Nothing in the License Agreement gives you a right to use any of Google's trade names, trademarks, service marks, logos, domain names, or other distinctive brand features.
-
-3.8 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the Preview.
-
-4. Use of the Preview by You
-
-4.1 Google agrees that nothing in the License Agreement gives Google any right, title or interest from you (or your licensors) under the License Agreement in or to any software applications that you develop using the Preview, including any intellectual property rights that subsist in those applications.
-
-4.2 You agree to use the Preview and write applications only for purposes that are permitted by (a) the License Agreement, and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries).
-
-4.3 You agree that if you use the Preview to develop applications, you will protect the privacy and legal rights of users. If users provide you with user names, passwords, or other login information or personal information, you must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. If users provide you with Google Account information, your application may only use that information to access the user's Google Account when, and for the limited purposes for which, each user has given you permission to do so.
-
-4.4 You agree that you will not engage in any activity with the Preview, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of Google or any third party.
-
-4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through Android and/or applications for Android, and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so.
-
-4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under the License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Google or any third party may suffer) of any such breach.
-
-4.7 The Preview is in development, and your testing and feedback are an important part of the development process. By using the Preview, you acknowledge that implementation of some features are still under development and that you should not rely on the Preview having the full functionality of a stable release. You agree not to publicly distribute or ship any application using this Preview as this Preview will no longer be supported after the official Android SDK is released.
-
-5. Your Developer Credentials
-
-5.1 You agree that you are responsible for maintaining the confidentiality of any developer credentials that may be issued to you by Google or which you may choose yourself and that you will be solely responsible for all applications that are developed under your developer credentials.
-
-6. Privacy and Information
-
-6.1 In order to continually innovate and improve the Preview, Google may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in the Preview are being used and how they are being used. Before any of this information is collected, the Preview will notify you and seek your consent. If you withhold consent, the information will not be collected.
-
-6.2 The data collected is examined in the aggregate to improve the Preview and is maintained in accordance with Google's Privacy Policy located at http://www.google.com/policies/privacy/.
-
-7. Third Party Applications
-
-7.1 If you use the Preview to run applications developed by a third party or that access data, content or resources provided by a third party, you agree that Google is not responsible for those applications, data, content, or resources. You understand that all data, content or resources which you may access through such third party applications are the sole responsibility of the person from which they originated and that Google is not liable for any loss or damage that you may experience as a result of the use or access of any of those third party applications, data, content, or resources.
-
-7.2 You should be aware the data, content, and resources presented to you through such a third party application may be protected by intellectual property rights which are owned by the providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on these data, content, or resources (either in whole or in part) unless you have been specifically given permission to do so by the relevant owners.
-
-7.3 You acknowledge that your use of such third party applications, data, content, or resources may be subject to separate terms between you and the relevant third party.
-
-8. Using Google APIs
-
-8.1 Google APIs
-
-8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be protected by intellectual property rights which are owned by Google or those parties that provide the data (or by other persons or companies on their behalf). Your use of any such API may be subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this data (either in whole or in part) unless allowed by the relevant Terms of Service.
-
-8.1.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree that you shall retrieve data only with the user's explicit consent and only when, and for the limited purposes for which, the user has given you permission to do so.
-
-9. Terminating the License Agreement
-
-9.1 the License Agreement will continue to apply until terminated by either you or Google as set out below.
-
-9.2 If you want to terminate the License Agreement, you may do so by ceasing your use of the Preview and any relevant developer credentials.
-
-9.3 Google may at any time, terminate the License Agreement, with or without cause, upon notice to you.
-
-9.4 The License Agreement will automatically terminate without notice or other action upon the earlier of:
-(A) when Google ceases to provide the Preview or certain parts of the Preview to users in the country in which you are resident or from which you use the service; and
-(B) Google issues a final release version of the Android SDK.
-
-9.5 When the License Agreement is terminated, the license granted to you in the License Agreement will terminate, you will immediately cease all use of the Preview, and the provisions of paragraphs 10, 11, 12 and 14 shall survive indefinitely.
-
-10. DISCLAIMERS
-
-10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE PREVIEW IS AT YOUR SOLE RISK AND THAT THE PREVIEW IS PROVIDED &quot;AS IS&quot; AND &quot;AS AVAILABLE&quot; WITHOUT WARRANTY OF ANY KIND FROM GOOGLE.
-
-10.2 YOUR USE OF THE PREVIEW AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE PREVIEW IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE. WITHOUT LIMITING THE FOREGOING, YOU UNDERSTAND THAT THE PREVIEW IS NOT A STABLE RELEASE AND MAY CONTAIN ERRORS, DEFECTS AND SECURITY VULNERABILITIES THAT CAN RESULT IN SIGNIFICANT DAMAGE, INCLUDING THE COMPLETE, IRRECOVERABLE LOSS OF USE OF YOUR COMPUTER SYSTEM OR OTHER DEVICE.
-
-10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-
-11. LIMITATION OF LIABILITY
-
-11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.
-
-12. Indemnification
-
-12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Google, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys’ fees) arising out of or accruing from (a) your use of the Preview, (b) any application you develop on the Preview that infringes any Intellectual Property Rights of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you of the License Agreement.
-
-13. Changes to the License Agreement
-
-13.1 Google may make changes to the License Agreement as it distributes new versions of the Preview. When these changes are made, Google will make a new version of the License Agreement available on the website where the Preview is made available.
-
-14. General Legal Terms
-
-14.1 the License Agreement constitutes the whole legal agreement between you and Google and governs your use of the Preview (excluding any services which Google may provide to you under a separate written agreement), and completely replaces any prior agreements between you and Google in relation to the Preview.
-
-14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in the License Agreement (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google's rights and that those rights or remedies will still be available to Google.
-
-14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of the License Agreement is invalid, then that provision will be removed from the License Agreement without affecting the rest of the License Agreement. The remaining provisions of the License Agreement will continue to be valid and enforceable.
-
-14.4 You acknowledge and agree that each member of the group of companies of which Google is the parent shall be third party beneficiaries to the License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of the License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to the License Agreement.
-
-14.5 EXPORT RESTRICTIONS. THE PREVIEW IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE PREVIEW. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.
-
-14.6 The License Agreement may not be assigned or transferred by you without the prior written approval of Google, and any attempted assignment without such approval will be void. You shall not delegate your responsibilities or obligations under the License Agreement without the prior written approval of Google.
-
-14.7 The License Agreement, and your relationship with Google under the License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from the License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.
-
-June 2014.</sdk:license>
-	<sdk:ndk>
-		<!--Generated from bid:5063045, branch:aosp-ndk-release-r18-->
-		<sdk:description>NDK</sdk:description>
-		<sdk:revision>18</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Thu Oct 11 14:06:10 2018.-->
-				<sdk:size>542911996</sdk:size>
-				<sdk:checksum type="sha1">98cb9909aa8c2dab32db188bbdc3ac6207e09440</sdk:checksum>
-				<sdk:url>android-ndk-r18b-darwin-x86_64.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-				<sdk:host-bits>64</sdk:host-bits>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Thu Oct 11 14:06:26 2018.-->
-				<sdk:size>557038702</sdk:size>
-				<sdk:checksum type="sha1">500679655da3a86aecf67007e8ab230ea9b4dd7b</sdk:checksum>
-				<sdk:url>android-ndk-r18b-linux-x86_64.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-				<sdk:host-bits>64</sdk:host-bits>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Thu Oct 11 14:05:37 2018.-->
-				<sdk:size>504605336</sdk:size>
-				<sdk:checksum type="sha1">4b8b6a4edc0fa967b429c1d6d25adf69acc28803</sdk:checksum>
-				<sdk:url>android-ndk-r18b-windows-x86.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-				<sdk:host-bits>32</sdk:host-bits>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Thu Oct 11 14:05:53 2018.-->
-				<sdk:size>522489470</sdk:size>
-				<sdk:checksum type="sha1">6b6d4138aaaad7166679fdfa4780e177f95cee6f</sdk:checksum>
-				<sdk:url>android-ndk-r18b-windows-x86_64.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-				<sdk:host-bits>64</sdk:host-bits>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:ndk>
-	<sdk:platform>
-		<!--Generated from bid:4913185, branch:pi-sdk-release-->
-		<sdk:version>9</sdk:version>
-		<sdk:api-level>28</sdk:api-level>
-		<sdk:description>Android SDK Platform 28</sdk:description>
-		<sdk:revision>6</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Wed Jul 25 20:19:20 2018.-->
-				<sdk:size>75565084</sdk:size>
-				<sdk:checksum type="sha1">9a4e52b1d55bd2e24216b150aafae2503d3efba6</sdk:checksum>
-				<sdk:url>platform-28_r06.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:min-tools-rev>
-			<sdk:major>22</sdk:major>
-		</sdk:min-tools-rev>
-		<sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
-		<sdk:layoutlib>
-			<sdk:api>15</sdk:api>
-			<sdk:revision>1</sdk:revision>
-		</sdk:layoutlib>
-	</sdk:platform>
-	<sdk:platform>
-		<!--Generated from bid:4774931, branch:git_oc-mr1-sdk-release-->
-		<sdk:version>8.1.0</sdk:version>
-		<sdk:api-level>27</sdk:api-level>
-		<sdk:description>Android SDK Platform 27</sdk:description>
-		<sdk:revision>3</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Fri May 11 15:44:04 2018.-->
-				<sdk:size>65635348</sdk:size>
-				<sdk:checksum type="sha1">35f747e7e70b2d16e0e4246876be28d15ea1c353</sdk:checksum>
-				<sdk:url>platform-27_r03.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:min-tools-rev>
-			<sdk:major>22</sdk:major>
-		</sdk:min-tools-rev>
-		<sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
-		<sdk:layoutlib>
-			<sdk:api>15</sdk:api>
-			<sdk:revision>1</sdk:revision>
-		</sdk:layoutlib>
-	</sdk:platform>
-	<sdk:platform>
-		<!--Generated from bid:4187382, branch:git_oc-release-->
-		<sdk:version>8.0.0</sdk:version>
-		<sdk:api-level>26</sdk:api-level>
-		<sdk:description>Android SDK Platform 26</sdk:description>
-		<sdk:revision>2</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Wed May 23 00:35:53 2018.-->
-				<sdk:size>63623734</sdk:size>
-				<sdk:checksum type="sha1">e4ae5d7aa557a3c827135838ee400da8443ac4ef</sdk:checksum>
-				<sdk:url>platform-26_r02.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:min-tools-rev>
-			<sdk:major>22</sdk:major>
-		</sdk:min-tools-rev>
-		<sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
-		<sdk:layoutlib>
-			<sdk:api>15</sdk:api>
-			<sdk:revision>1</sdk:revision>
-		</sdk:layoutlib>
-	</sdk:platform>
-	<sdk:platform>
-		<!--Generated from bid:3544217, branch:git_nyc-mr1-sdk-dev-->
-		<sdk:version>7.1.1</sdk:version>
-		<sdk:api-level>25</sdk:api-level>
-		<sdk:description>Android SDK Platform 25</sdk:description>
-		<sdk:revision>3</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sat May 26 06:47:38 2018.-->
-				<sdk:size>85424763</sdk:size>
-				<sdk:checksum type="sha1">00c2c5765e8988504be10a1eb66ed71fcdbd7fe8</sdk:checksum>
-				<sdk:url>platform-25_r03.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:min-tools-rev>
-			<sdk:major>22</sdk:major>
-		</sdk:min-tools-rev>
-		<sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
-		<sdk:layoutlib>
-			<sdk:api>16</sdk:api>
-			<sdk:revision>2</sdk:revision>
-		</sdk:layoutlib>
-	</sdk:platform>
-	<sdk:platform>
-		<!--Generated from bid:3209611, branch:git_nyc-sdk-dev-->
-		<sdk:version>7.0</sdk:version>
-		<sdk:api-level>24</sdk:api-level>
-		<sdk:description>Android SDK Platform 24</sdk:description>
-		<sdk:revision>2</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Tue Jun  5 15:00:21 2018.-->
-				<sdk:size>82648154</sdk:size>
-				<sdk:checksum type="sha1">8912da3d4bfe7a9f28f0e5ce92d3a8dc96342aee</sdk:checksum>
-				<sdk:url>platform-24_r02.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:min-tools-rev>
-			<sdk:major>22</sdk:major>
-		</sdk:min-tools-rev>
-		<sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
-		<sdk:layoutlib>
-			<sdk:api>16</sdk:api>
-			<sdk:revision>2</sdk:revision>
-		</sdk:layoutlib>
-	</sdk:platform>
-	<sdk:platform>
-		<!--Generated from bid:2704002, branch:git_mnc-sdk-release-->
-		<sdk:version>6.0</sdk:version>
-		<sdk:api-level>23</sdk:api-level>
-		<sdk:description>Android SDK Platform 23</sdk:description>
-		<sdk:revision>3</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Mon May 21 15:53:43 2018.-->
-				<sdk:size>70433421</sdk:size>
-				<sdk:checksum type="sha1">027fede3de6aa1649115bbd0bffff30ccd51c9a0</sdk:checksum>
-				<sdk:url>platform-23_r03.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:min-tools-rev>
-			<sdk:major>22</sdk:major>
-		</sdk:min-tools-rev>
-		<sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
-		<sdk:layoutlib>
-			<sdk:api>16</sdk:api>
-			<sdk:revision>3</sdk:revision>
-		</sdk:layoutlib>
-	</sdk:platform>
-	<sdk:platform>
-		<!--Generated from bid:1819727, branch:git_lmp-mr1-sdk-release-->
-		<sdk:version>5.1.1</sdk:version>
-		<sdk:api-level>22</sdk:api-level>
-		<sdk:description>Android SDK Platform 22</sdk:description>
-		<sdk:revision>2</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Mon May 21 03:54:34 2018.-->
-				<sdk:size>66852371</sdk:size>
-				<sdk:checksum type="sha1">5d1bd10fea962b216a0dece1247070164760a9fc</sdk:checksum>
-				<sdk:url>android-22_r02.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:min-tools-rev>
-			<sdk:major>22</sdk:major>
-		</sdk:min-tools-rev>
-		<sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
-		<sdk:layoutlib>
-			<sdk:api>14</sdk:api>
-			<sdk:revision>2</sdk:revision>
-		</sdk:layoutlib>
-	</sdk:platform>
-	<sdk:platform>
-		<!--Generated from bid:1624448, branch:git_lmp-dev-->
-		<sdk:version>5.0.1</sdk:version>
-		<sdk:api-level>21</sdk:api-level>
-		<sdk:description>Android SDK Platform 21</sdk:description>
-		<sdk:revision>2</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Tue Jun 19 02:28:04 2018.-->
-				<sdk:size>65897960</sdk:size>
-				<sdk:checksum type="sha1">53536556059bb29ae82f414fd2e14bc335a4eb4c</sdk:checksum>
-				<sdk:url>android-21_r02.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:min-tools-rev>
-			<sdk:major>22</sdk:major>
-		</sdk:min-tools-rev>
-		<sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
-		<sdk:layoutlib>
-			<sdk:api>12</sdk:api>
-			<sdk:revision>2</sdk:revision>
-		</sdk:layoutlib>
-	</sdk:platform>
-	<sdk:platform>
-		<!--Generated from bid:1537038, branch:git_klp-modular-dev-->
-		<sdk:version>4.4W.2</sdk:version>
-		<sdk:api-level>20</sdk:api-level>
-		<sdk:description>Android SDK Platform 20</sdk:description>
-		<sdk:revision>2</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sun Jun  3 18:11:51 2018.-->
-				<sdk:size>63567784</sdk:size>
-				<sdk:checksum type="sha1">a9251f8a3f313ab05834a07a963000927637e01d</sdk:checksum>
-				<sdk:url>android-20_r02.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:min-tools-rev>
-			<sdk:major>22</sdk:major>
-		</sdk:min-tools-rev>
-		<sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
-		<sdk:layoutlib>
-			<sdk:api>12</sdk:api>
-			<sdk:revision>1</sdk:revision>
-		</sdk:layoutlib>
-	</sdk:platform>
-	<sdk:platform>
-		<!--Generated from bid:1456859, branch:git_klp-sdk-release-->
-		<sdk:version>4.4.2</sdk:version>
-		<sdk:api-level>19</sdk:api-level>
-		<sdk:description>Android SDK Platform 19</sdk:description>
-		<sdk:revision>4</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Fri May 25 15:40:05 2018.-->
-				<sdk:size>63871092</sdk:size>
-				<sdk:checksum type="sha1">2ff20d89e68f2f5390981342e009db5a2d456aaa</sdk:checksum>
-				<sdk:url>android-19_r04.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:min-tools-rev>
-			<sdk:major>22</sdk:major>
-		</sdk:min-tools-rev>
-		<sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
-		<sdk:layoutlib>
-			<sdk:api>12</sdk:api>
-			<sdk:revision>1</sdk:revision>
-		</sdk:layoutlib>
-	</sdk:platform>
-	<sdk:platform>
-		<!--Generated from bid:1425645, branch:git_jb-mr2-dev-->
-		<sdk:version>4.3.1</sdk:version>
-		<sdk:api-level>18</sdk:api-level>
-		<sdk:description>Android SDK Platform 18</sdk:description>
-		<sdk:revision>3</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Fri May 18 13:24:37 2018.-->
-				<sdk:size>57771739</sdk:size>
-				<sdk:checksum type="sha1">e6b09b3505754cbbeb4a5622008b907262ee91cb</sdk:checksum>
-				<sdk:url>android-18_r03.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:min-tools-rev>
-			<sdk:major>21</sdk:major>
-		</sdk:min-tools-rev>
-		<sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
-		<sdk:layoutlib>
-			<sdk:api>12</sdk:api>
-			<sdk:revision>1</sdk:revision>
-		</sdk:layoutlib>
-	</sdk:platform>
-	<sdk:platform>
-		<!--Generated from bid:1425461, branch:git_jb-mr1.1-dev-->
-		<sdk:version>4.2.2</sdk:version>
-		<sdk:api-level>17</sdk:api-level>
-		<sdk:description>Android SDK Platform 17</sdk:description>
-		<sdk:revision>3</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sat May 26 21:15:56 2018.-->
-				<sdk:size>57030216</sdk:size>
-				<sdk:checksum type="sha1">dbe14101c06e6cdb34e300393e64e64f8c92168a</sdk:checksum>
-				<sdk:url>android-17_r03.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:min-tools-rev>
-			<sdk:major>21</sdk:major>
-		</sdk:min-tools-rev>
-		<sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
-		<sdk:layoutlib>
-			<sdk:api>12</sdk:api>
-			<sdk:revision>1</sdk:revision>
-		</sdk:layoutlib>
-	</sdk:platform>
-	<sdk:platform>
-		<!--Generated from bid:1425332, branch:git_jb-dev-->
-		<sdk:version>4.1.2</sdk:version>
-		<sdk:api-level>16</sdk:api-level>
-		<sdk:description>Android SDK Platform 16</sdk:description>
-		<sdk:revision>5</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Wed May 23 08:20:21 2018.-->
-				<sdk:size>48128695</sdk:size>
-				<sdk:checksum type="sha1">12a5ce6235a76bc30f62c26bda1b680e336abd07</sdk:checksum>
-				<sdk:url>android-16_r05.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:min-tools-rev>
-			<sdk:major>21</sdk:major>
-		</sdk:min-tools-rev>
-		<sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
-		<sdk:layoutlib>
-			<sdk:api>12</sdk:api>
-			<sdk:revision>1</sdk:revision>
-		</sdk:layoutlib>
-	</sdk:platform>
-	<sdk:platform>
-		<!--Generated from bid:1406430, branch:git_ics-mr1-->
-		<sdk:version>4.0.3</sdk:version>
-		<sdk:api-level>15</sdk:api-level>
-		<sdk:description>Android SDK Platform 15</sdk:description>
-		<sdk:revision>5</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sat Jun  2 14:02:31 2018.-->
-				<sdk:size>44533475</sdk:size>
-				<sdk:checksum type="sha1">69ab4c443b37184b2883af1fd38cc20cbeffd0f3</sdk:checksum>
-				<sdk:url>android-15_r05.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:min-tools-rev>
-			<sdk:major>21</sdk:major>
-		</sdk:min-tools-rev>
-		<sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
-		<sdk:layoutlib>
-			<sdk:api>12</sdk:api>
-			<sdk:revision>1</sdk:revision>
-		</sdk:layoutlib>
-	</sdk:platform>
-	<sdk:platform>
-		<!--Generated from bid:1406408, branch:git_ics-mr0-->
-		<sdk:version>4.0</sdk:version>
-		<sdk:api-level>14</sdk:api-level>
-		<sdk:description>Android SDK Platform 14</sdk:description>
-		<sdk:revision>4</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Mon Jun  4 10:33:42 2018.-->
-				<sdk:size>46038082</sdk:size>
-				<sdk:checksum type="sha1">d4f1d8fbca25225b5f0e7a0adf0d39c3d6e60b3c</sdk:checksum>
-				<sdk:url>android-14_r04.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
-		<sdk:layoutlib>
-			<sdk:api>12</sdk:api>
-			<sdk:revision>1</sdk:revision>
-		</sdk:layoutlib>
-	</sdk:platform>
-	<sdk:platform>
-		<!--Generated from bid:140714, branch:honeycomb-mr2-release-->
-		<sdk:version>3.2</sdk:version>
-		<sdk:api-level>13</sdk:api-level>
-		<sdk:description>Android SDK Platform 13</sdk:description>
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sat Jun  2 07:27:36 2018.-->
-				<sdk:size>108426536</sdk:size>
-				<sdk:checksum type="sha1">6189a500a8c44ae73a439604363de93591163cd9</sdk:checksum>
-				<sdk:url>android-3.2_r01.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:min-tools-rev>
-			<sdk:major>12</sdk:major>
-		</sdk:min-tools-rev>
-		<sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
-		<sdk:layoutlib>
-			<sdk:api>4</sdk:api>
-		</sdk:layoutlib>
-	</sdk:platform>
-	<sdk:platform>
-		<!--Generated from bid:123685, branch:honeycomb-mr1-->
-		<sdk:version>3.1</sdk:version>
-		<sdk:api-level>12</sdk:api-level>
-		<sdk:description>Android SDK Platform 12</sdk:description>
-		<sdk:revision>3</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Thu May 24 23:42:26 2018.-->
-				<sdk:size>106472351</sdk:size>
-				<sdk:checksum type="sha1">4a50a6679cd95bb68bb5fc032e754cd7c5e2b1bf</sdk:checksum>
-				<sdk:url>android-3.1_r03.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:min-tools-rev>
-			<sdk:major>11</sdk:major>
-		</sdk:min-tools-rev>
-		<sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
-		<sdk:layoutlib>
-			<sdk:api>4</sdk:api>
-		</sdk:layoutlib>
-	</sdk:platform>
-	<sdk:platform>
-		<!--Generated from bid:104254, branch:honeycomb-->
-		<sdk:version>3.0</sdk:version>
-		<sdk:api-level>11</sdk:api-level>
-		<sdk:description>Android SDK Platform 11</sdk:description>
-		<sdk:revision>2</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sun Jun 17 05:58:58 2018.-->
-				<sdk:size>104513908</sdk:size>
-				<sdk:checksum type="sha1">2c7d4bd13f276e76f6bbd87315fe27aba351dd37</sdk:checksum>
-				<sdk:url>android-3.0_r02.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:min-tools-rev>
-			<sdk:major>10</sdk:major>
-		</sdk:min-tools-rev>
-		<sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
-		<sdk:layoutlib>
-			<sdk:api>4</sdk:api>
-		</sdk:layoutlib>
-	</sdk:platform>
-	<sdk:platform>
-		<!--Generated from bid:101070, branch:gingerbread-release-->
-		<sdk:version>2.3.3</sdk:version>
-		<sdk:api-level>10</sdk:api-level>
-		<sdk:description>Android SDK Platform 10</sdk:description>
-		<sdk:revision>2</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Wed Jun 13 04:35:13 2018.-->
-				<sdk:size>85470907</sdk:size>
-				<sdk:checksum type="sha1">887e37783ec32f541ea33c2c649dda648e8e6fb3</sdk:checksum>
-				<sdk:url>android-2.3.3_r02.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:min-tools-rev>
-			<sdk:major>4</sdk:major>
-		</sdk:min-tools-rev>
-		<sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
-		<sdk:layoutlib>
-			<sdk:api>4</sdk:api>
-		</sdk:layoutlib>
-	</sdk:platform>
-	<sdk:platform>
-		<!--Generated from bid:93351, branch:gingerbread-sdk-release-->
-		<sdk:version>2.3.1</sdk:version>
-		<sdk:api-level>9</sdk:api-level>
-		<sdk:description>Android SDK Platform 9</sdk:description>
-		<sdk:revision>2</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Tue Jun 19 00:10:28 2018.-->
-				<sdk:size>78732563</sdk:size>
-				<sdk:checksum type="sha1">209f8a7a8b2cb093fce858b8b55fed3ba5206773</sdk:checksum>
-				<sdk:url>android-2.3.1_r02.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:min-tools-rev>
-			<sdk:major>4</sdk:major>
-		</sdk:min-tools-rev>
-		<sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
-		<sdk:layoutlib>
-			<sdk:api>4</sdk:api>
-		</sdk:layoutlib>
-	</sdk:platform>
-	<sdk:platform>
-		<!--Generated from bid:43546, branch:froyo-release-->
-		<sdk:version>2.2</sdk:version>
-		<sdk:api-level>8</sdk:api-level>
-		<sdk:description>Android SDK Platform 8</sdk:description>
-		<sdk:revision>3</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Mon Jun 11 13:26:30 2018.-->
-				<sdk:size>74652366</sdk:size>
-				<sdk:checksum type="sha1">231262c63eefdff8fd0386e9ccfefeb27a8f9202</sdk:checksum>
-				<sdk:url>android-2.2_r03.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:min-tools-rev>
-			<sdk:major>4</sdk:major>
-		</sdk:min-tools-rev>
-		<sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
-		<sdk:layoutlib>
-			<sdk:api>4</sdk:api>
-		</sdk:layoutlib>
-	</sdk:platform>
-	<sdk:platform>
-		<!--Generated from bid:35983, branch:eclair-->
-		<sdk:version>2.1</sdk:version>
-		<sdk:api-level>7</sdk:api-level>
-		<sdk:description>Android SDK Platform 7</sdk:description>
-		<sdk:revision>3</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Fri May 25 18:43:17 2018.-->
-				<sdk:size>70142829</sdk:size>
-				<sdk:checksum type="sha1">5ce51b023ac19f8738500b1007a1da5de2349a1e</sdk:checksum>
-				<sdk:url>android-2.1_r03.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:min-tools-rev>
-			<sdk:major>8</sdk:major>
-		</sdk:min-tools-rev>
-		<sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
-		<sdk:layoutlib>
-			<sdk:api>4</sdk:api>
-		</sdk:layoutlib>
-	</sdk:platform>
-	<sdk:platform>
-		<!--Generated from bid:20723, branch:unknown-->
-		<sdk:version>2.0.1</sdk:version>
-		<sdk:api-level>6</sdk:api-level>
-		<sdk:description>Android SDK Platform 6</sdk:description>
-		<sdk:obsolete/>
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sun May 27 03:48:57 2018.-->
-				<sdk:size>79192618</sdk:size>
-				<sdk:checksum type="sha1">ce2c971dce352aa28af06bda92a070116aa5ae1a</sdk:checksum>
-				<sdk:url>android-2.0.1_r01-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Fri Jun 15 10:07:34 2018.-->
-				<sdk:size>79035527</sdk:size>
-				<sdk:checksum type="sha1">c3096f80d75a6fc8cb38ef8a18aec920e53d42c0</sdk:checksum>
-				<sdk:url>android-2.0.1_r01-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Fri Jun  8 14:23:45 2018.-->
-				<sdk:size>80385601</sdk:size>
-				<sdk:checksum type="sha1">255781ebe4509d9707d0e77edda2815e2bc216e6</sdk:checksum>
-				<sdk:url>android-2.0.1_r01-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:min-tools-rev>
-			<sdk:major>4</sdk:major>
-		</sdk:min-tools-rev>
-		<sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
-		<sdk:layoutlib>
-			<sdk:api>4</sdk:api>
-		</sdk:layoutlib>
-	</sdk:platform>
-	<sdk:platform>
-		<!--Generated from bid:17704, branch:unknown-->
-		<sdk:version>2.0</sdk:version>
-		<sdk:api-level>5</sdk:api-level>
-		<sdk:description>Android SDK Platform 5</sdk:description>
-		<sdk:obsolete/>
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sat May 19 10:03:45 2018.-->
-				<sdk:size>75095268</sdk:size>
-				<sdk:checksum type="sha1">be9be6a99ca32875c96ec7f91160ca9fce7e3c7d</sdk:checksum>
-				<sdk:url>android-2.0_r01-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Sat May 19 16:50:28 2018.-->
-				<sdk:size>74956356</sdk:size>
-				<sdk:checksum type="sha1">2a866d0870dbba18e0503cd41e5fae988a21b314</sdk:checksum>
-				<sdk:url>android-2.0_r01-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Thu Jun 14 00:45:58 2018.-->
-				<sdk:size>76288040</sdk:size>
-				<sdk:checksum type="sha1">aeb623217ff88b87216d6eb7dbc846ed53f68f57</sdk:checksum>
-				<sdk:url>android-2.0_r01-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:min-tools-rev>
-			<sdk:major>3</sdk:major>
-		</sdk:min-tools-rev>
-		<sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
-		<sdk:layoutlib>
-			<sdk:api>4</sdk:api>
-		</sdk:layoutlib>
-	</sdk:platform>
-	<sdk:platform>
-		<!--Generated from bid:3, branch:unknown-->
-		<sdk:version>1.6</sdk:version>
-		<sdk:api-level>4</sdk:api-level>
-		<sdk:description>Android SDK Platform 4</sdk:description>
-		<sdk:obsolete/>
-		<sdk:revision>3</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sat May 26 23:29:51 2018.-->
-				<sdk:size>63454485</sdk:size>
-				<sdk:checksum type="sha1">483ed088e45bbdf3444baaf9250c8b02e5383cb0</sdk:checksum>
-				<sdk:url>android-1.6_r03-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Sat Jun  2 07:57:24 2018.-->
-				<sdk:size>62418496</sdk:size>
-				<sdk:checksum type="sha1">bdafad44f5df9f127979bdb21a1fdd87ee3cd625</sdk:checksum>
-				<sdk:url>android-1.6_r03-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Mon Jun  4 04:34:06 2018.-->
-				<sdk:size>64654625</sdk:size>
-				<sdk:checksum type="sha1">ce0b5e4ffaf12ca4fd07c2da71a8a1ab4a03dc22</sdk:checksum>
-				<sdk:url>android-1.6_r03-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:min-tools-rev>
-			<sdk:major>6</sdk:major>
-		</sdk:min-tools-rev>
-		<sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
-		<sdk:layoutlib>
-			<sdk:api>4</sdk:api>
-		</sdk:layoutlib>
-	</sdk:platform>
-	<sdk:platform>
-		<!--Generated from bid:2, branch:unknown-->
-		<sdk:version>1.5</sdk:version>
-		<sdk:api-level>3</sdk:api-level>
-		<sdk:description>Android SDK Platform 3</sdk:description>
-		<sdk:obsolete/>
-		<sdk:revision>4</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Thu May 17 22:23:16 2018.-->
-				<sdk:size>53348669</sdk:size>
-				<sdk:checksum type="sha1">5c134b7df5f4b8bd5b61ba93bdaebada8fa3468c</sdk:checksum>
-				<sdk:url>android-1.5_r04-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Mon Jun  4 15:31:36 2018.-->
-				<sdk:size>52440607</sdk:size>
-				<sdk:checksum type="sha1">d3a67c2369afa48b6c3c7624de5031c262018d1e</sdk:checksum>
-				<sdk:url>android-1.5_r04-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Thu Jun 14 02:58:08 2018.-->
-				<sdk:size>54624370</sdk:size>
-				<sdk:checksum type="sha1">5bb106d2e40d481edd337b0833093843e15fe49a</sdk:checksum>
-				<sdk:url>android-1.5_r04-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:min-tools-rev>
-			<sdk:major>6</sdk:major>
-		</sdk:min-tools-rev>
-		<sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
-		<sdk:layoutlib>
-			<sdk:api>4</sdk:api>
-		</sdk:layoutlib>
-	</sdk:platform>
-	<sdk:platform>
-		<!--Generated from bid:1, branch:unknown-->
-		<sdk:version>1.1</sdk:version>
-		<sdk:api-level>2</sdk:api-level>
-		<sdk:description>Android SDK Platform 2</sdk:description>
-		<sdk:obsolete/>
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sun May 20 23:48:42 2018.-->
-				<sdk:size>45476658</sdk:size>
-				<sdk:checksum type="sha1">c054d25c9b4c6251fa49c2f9c54336998679d3fe</sdk:checksum>
-				<sdk:url>android-1.1_r1-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Sat May 19 16:29:20 2018.-->
-				<sdk:size>45584305</sdk:size>
-				<sdk:checksum type="sha1">e21dbcff45b7356657449ebb3c7e941be2bb5ebe</sdk:checksum>
-				<sdk:url>android-1.1_r1-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Fri Jun  8 18:57:19 2018.-->
-				<sdk:size>46828615</sdk:size>
-				<sdk:checksum type="sha1">a4060f29ed39fc929c302836d488998c53c3002e</sdk:checksum>
-				<sdk:url>android-1.1_r1-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:min-tools-rev>
-			<sdk:major>6</sdk:major>
-		</sdk:min-tools-rev>
-		<sdk:desc-url>http://developer.android.com/sdk/</sdk:desc-url>
-		<sdk:layoutlib>
-			<sdk:api>4</sdk:api>
-		</sdk:layoutlib>
-	</sdk:platform>
-	<sdk:source>
-		<!--Generated from bid:4898911, branch:git_pi-release-->
-		<sdk:api-level>28</sdk:api-level>
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Wed Aug  8 15:54:23 2018.-->
-				<sdk:size>42552241</sdk:size>
-				<sdk:checksum type="sha1">5610e0c24235ee3fa343c899ddd551be30315255</sdk:checksum>
-				<sdk:url>sources-28_r01.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:source>
-	<sdk:source>
-		<!--Generated from bid:4402310, branch:git_oc-mr1-release-->
-		<sdk:api-level>27</sdk:api-level>
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Fri Jun  8 01:46:30 2018.-->
-				<sdk:size>36997618</sdk:size>
-				<sdk:checksum type="sha1">7b714670561d08f54751af42aca929867b806596</sdk:checksum>
-				<sdk:url>sources-27_r01.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:source>
-	<sdk:source>
-		<!--Generated from bid:4187382, branch:git_oc-release-->
-		<sdk:api-level>26</sdk:api-level>
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Fri Jun  8 01:15:38 2018.-->
-				<sdk:size>35138547</sdk:size>
-				<sdk:checksum type="sha1">2af701ee3223d580409288540b1d06932fd8f9b9</sdk:checksum>
-				<sdk:url>sources-26_r01.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:source>
-	<sdk:source>
-		<!--Generated from bid:3544217, branch:git_nyc-mr1-sdk-dev-->
-		<sdk:api-level>25</sdk:api-level>
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Tue Jun  5 06:06:13 2018.-->
-				<sdk:size>30822685</sdk:size>
-				<sdk:checksum type="sha1">bbc72efd1a9bad87cc507e308f0d29aad438c52c</sdk:checksum>
-				<sdk:url>sources-25_r01.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:source>
-	<sdk:source>
-		<!--Generated from bid:3209611, branch:git_nyc-sdk-dev-->
-		<sdk:api-level>24</sdk:api-level>
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Fri Jun  8 14:43:03 2018.-->
-				<sdk:size>30270410</sdk:size>
-				<sdk:checksum type="sha1">6b96115830a83d654479f32ce4b724ca9011148b</sdk:checksum>
-				<sdk:url>sources-24_r01.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:source>
-	<sdk:source>
-		<!--Generated from bid:2166767, branch:git_mnc-release-->
-		<sdk:api-level>23</sdk:api-level>
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sun Jun 10 14:12:23 2018.-->
-				<sdk:size>31771965</sdk:size>
-				<sdk:checksum type="sha1">b0f15da2762b42f543c5e364c2b15b198cc99cc2</sdk:checksum>
-				<sdk:url>sources-23_r01.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:source>
-	<sdk:source>
-		<!--Generated from bid:1737576, branch:git_lmp-mr1-sdk-release-->
-		<sdk:api-level>22</sdk:api-level>
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Mon Jun  4 23:43:02 2018.-->
-				<sdk:size>28861236</sdk:size>
-				<sdk:checksum type="sha1">98320e13976d11597a4a730a8d203ac9a03ed5a6</sdk:checksum>
-				<sdk:url>sources-22_r01.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:source>
-	<sdk:source>
-		<!--Generated from bid:1521886, branch:git_lmp-release-->
-		<sdk:api-level>21</sdk:api-level>
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sat Jun 16 09:12:37 2018.-->
-				<sdk:size>28274751</sdk:size>
-				<sdk:checksum type="sha1">137a5044915d32bea297a8c1552684802bbc2e25</sdk:checksum>
-				<sdk:url>sources-21_r01.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:source>
-	<sdk:source>
-		<!--Generated from bid:1246132, branch:git_klp-modular-release-->
-		<sdk:api-level>20</sdk:api-level>
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sat Jun  2 19:46:05 2018.-->
-				<sdk:size>23367603</sdk:size>
-				<sdk:checksum type="sha1">8da3e40f2625f9f7ef38b7e403f49f67226c0d76</sdk:checksum>
-				<sdk:url>sources-20_r01.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:source>
-	<sdk:source>
-		<!--Generated from bid:938007, branch:git_klp-dev-->
-		<sdk:api-level>19</sdk:api-level>
-		<sdk:revision>2</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Tue May 29 10:39:58 2018.-->
-				<sdk:size>21819439</sdk:size>
-				<sdk:checksum type="sha1">433a1d043ef77561571250e94cb7a0ef24a202e7</sdk:checksum>
-				<sdk:url>sources-19_r02.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:source>
-	<sdk:source>
-		<!--Generated from bid:737497, branch:git_jb-mr2-release-->
-		<sdk:api-level>18</sdk:api-level>
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Fri May 18 03:14:54 2018.-->
-				<sdk:size>20226735</sdk:size>
-				<sdk:checksum type="sha1">8b49fdf7433f4881a2bfb559b5dd05d8ec65fb78</sdk:checksum>
-				<sdk:url>sources-18_r01.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:source>
-	<sdk:source>
-		<!--Generated from bid:526865, branch:git_jb-mr1-dev-->
-		<sdk:api-level>17</sdk:api-level>
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Thu May 17 17:14:50 2018.-->
-				<sdk:size>18976816</sdk:size>
-				<sdk:checksum type="sha1">6f1f18cd2d2b1852d7f6892df9cee3823349d43a</sdk:checksum>
-				<sdk:url>sources-17_r01.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:source>
-	<sdk:source>
-		<!--Generated from bid:403059, branch:git_jb-release-->
-		<sdk:api-level>16</sdk:api-level>
-		<sdk:revision>2</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Wed May 30 05:17:35 2018.-->
-				<sdk:size>17876720</sdk:size>
-				<sdk:checksum type="sha1">0f83c14ed333c45d962279ab5d6bc98a0269ef84</sdk:checksum>
-				<sdk:url>sources-16_r02.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:source>
-	<sdk:source>
-		<!--Generated from bid:302030, branch:git_ics-mr1-->
-		<sdk:api-level>15</sdk:api-level>
-		<sdk:revision>2</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sat Jun 16 23:00:27 2018.-->
-				<sdk:size>16468746</sdk:size>
-				<sdk:checksum type="sha1">e5992a5747c9590783fbbdd700337bf0c9f6b1fa</sdk:checksum>
-				<sdk:url>sources-15_r02.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:source>
-	<sdk:source>
-		<!--Generated from bid:234950, branch:git_ics-mr0-->
-		<sdk:api-level>14</sdk:api-level>
-		<sdk:obsolete/>
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sat Jun  9 09:00:50 2018.-->
-				<sdk:size>16152383</sdk:size>
-				<sdk:checksum type="sha1">eaf4ed7dcac46e68516a1b4aa5b0d9e5a39a7555</sdk:checksum>
-				<sdk:url>sources-14_r01.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:source>
-	<sdk:build-tool>
-		<!--Generated from bid:5016651, branch:pi-sdk-release-->
-		<sdk:revision>
-			<sdk:major>28</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>3</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Tue Sep 18 17:02:14 2018.-->
-				<sdk:size>57830695</sdk:size>
-				<sdk:checksum type="sha1">ea6f2f7103cd9da9ff0bdf6e37fbbba548fa4165</sdk:checksum>
-				<sdk:url>build-tools_r28.0.3-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Tue Sep 18 17:02:10 2018.-->
-				<sdk:size>57133581</sdk:size>
-				<sdk:checksum type="sha1">f8c333a2991b1ab05a671bc6248b78e00edcd83a</sdk:checksum>
-				<sdk:url>build-tools_r28.0.3-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Tue Sep 18 17:02:07 2018.-->
-				<sdk:size>58393729</sdk:size>
-				<sdk:checksum type="sha1">05bd35bb48d11c848da2b393c6f864eb609aacba</sdk:checksum>
-				<sdk:url>build-tools_r28.0.3-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:4913185, branch:pi-sdk-release-->
-		<sdk:revision>
-			<sdk:major>28</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>2</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Wed Jul 25 20:19:09 2018.-->
-				<sdk:size>57754663</sdk:size>
-				<sdk:checksum type="sha1">b4492209810a3fd48deaa982f9852fef12433d55</sdk:checksum>
-				<sdk:url>build-tools_r28.0.2-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Wed Jul 25 20:19:05 2018.-->
-				<sdk:size>57057554</sdk:size>
-				<sdk:checksum type="sha1">c10dd5a7825578622fb362a8a34f76eb3ba0c0a9</sdk:checksum>
-				<sdk:url>build-tools_r28.0.2-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Wed Jul 25 20:19:01 2018.-->
-				<sdk:size>58317692</sdk:size>
-				<sdk:checksum type="sha1">e9c570c568a0c2a32e88ee3204279019ebefd949</sdk:checksum>
-				<sdk:url>build-tools_r28.0.2-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:4860066, branch:pi-preview4-release-->
-		<sdk:revision>
-			<sdk:major>28</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>1</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Tue Jun 26 16:23:22 2018.-->
-				<sdk:size>57610954</sdk:size>
-				<sdk:checksum type="sha1">ee70dfa1fccb58b37cebc9544830511f36a137a0</sdk:checksum>
-				<sdk:url>build-tools_r28.0.1-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Tue Jun 26 16:23:20 2018.-->
-				<sdk:size>56913869</sdk:size>
-				<sdk:checksum type="sha1">aeef42ad953f1630dd6f5d71eefdc0b825211462</sdk:checksum>
-				<sdk:url>build-tools_r28.0.1-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Tue Jun 26 16:23:17 2018.-->
-				<sdk:size>58173989</sdk:size>
-				<sdk:checksum type="sha1">29c6342835734be25b9e458ab3fad5750ad6a355</sdk:checksum>
-				<sdk:url>build-tools_r28.0.1-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:4799589, branch:pi-preview3-release-->
-		<sdk:revision>
-			<sdk:major>28</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>0</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Wed May 23 16:22:51 2018.-->
-				<sdk:size>37157769</sdk:size>
-				<sdk:checksum type="sha1">d9f8a754d833ccd334f56fcc6089c5925cd82abb</sdk:checksum>
-				<sdk:url>build-tools_r28-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Wed May 23 16:22:49 2018.-->
-				<sdk:size>36458977</sdk:size>
-				<sdk:checksum type="sha1">72088d32d1d82cc3c2cf7cf6618b6130c0c84ade</sdk:checksum>
-				<sdk:url>build-tools_r28-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Wed May 23 16:22:47 2018.-->
-				<sdk:size>37718995</sdk:size>
-				<sdk:checksum type="sha1">d4b0638a877ed570e07876264e69fdbd86409610</sdk:checksum>
-				<sdk:url>build-tools_r28-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:4758566, branch:pi-preview2-release-->
-		<sdk:revision>
-			<sdk:major>28</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>0</sdk:micro>
-			<sdk:preview>2</sdk:preview>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Thu May  3 14:26:31 2018.-->
-				<sdk:size>37151124</sdk:size>
-				<sdk:checksum type="sha1">efe9c0dde0646a07544c864276390ca6e96b24dc</sdk:checksum>
-				<sdk:url>build-tools_r28-rc2-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Thu May  3 14:26:27 2018.-->
-				<sdk:size>36449480</sdk:size>
-				<sdk:checksum type="sha1">0d0314b353589feb10e528b44c5a685b6658d797</sdk:checksum>
-				<sdk:url>build-tools_r28-rc2-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Thu May  3 14:26:24 2018.-->
-				<sdk:size>37716459</sdk:size>
-				<sdk:checksum type="sha1">a94bfb52b4ec74b95c116236c3e382e923cad6c4</sdk:checksum>
-				<sdk:url>build-tools_r28-rc2-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:4614665, branch:git_pi-release-->
-		<sdk:revision>
-			<sdk:major>28</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>0</sdk:micro>
-			<sdk:preview>1</sdk:preview>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sat Jun 16 20:06:20 2018.-->
-				<sdk:size>38703535</sdk:size>
-				<sdk:checksum type="sha1">1601977fae25fd478bcfaa0481ca5ea3c609d840</sdk:checksum>
-				<sdk:url>build-tools_r28-rc1-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Sun Jun 10 21:05:54 2018.-->
-				<sdk:size>38004795</sdk:size>
-				<sdk:checksum type="sha1">2c77821967a2330b7b227072d0b1c02ef19fe2fc</sdk:checksum>
-				<sdk:url>build-tools_r28-rc1-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Sat Jun  9 11:13:53 2018.-->
-				<sdk:size>39273232</sdk:size>
-				<sdk:checksum type="sha1">fbf46c33d1268f6532911707b2a05033fd5c5b41</sdk:checksum>
-				<sdk:url>build-tools_r28-rc1-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:4507799, branch:git_oc-mr1-sdk-release-->
-		<sdk:revision>
-			<sdk:major>27</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>3</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Fri Jun 15 01:14:40 2018.-->
-				<sdk:size>54478554</sdk:size>
-				<sdk:checksum type="sha1">d85e7a6320eddffe7eeace3437605079dac938ca</sdk:checksum>
-				<sdk:url>build-tools_r27.0.3-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Fri Jun 15 02:46:10 2018.-->
-				<sdk:size>53867966</sdk:size>
-				<sdk:checksum type="sha1">61d9fb18790c68d66ff73bf1e7ad56bc1f1eef2d</sdk:checksum>
-				<sdk:url>build-tools_r27.0.3-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Mon Jun 18 21:09:43 2018.-->
-				<sdk:size>55194255</sdk:size>
-				<sdk:checksum type="sha1">0df61e11713a2838d2cc9a911219dddf5e6a2749</sdk:checksum>
-				<sdk:url>build-tools_r27.0.3-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:4458339, branch:git_oc-mr1-sdk-release-->
-		<sdk:revision>
-			<sdk:major>27</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>2</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Mon Jun  4 08:42:16 2018.-->
-				<sdk:size>54458153</sdk:size>
-				<sdk:checksum type="sha1">b687ddf6be84f11607871138aad32cf857d0b837</sdk:checksum>
-				<sdk:url>build-tools_r27.0.2-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Mon Jun 11 15:49:30 2018.-->
-				<sdk:size>53846615</sdk:size>
-				<sdk:checksum type="sha1">6d5d9cf2a47877f273f4b742b19e712a051a31be</sdk:checksum>
-				<sdk:url>build-tools_r27.0.2-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Mon May 21 01:11:23 2018.-->
-				<sdk:size>55173070</sdk:size>
-				<sdk:checksum type="sha1">b80466c13b75e3ebf3c546964f40775db5898b2a</sdk:checksum>
-				<sdk:url>build-tools_r27.0.2-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:4429804, branch:git_oc-mr1-release-->
-		<sdk:revision>
-			<sdk:major>27</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>1</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Wed Jun 13 21:53:36 2018.-->
-				<sdk:size>54450260</sdk:size>
-				<sdk:checksum type="sha1">7f4eedb1077ef948b848040dcd15de9e8a759f4a</sdk:checksum>
-				<sdk:url>build-tools_r27.0.1-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Thu May 17 21:44:36 2018.-->
-				<sdk:size>53838762</sdk:size>
-				<sdk:checksum type="sha1">1edd07bfdbadd95652d093040e16d858f7489594</sdk:checksum>
-				<sdk:url>build-tools_r27.0.1-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Sun Jun 10 07:28:26 2018.-->
-				<sdk:size>55171114</sdk:size>
-				<sdk:checksum type="sha1">18109db020c6d088d0157d1df201d31bc6970875</sdk:checksum>
-				<sdk:url>build-tools_r27.0.1-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:4402310, branch:git_oc-mr1-release-->
-		<sdk:revision>
-			<sdk:major>27</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>0</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sun Jun  3 03:24:44 2018.-->
-				<sdk:size>54441725</sdk:size>
-				<sdk:checksum type="sha1">28542332ba97cf4a08c3eddfcf5edd70e3cf1260</sdk:checksum>
-				<sdk:url>build-tools_r27-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Sat Jun  9 15:50:22 2018.-->
-				<sdk:size>53831513</sdk:size>
-				<sdk:checksum type="sha1">fb4e8d7e6b8d29a77090e34024077a80458d5ae1</sdk:checksum>
-				<sdk:url>build-tools_r27-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Wed Jun 13 05:13:49 2018.-->
-				<sdk:size>55163097</sdk:size>
-				<sdk:checksum type="sha1">4f1df22a6d99261d2160d624b81445da0a027dbe</sdk:checksum>
-				<sdk:url>build-tools_r27-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:4420879, branch:git_oc-mr1-release-->
-		<sdk:revision>
-			<sdk:major>26</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>3</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Fri May 18 19:01:05 2018.-->
-				<sdk:size>54449983</sdk:size>
-				<sdk:checksum type="sha1">8a2e6c1bcd845844523a68aa17e5442f0dce328c</sdk:checksum>
-				<sdk:url>build-tools_r26.0.3-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Sat May 26 11:11:32 2018.-->
-				<sdk:size>53839758</sdk:size>
-				<sdk:checksum type="sha1">5bb90ed935d99e5bc90686f43b852e68c5ad40df</sdk:checksum>
-				<sdk:url>build-tools_r26.0.3-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Mon Jun  4 23:32:18 2018.-->
-				<sdk:size>55170919</sdk:size>
-				<sdk:checksum type="sha1">460e511a9616b4661cc8dba0102d9d990ae60160</sdk:checksum>
-				<sdk:url>build-tools_r26.0.3-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:4355572, branch:git_oc-mr1-release-->
-		<sdk:revision>
-			<sdk:major>26</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>2</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Wed May 23 14:33:19 2018.-->
-				<sdk:size>54440678</sdk:size>
-				<sdk:checksum type="sha1">5b2b7b66c7bf2151f2af183b5b50a17808850592</sdk:checksum>
-				<sdk:url>build-tools_r26.0.2-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Wed Jun  6 07:17:54 2018.-->
-				<sdk:size>53830573</sdk:size>
-				<sdk:checksum type="sha1">d9ed7c7f149ce38be5dc08979aea8acec1459ca0</sdk:checksum>
-				<sdk:url>build-tools_r26.0.2-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Mon Jun 11 07:41:38 2018.-->
-				<sdk:size>55161474</sdk:size>
-				<sdk:checksum type="sha1">39ca02d3faa49859cd9d1bc0adc2f331017b699b</sdk:checksum>
-				<sdk:url>build-tools_r26.0.2-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:4187382, branch:git_oc-release-->
-		<sdk:revision>
-			<sdk:major>26</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>1</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Fri Jun  8 18:48:52 2018.-->
-				<sdk:size>54113329</sdk:size>
-				<sdk:checksum type="sha1">5378c2c78091b414d0eac40a6bd37f2faa31a365</sdk:checksum>
-				<sdk:url>build-tools_r26.0.1-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Wed Jun 13 12:42:53 2018.-->
-				<sdk:size>53266653</sdk:size>
-				<sdk:checksum type="sha1">cbde59de198916b390777dd0227921bfa2120832</sdk:checksum>
-				<sdk:url>build-tools_r26.0.1-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Tue Jun  5 10:41:28 2018.-->
-				<sdk:size>54936185</sdk:size>
-				<sdk:checksum type="sha1">02494c80ffbe65bfff0aaa7463c9692693327b7d</sdk:checksum>
-				<sdk:url>build-tools_r26.0.1-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:4062713, branch:git_oc-preview3-sdk-->
-		<sdk:revision>
-			<sdk:major>26</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>0</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sat May 26 02:59:29 2018.-->
-				<sdk:size>53854197</sdk:size>
-				<sdk:checksum type="sha1">1cbe72929876f8a872ab1f1b1040a9f720261f59</sdk:checksum>
-				<sdk:url>build-tools_r26-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Sat Jun  9 20:38:32 2018.-->
-				<sdk:size>53010814</sdk:size>
-				<sdk:checksum type="sha1">d01a1aeca03747245f1f5936b3cb01759c66d086</sdk:checksum>
-				<sdk:url>build-tools_r26-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Thu May 31 06:40:23 2018.-->
-				<sdk:size>54681641</sdk:size>
-				<sdk:checksum type="sha1">896ebd31117c09db220f7a3116cc0e5121c78b9d</sdk:checksum>
-				<sdk:url>build-tools_r26-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:4004883, branch:git_oc-preview2-sdk-->
-		<sdk:revision>
-			<sdk:major>26</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>0</sdk:micro>
-			<sdk:preview>2</sdk:preview>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Tue May 22 14:01:05 2018.-->
-				<sdk:size>53847560</sdk:size>
-				<sdk:checksum type="sha1">629bbd8d2e415bf64871fb0b4c0540fd6d0347a0</sdk:checksum>
-				<sdk:url>build-tools_r26-rc2-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Sat May 26 08:16:12 2018.-->
-				<sdk:size>53003874</sdk:size>
-				<sdk:checksum type="sha1">cb1eb738a1f7003025af267a9b8cc2d259533c70</sdk:checksum>
-				<sdk:url>build-tools_r26-rc2-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Mon Jun 18 00:43:07 2018.-->
-				<sdk:size>54678375</sdk:size>
-				<sdk:checksum type="sha1">ddaba77db0557a98f6330fbd579ad0bd12cbb152</sdk:checksum>
-				<sdk:url>build-tools_r26-rc2-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-preview-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:3821161, branch:git_oc-preview-release-->
-		<sdk:revision>
-			<sdk:major>26</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>0</sdk:micro>
-			<sdk:preview>1</sdk:preview>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sun May 27 22:43:40 2018.-->
-				<sdk:size>53648603</sdk:size>
-				<sdk:checksum type="sha1">8cd6388dc96db2d7a49d06159cf990d3bbc78d04</sdk:checksum>
-				<sdk:url>build-tools_r26-rc1-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Tue Jun 12 18:41:58 2018.-->
-				<sdk:size>52821129</sdk:size>
-				<sdk:checksum type="sha1">5c5a1de7d5f4f000d36ae349229fe0be846d6137</sdk:checksum>
-				<sdk:url>build-tools_r26-rc1-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Sat May 26 12:23:48 2018.-->
-				<sdk:size>54379108</sdk:size>
-				<sdk:checksum type="sha1">43c2ddad3b67a5c33712ae14331a60673e69be91</sdk:checksum>
-				<sdk:url>build-tools_r26-rc1-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-preview-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:3907386, branch:git_nyc-mr1-sdk-dev-->
-		<sdk:revision>
-			<sdk:major>25</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>3</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Mon Jun  4 10:03:34 2018.-->
-				<sdk:size>50757258</sdk:size>
-				<sdk:checksum type="sha1">db95f3a0ae376534d4d69f4cdb6fad20649f3509</sdk:checksum>
-				<sdk:url>build-tools_r25.0.3-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Sat Jun 16 17:57:45 2018.-->
-				<sdk:size>50545085</sdk:size>
-				<sdk:checksum type="sha1">160d2fefb5ce68e443427fc30a793a703b63e26e</sdk:checksum>
-				<sdk:url>build-tools_r25.0.3-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Sat Jun  2 16:26:03 2018.-->
-				<sdk:size>51337442</sdk:size>
-				<sdk:checksum type="sha1">1edcb109ae5133aebfed573cf0bc84e0c353c28d</sdk:checksum>
-				<sdk:url>build-tools_r25.0.3-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:3544217, branch:git_nyc-mr1-sdk-dev-->
-		<sdk:revision>
-			<sdk:major>25</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>2</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Wed Jun 13 09:54:19 2018.-->
-				<sdk:size>49880329</sdk:size>
-				<sdk:checksum type="sha1">ff953c0177e317618fda40516f3e9d95fd43c7ae</sdk:checksum>
-				<sdk:url>build-tools_r25.0.2-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Tue May 29 08:01:46 2018.-->
-				<sdk:size>49667185</sdk:size>
-				<sdk:checksum type="sha1">12a5204bb3b6e39437535469fde7ddf42da46b16</sdk:checksum>
-				<sdk:url>build-tools_r25.0.2-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Thu Jun  7 23:11:35 2018.-->
-				<sdk:size>50458908</sdk:size>
-				<sdk:checksum type="sha1">2fee3c0704d6ecc480570450d8b8069b2c4a2dd4</sdk:checksum>
-				<sdk:url>build-tools_r25.0.2-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:3485210, branch:git_nyc-mr1-sdk-dev-->
-		<sdk:revision>
-			<sdk:major>25</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>1</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Fri May 25 11:51:28 2018.-->
-				<sdk:size>49880178</sdk:size>
-				<sdk:checksum type="sha1">ff063d252ab750d339f5947d06ff782836f22bac</sdk:checksum>
-				<sdk:url>build-tools_r25.0.1-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Mon May 21 03:26:16 2018.-->
-				<sdk:size>49667353</sdk:size>
-				<sdk:checksum type="sha1">7bf7f22d7d48ef20b6ab0e3d7a2912e5c088340f</sdk:checksum>
-				<sdk:url>build-tools_r25.0.1-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Wed May 30 20:26:28 2018.-->
-				<sdk:size>50458759</sdk:size>
-				<sdk:checksum type="sha1">c6c61393565ccf46349e7f44511e5db7c1c6169d</sdk:checksum>
-				<sdk:url>build-tools_r25.0.1-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:3359293, branch:git_nyc-mr1-sdk-dev-->
-		<sdk:revision>
-			<sdk:major>25</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>0</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sun Jun  3 08:35:42 2018.-->
-				<sdk:size>49872921</sdk:size>
-				<sdk:checksum type="sha1">f2bbda60403e75cabd0f238598c3b4dfca56ea44</sdk:checksum>
-				<sdk:url>build-tools_r25-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Tue Jun  5 22:55:37 2018.-->
-				<sdk:size>49659466</sdk:size>
-				<sdk:checksum type="sha1">273c5c29a65cbed00e44f3aa470bbd7dce556606</sdk:checksum>
-				<sdk:url>build-tools_r25-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Fri Jun  1 02:28:01 2018.-->
-				<sdk:size>50451378</sdk:size>
-				<sdk:checksum type="sha1">f9258f2308ff8b62cfc4513d40cb961612d07b6a</sdk:checksum>
-				<sdk:url>build-tools_r25-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:3303571, branch:git_nyc-sdk-dev-->
-		<sdk:revision>
-			<sdk:major>24</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>3</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sun Jun 10 09:52:06 2018.-->
-				<sdk:size>49779151</sdk:size>
-				<sdk:checksum type="sha1">9e8cc49d66e03fa1a8ecc1ac3e58f1324f5da304</sdk:checksum>
-				<sdk:url>build-tools_r24.0.3-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Tue May 22 10:05:55 2018.-->
-				<sdk:size>49568967</sdk:size>
-				<sdk:checksum type="sha1">a01c15f1b105c34595681075e1895d58b3fff48c</sdk:checksum>
-				<sdk:url>build-tools_r24.0.3-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Thu May 17 23:44:20 2018.-->
-				<sdk:size>50354788</sdk:size>
-				<sdk:checksum type="sha1">8b960d693fd4163caeb8dc5f5f5f80b10987089c</sdk:checksum>
-				<sdk:url>build-tools_r24.0.3-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:3209611, branch:git_nyc-sdk-dev-->
-		<sdk:revision>
-			<sdk:major>24</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>2</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Fri Jun 15 23:52:09 2018.-->
-				<sdk:size>48936295</sdk:size>
-				<sdk:checksum type="sha1">f199a7a788c3fefbed102eea34d6007737b803cf</sdk:checksum>
-				<sdk:url>build-tools_r24.0.2-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Fri Jun  8 05:11:05 2018.-->
-				<sdk:size>48726190</sdk:size>
-				<sdk:checksum type="sha1">8bb8fc575477491d5957de743089df412de55cda</sdk:checksum>
-				<sdk:url>build-tools_r24.0.2-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Fri Jun 15 23:26:15 2018.-->
-				<sdk:size>49512513</sdk:size>
-				<sdk:checksum type="sha1">09586a1f1c39bcfa7db5205c9a07837247deb67e</sdk:checksum>
-				<sdk:url>build-tools_r24.0.2-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:3208200, branch:git_nyc-dev-->
-		<sdk:revision>
-			<sdk:major>24</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>1</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Mon May 28 07:24:53 2018.-->
-				<sdk:size>48936286</sdk:size>
-				<sdk:checksum type="sha1">84f18c392919a074fcbb9b1d967984e6b2fef8b4</sdk:checksum>
-				<sdk:url>build-tools_r24.0.1-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Thu Jun 14 02:41:05 2018.-->
-				<sdk:size>48726085</sdk:size>
-				<sdk:checksum type="sha1">5c6457fcdfa07724fb086d8ff4e8316fc0742848</sdk:checksum>
-				<sdk:url>build-tools_r24.0.1-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Tue Jun 12 21:59:52 2018.-->
-				<sdk:size>49511883</sdk:size>
-				<sdk:checksum type="sha1">ac4a7cea42c3ef74d7fbf1b992fad311c550034e</sdk:checksum>
-				<sdk:url>build-tools_r24.0.1-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:2964546, branch:git_nyc-preview-release-->
-		<sdk:revision>
-			<sdk:major>24</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>0</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Thu May 31 15:18:44 2018.-->
-				<sdk:size>48960919</sdk:size>
-				<sdk:checksum type="sha1">c6271c4d78a5612ea6c7150688bcd5b7313de8d1</sdk:checksum>
-				<sdk:url>build-tools_r24-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Sun Jun 10 20:05:01 2018.-->
-				<sdk:size>48747930</sdk:size>
-				<sdk:checksum type="sha1">97fc4ed442f23989cc488d02c1d1de9bdde241de</sdk:checksum>
-				<sdk:url>build-tools_r24-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Sun Jun 10 15:13:01 2018.-->
-				<sdk:size>49535326</sdk:size>
-				<sdk:checksum type="sha1">dc61b9e5b451a0c3ec42ae2b1ce27c4d3c8da9f7</sdk:checksum>
-				<sdk:url>build-tools_r24-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:2355899, branch:git_mnc-dev-->
-		<sdk:revision>
-			<sdk:major>23</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>2</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sat May 19 00:00:21 2018.-->
-				<sdk:size>39071201</sdk:size>
-				<sdk:checksum type="sha1">8a9f2b37f6fcf7a9fa784dc21aeaeb41bbb9f2c3</sdk:checksum>
-				<sdk:url>build-tools_r23.0.2-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Sun May 27 14:18:27 2018.-->
-				<sdk:size>38060914</sdk:size>
-				<sdk:checksum type="sha1">482c4cbceef8ff58aefd92d8155a38610158fdaf</sdk:checksum>
-				<sdk:url>build-tools_r23.0.2-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Mon Jun 18 16:23:02 2018.-->
-				<sdk:size>38217626</sdk:size>
-				<sdk:checksum type="sha1">fc3a92c744d3ba0a16ccb5d2b41eea5974ce0a96</sdk:checksum>
-				<sdk:url>build-tools_r23.0.2-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:2679779, branch:git_mnc-dev-->
-		<sdk:revision>
-			<sdk:major>23</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>3</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Tue Jun 12 12:39:27 2018.-->
-				<sdk:size>40733174</sdk:size>
-				<sdk:checksum type="sha1">368f2600feac7e9b511b82f53d1f2240ae4a91a3</sdk:checksum>
-				<sdk:url>build-tools_r23.0.3-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Fri Jun  8 14:28:55 2018.-->
-				<sdk:size>39679533</sdk:size>
-				<sdk:checksum type="sha1">fbc98cd303fd15a31d472de6c03bd707829f00b0</sdk:checksum>
-				<sdk:url>build-tools_r23.0.3-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Sat Jun  9 16:05:42 2018.-->
-				<sdk:size>39869945</sdk:size>
-				<sdk:checksum type="sha1">c6d8266c6a3243c8f1e41b786c0e3cee4c781263</sdk:checksum>
-				<sdk:url>build-tools_r23.0.3-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:2201634, branch:git_mnc-sdk-release-->
-		<sdk:revision>
-			<sdk:major>23</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>1</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sun Jun 17 12:24:05 2018.-->
-				<sdk:size>39069295</sdk:size>
-				<sdk:checksum type="sha1">b6ba7c399d5fa487d95289d8832e4ad943aed556</sdk:checksum>
-				<sdk:url>build-tools_r23.0.1-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Tue Jun 12 04:52:07 2018.-->
-				<sdk:size>38059328</sdk:size>
-				<sdk:checksum type="sha1">d96ec1522721e9a179ae2c591c99f75d31d39718</sdk:checksum>
-				<sdk:url>build-tools_r23.0.1-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Sat May 26 01:11:05 2018.-->
-				<sdk:size>38558889</sdk:size>
-				<sdk:checksum type="sha1">cc1d37231d228f7a6f130e1f8d8c940052f0f8ab</sdk:checksum>
-				<sdk:url>build-tools_r23.0.1-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:2166767, branch:git_mnc-release-->
-		<sdk:obsolete/>
-		<sdk:revision>
-			<sdk:major>23</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>0</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sat Jun  2 10:17:50 2018.-->
-				<sdk:size>39080519</sdk:size>
-				<sdk:checksum type="sha1">c1d6209212b01469f80fa804e0c1d39a06bc9060</sdk:checksum>
-				<sdk:url>build-tools_r23-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Wed Jun 13 23:09:27 2018.-->
-				<sdk:size>38070540</sdk:size>
-				<sdk:checksum type="sha1">90ba6e716f7703a236cd44b2e71c5ff430855a03</sdk:checksum>
-				<sdk:url>build-tools_r23-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Sat May 19 18:49:10 2018.-->
-				<sdk:size>38570715</sdk:size>
-				<sdk:checksum type="sha1">3874948f35f2f8946597679cc6e9151449f23b5d</sdk:checksum>
-				<sdk:url>build-tools_r23-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:1793126, branch:git_lmp-mr1-sdk-release-->
-		<sdk:revision>
-			<sdk:major>22</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>1</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Thu Jun 14 19:03:49 2018.-->
-				<sdk:size>33104577</sdk:size>
-				<sdk:checksum type="sha1">da8b9c5c3ede39298e6cf0283c000c2ee9029646</sdk:checksum>
-				<sdk:url>build-tools_r22.0.1-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Mon Jun 11 09:42:44 2018.-->
-				<sdk:size>33646102</sdk:size>
-				<sdk:checksum type="sha1">53dad7f608e01d53b17176ba11165acbfccc5bbf</sdk:checksum>
-				<sdk:url>build-tools_r22.0.1-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Sat Jun  2 09:57:53 2018.-->
-				<sdk:size>33254137</sdk:size>
-				<sdk:checksum type="sha1">61d8cbe069d9e0a57872a83e5e5abe164b7d52cf</sdk:checksum>
-				<sdk:url>build-tools_r22.0.1-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:1764203, branch:git_lmp-mr1-sdk-release-->
-		<sdk:obsolete/>
-		<sdk:revision>
-			<sdk:major>22</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>0</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Wed May 30 05:04:37 2018.-->
-				<sdk:size>33104280</sdk:size>
-				<sdk:checksum type="sha1">a8a1619dd090e44fac957bce6842e62abf87965b</sdk:checksum>
-				<sdk:url>build-tools_r22-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Sat May 26 11:13:48 2018.-->
-				<sdk:size>33646090</sdk:size>
-				<sdk:checksum type="sha1">af95429b24088d704bc5db9bd606e34ac1b82c0d</sdk:checksum>
-				<sdk:url>build-tools_r22-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Sat May 26 03:19:55 2018.-->
-				<sdk:size>33254114</sdk:size>
-				<sdk:checksum type="sha1">08fcca41e81b172bd9f570963b90d3a84929e043</sdk:checksum>
-				<sdk:url>build-tools_r22-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:1635773, branch:git_lmp-sdk-release-->
-		<sdk:revision>
-			<sdk:major>21</sdk:major>
-			<sdk:minor>1</sdk:minor>
-			<sdk:micro>2</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Wed Jun 13 11:02:29 2018.-->
-				<sdk:size>32637678</sdk:size>
-				<sdk:checksum type="sha1">5e35259843bf2926113a38368b08458735479658</sdk:checksum>
-				<sdk:url>build-tools_r21.1.2-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Tue May 29 13:57:42 2018.-->
-				<sdk:size>33152878</sdk:size>
-				<sdk:checksum type="sha1">e7c906b4ba0eea93b32ba36c610dbd6b204bff48</sdk:checksum>
-				<sdk:url>build-tools_r21.1.2-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Tue May 29 12:10:34 2018.-->
-				<sdk:size>32792587</sdk:size>
-				<sdk:checksum type="sha1">1d944759c47f60e634d2b8a1f3a4259be2f8d652</sdk:checksum>
-				<sdk:url>build-tools_r21.1.2-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:1559046, branch:git_lmp-sdk-release-->
-		<sdk:obsolete/>
-		<sdk:revision>
-			<sdk:major>21</sdk:major>
-			<sdk:minor>1</sdk:minor>
-			<sdk:micro>1</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sun Jun  3 21:41:00 2018.-->
-				<sdk:size>32642454</sdk:size>
-				<sdk:checksum type="sha1">1c712ee3a1ba5a8b0548f9c32f17d4a0ddfd727d</sdk:checksum>
-				<sdk:url>build-tools_r21.1.1-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Mon May 28 13:35:06 2018.-->
-				<sdk:size>33157676</sdk:size>
-				<sdk:checksum type="sha1">836a146eab0504aa9387a5132e986fe7c7381571</sdk:checksum>
-				<sdk:url>build-tools_r21.1.1-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Thu Jun 14 17:16:57 2018.-->
-				<sdk:size>32797356</sdk:size>
-				<sdk:checksum type="sha1">53fc4201237f899d5cd92f0b76ad41fb89da188b</sdk:checksum>
-				<sdk:url>build-tools_r21.1.1-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:1552913, branch:git_lmp-sdk-release-->
-		<sdk:obsolete/>
-		<sdk:revision>
-			<sdk:major>21</sdk:major>
-			<sdk:minor>1</sdk:minor>
-			<sdk:micro>0</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Tue Jun 12 23:37:47 2018.-->
-				<sdk:size>32642820</sdk:size>
-				<sdk:checksum type="sha1">b7455e543784d52a8925f960bc880493ed1478cb</sdk:checksum>
-				<sdk:url>build-tools_r21.1-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Sun Jun  3 03:22:22 2018.-->
-				<sdk:size>33158159</sdk:size>
-				<sdk:checksum type="sha1">df619356c2359aa5eacdd48699d15b335d9bd246</sdk:checksum>
-				<sdk:url>build-tools_r21.1-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Wed Jun 13 10:53:39 2018.-->
-				<sdk:size>32797810</sdk:size>
-				<sdk:checksum type="sha1">c79d63ac6b713a1e326ad4dae43f2ee76708a2f4</sdk:checksum>
-				<sdk:url>build-tools_r21.1-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:1532339, branch:git_lmp-release-->
-		<sdk:obsolete/>
-		<sdk:revision>
-			<sdk:major>21</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>2</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sat May 26 15:43:32 2018.-->
-				<sdk:size>22153122</sdk:size>
-				<sdk:checksum type="sha1">e1236ab8897b62b57414adcf04c132567b2612a5</sdk:checksum>
-				<sdk:url>build-tools_r21.0.2-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Sun Jun 10 08:07:31 2018.-->
-				<sdk:size>22668597</sdk:size>
-				<sdk:checksum type="sha1">f17471c154058f3734729ef3cc363399b1cd3de1</sdk:checksum>
-				<sdk:url>build-tools_r21.0.2-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Mon Jun  4 04:34:43 2018.-->
-				<sdk:size>22306371</sdk:size>
-				<sdk:checksum type="sha1">37496141b23cbe633167927b7abe6e22d9f1a1c1</sdk:checksum>
-				<sdk:url>build-tools_r21.0.2-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:1525922, branch:git_lmp-release-->
-		<sdk:obsolete/>
-		<sdk:revision>
-			<sdk:major>21</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>1</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Mon May 21 01:06:40 2018.-->
-				<sdk:size>22153013</sdk:size>
-				<sdk:checksum type="sha1">e573069eea3e5255e7a65bedeb767f4fd0a5f49a</sdk:checksum>
-				<sdk:url>build-tools_r21.0.1-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Sat Jun  9 12:04:35 2018.-->
-				<sdk:size>22668616</sdk:size>
-				<sdk:checksum type="sha1">b60c8f9b810c980abafa04896706f3911be1ade7</sdk:checksum>
-				<sdk:url>build-tools_r21.0.1-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Mon Jun 11 17:48:54 2018.-->
-				<sdk:size>22306243</sdk:size>
-				<sdk:checksum type="sha1">d68e7e6fd7a48c8759aa41d713c9d4f0e4c1c1df</sdk:checksum>
-				<sdk:url>build-tools_r21.0.1-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:1521886, branch:git_lmp-release-->
-		<sdk:obsolete/>
-		<sdk:revision>
-			<sdk:major>21</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>0</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Tue Jun 12 23:16:22 2018.-->
-				<sdk:size>22153145</sdk:size>
-				<sdk:checksum type="sha1">4933328fdeecbd554a29528f254f4993468e1cf4</sdk:checksum>
-				<sdk:url>build-tools_r21-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Mon Jun  4 10:47:41 2018.-->
-				<sdk:size>22668456</sdk:size>
-				<sdk:checksum type="sha1">9bef7989b51436bd4e5114d8a0330359f077cbfa</sdk:checksum>
-				<sdk:url>build-tools_r21-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Mon Jun  4 08:31:36 2018.-->
-				<sdk:size>22306371</sdk:size>
-				<sdk:checksum type="sha1">5bc8fd399bc0135a9bc91eec78ddc5af4f54bf32</sdk:checksum>
-				<sdk:url>build-tools_r21-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:1246132, branch:git_klp-modular-release-->
-		<sdk:revision>
-			<sdk:major>20</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>0</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Wed May 30 04:41:59 2018.-->
-				<sdk:size>21445463</sdk:size>
-				<sdk:checksum type="sha1">b688905526a5584d1327a662d871a635ff502758</sdk:checksum>
-				<sdk:url>build-tools_r20-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Thu Jun  7 14:45:22 2018.-->
-				<sdk:size>21650508</sdk:size>
-				<sdk:checksum type="sha1">1240f629411c108a714c4ddd756937c7fab93f83</sdk:checksum>
-				<sdk:url>build-tools_r20-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Mon Jun  4 07:14:07 2018.-->
-				<sdk:size>20828006</sdk:size>
-				<sdk:checksum type="sha1">cf20720e452b642d5eb59dabe05c0c729b36ec75</sdk:checksum>
-				<sdk:url>build-tools_r20-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:1153987, branch:git_klp-sdk-release-->
-		<sdk:revision>
-			<sdk:major>19</sdk:major>
-			<sdk:minor>1</sdk:minor>
-			<sdk:micro>0</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Mon May 21 21:37:00 2018.-->
-				<sdk:size>21490972</sdk:size>
-				<sdk:checksum type="sha1">1ff20ac15fa47a75d00346ec12f180d531b3ca89</sdk:checksum>
-				<sdk:url>build-tools_r19.1-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Tue May 29 05:26:30 2018.-->
-				<sdk:size>21590160</sdk:size>
-				<sdk:checksum type="sha1">0d11aae3417de1efb4b9a0e0a7855904a61bcec1</sdk:checksum>
-				<sdk:url>build-tools_r19.1-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Fri Jun  1 00:37:10 2018.-->
-				<sdk:size>20812533</sdk:size>
-				<sdk:checksum type="sha1">13b367fbdbff8132cb4356f716e8dc8a8df745c5</sdk:checksum>
-				<sdk:url>build-tools_r19.1-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:1035858, branch:git_klp-sdk-release-->
-		<sdk:obsolete/>
-		<sdk:revision>
-			<sdk:major>19</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>3</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sat May 26 14:59:05 2018.-->
-				<sdk:size>21462150</sdk:size>
-				<sdk:checksum type="sha1">c2d6055478e9d2d4fba476ee85f99181ddd1160c</sdk:checksum>
-				<sdk:url>build-tools_r19.0.3-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Sun May 20 19:28:53 2018.-->
-				<sdk:size>21563992</sdk:size>
-				<sdk:checksum type="sha1">651cf8754373b2d52e7f6aab2c52eabffe4e9ea4</sdk:checksum>
-				<sdk:url>build-tools_r19.0.3-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Wed Jun 13 12:26:28 2018.-->
-				<sdk:size>20730715</sdk:size>
-				<sdk:checksum type="sha1">cb46b433b67a0a6910ff00db84be8b527ea3102f</sdk:checksum>
-				<sdk:url>build-tools_r19.0.3-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:1009316, branch:git_klp-sdk-release-->
-		<sdk:obsolete/>
-		<sdk:revision>
-			<sdk:major>19</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>2</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Mon Jun  4 07:15:16 2018.-->
-				<sdk:size>21352552</sdk:size>
-				<sdk:checksum type="sha1">a03a6bdea0091aea32e1b35b90a7294c9f04e3dd</sdk:checksum>
-				<sdk:url>build-tools_r19.0.2-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Wed Jun 13 06:24:09 2018.-->
-				<sdk:size>21453726</sdk:size>
-				<sdk:checksum type="sha1">145bc43065d45f756d99d87329d899052b9a9288</sdk:checksum>
-				<sdk:url>build-tools_r19.0.2-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Sat May 19 22:57:09 2018.-->
-				<sdk:size>20621117</sdk:size>
-				<sdk:checksum type="sha1">af664672d0d709c9ae30937b1062317d3ade7f95</sdk:checksum>
-				<sdk:url>build-tools_r19.0.2-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:938007, branch:git_klp-dev-->
-		<sdk:obsolete/>
-		<sdk:revision>
-			<sdk:major>19</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>1</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sat Jun  2 09:30:45 2018.-->
-				<sdk:size>21229048</sdk:size>
-				<sdk:checksum type="sha1">18d2312dc4368858914213087f4e61445aca4517</sdk:checksum>
-				<sdk:url>build-tools_r19.0.1-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Fri Jun 15 19:07:47 2018.-->
-				<sdk:size>21450597</sdk:size>
-				<sdk:checksum type="sha1">efaf50fb19a3edb8d03efbff76f89a249ad2920b</sdk:checksum>
-				<sdk:url>build-tools_r19.0.1-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Sun Jun 10 05:45:57 2018.-->
-				<sdk:size>20500648</sdk:size>
-				<sdk:checksum type="sha1">5ef422bac5b28f4ced108319ed4a6bc7050a6234</sdk:checksum>
-				<sdk:url>build-tools_r19.0.1-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:886418, branch:git_klp-release-->
-		<sdk:obsolete/>
-		<sdk:revision>
-			<sdk:major>19</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>0</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Wed May 30 04:04:22 2018.-->
-				<sdk:size>21339943</sdk:size>
-				<sdk:checksum type="sha1">55c1a6cf632e7d346f0002b275ec41fd3137fd83</sdk:checksum>
-				<sdk:url>build-tools_r19-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Fri Jun 15 01:37:33 2018.-->
-				<sdk:size>21441270</sdk:size>
-				<sdk:checksum type="sha1">86ec1c12db1bc446b7bcaefc5cc14eb361044e90</sdk:checksum>
-				<sdk:url>build-tools_r19-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Wed Jun  6 05:47:57 2018.-->
-				<sdk:size>20611447</sdk:size>
-				<sdk:checksum type="sha1">6edf505c20f5ece9c48fa0aff9a90488f9654d52</sdk:checksum>
-				<sdk:url>build-tools_r19-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:867478, branch:git_jb-mr2-dev-->
-		<sdk:obsolete/>
-		<sdk:revision>
-			<sdk:major>18</sdk:major>
-			<sdk:minor>1</sdk:minor>
-			<sdk:micro>1</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Thu May 24 00:01:04 2018.-->
-				<sdk:size>20229760</sdk:size>
-				<sdk:checksum type="sha1">68c9acbfc0cec2d51b19efaed39831a17055d998</sdk:checksum>
-				<sdk:url>build-tools_r18.1.1-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Tue May 22 07:45:01 2018.-->
-				<sdk:size>20452157</sdk:size>
-				<sdk:checksum type="sha1">a9d9d37f6ddf859e57abc78802a77aaa166e48d4</sdk:checksum>
-				<sdk:url>build-tools_r18.1.1-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Sun May 27 16:32:56 2018.-->
-				<sdk:size>19660000</sdk:size>
-				<sdk:checksum type="sha1">c4605066e2f851387ea70bc1442b1968bd7b4a15</sdk:checksum>
-				<sdk:url>build-tools_r18.1.1-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:819563, branch:git_jb-mr2-dev-->
-		<sdk:obsolete/>
-		<sdk:revision>
-			<sdk:major>18</sdk:major>
-			<sdk:minor>1</sdk:minor>
-			<sdk:micro>0</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Mon Jun  4 05:17:04 2018.-->
-				<sdk:size>20229298</sdk:size>
-				<sdk:checksum type="sha1">f314a0599e51397f0886fe888b50dd98f2f050d8</sdk:checksum>
-				<sdk:url>build-tools_r18.1-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Sun Jun 17 12:29:46 2018.-->
-				<sdk:size>20451524</sdk:size>
-				<sdk:checksum type="sha1">16ddb299b8b43063e5bb3387ec17147c5053dfd8</sdk:checksum>
-				<sdk:url>build-tools_r18.1-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Thu Jun 14 15:56:37 2018.-->
-				<sdk:size>19659547</sdk:size>
-				<sdk:checksum type="sha1">3a9810fc8559ab03c09378f07531e8cae2f1db30</sdk:checksum>
-				<sdk:url>build-tools_r18.1-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:754669, branch:git_jb-mr2-dev-->
-		<sdk:obsolete/>
-		<sdk:revision>
-			<sdk:major>18</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>1</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sun Jun 10 13:17:31 2018.-->
-				<sdk:size>16627330</sdk:size>
-				<sdk:checksum type="sha1">f11618492b0d2270c332325d45d752d3656a9640</sdk:checksum>
-				<sdk:url>build-tools_r18.0.1-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Mon May 21 16:08:02 2018.-->
-				<sdk:size>16633121</sdk:size>
-				<sdk:checksum type="sha1">d84f5692fb44d60fc53e5b2507cebf9f24626902</sdk:checksum>
-				<sdk:url>build-tools_r18.0.1-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Fri Jun  1 08:16:51 2018.-->
-				<sdk:size>15413527</sdk:size>
-				<sdk:checksum type="sha1">a6c2afd0b6289d589351956d2f5212b37014ca7d</sdk:checksum>
-				<sdk:url>build-tools_r18.0.1-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:build-tool>
-		<!--Generated from bid:673949, branch:git_jb-mr1.1-dev-->
-		<sdk:obsolete/>
-		<sdk:revision>
-			<sdk:major>17</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>0</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sat Jun  2 14:13:23 2018.-->
-				<sdk:size>11696007</sdk:size>
-				<sdk:checksum type="sha1">2c2872bc3806aabf16a12e3959c2183ddc866e6d</sdk:checksum>
-				<sdk:url>build-tools_r17-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Tue Jun 19 09:33:42 2018.-->
-				<sdk:size>12208114</sdk:size>
-				<sdk:checksum type="sha1">602ee709be9dbb8f179b1e4075148a57f9419930</sdk:checksum>
-				<sdk:url>build-tools_r17-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Fri Jun  8 13:26:17 2018.-->
-				<sdk:size>11004914</sdk:size>
-				<sdk:checksum type="sha1">899897d327b0bad492d3a40d3db4d96119c15bc0</sdk:checksum>
-				<sdk:url>build-tools_r17-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:build-tool>
-	<sdk:platform-tool>
-		<!--Generated from bid:4986621, branch:aosp-sdk-release-->
-		<sdk:revision>
-			<sdk:major>28</sdk:major>
-			<sdk:minor>0</sdk:minor>
-			<sdk:micro>1</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Fri Aug 31 09:51:45 2018.-->
-				<sdk:size>6848749</sdk:size>
-				<sdk:checksum type="sha1">ed1edad4a48c27655ce98d0a5821e7296e9de145</sdk:checksum>
-				<sdk:url>platform-tools_r28.0.1-darwin.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Fri Aug 31 09:51:40 2018.-->
-				<sdk:size>6843966</sdk:size>
-				<sdk:checksum type="sha1">74ff83bc203f01c4f04bd9316ab5a2573f023fd1</sdk:checksum>
-				<sdk:url>platform-tools_r28.0.1-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Fri Aug 31 09:51:43 2018.-->
-				<sdk:size>6183783</sdk:size>
-				<sdk:checksum type="sha1">5a44d10d41725aa718c71b6e44bc2dea6f1a7f49</sdk:checksum>
-				<sdk:url>platform-tools_r28.0.1-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:platform-tool>
-	<sdk:tool>
-		<!--Generated from bid:3567187, branch:aosp-emu-2.2-release-->
-		<sdk:revision>
-			<sdk:major>25</sdk:major>
-			<sdk:minor>2</sdk:minor>
-			<sdk:micro>5</sdk:micro>
-		</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Mon May 21 14:06:04 2018.-->
-				<sdk:size>277894900</sdk:size>
-				<sdk:checksum type="sha1">72df3aa1988c0a9003ccdfd7a13a7b8bd0f47fc1</sdk:checksum>
-				<sdk:url>tools_r25.2.5-linux.zip</sdk:url>
-				<sdk:host-os>linux</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Thu May 31 17:55:03 2018.-->
-				<sdk:size>200529982</sdk:size>
-				<sdk:checksum type="sha1">d2168d963ac5b616e3d3ddaf21511d084baf3659</sdk:checksum>
-				<sdk:url>tools_r25.2.5-macosx.zip</sdk:url>
-				<sdk:host-os>macosx</sdk:host-os>
-			</sdk:archive>
-			<sdk:archive>
-				<!--Built on: Thu Jun  7 09:09:48 2018.-->
-				<sdk:size>306785944</sdk:size>
-				<sdk:checksum type="sha1">a7f7ebeae1c8d8f62d3a8466e9c81baee7cc31ca</sdk:checksum>
-				<sdk:url>tools_r25.2.5-windows.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:min-platform-tools-rev>
-			<sdk:major>20</sdk:major>
-		</sdk:min-platform-tools-rev>
-	</sdk:tool>
-	<sdk:doc>
-		<!--Generated from bid:3249234, branch:git_nyc-emu-release-->
-		<sdk:api-level>24</sdk:api-level>
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Thu Jun 14 09:35:24 2018.-->
-				<sdk:size>419477967</sdk:size>
-				<sdk:checksum type="sha1">eef58238949ee9544876cb3e002f2d58e4ee7b5d</sdk:checksum>
-				<sdk:url>docs-24_r01.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-	</sdk:doc>
-</sdk:sdk-repository>
diff --git a/pkgs/development/mobile/androidenv/sources.nix b/pkgs/development/mobile/androidenv/sources.nix
deleted file mode 100644
index cca132e2774..00000000000
--- a/pkgs/development/mobile/androidenv/sources.nix
+++ /dev/null
@@ -1,184 +0,0 @@
-
-# This file is generated from generate-sources.sh. DO NOT EDIT.
-# Execute generate-sources.sh or fetch.sh to update the file.
-{stdenv, fetchurl, unzip}:
-
-let
-  buildSource = args:
-    stdenv.mkDerivation (args // {
-      buildInputs = [ unzip ];
-      buildCommand = ''
-        mkdir -p $out
-        cd $out
-        unzip $src
-    '';
-  });
-in
-{
-
-  source_14 = buildSource {
-    name = "android-source-14";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sources-14_r01.zip;
-      sha1 = "eaf4ed7dcac46e68516a1b4aa5b0d9e5a39a7555";
-    };
-    meta = {
-      description = "Source code for Android API 14";
-    };
-  };
-
-  source_15 = buildSource {
-    name = "android-source-15";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sources-15_r02.zip;
-      sha1 = "e5992a5747c9590783fbbdd700337bf0c9f6b1fa";
-    };
-    meta = {
-      description = "Source code for Android API 15";
-    };
-  };
-
-  source_16 = buildSource {
-    name = "android-source-16";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sources-16_r02.zip;
-      sha1 = "0f83c14ed333c45d962279ab5d6bc98a0269ef84";
-    };
-    meta = {
-      description = "Source code for Android API 16";
-    };
-  };
-
-  source_17 = buildSource {
-    name = "android-source-17";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sources-17_r01.zip;
-      sha1 = "6f1f18cd2d2b1852d7f6892df9cee3823349d43a";
-    };
-    meta = {
-      description = "Source code for Android API 17";
-    };
-  };
-
-  source_18 = buildSource {
-    name = "android-source-18";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sources-18_r01.zip;
-      sha1 = "8b49fdf7433f4881a2bfb559b5dd05d8ec65fb78";
-    };
-    meta = {
-      description = "Source code for Android API 18";
-    };
-  };
-
-  source_19 = buildSource {
-    name = "android-source-19";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sources-19_r02.zip;
-      sha1 = "433a1d043ef77561571250e94cb7a0ef24a202e7";
-    };
-    meta = {
-      description = "Source code for Android API 19";
-    };
-  };
-
-  source_20 = buildSource {
-    name = "android-source-20";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sources-20_r01.zip;
-      sha1 = "8da3e40f2625f9f7ef38b7e403f49f67226c0d76";
-    };
-    meta = {
-      description = "Source code for Android API 20";
-    };
-  };
-
-  source_21 = buildSource {
-    name = "android-source-21";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sources-21_r01.zip;
-      sha1 = "137a5044915d32bea297a8c1552684802bbc2e25";
-    };
-    meta = {
-      description = "Source code for Android API 21";
-    };
-  };
-
-  source_22 = buildSource {
-    name = "android-source-22";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sources-22_r01.zip;
-      sha1 = "98320e13976d11597a4a730a8d203ac9a03ed5a6";
-    };
-    meta = {
-      description = "Source code for Android API 22";
-    };
-  };
-
-  source_23 = buildSource {
-    name = "android-source-23";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sources-23_r01.zip;
-      sha1 = "b0f15da2762b42f543c5e364c2b15b198cc99cc2";
-    };
-    meta = {
-      description = "Source code for Android API 23";
-    };
-  };
-
-  source_24 = buildSource {
-    name = "android-source-24";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sources-24_r01.zip;
-      sha1 = "6b96115830a83d654479f32ce4b724ca9011148b";
-    };
-    meta = {
-      description = "Source code for Android API 24";
-    };
-  };
-
-  source_25 = buildSource {
-    name = "android-source-25";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sources-25_r01.zip;
-      sha1 = "bbc72efd1a9bad87cc507e308f0d29aad438c52c";
-    };
-    meta = {
-      description = "Source code for Android API 25";
-    };
-  };
-
-  source_26 = buildSource {
-    name = "android-source-26";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sources-26_r01.zip;
-      sha1 = "2af701ee3223d580409288540b1d06932fd8f9b9";
-    };
-    meta = {
-      description = "Source code for Android API 26";
-    };
-  };
-
-  source_27 = buildSource {
-    name = "android-source-27";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sources-27_r01.zip;
-      sha1 = "7b714670561d08f54751af42aca929867b806596";
-    };
-    meta = {
-      description = "Source code for Android API 27";
-    };
-  };
-
-  source_28 = buildSource {
-    name = "android-source-28";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sources-28_r01.zip;
-      sha1 = "5610e0c24235ee3fa343c899ddd551be30315255";
-    };
-    meta = {
-      description = "Source code for Android API 28";
-    };
-  };
-
-}
diff --git a/pkgs/development/mobile/androidenv/support-repository.nix b/pkgs/development/mobile/androidenv/support-repository.nix
deleted file mode 100644
index 55c1b60e965..00000000000
--- a/pkgs/development/mobile/androidenv/support-repository.nix
+++ /dev/null
@@ -1,18 +0,0 @@
-{stdenv, fetchurl, unzip}:
-
-stdenv.mkDerivation rec {
-  version = "47";
-  name = "android-support-repository-r${version}";
-  src = fetchurl {
-    url = "http://dl.google.com/android/repository/android_m2repository_r${version}.zip";
-    sha256 = "1l13a6myff6i8x99h1ky2j5sglwy8wc0rsbxfcbif375vh41iyd3";
-  };
-
-  buildCommand = ''
-    mkdir -p $out
-    cd $out
-    unzip $src
-  '';
-
-  buildInputs = [ unzip ];
-}
diff --git a/pkgs/development/mobile/androidenv/support.nix b/pkgs/development/mobile/androidenv/support.nix
deleted file mode 100644
index 8198e96f7e7..00000000000
--- a/pkgs/development/mobile/androidenv/support.nix
+++ /dev/null
@@ -1,18 +0,0 @@
-{stdenv, fetchurl, unzip}:
-
-stdenv.mkDerivation rec {
-  version = "23.2.1";
-  name = "android-support-r${version}";
-  src = fetchurl {
-    url = "https://dl.google.com/android/repository/support_r${version}.zip";
-    sha1 = "azl7hgps1k98kmbhw45wwbrc86y1n4j1";
-  };
-  
-  buildCommand = ''
-    mkdir -p $out
-    cd $out
-    unzip $src
-  '';
-  
-  buildInputs = [ unzip ];
-}
diff --git a/pkgs/development/mobile/androidenv/sys-img.xml b/pkgs/development/mobile/androidenv/sys-img.xml
deleted file mode 100644
index d7c8dd9de9b..00000000000
--- a/pkgs/development/mobile/androidenv/sys-img.xml
+++ /dev/null
@@ -1,1026 +0,0 @@
-<?xml version="1.0" ?>
-<sdk:sdk-sys-img xmlns:sdk="http://schemas.android.com/sdk/android/sys-img/3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-	<!--Generated on 2018-09-27 12:07:51.414125 with ADRT.-->
-	<sdk:license id="android-sdk-license" type="text">Terms and Conditions
-
-This is the Android Software Development Kit License Agreement
-
-1. Introduction
-
-1.1 The Android Software Development Kit (referred to in the License Agreement as the &quot;SDK&quot; and specifically including the Android system files, packaged APIs, and Google APIs add-ons) is licensed to you subject to the terms of the License Agreement. The License Agreement forms a legally binding contract between you and Google in relation to your use of the SDK.
-
-1.2 &quot;Android&quot; means the Android software stack for devices, as made available under the Android Open Source Project, which is located at the following URL: http://source.android.com/, as updated from time to time.
-
-1.3 A &quot;compatible implementation&quot; means any Android device that (i) complies with the Android Compatibility Definition document, which can be found at the Android compatibility website (http://source.android.com/compatibility) and which may be updated from time to time; and (ii) successfully passes the Android Compatibility Test Suite (CTS).
-
-1.4 &quot;Google&quot; means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States.
-
-
-2. Accepting the License Agreement
-
-2.1 In order to use the SDK, you must first agree to the License Agreement. You may not use the SDK if you do not accept the License Agreement.
-
-2.2 By clicking to accept, you hereby agree to the terms of the License Agreement.
-
-2.3 You may not use the SDK and may not accept the License Agreement if you are a person barred from receiving the SDK under the laws of the United States or other countries, including the country in which you are resident or from which you use the SDK.
-
-2.4 If you are agreeing to be bound by the License Agreement on behalf of your employer or other entity, you represent and warrant that you have full legal authority to bind your employer or such entity to the License Agreement. If you do not have the requisite authority, you may not accept the License Agreement or use the SDK on behalf of your employer or other entity.
-
-
-3. SDK License from Google
-
-3.1 Subject to the terms of the License Agreement, Google grants you a limited, worldwide, royalty-free, non-assignable, non-exclusive, and non-sublicensable license to use the SDK solely to develop applications for compatible implementations of Android.
-
-3.2 You may not use this SDK to develop applications for other platforms (including non-compatible implementations of Android) or to develop another SDK. You are of course free to develop applications for other platforms, including non-compatible implementations of Android, provided that this SDK is not used for that purpose.
-
-3.3 You agree that Google or third parties own all legal right, title and interest in and to the SDK, including any Intellectual Property Rights that subsist in the SDK. &quot;Intellectual Property Rights&quot; means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Google reserves all rights not expressly granted to you.
-
-3.4 You may not use the SDK for any purpose not expressly permitted by the License Agreement.  Except to the extent required by applicable third party licenses, you may not copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the SDK or any part of the SDK.
-
-3.5 Use, reproduction and distribution of components of the SDK licensed under an open source software license are governed solely by the terms of that open source software license and not the License Agreement.
-
-3.6 You agree that the form and nature of the SDK that Google provides may change without prior notice to you and that future versions of the SDK may be incompatible with applications developed on previous versions of the SDK. You agree that Google may stop (permanently or temporarily) providing the SDK (or any features within the SDK) to you or to users generally at Google's sole discretion, without prior notice to you.
-
-3.7 Nothing in the License Agreement gives you a right to use any of Google's trade names, trademarks, service marks, logos, domain names, or other distinctive brand features.
-
-3.8 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the SDK.
-
-
-4. Use of the SDK by You
-
-4.1 Google agrees that it obtains no right, title or interest from you (or your licensors) under the License Agreement in or to any software applications that you develop using the SDK, including any intellectual property rights that subsist in those applications.
-
-4.2 You agree to use the SDK and write applications only for purposes that are permitted by (a) the License Agreement and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries).
-
-4.3 You agree that if you use the SDK to develop applications for general public users, you will protect the privacy and legal rights of those users. If the users provide you with user names, passwords, or other login information or personal information, you must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. If the user provides your application with Google Account information, your application may only use that information to access the user's Google Account when, and for the limited purposes for which, the user has given you permission to do so.
-
-4.4 You agree that you will not engage in any activity with the SDK, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of any third party including, but not limited to, Google or any mobile communications carrier.
-
-4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through Android and/or applications for Android, and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so.
-
-4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under the License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Google or any third party may suffer) of any such breach.
-
-5. Your Developer Credentials
-
-5.1 You agree that you are responsible for maintaining the confidentiality of any developer credentials that may be issued to you by Google or which you may choose yourself and that you will be solely responsible for all applications that are developed under your developer credentials.
-
-6. Privacy and Information
-
-6.1 In order to continually innovate and improve the SDK, Google may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in the SDK are being used and how they are being used. Before any of this information is collected, the SDK will notify you and seek your consent. If you withhold consent, the information will not be collected.
-
-6.2 The data collected is examined in the aggregate to improve the SDK and is maintained in accordance with Google's Privacy Policy.
-
-
-7. Third Party Applications
-
-7.1 If you use the SDK to run applications developed by a third party or that access data, content or resources provided by a third party, you agree that Google is not responsible for those applications, data, content, or resources. You understand that all data, content or resources which you may access through such third party applications are the sole responsibility of the person from which they originated and that Google is not liable for any loss or damage that you may experience as a result of the use or access of any of those third party applications, data, content, or resources.
-
-7.2 You should be aware the data, content, and resources presented to you through such a third party application may be protected by intellectual property rights which are owned by the providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on these data, content, or resources (either in whole or in part) unless you have been specifically given permission to do so by the relevant owners.
-
-7.3 You acknowledge that your use of such third party applications, data, content, or resources may be subject to separate terms between you and the relevant third party. In that case, the License Agreement does not affect your legal relationship with these third parties.
-
-
-8. Using Android APIs
-
-8.1 Google Data APIs
-
-8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be protected by intellectual property rights which are owned by Google or those parties that provide the data (or by other persons or companies on their behalf). Your use of any such API may be subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this data (either in whole or in part) unless allowed by the relevant Terms of Service.
-
-8.1.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree that you shall retrieve data only with the user's explicit consent and only when, and for the limited purposes for which, the user has given you permission to do so.
-
-
-9. Terminating the License Agreement
-
-9.1 The License Agreement will continue to apply until terminated by either you or Google as set out below.
-
-9.2 If you want to terminate the License Agreement, you may do so by ceasing your use of the SDK and any relevant developer credentials.
-
-9.3 Google may at any time, terminate the License Agreement with you if:
-(A) you have breached any provision of the License Agreement; or
-(B) Google is required to do so by law; or
-(C) the partner with whom Google offered certain parts of SDK (such as APIs) to you has terminated its relationship with Google or ceased to offer certain parts of the SDK to you; or
-(D) Google decides to no longer provide the SDK or certain parts of the SDK to users in the country in which you are resident or from which you use the service, or the provision of the SDK or certain SDK services to you by Google is, in Google's sole discretion, no longer commercially viable.
-
-9.4 When the License Agreement comes to an end, all of the legal rights, obligations and liabilities that you and Google have benefited from, been subject to (or which have accrued over time whilst the License Agreement has been in force) or which are expressed to continue indefinitely, shall be unaffected by this cessation, and the provisions of paragraph 14.7 shall continue to apply to such rights, obligations and liabilities indefinitely.
-
-
-10. DISCLAIMER OF WARRANTIES
-
-10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE SDK IS AT YOUR SOLE RISK AND THAT THE SDK IS PROVIDED &quot;AS IS&quot; AND &quot;AS AVAILABLE&quot; WITHOUT WARRANTY OF ANY KIND FROM GOOGLE.
-
-10.2 YOUR USE OF THE SDK AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE SDK IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE.
-
-10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-
-
-11. LIMITATION OF LIABILITY
-
-11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.
-
-
-12. Indemnification
-
-12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Google, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys fees) arising out of or accruing from (a) your use of the SDK, (b) any application you develop on the SDK that infringes any copyright, trademark, trade secret, trade dress, patent or other intellectual property right of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you with the License Agreement.
-
-
-13. Changes to the License Agreement
-
-13.1 Google may make changes to the License Agreement as it distributes new versions of the SDK. When these changes are made, Google will make a new version of the License Agreement available on the website where the SDK is made available.
-
-
-14. General Legal Terms
-
-14.1 The License Agreement constitutes the whole legal agreement between you and Google and governs your use of the SDK (excluding any services which Google may provide to you under a separate written agreement), and completely replaces any prior agreements between you and Google in relation to the SDK.
-
-14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in the License Agreement (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google's rights and that those rights or remedies will still be available to Google.
-
-14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of the License Agreement is invalid, then that provision will be removed from the License Agreement without affecting the rest of the License Agreement. The remaining provisions of the License Agreement will continue to be valid and enforceable.
-
-14.4 You acknowledge and agree that each member of the group of companies of which Google is the parent shall be third party beneficiaries to the License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of the License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to the License Agreement.
-
-14.5 EXPORT RESTRICTIONS. THE SDK IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE SDK. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.
-
-14.6 The rights granted in the License Agreement may not be assigned or transferred by either you or Google without the prior written approval of the other party. Neither you nor Google shall be permitted to delegate their responsibilities or obligations under the License Agreement without the prior written approval of the other party.
-
-14.7 The License Agreement, and your relationship with Google under the License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from the License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.
-
-
-November 20, 2015</sdk:license>
-	<sdk:license id="android-sdk-preview-license" type="text">To get started with the Android SDK Preview, you must agree to the following terms and conditions.
-As described below, please note that this is a preview version of the Android SDK, subject to change, that you use at your own risk.  The Android SDK Preview is not a stable release, and may contain errors and defects that can result in serious damage to your computer systems, devices and data.
-
-This is the Android SDK Preview License Agreement (the &quot;License Agreement&quot;).
-
-1. Introduction
-
-1.1 The Android SDK Preview (referred to in the License Agreement as the “Preview” and specifically including the Android system files, packaged APIs, and Preview library files, if and when they are made available) is licensed to you subject to the terms of the License Agreement. The License Agreement forms a legally binding contract between you and Google in relation to your use of the Preview.
-
-1.2 &quot;Android&quot; means the Android software stack for devices, as made available under the Android Open Source Project, which is located at the following URL: http://source.android.com/, as updated from time to time.
-
-1.3 &quot;Google&quot; means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States.
-
-2. Accepting the License Agreement
-
-2.1 In order to use the Preview, you must first agree to the License Agreement. You may not use the Preview if you do not accept the License Agreement.
-
-2.2 By clicking to accept and/or using the Preview, you hereby agree to the terms of the License Agreement.
-
-2.3 You may not use the Preview and may not accept the License Agreement if you are a person barred from receiving the Preview under the laws of the United States or other countries including the country in which you are resident or from which you use the Preview.
-
-2.4 If you will use the Preview internally within your company or organization you agree to be bound by the License Agreement on behalf of your employer or other entity, and you represent and warrant that you have full legal authority to bind your employer or such entity to the License Agreement. If you do not have the requisite authority, you may not accept the License Agreement or use the Preview on behalf of your employer or other entity.
-
-3. Preview License from Google
-
-3.1 Subject to the terms of the License Agreement, Google grants you a royalty-free, non-assignable, non-exclusive, non-sublicensable, limited, revocable license to use the Preview, personally or internally within your company or organization, solely to develop applications to run on the Android platform.
-
-3.2 You agree that Google or third parties owns all legal right, title and interest in and to the Preview, including any Intellectual Property Rights that subsist in the Preview. &quot;Intellectual Property Rights&quot; means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Google reserves all rights not expressly granted to you.
-
-3.3 You may not use the Preview for any purpose not expressly permitted by the License Agreement. Except to the extent required by applicable third party licenses, you may not: (a) copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the Preview or any part of the Preview; or (b) load any part of the Preview onto a mobile handset or any other hardware device except a personal computer, combine any part of the Preview with other software, or distribute any software or device incorporating a part of the Preview.
-
-3.4 You agree that you will not take any actions that may cause or result in the fragmentation of Android, including but not limited to distributing, participating in the creation of, or promoting in any way a software development kit derived from the Preview.
-
-3.5 Use, reproduction and distribution of components of the Preview licensed under an open source software license are governed solely by the terms of that open source software license and not the License Agreement. You agree to remain a licensee in good standing in regard to such open source software licenses under all the rights granted and to refrain from any actions that may terminate, suspend, or breach such rights.
-
-3.6 You agree that the form and nature of the Preview that Google provides may change without prior notice to you and that future versions of the Preview may be incompatible with applications developed on previous versions of the Preview. You agree that Google may stop (permanently or temporarily) providing the Preview (or any features within the Preview) to you or to users generally at Google's sole discretion, without prior notice to you.
-
-3.7 Nothing in the License Agreement gives you a right to use any of Google's trade names, trademarks, service marks, logos, domain names, or other distinctive brand features.
-
-3.8 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the Preview.
-
-4. Use of the Preview by You
-
-4.1 Google agrees that nothing in the License Agreement gives Google any right, title or interest from you (or your licensors) under the License Agreement in or to any software applications that you develop using the Preview, including any intellectual property rights that subsist in those applications.
-
-4.2 You agree to use the Preview and write applications only for purposes that are permitted by (a) the License Agreement, and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries).
-
-4.3 You agree that if you use the Preview to develop applications, you will protect the privacy and legal rights of users. If users provide you with user names, passwords, or other login information or personal information, you must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. If users provide you with Google Account information, your application may only use that information to access the user's Google Account when, and for the limited purposes for which, each user has given you permission to do so.
-
-4.4 You agree that you will not engage in any activity with the Preview, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of Google or any third party.
-
-4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through Android and/or applications for Android, and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so.
-
-4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under the License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Google or any third party may suffer) of any such breach.
-
-4.7 The Preview is in development, and your testing and feedback are an important part of the development process. By using the Preview, you acknowledge that implementation of some features are still under development and that you should not rely on the Preview having the full functionality of a stable release. You agree not to publicly distribute or ship any application using this Preview as this Preview will no longer be supported after the official Android SDK is released.
-
-5. Your Developer Credentials
-
-5.1 You agree that you are responsible for maintaining the confidentiality of any developer credentials that may be issued to you by Google or which you may choose yourself and that you will be solely responsible for all applications that are developed under your developer credentials.
-
-6. Privacy and Information
-
-6.1 In order to continually innovate and improve the Preview, Google may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in the Preview are being used and how they are being used. Before any of this information is collected, the Preview will notify you and seek your consent. If you withhold consent, the information will not be collected.
-
-6.2 The data collected is examined in the aggregate to improve the Preview and is maintained in accordance with Google's Privacy Policy located at http://www.google.com/policies/privacy/.
-
-7. Third Party Applications
-
-7.1 If you use the Preview to run applications developed by a third party or that access data, content or resources provided by a third party, you agree that Google is not responsible for those applications, data, content, or resources. You understand that all data, content or resources which you may access through such third party applications are the sole responsibility of the person from which they originated and that Google is not liable for any loss or damage that you may experience as a result of the use or access of any of those third party applications, data, content, or resources.
-
-7.2 You should be aware the data, content, and resources presented to you through such a third party application may be protected by intellectual property rights which are owned by the providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on these data, content, or resources (either in whole or in part) unless you have been specifically given permission to do so by the relevant owners.
-
-7.3 You acknowledge that your use of such third party applications, data, content, or resources may be subject to separate terms between you and the relevant third party.
-
-8. Using Google APIs
-
-8.1 Google APIs
-
-8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be protected by intellectual property rights which are owned by Google or those parties that provide the data (or by other persons or companies on their behalf). Your use of any such API may be subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this data (either in whole or in part) unless allowed by the relevant Terms of Service.
-
-8.1.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree that you shall retrieve data only with the user's explicit consent and only when, and for the limited purposes for which, the user has given you permission to do so.
-
-9. Terminating the License Agreement
-
-9.1 the License Agreement will continue to apply until terminated by either you or Google as set out below.
-
-9.2 If you want to terminate the License Agreement, you may do so by ceasing your use of the Preview and any relevant developer credentials.
-
-9.3 Google may at any time, terminate the License Agreement, with or without cause, upon notice to you.
-
-9.4 The License Agreement will automatically terminate without notice or other action upon the earlier of:
-(A) when Google ceases to provide the Preview or certain parts of the Preview to users in the country in which you are resident or from which you use the service; and
-(B) Google issues a final release version of the Android SDK.
-
-9.5 When the License Agreement is terminated, the license granted to you in the License Agreement will terminate, you will immediately cease all use of the Preview, and the provisions of paragraphs 10, 11, 12 and 14 shall survive indefinitely.
-
-10. DISCLAIMERS
-
-10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE PREVIEW IS AT YOUR SOLE RISK AND THAT THE PREVIEW IS PROVIDED &quot;AS IS&quot; AND &quot;AS AVAILABLE&quot; WITHOUT WARRANTY OF ANY KIND FROM GOOGLE.
-
-10.2 YOUR USE OF THE PREVIEW AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE PREVIEW IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE. WITHOUT LIMITING THE FOREGOING, YOU UNDERSTAND THAT THE PREVIEW IS NOT A STABLE RELEASE AND MAY CONTAIN ERRORS, DEFECTS AND SECURITY VULNERABILITIES THAT CAN RESULT IN SIGNIFICANT DAMAGE, INCLUDING THE COMPLETE, IRRECOVERABLE LOSS OF USE OF YOUR COMPUTER SYSTEM OR OTHER DEVICE.
-
-10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-
-11. LIMITATION OF LIABILITY
-
-11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.
-
-12. Indemnification
-
-12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Google, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys’ fees) arising out of or accruing from (a) your use of the Preview, (b) any application you develop on the Preview that infringes any Intellectual Property Rights of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you of the License Agreement.
-
-13. Changes to the License Agreement
-
-13.1 Google may make changes to the License Agreement as it distributes new versions of the Preview. When these changes are made, Google will make a new version of the License Agreement available on the website where the Preview is made available.
-
-14. General Legal Terms
-
-14.1 the License Agreement constitutes the whole legal agreement between you and Google and governs your use of the Preview (excluding any services which Google may provide to you under a separate written agreement), and completely replaces any prior agreements between you and Google in relation to the Preview.
-
-14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in the License Agreement (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google's rights and that those rights or remedies will still be available to Google.
-
-14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of the License Agreement is invalid, then that provision will be removed from the License Agreement without affecting the rest of the License Agreement. The remaining provisions of the License Agreement will continue to be valid and enforceable.
-
-14.4 You acknowledge and agree that each member of the group of companies of which Google is the parent shall be third party beneficiaries to the License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of the License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to the License Agreement.
-
-14.5 EXPORT RESTRICTIONS. THE PREVIEW IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE PREVIEW. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.
-
-14.6 The License Agreement may not be assigned or transferred by you without the prior written approval of Google, and any attempted assignment without such approval will be void. You shall not delegate your responsibilities or obligations under the License Agreement without the prior written approval of Google.
-
-14.7 The License Agreement, and your relationship with Google under the License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from the License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.
-
-June 2014.</sdk:license>
-	<sdk:license id="intel-android-sysimage-license" type="text">Intel Corporation Internal Evaluation License Agreement for x86 Android* System Images for Android Software Development Kit (SDK)
-This Internal Evaluation License Agreement (this &quot;Agreement&quot;) is entered into by and between Intel and you (as an individual developer or a legal entity -- identified below as Recipient). Intel shall provide the Evaluation Software to Recipient as described in accordance with the Internal Evaluation License Terms and Conditions.
-
-Definitions.
-These terms shall have the following meanings:
-
-&quot;Intel&quot; or &quot;INTEL&quot;
-Intel Corporation
-With an Address of:
-2200 Mission College Blvd.
-Santa Clara, CA 95052
-Office of the General Counsel
-Mail Stop: RNB-4-51
-Attn: Software and Services Group Legal
-
-&quot;Evaluation Software&quot;
-The x86 Android* emulator system images for Android  Software Development Kit (SDK), as provided by Intel.
-
-INTERNAL EVALUATION LICENSE TERMS AND CONDITIONS
-
-1. DEFINITIONS.
-
-1.1 Additional Defined Terms. &quot;Agreement&quot;, &quot;Evaluation Software&quot;,  &quot;Intel&quot;, &quot;Non-disclosure Agreement&quot;, &quot;Recipient&quot;, and &quot;Effective Date&quot; shall have the meanings ascribed to them on the signature page(s) of this Agreement.
-
-1.2 Evaluation Materials means, collectively, the Evaluation Software (in source and/or object code form) and documentation (including, without limitation, any design documents, specifications and other related materials) related to the Evaluation Software.
-
-1.3 &quot;Open Source Software&quot; means any software that requires as a condition of use, modification and/or distribution of such software that such software or other software incorporated into, derived from or distributed with such software (a) be disclosed or distributed in source code form; or (b) be licensed by the user to third parties for the purpose of making and/or distributing derivative works; or (c) be redistributable at no charge. Open Source Software includes, without limitation, software licensed or distributed under any of the following licenses or distribution models, or licenses or distribution models substantially similar to any of the following: (a) GNU’s General Public License (GPL) or Lesser/Library GPL (LGPL), (b) the Artistic License (e.g., PERL), (c) the Mozilla Public License, (d) the Netscape Public License, (e) the Sun Community Source License (SCSL), (f) the Sun Industry Source License (SISL), (g) the Apache Software license and (h) the Common Public License (CPL).
-
-1.4 &quot;Pre-Release Materials&quot; means &quot;alpha&quot; or &quot;beta&quot; designated pre-release features, which may not be fully functional, which Intel may substantially modify in producing any production version of the Evaluation Materials and/or is still under development by Intel and/or Intel’s suppliers.
-
-2. PURPOSE. Intel desires to provide the Evaluation Materials to Recipient solely for Recipient's internal evaluation of the Evaluation Software and other Intel products, to evaluate the desirability of cooperating with Intel in developing products based on the Evaluation Software and/or to advise Intel as to possible modifications to the Evaluation Software. Recipient may not disclose, distribute or make commercial use of the Evaluation Materials or any modifications to the Evaluation Materials.
-THE EVALUATION MATERIALS ARE PROVIDED FOR EVALUATION PURPOSES ONLY AND MAY NOT BE DISTRIBUTED BY RECIPIENT OR INCORPORATED INTO RECIPIENT’S PRODUCTS OR SOFTWARE. PLEASE CONTACT AN INTEL SALES REPRESENTATIVE TO LEARN ABOUT THE AVAILABILITY AND COST OF A COMMERICAL VERSION OF THE EVALUATION SOFTWARE.
-
-3. TITLE. Title to the Evaluation Materials remains with Intel or its suppliers. Recipient shall not mortgage, pledge or encumber the Evaluation Materials in any way. Recipient shall return all Evaluation Materials, keeping no copies, upon termination or expiration of this Agreement.
-
-4. LICENSE. Intel grants Recipient a royalty-free, personal, nontransferable, nonexclusive license under its copyrights to use the Evaluation Software only for the purposes described in paragraph 2 above. Unless otherwise communicated in writing by Intel to Recipient, to the extent the Evaluation Software is provided in more than one delivery or release (each, a &quot;Release&quot;) the license grant in this Section 4 and the Evaluation Period shall apply to each Release. Recipient may not make modifications to the Evaluation Software. Recipient shall not disassemble, reverse-engineer, or decompile any software not provided to Recipient in source code form.
-EXCEPT AS PROVIDED HEREIN, NO OTHER LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY OTHER INTELLECTUAL PROPERTY RIGHTS IS GRANTED TO THE RECIPIENT.
-
-5. NO OBLIGATION. Recipient shall have no duty to purchase or license any product from Intel. Intel and its suppliers shall have no obligation to provide support for, or develop a non-evaluation version of, the Evaluation Software or to license any version of it.
-
-6. MODIFICATIONS. This Agreement does NOT obligate Recipient to provide Intel with comments or suggestions regarding Evaluation Materials. However, should Recipient provide Intel with comments or suggestions for the modification, correction, improvement or enhancement of (a) the Evaluation Materials or (b) Intel products or processes which may embody the Evaluation Materials, Recipient grants to Intel a non-exclusive, irrevocable, worldwide, royalty-free license, with the right to sublicense Intel’s licensees and customers, under Recipient intellectual property rights, the rights to use and disclose such comments and suggestions in any manner Intel chooses and to display, perform, copy, make, have made, use, sell, offer to sell, import, and otherwise dispose of Intel’s and its sublicensee’s products embodying such comments and suggestions in any manner and via any media Intel chooses, without reference to the source.
-
-7. WARRANTY DISCLAIMER. INTEL AND ITS SUPPLIERS MAKE NO WARRANTIES WITH RESPECT TO EVALUATION MATERIALS, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OR ANY IMPLIED WARRANTY OF NONINFRINGEMENT. THE EVALUATION MATERIALS ARE PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND.
-
-8. LIMITATION OF LIABILITY. INTEL AND ITS SUPPLIERS SHALL NOT BE LIABLE FOR ANY PROPERTY DAMAGE, PERSONAL INJURY, LOSS OF PROFITS, INTERRUPTION OF BUSINESS OR ANY SPECIAL, CONSEQUENTIAL OR INCIDENTAL DAMAGES, HOWEVER CAUSED, WHETHER FOR BREACH OF WARRANTY, CONTRACT, STRICT LIABILITY OR OTHERWISE. INTEL AND ITS SUPPLIERS DISCLAIM ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS RELATING TO THE EVALUATION MATERIALS.
-
-9. EXPIRATION. Intel may terminate this Agreement immediately after a breach by Recipient.
-
-10. GENERAL.
-
-10.1 Controlling Law. Any claims arising under or relating to this Agreement shall be governed by the internal substantive laws of the State of Delaware or federal courts located in Delaware, without regard to principles of conflict of laws. Each party hereby agrees to jurisdiction and venue in the courts of the State of Delaware for all disputes and litigation arising under or relating to this Agreement. The parties agree that the United Nations Convention on Contracts for the International Sale of Goods is specifically excluded from application to this Agreement. The parties consent to the personal jurisdiction of the above courts.
-
-10.2 Remedies. Recipient acknowledges that any disclosure, commercialization, or public use of the Evaluation Materials would cause irreparable injury to Intel and consents to the grant of an injunction by any court of competent jurisdiction in the event of a threatened breach.
-
-10.3 Assignment. Recipient may not delegate, assign or transfer this Agreement, the license granted or any of Recipient’s rights or duties hereunder, expressly, by implication, by operation of law, by way of merger (regardless of whether Recipient is the surviving entity) or acquisition, or otherwise and any attempt to do so, without Intel’s express prior written consent, shall be null and void. Intel may assign this Agreement, and its rights and obligations hereunder, in its sole discretion.
-
-10.4 Entire Agreement. This Agreement constitutes the entire agreement between Recipient and Intel and supersedes in their entirety any and all oral or written agreements previously existing between Recipient and Intel with respect to the subject matter hereof. This Agreement supersedes any and all &quot;click-to-accept&quot; or shrink-wrapped licenses, in hard-copy or electronic form, embedded in or included with the Evaluation Materials. This Agreement may only be amended or supplemented by a writing that refers explicitly to this Agreement and that is signed by duly authorized representatives of Recipient and Intel. Without limiting the foregoing, terms and conditions on any purchase orders or similar materials submitted by Recipient to Intel, and any terms contained in Intel’s standard acknowledgment form that are in conflict with these terms, shall be of no force or effect.
-
-10.5 Severability. In the event that any provision of this Agreement shall be unenforceable or invalid under any applicable law or be so held by applicable court decision, such unenforceability or invalidity shall not render this Agreement unenforceable or invalid as a whole, and, in such event, such provision shall be changed and interpreted so as to best accomplish the objectives of such unenforceable or invalid provision within the limits of applicable law or applicable court decisions.
-
-10.6 Export Regulations / Export Control. Recipient shall not export, either directly or indirectly, any product, service or technical data or system incorporating the Evaluation Materials without first obtaining any required license or other approval from the U.S. Department of Commerce or any other agency or department of the United States Government. In the event any product is exported from the United States or re-exported from a foreign destination by Recipient, Recipient shall ensure that the distribution and export/re-export or import of the product is in compliance with all laws, regulations, orders, or other restrictions of the U.S. Export Administration Regulations and the appropriate foreign government. Recipient agrees that neither it nor any of its subsidiaries will export/re-export any technical data, process, product, or service, directly or indirectly, to any country for which the United States government or any agency thereof or the foreign government from where it is shipping requires an export license, or other governmental approval, without first obtaining such license or approval. Recipient also agrees to implement measures to ensure that foreign national employees are authorized to receive any information controlled by U.S. export control laws. An export is &quot;deemed&quot; to take place when information is released to a foreign national wherever located.
-
-10.7 Special Terms for Pre-Release Materials. If so indicated in the description of the Evaluation Software, the Evaluation Software may contain Pre-Release Materials. Recipient hereby understands, acknowledges and agrees that: (i) Pre-Release Materials may not be fully tested and may contain bugs or errors; (ii) Pre-Release materials are not suitable for commercial release in their current state; (iii) regulatory approvals for Pre-Release Materials (such as UL or FCC) have not been obtained, and Pre-Release Materials may therefore not be certified for use in certain countries or environments and (iv) Intel can provide no assurance that it will ever produce or make generally available a production version of the Pre-Release Materials . Intel is not under any obligation to develop and/or release or offer for sale or license a final product based upon the Pre-Release Materials and may unilaterally elect to abandon the Pre-Release Materials or any such development platform at any time and without any obligation or liability whatsoever to Recipient or any other person.
-
-10.8 Open Source Software. In the event Open Source software is included with Evaluation Software, such Open Source software is licensed pursuant to the applicable Open Source software license agreement identified in the Open Source software comments in the applicable source code file(s) and/or file header provided with Evaluation Software. Additional detail may be provided (where applicable) in the accompanying on-line documentation. With respect to the Open Source software, nothing in this Agreement limits any rights under, or grants rights that supersede, the terms of any applicable Open Source software license agreement.
-ANY PRE-RELEASE MATERIALS ARE NON-QUALIFIED AND, AS SUCH, ARE PROVIDED POSSIBLY WITH FAULTS</sdk:license>
-	<sdk:license id="mips-android-sysimage-license" type="text">MIPS Technologies, Inc. (“MIPS”) Internal Evaluation License Agreement for MIPS Android™ System Images for Android Software Development Kit (SDK):
-This Internal Evaluation License Agreement (this &quot;Agreement&quot;) is entered into by and between MIPS and you (as an individual developer or a legal entity -- identified below as “Recipient”). MIPS shall make the Evaluation Software available to Recipient as described in accordance with the terms and conditions set forth below.
-
-By clicking on the “Accept” button, downloading, installing, or otherwise using the Evaluation Materials (defined below), you agree to be bound by the terms of this Agreement effective as of the date you click “Accept” (the “Effective Date”), and if doing so on behalf of an entity, you represent that you are authorized to bind the entity to the terms and conditions of this Agreement. If you do not agree to be bound by the terms and conditions of this Agreement, do not download, install, or use the Evaluation Materials.
-
-1. DEFINITIONS. These terms shall have the following meanings:
-
-1.1 “MIPS” shall mean MIPS Technologies, Inc., a Delaware corporation having a principal place of business at: 955 East Arques Ave., Sunnyvale, CA 94085
-
-1.2 “Evaluation Software” shall mean MIPS Android™ emulator system images for Android Software Development Kit (SDK), as made available to Recipient.
-
-1.3 “Evaluation Materials&quot; means, collectively, the Evaluation Software (in source and/or object code form) and documentation (including, without limitation, any design documents, specifications, reference manuals, and other related materials) related to the Evaluation Software as made available to Recipient.
-
-1.4 “Open Source Software” means any software that requires (as a condition of use, modification and/or distribution of such software) that such software or other software incorporated into, derived from or distributed with such software (a) be disclosed or distributed in source code form; or (b) be licensed by the user to third parties for the purpose of making and/or distributing derivative works; or (c) be redistributable at no charge. Open Source Software includes, without limitation, software licensed or distributed under any of the following licenses or distribution models, or licenses or distribution models substantially similar to any of the following: (a) GNU’s General Public License (GPL) or Lesser/Library GPL (LGPL), (b) the Artistic License (e.g., PERL), (c) the Mozilla Public License, (d) the Netscape Public License, (e) the Sun Community Source License (SCSL), (f) the Sun Industry Source License (SISL), (g) the Apache Software license and (h) the Common Public License (CPL).
-
-1.5 “Pre-Release Materials” means “alpha” or “beta” designated pre-release features, which may not be fully functional, which MIPS may substantially modify in producing any production version of the Evaluation Materials, and/or which is still under development by MIPS and/or MIPS’ suppliers.
-
-2. PURPOSE. MIPS desires to make the Evaluation Materials available to Recipient solely for Recipient's internal evaluation of the Evaluation Software to evaluate the desirability of cooperating with MIPS in developing products that are compatible with the Evaluation Software and/or to advise MIPS as to possible modifications to the Evaluation Software. Recipient may not disclose, distribute, modify (except to facilitate the above-mentioned internal evaluation), or make commercial use of the Evaluation Materials or any modifications of the Evaluation Materials.
-
-THE EVALUATION MATERIALS ARE PROVIDED FOR EVALUATION PURPOSES ONLY AND MAY NOT BE MODIFIED (EXCEPT TO FACILITATE THE INTERNAL EVALUATION) OR DISTRIBUTED BY RECIPIENT OR INCORPORATED INTO RECIPIENT’S PRODUCTS OR SOFTWARE. PLEASE CONTACT A MIPS SALES REPRESENTATIVE TO LEARN ABOUT THE AVAILABILITY AND COST OF A COMMERCIAL VERSION OF THE EVALUATION SOFTWARE.
-
-3. TITLE. Title to the Evaluation Materials remains with MIPS or its suppliers. Recipient shall not mortgage, pledge or encumber the Evaluation Materials in any way. Recipient shall return all Evaluation Materials, keeping no copies, upon termination or expiration of this Agreement.
-
-4. LICENSE. MIPS grants Recipient a royalty-free, personal, nontransferable, nonexclusive license under its copyrights to use the Evaluation Software only for the purposes described in paragraph 2 above and only for a period beginning on the Effective Date and extending to the first anniversary of the Effective Date (the “Evaluation Period”). Unless otherwise communicated in writing by MIPS to Recipient, to the extent the Evaluation Software is provided in more than one delivery or release (each, a “Release”) the license grant in this Section 4 and the Evaluation Period shall apply to each Release, in which case the Evaluation Period shall begin on the date that the Release is made generally available and continue to the first anniversary of such date. Recipient may not make modifications to the Evaluation Software. Recipient shall not disassemble, reverse-engineer, or decompile any software that is not provided to Recipient in source code form.
-
-
-EXCEPT AS PROVIDED HEREIN, NO OTHER LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY OTHER MIPS INTELLECTUAL PROPERTY RIGHTS IS GRANTED TO THE RECIPIENT. OTHER THAN AS EXPLICITLY SET FORTH IN PARAGRAPH 2 ABOVE, NO RIGHT TO COPY, TO REPRODUCE, TO MODIFY, OR TO CREATE DERIVATIVE WORKS OF, THE EVALUATION MATERIALS IS GRANTED HEREIN.
-
-5. NO OBLIGATION. Recipient shall have no duty to purchase or license any product from MIPS. MIPS and its suppliers shall have no obligation to provide support for, or develop a non-evaluation version of, the Evaluation Software or to license any version of it.
-
-6. MODIFICATIONS. This Agreement does not obligate Recipient to provide MIPS with comments or suggestions regarding Evaluation Materials. However, should Recipient provide MIPS with comments or suggestions for the modification, correction, improvement or enhancement of (a) the Evaluation Materials or (b) MIPS products or processes which may embody the Evaluation Materials, then Recipient agrees to grant and hereby grants to MIPS a non-exclusive, irrevocable, worldwide, fully paid-up, royalty-free license, with the right to sublicense MIPS’ licensees and customers, under Recipient’s Intellectual property rights, to use and disclose such comments and suggestions in any manner MIPS chooses and to display, perform, copy, make, have made, use, sell, offer to sell, import, and otherwise dispose of MIPS’ and its sublicensee’s products embodying such comments and suggestions in any manner and via any media MIPS chooses, without reference to the source.
-
-7. WARRANTY DISCLAIMER. MIPS AND ITS SUPPLIERS MAKE NO WARRANTIES WITH RESPECT TO EVALUATION MATERIALS, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OR ANY IMPLIED WARRANTY OF NONINFRINGEMENT WITH RESPECT TO THIRD PARTY INTELLECTUAL PROPERTY. RECIPIENT ACKNOWLEDGES AND AGREES THAT THE EVALUATION MATERIALS ARE PROVIDED “AS IS,” WITHOUT WARRANTY OF ANY KIND.
-
-8. LIMITATION OF LIABILITY. MIPS AND ITS SUPPLIERS SHALL NOT BE LIABLE FOR ANY PROPERTY DAMAGE, PERSONAL INJURY, LOSS OF PROFITS, INTERRUPTION OF BUSINESS OR FOR ANY DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL OR INCIDENTAL DAMAGES, HOWEVER CAUSED OR ALLEGED, WHETHER FOR BREACH OF WARRANTY, CONTRACT, STRICT LIABILITY OR OTHERWISE, INCLUDING WITHOUT LIMITATION, UNDER TORT OR OTHER LEGAL THEORY. MIPS AND ITS SUPPLIERS DISCLAIM ANY AND ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS OF ANY KIND RELATING TO THE EVALUATION MATERIALS.
-
-9. EXPIRATION. MIPS may terminate this Agreement immediately after a breach by Recipient or otherwise at MIPS’ reasonable discretion and upon five (5) business days’ notice to Recipient.
-
-10. GENERAL.
-
-10.1 Controlling Law. This Agreement shall be governed by California law excluding its choice of law rules. With the exception of MIPS’ rights to enforce its intellectual property rights and any confidentiality obligations under this Agreement or any licenses distributed with the Evaluation Materials, all disputes and any claims arising under or relating to this Agreement shall be subject to the exclusive jurisdiction and venue of the state and federal courts located in Santa Clara County, California. Each party hereby agrees to jurisdiction and venue in the courts set forth in the preceding sentence. The parties agree that the United Nations Convention on Contracts for the International Sale of Goods is specifically excluded from application to this Agreement. The parties consent to the personal jurisdiction of the above courts.
-
-10.2 Remedies. Recipient acknowledges and agrees that any breach of confidentiality obligations under this Agreement or any licenses distributed with the Evaluation Materials, as well as any disclosure, commercialization, or public use of the Evaluation Materials, would cause irreparable injury to MIPS, and therefore Recipient agrees to consent to, and hereby consents to, the grant of an injunction by any court of competent jurisdiction in the event of an actual or threatened breach.
-
-10.3 Assignment. Recipient may not delegate, assign or transfer this Agreement, the license granted or any of Recipient’s rights, obligations, or duties hereunder, expressly, by implication, by operation of law, by way of merger (regardless of whether Recipient is the surviving entity) or acquisition, or otherwise and any attempt to do so, without MIPS’ express prior written consent, shall be ineffective, null and void. MIPS may freely assign this Agreement, and its rights and obligations hereunder, in its sole discretion.
-
-10.4 Entire Agreement. This Agreement constitutes the entire agreement between Recipient and MIPS and supersedes in their entirety any and all oral or written agreements previously existing between Recipient and MIPS with respect to the subject matter hereof. This Agreement may only be amended or supplemented by a writing that refers explicitly to this Agreement and that is signed or otherwise accepted by duly authorized representatives of Recipient and MIPS.
-
-10.5 Severability. In the event that any provision of this Agreement is finally adjudicated to be unenforceable or invalid under any applicable law, such unenforceability or invalidity shall not render this Agreement unenforceable or invalid as a whole, and, in such event, such unenforceable or invalid provision shall be interpreted so as to best accomplish the objectives of such provision within the limits of applicable law or applicable court decisions.
-
-10.6 Export Regulations / Export Control. Recipient shall not export, either directly or indirectly, any product, service or technical data or system incorporating the Evaluation Materials without first obtaining any required license or other necessary approval from the U.S. Department of Commerce or any other governing agency or department of the United States Government. In the event any product is exported from the United States or re-exported from a foreign destination by Recipient, Recipient shall ensure that the distribution and export/re-export or import of the product is in compliance with all applicable laws, regulations, orders, or other restrictions of the U.S. Export Administration Regulations and the appropriate foreign government. Recipient agrees that neither it nor any of its subsidiaries will export/re-export any technical data, process, product, or service, directly or indirectly, to any country for which the United States government or any agency thereof or the foreign government from where it is shipping requires an export license, or other governmental approval, without first obtaining such license or approval. Recipient also agrees to implement measures to ensure that foreign national employees are authorized to receive any information controlled by U.S. export control laws. An export is &quot;deemed&quot; to take place when information is released to a foreign national wherever located.
-
-10.7 Special Terms for Pre-Release Materials. If so indicated in the description of the Evaluation Software, the Evaluation Software may contain Pre-Release Materials. Recipient hereby understands, acknowledges and agrees that: (i) Pre-Release Materials may not be fully tested and may contain bugs or errors; (ii) Pre-Release materials are not suitable for commercial release in their current state; (iii) regulatory approvals for Pre-Release Materials (such as UL or FCC) have not been obtained, and Pre-Release Materials may therefore not be certified for use in certain countries or environments or may not be suitable for certain applications and (iv) MIPS can provide no assurance that it will ever produce or make generally available a production version of the Pre-Release Materials . MIPS is not under any obligation to develop and/or release or offer for sale or license a final product based upon the Pre-Release Materials and may unilaterally elect to abandon the Pre-Release Materials or any such development platform at any time and without any obligation or liability whatsoever to Recipient or any other person.
-
-ANY PRE-RELEASE MATERIALS ARE NON-QUALIFIED AND, AS SUCH, ARE PROVIDED “AS IS” AND “AS AVAILABLE”, POSSIBLY WITH FAULTS, AND WITHOUT REPRESENTATION OR WARRANTY OF ANY KIND.
-
-10.8 Open Source Software. In the event Open Source software is included with Evaluation Software, such Open Source software is licensed pursuant to the applicable Open Source software license agreement identified in the Open Source software comments in the applicable source code file(s) and/or file header as indicated in the Evaluation Software. Additional detail may be available (where applicable) in the accompanying on-line documentation. With respect to the Open Source software, nothing in this Agreement limits any rights under, or grants rights that supersede, the terms of any applicable Open Source software license agreement.
-</sdk:license>
-	<sdk:system-image>
-		<!--Generated from bid:3093079, branch:git_gb-emu-release-->
-		<sdk:api-level>10</sdk:api-level>
-		<sdk:description>ARM EABI v7a System Image</sdk:description>
-		<sdk:revision>4</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Fri Jul 27 08:50:45 2018.-->
-				<sdk:size>67918042</sdk:size>
-				<sdk:checksum type="sha1">54680383118eb5c95a11e1cc2a14aa572c86ee69</sdk:checksum>
-				<sdk:url>armv7-10_r04.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:abi>armeabi-v7a</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:229537, branch:git_ics-mr0-->
-		<sdk:api-level>14</sdk:api-level>
-		<sdk:description>ARM EABI v7a System Image</sdk:description>
-		<sdk:revision>2</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Thu Jul 26 20:46:32 2018.-->
-				<sdk:size>99621822</sdk:size>
-				<sdk:checksum type="sha1">d8991b0c06b18d7d6ed4169d67460ee1add6661b</sdk:checksum>
-				<sdk:url>sysimg_armv7a-14_r02.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:abi>armeabi-v7a</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:3462039, branch:git_ics-mr1-emu-release-->
-		<sdk:api-level>15</sdk:api-level>
-		<sdk:description>ARM EABI v7a System Image</sdk:description>
-		<sdk:revision>4</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Fri Jul 27 08:53:17 2018.-->
-				<sdk:size>102079727</sdk:size>
-				<sdk:checksum type="sha1">363223bd62f5afc0b2bd760b54ce9d26b31eacf1</sdk:checksum>
-				<sdk:url>armeabi-v7a-15_r04.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:abi>armeabi-v7a</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:1741836, branch:git_jb-dev-->
-		<sdk:api-level>16</sdk:api-level>
-		<sdk:description>ARM EABI v7a System Image</sdk:description>
-		<sdk:revision>4</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Thu Jul 26 16:01:22 2018.-->
-				<sdk:size>112608076</sdk:size>
-				<sdk:checksum type="sha1">39c093ea755098f0ee79f607be7df9e54ba4943f</sdk:checksum>
-				<sdk:url>sysimg_armv7a-16_r04.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:abi>armeabi-v7a</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:3453820, branch:git_jb-mr1.1-emu-release-->
-		<sdk:api-level>17</sdk:api-level>
-		<sdk:description>ARM EABI v7a System Image</sdk:description>
-		<sdk:revision>5</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Fri Jul 27 08:53:02 2018.-->
-				<sdk:size>124238679</sdk:size>
-				<sdk:checksum type="sha1">7460e8110f4a87f9644f1bdb5511a66872d50fd9</sdk:checksum>
-				<sdk:url>armeabi-v7a-17_r05.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:abi>armeabi-v7a</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:3462034, branch:git_jb-mr2-emu-release-->
-		<sdk:api-level>18</sdk:api-level>
-		<sdk:description>ARM EABI v7a System Image</sdk:description>
-		<sdk:revision>4</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Fri Jul 27 08:53:09 2018.-->
-				<sdk:size>130394401</sdk:size>
-				<sdk:checksum type="sha1">0bf34ecf4ddd53f6b1b7fe7dfa12f2887c17e642</sdk:checksum>
-				<sdk:url>armeabi-v7a-18_r04.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:abi>armeabi-v7a</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:3462041, branch:git_klp-emu-release-->
-		<sdk:api-level>19</sdk:api-level>
-		<sdk:description>ARM EABI v7a System Image</sdk:description>
-		<sdk:revision>5</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Fri Jul 27 08:53:25 2018.-->
-				<sdk:size>159871567</sdk:size>
-				<sdk:checksum type="sha1">d1a5fd4f2e1c013c3d3d9bfe7e9db908c3ed56fa</sdk:checksum>
-				<sdk:url>armeabi-v7a-19_r05.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:abi>armeabi-v7a</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:3079185, branch:git_lmp-emu-release-->
-		<sdk:api-level>21</sdk:api-level>
-		<sdk:description>ARM EABI v7a System Image</sdk:description>
-		<sdk:revision>4</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Fri Jul 27 08:50:26 2018.-->
-				<sdk:size>187163871</sdk:size>
-				<sdk:checksum type="sha1">8c606f81306564b65e41303d2603e4c42ded0d10</sdk:checksum>
-				<sdk:url>armeabi-v7a-21_r04.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:abi>armeabi-v7a</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:3079158, branch:git_lmp_mr1-emu-release-->
-		<sdk:api-level>22</sdk:api-level>
-		<sdk:description>ARM EABI v7a System Image</sdk:description>
-		<sdk:revision>2</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Fri Jul 27 08:50:08 2018.-->
-				<sdk:size>194596267</sdk:size>
-				<sdk:checksum type="sha1">2114ec015dbf3a16cbcb4f63e8a84a1b206a07a1</sdk:checksum>
-				<sdk:url>armeabi-v7a-22_r02.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:abi>armeabi-v7a</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:3079352, branch:git_mnc-emu-release-->
-		<sdk:api-level>23</sdk:api-level>
-		<sdk:description>ARM EABI v7a System Image</sdk:description>
-		<sdk:revision>6</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Fri Jul 27 08:50:36 2018.-->
-				<sdk:size>238333358</sdk:size>
-				<sdk:checksum type="sha1">7cf2ad756e54a3acfd81064b63cb0cb9dff2798d</sdk:checksum>
-				<sdk:url>armeabi-v7a-23_r06.zip</sdk:url>
-				<sdk:host-os>windows</sdk:host-os>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:abi>armeabi-v7a</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:3245079, branch:git_nyc-emu-release-->
-		<sdk:api-level>24</sdk:api-level>
-		<sdk:description>ARM EABI v7a System Image</sdk:description>
-		<sdk:revision>7</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Fri Jul 27 08:51:39 2018.-->
-				<sdk:size>283677512</sdk:size>
-				<sdk:checksum type="sha1">3454546b4eed2d6c3dd06d47757d6da9f4176033</sdk:checksum>
-				<sdk:url>armeabi-v7a-24_r07.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:abi>armeabi-v7a</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:3245079, branch:git_nyc-emu-release-->
-		<sdk:api-level>24</sdk:api-level>
-		<sdk:description>ARM 64 v8a System Image</sdk:description>
-		<sdk:revision>7</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Fri Jul 27 08:51:37 2018.-->
-				<sdk:size>384556503</sdk:size>
-				<sdk:checksum type="sha1">e8ab2e49e4efe4b064232b33b5eeaded61437d7f</sdk:checksum>
-				<sdk:url>arm64-v8a-24_r07.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:abi>arm64-v8a</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:1741836, branch:git_jb-dev-->
-		<sdk:api-level>16</sdk:api-level>
-		<sdk:description>MIPS System Image</sdk:description>
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Thu Jul 26 16:01:28 2018.-->
-				<sdk:size>122482530</sdk:size>
-				<sdk:checksum type="sha1">67943c54fb3943943ffeb05fdd39c0b753681f6e</sdk:checksum>
-				<sdk:url>sysimg_mips-16_r04.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="mips-android-sysimage-license"/>
-		<sdk:abi>mips</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:1742939, branch:git_jb-mr1.1-dev-->
-		<sdk:api-level>17</sdk:api-level>
-		<sdk:description>MIPS System Image</sdk:description>
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Thu Jul 26 16:01:38 2018.-->
-				<sdk:size>131781761</sdk:size>
-				<sdk:checksum type="sha1">f0c6e153bd584c29e51b5c9723cfbf30f996a05d</sdk:checksum>
-				<sdk:url>sysimg_mips-17_r01.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="mips-android-sysimage-license"/>
-		<sdk:abi>mips</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:3093079, branch:git_gb-emu-release-->
-		<sdk:api-level>10</sdk:api-level>
-		<sdk:description>Intel x86 Atom System Image</sdk:description>
-		<sdk:revision>4</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Fri Jul 27 08:50:47 2018.-->
-				<sdk:size>75382637</sdk:size>
-				<sdk:checksum type="sha1">655ffc5cc89dd45a3aca154b254009016e473aeb</sdk:checksum>
-				<sdk:url>x86-10_r04.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:abi>x86</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:3462039, branch:git_ics-mr1-emu-release-->
-		<sdk:api-level>15</sdk:api-level>
-		<sdk:description>Intel x86 Atom System Image</sdk:description>
-		<sdk:revision>4</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Fri Jul 27 08:53:18 2018.-->
-				<sdk:size>115324561</sdk:size>
-				<sdk:checksum type="sha1">e45c728b64881c0e86529a8f7ea9c103a3cd14c1</sdk:checksum>
-				<sdk:url>x86-15_r04.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:abi>x86</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:4875369, branch:git_jb-emu-release-->
-		<sdk:api-level>16</sdk:api-level>
-		<sdk:description>Intel x86 Atom System Image</sdk:description>
-		<sdk:revision>6</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Tue Jul 17 16:27:13 2018.-->
-				<sdk:size>134926152</sdk:size>
-				<sdk:checksum type="sha1">bf1bf8c5591346118d2235da1ad20e7be8a3e9cd</sdk:checksum>
-				<sdk:url>x86-16_r06.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:abi>x86</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:4875371, branch:git_jb-mr1.1-emu-release-->
-		<sdk:api-level>17</sdk:api-level>
-		<sdk:description>Intel x86 Atom System Image</sdk:description>
-		<sdk:revision>4</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Tue Jul 17 16:30:45 2018.-->
-				<sdk:size>143278662</sdk:size>
-				<sdk:checksum type="sha1">03c6d022ab2dcbbcf655d78ba5ccb0431cadcaec</sdk:checksum>
-				<sdk:url>x86-17_r04.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:abi>x86</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:3462034, branch:git_jb-mr2-emu-release-->
-		<sdk:api-level>18</sdk:api-level>
-		<sdk:description>Intel x86 Atom System Image</sdk:description>
-		<sdk:revision>3</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Fri Jul 27 08:53:12 2018.-->
-				<sdk:size>149657535</sdk:size>
-				<sdk:checksum type="sha1">03a0cb23465c3de15215934a1dbc9715b56e9458</sdk:checksum>
-				<sdk:url>x86-18_r03.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:abi>x86</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:4174703, branch:git_klp-emu-release-->
-		<sdk:api-level>19</sdk:api-level>
-		<sdk:description>Intel x86 Atom System Image</sdk:description>
-		<sdk:revision>6</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Wed Jun 13 18:42:22 2018.-->
-				<sdk:size>185886274</sdk:size>
-				<sdk:checksum type="sha1">2ac82153aae97f7eae4c5a0761224fe04321d03d</sdk:checksum>
-				<sdk:url>x86-19_r06.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:abi>x86</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:4174711, branch:git_lmp-emu-release-->
-		<sdk:api-level>21</sdk:api-level>
-		<sdk:description>Intel x86 Atom System Image</sdk:description>
-		<sdk:revision>5</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Tue May 22 03:41:51 2018.-->
-				<sdk:size>208212529</sdk:size>
-				<sdk:checksum type="sha1">00f0eb0a1003efe3316347f762e20a85d8749cff</sdk:checksum>
-				<sdk:url>x86-21_r05.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:abi>x86</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:4174727, branch:git_lmp-mr1-emu-release-->
-		<sdk:api-level>22</sdk:api-level>
-		<sdk:description>Intel x86 Atom System Image</sdk:description>
-		<sdk:revision>6</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sun May 20 00:45:19 2018.-->
-				<sdk:size>214268954</sdk:size>
-				<sdk:checksum type="sha1">e33e2a6cc3f1cc56b2019dbef3917d2eeb26f54e</sdk:checksum>
-				<sdk:url>x86-22_r06.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:abi>x86</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:4174734, branch:git_mnc-emu-release-->
-		<sdk:api-level>23</sdk:api-level>
-		<sdk:description>Intel x86 Atom System Image</sdk:description>
-		<sdk:revision>10</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Tue Jun  5 22:05:27 2018.-->
-				<sdk:size>260804863</sdk:size>
-				<sdk:checksum type="sha1">f6c3e3dd7bd951454795aa75c3a145fd05ac25bb</sdk:checksum>
-				<sdk:url>x86-23_r10.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:abi>x86</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:4174735, branch:git_nyc-emu-release-->
-		<sdk:api-level>24</sdk:api-level>
-		<sdk:description>Intel x86 Atom System Image</sdk:description>
-		<sdk:revision>8</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Tue May 22 10:30:01 2018.-->
-				<sdk:size>313489224</sdk:size>
-				<sdk:checksum type="sha1">c1cae7634b0216c0b5990f2c144eb8ca948e3511</sdk:checksum>
-				<sdk:url>x86-24_r08.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:abi>x86</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:4931657, branch:git_nyc-mr1-emu-release-->
-		<sdk:api-level>25</sdk:api-level>
-		<sdk:description>Intel x86 Atom System Image</sdk:description>
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Tue Aug  7 14:04:45 2018.-->
-				<sdk:size>316695942</sdk:size>
-				<sdk:checksum type="sha1">78ce7eb1387d598685633b9f7cbb300c3d3aeb5f</sdk:checksum>
-				<sdk:url>x86-25_r01.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:abi>x86</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:4931640, branch:git_oc-emu-release-->
-		<sdk:api-level>26</sdk:api-level>
-		<sdk:description>Intel x86 Atom System Image</sdk:description>
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Tue Aug  7 14:05:14 2018.-->
-				<sdk:size>350195807</sdk:size>
-				<sdk:checksum type="sha1">e613d6e0da668e30daf547f3c6627a6352846f90</sdk:checksum>
-				<sdk:url>x86-26_r01.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:abi>x86</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-		<sdk:tag-display>Default Android System Image</sdk:tag-display>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:4931629, branch:git_oc-mr1-emu-release-->
-		<sdk:api-level>27</sdk:api-level>
-		<sdk:description>Intel x86 Atom System Image</sdk:description>
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Tue Aug  7 14:05:43 2018.-->
-				<sdk:size>360984187</sdk:size>
-				<sdk:checksum type="sha1">4ec990fac7b62958decd12e18a4cd389dfe7c582</sdk:checksum>
-				<sdk:url>x86-27_r01.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:abi>x86</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-		<sdk:tag-display>Default Android System Image</sdk:tag-display>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:4923214, branch:git_pi-emu-release-->
-		<sdk:api-level>28</sdk:api-level>
-		<sdk:description>Intel x86 Atom System Image</sdk:description>
-		<sdk:revision>4</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Tue Jul 31 17:43:13 2018.-->
-				<sdk:size>437320152</sdk:size>
-				<sdk:checksum type="sha1">ce03c42d80c0fc6dc47f6455dbee7aa275d02780</sdk:checksum>
-				<sdk:url>x86-28_r04.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-preview-license"/>
-		<sdk:abi>x86</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-		<sdk:tag-display>Default Android System Image</sdk:tag-display>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:4174711, branch:git_lmp-emu-release-->
-		<sdk:api-level>21</sdk:api-level>
-		<sdk:description>Intel x86 Atom_64 System Image</sdk:description>
-		<sdk:revision>5</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Wed Jun  6 04:05:38 2018.-->
-				<sdk:size>292623982</sdk:size>
-				<sdk:checksum type="sha1">9078a095825a69e5e215713f0866c83cef65a342</sdk:checksum>
-				<sdk:url>x86_64-21_r05.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:abi>x86_64</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:4174727, branch:git_lmp-mr1-emu-release-->
-		<sdk:api-level>22</sdk:api-level>
-		<sdk:description>Intel x86 Atom_64 System Image</sdk:description>
-		<sdk:revision>6</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sun May 27 01:45:29 2018.-->
-				<sdk:size>299976630</sdk:size>
-				<sdk:checksum type="sha1">5db3b27f78cd9c4c5092b1cad5a5dd479fb5b2e4</sdk:checksum>
-				<sdk:url>x86_64-22_r06.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:abi>x86_64</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:4174734, branch:git_mnc-emu-release-->
-		<sdk:api-level>23</sdk:api-level>
-		<sdk:description>Intel x86 Atom_64 System Image</sdk:description>
-		<sdk:revision>10</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Tue Jun 12 05:59:42 2018.-->
-				<sdk:size>365009313</sdk:size>
-				<sdk:checksum type="sha1">7cbc291483ca07dc67b71268c5f08a5755f50f51</sdk:checksum>
-				<sdk:url>x86_64-23_r10.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:abi>x86_64</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:4174735, branch:git_nyc-emu-release-->
-		<sdk:api-level>24</sdk:api-level>
-		<sdk:description>Intel x86 Atom_64 System Image</sdk:description>
-		<sdk:revision>8</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Sat Jun 16 05:29:19 2018.-->
-				<sdk:size>419261998</sdk:size>
-				<sdk:checksum type="sha1">f6559e1949a5879f31a9662f4f0e50ad60181684</sdk:checksum>
-				<sdk:url>x86_64-24_r08.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:abi>x86_64</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:4931657, branch:git_nyc-mr1-emu-release-->
-		<sdk:api-level>25</sdk:api-level>
-		<sdk:description>Intel x86 Atom_64 System Image</sdk:description>
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Tue Aug  7 14:06:13 2018.-->
-				<sdk:size>422702097</sdk:size>
-				<sdk:checksum type="sha1">7093d7b39216020226ff430a3b7b81c94d31ad37</sdk:checksum>
-				<sdk:url>x86_64-25_r01.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:abi>x86_64</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:4931640, branch:git_oc-emu-release-->
-		<sdk:api-level>26</sdk:api-level>
-		<sdk:description>Intel x86 Atom_64 System Image</sdk:description>
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Tue Aug  7 14:06:52 2018.-->
-				<sdk:size>474178332</sdk:size>
-				<sdk:checksum type="sha1">432f149c048bffce7f9de526ec65b336daf7a0a3</sdk:checksum>
-				<sdk:url>x86_64-26_r01.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:abi>x86_64</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-		<sdk:tag-display>Default Android System Image</sdk:tag-display>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:4931629, branch:git_oc-mr1-emu-release-->
-		<sdk:api-level>27</sdk:api-level>
-		<sdk:description>Intel x86 Atom_64 System Image</sdk:description>
-		<sdk:revision>1</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Tue Aug  7 14:07:35 2018.-->
-				<sdk:size>491675204</sdk:size>
-				<sdk:checksum type="sha1">2878261011a59ca3de29dc5b457a495fdb268d60</sdk:checksum>
-				<sdk:url>x86_64-27_r01.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-license"/>
-		<sdk:abi>x86_64</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-		<sdk:tag-display>Default Android System Image</sdk:tag-display>
-	</sdk:system-image>
-	<sdk:system-image>
-		<!--Generated from bid:4923214, branch:git_pi-emu-release-->
-		<sdk:api-level>28</sdk:api-level>
-		<sdk:description>Intel x86 Atom_64 System Image</sdk:description>
-		<sdk:revision>4</sdk:revision>
-		<sdk:archives>
-			<sdk:archive>
-				<!--Built on: Tue Jul 31 17:43:48 2018.-->
-				<sdk:size>564792723</sdk:size>
-				<sdk:checksum type="sha1">d47a85c8f4e9fd57df97814ad8884eeb0f3a0ef0</sdk:checksum>
-				<sdk:url>x86_64-28_r04.zip</sdk:url>
-			</sdk:archive>
-		</sdk:archives>
-		<sdk:uses-license ref="android-sdk-preview-license"/>
-		<sdk:abi>x86_64</sdk:abi>
-		<sdk:tag-id>default</sdk:tag-id>
-		<sdk:tag-display>Default Android System Image</sdk:tag-display>
-	</sdk:system-image>
-</sdk:sdk-sys-img>
diff --git a/pkgs/development/mobile/androidenv/sysimages.nix b/pkgs/development/mobile/androidenv/sysimages.nix
deleted file mode 100644
index 0ad09a02556..00000000000
--- a/pkgs/development/mobile/androidenv/sysimages.nix
+++ /dev/null
@@ -1,305 +0,0 @@
-# This file is generated from generate-sysimages.sh. DO NOT EDIT.
-# Execute generate-sysimages.sh or fetch.sh to update the file.
-{stdenv, fetchurl, unzip}:
-
-let
-  buildSystemImage = args:
-    stdenv.mkDerivation (args // {
-      buildInputs = [ unzip ];
-      buildCommand = ''
-        mkdir -p $out
-        cd $out
-        unzip $src
-    '';
-  });
-in
-{
-
-  sysimg_armeabi-v7a_10 = buildSystemImage {
-    name = "sysimg-armeabi-v7a-10";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/armv7-10_r04.zip;
-      sha1 = "54680383118eb5c95a11e1cc2a14aa572c86ee69";
-    };
-  };
-
-  sysimg_x86_10 = buildSystemImage {
-    name = "sysimg-x86-10";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/x86-10_r04.zip;
-      sha1 = "655ffc5cc89dd45a3aca154b254009016e473aeb";
-    };
-  };
-
-  sysimg_armeabi-v7a_14 = buildSystemImage {
-    name = "sysimg-armeabi-v7a-14";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/sysimg_armv7a-14_r02.zip;
-      sha1 = "d8991b0c06b18d7d6ed4169d67460ee1add6661b";
-    };
-  };
-
-  sysimg_armeabi-v7a_15 = buildSystemImage {
-    name = "sysimg-armeabi-v7a-15";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/armeabi-v7a-15_r04.zip;
-      sha1 = "363223bd62f5afc0b2bd760b54ce9d26b31eacf1";
-    };
-  };
-
-  sysimg_x86_15 = buildSystemImage {
-    name = "sysimg-x86-15";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/x86-15_r04.zip;
-      sha1 = "e45c728b64881c0e86529a8f7ea9c103a3cd14c1";
-    };
-  };
-
-  sysimg_armeabi-v7a_16 = buildSystemImage {
-    name = "sysimg-armeabi-v7a-16";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/sysimg_armv7a-16_r04.zip;
-      sha1 = "39c093ea755098f0ee79f607be7df9e54ba4943f";
-    };
-  };
-
-  sysimg_mips_16 = buildSystemImage {
-    name = "sysimg-mips-16";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/sysimg_mips-16_r04.zip;
-      sha1 = "67943c54fb3943943ffeb05fdd39c0b753681f6e";
-    };
-  };
-
-  sysimg_x86_16 = buildSystemImage {
-    name = "sysimg-x86-16";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/x86-16_r06.zip;
-      sha1 = "bf1bf8c5591346118d2235da1ad20e7be8a3e9cd";
-    };
-  };
-
-  sysimg_armeabi-v7a_17 = buildSystemImage {
-    name = "sysimg-armeabi-v7a-17";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/armeabi-v7a-17_r05.zip;
-      sha1 = "7460e8110f4a87f9644f1bdb5511a66872d50fd9";
-    };
-  };
-
-  sysimg_mips_17 = buildSystemImage {
-    name = "sysimg-mips-17";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/sysimg_mips-17_r01.zip;
-      sha1 = "f0c6e153bd584c29e51b5c9723cfbf30f996a05d";
-    };
-  };
-
-  sysimg_x86_17 = buildSystemImage {
-    name = "sysimg-x86-17";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/x86-17_r04.zip;
-      sha1 = "03c6d022ab2dcbbcf655d78ba5ccb0431cadcaec";
-    };
-  };
-
-  sysimg_armeabi-v7a_18 = buildSystemImage {
-    name = "sysimg-armeabi-v7a-18";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/armeabi-v7a-18_r04.zip;
-      sha1 = "0bf34ecf4ddd53f6b1b7fe7dfa12f2887c17e642";
-    };
-  };
-
-  sysimg_x86_18 = buildSystemImage {
-    name = "sysimg-x86-18";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/x86-18_r03.zip;
-      sha1 = "03a0cb23465c3de15215934a1dbc9715b56e9458";
-    };
-  };
-
-  sysimg_armeabi-v7a_19 = buildSystemImage {
-    name = "sysimg-armeabi-v7a-19";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/armeabi-v7a-19_r05.zip;
-      sha1 = "d1a5fd4f2e1c013c3d3d9bfe7e9db908c3ed56fa";
-    };
-  };
-
-  sysimg_x86_19 = buildSystemImage {
-    name = "sysimg-x86-19";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/x86-19_r06.zip;
-      sha1 = "2ac82153aae97f7eae4c5a0761224fe04321d03d";
-    };
-  };
-
-  sysimg_armeabi-v7a_21 = buildSystemImage {
-    name = "sysimg-armeabi-v7a-21";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/armeabi-v7a-21_r04.zip;
-      sha1 = "8c606f81306564b65e41303d2603e4c42ded0d10";
-    };
-  };
-
-  sysimg_x86_21 = buildSystemImage {
-    name = "sysimg-x86-21";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/x86-21_r05.zip;
-      sha1 = "00f0eb0a1003efe3316347f762e20a85d8749cff";
-    };
-  };
-
-  sysimg_x86_64_21 = buildSystemImage {
-    name = "sysimg-x86_64-21";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/x86_64-21_r05.zip;
-      sha1 = "9078a095825a69e5e215713f0866c83cef65a342";
-    };
-  };
-
-  sysimg_armeabi-v7a_22 = buildSystemImage {
-    name = "sysimg-armeabi-v7a-22";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/armeabi-v7a-22_r02.zip;
-      sha1 = "2114ec015dbf3a16cbcb4f63e8a84a1b206a07a1";
-    };
-  };
-
-  sysimg_x86_22 = buildSystemImage {
-    name = "sysimg-x86-22";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/x86-22_r06.zip;
-      sha1 = "e33e2a6cc3f1cc56b2019dbef3917d2eeb26f54e";
-    };
-  };
-
-  sysimg_x86_64_22 = buildSystemImage {
-    name = "sysimg-x86_64-22";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/x86_64-22_r06.zip;
-      sha1 = "5db3b27f78cd9c4c5092b1cad5a5dd479fb5b2e4";
-    };
-  };
-
-  sysimg_armeabi-v7a_23 = buildSystemImage {
-    name = "sysimg-armeabi-v7a-23";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/armeabi-v7a-23_r06.zip;
-      sha1 = "7cf2ad756e54a3acfd81064b63cb0cb9dff2798d";
-    };
-  };
-
-  sysimg_x86_23 = buildSystemImage {
-    name = "sysimg-x86-23";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/x86-23_r10.zip;
-      sha1 = "f6c3e3dd7bd951454795aa75c3a145fd05ac25bb";
-    };
-  };
-
-  sysimg_x86_64_23 = buildSystemImage {
-    name = "sysimg-x86_64-23";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/x86_64-23_r10.zip;
-      sha1 = "7cbc291483ca07dc67b71268c5f08a5755f50f51";
-    };
-  };
-
-  sysimg_arm64-v8a_24 = buildSystemImage {
-    name = "sysimg-arm64-v8a-24";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/arm64-v8a-24_r07.zip;
-      sha1 = "e8ab2e49e4efe4b064232b33b5eeaded61437d7f";
-    };
-  };
-
-  sysimg_armeabi-v7a_24 = buildSystemImage {
-    name = "sysimg-armeabi-v7a-24";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/armeabi-v7a-24_r07.zip;
-      sha1 = "3454546b4eed2d6c3dd06d47757d6da9f4176033";
-    };
-  };
-
-  sysimg_x86_24 = buildSystemImage {
-    name = "sysimg-x86-24";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/x86-24_r08.zip;
-      sha1 = "c1cae7634b0216c0b5990f2c144eb8ca948e3511";
-    };
-  };
-
-  sysimg_x86_64_24 = buildSystemImage {
-    name = "sysimg-x86_64-24";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/x86_64-24_r08.zip;
-      sha1 = "f6559e1949a5879f31a9662f4f0e50ad60181684";
-    };
-  };
-
-  sysimg_x86_25 = buildSystemImage {
-    name = "sysimg-x86-25";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/x86-25_r01.zip;
-      sha1 = "78ce7eb1387d598685633b9f7cbb300c3d3aeb5f";
-    };
-  };
-
-  sysimg_x86_64_25 = buildSystemImage {
-    name = "sysimg-x86_64-25";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/x86_64-25_r01.zip;
-      sha1 = "7093d7b39216020226ff430a3b7b81c94d31ad37";
-    };
-  };
-
-  sysimg_x86_26 = buildSystemImage {
-    name = "sysimg-x86-26";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/x86-26_r01.zip;
-      sha1 = "e613d6e0da668e30daf547f3c6627a6352846f90";
-    };
-  };
-
-  sysimg_x86_64_26 = buildSystemImage {
-    name = "sysimg-x86_64-26";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/x86_64-26_r01.zip;
-      sha1 = "432f149c048bffce7f9de526ec65b336daf7a0a3";
-    };
-  };
-
-  sysimg_x86_27 = buildSystemImage {
-    name = "sysimg-x86-27";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/x86-27_r01.zip;
-      sha1 = "4ec990fac7b62958decd12e18a4cd389dfe7c582";
-    };
-  };
-
-  sysimg_x86_64_27 = buildSystemImage {
-    name = "sysimg-x86_64-27";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/x86_64-27_r01.zip;
-      sha1 = "2878261011a59ca3de29dc5b457a495fdb268d60";
-    };
-  };
-
-  sysimg_x86_28 = buildSystemImage {
-    name = "sysimg-x86-28";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/x86-28_r04.zip;
-      sha1 = "ce03c42d80c0fc6dc47f6455dbee7aa275d02780";
-    };
-  };
-
-  sysimg_x86_64_28 = buildSystemImage {
-    name = "sysimg-x86_64-28";
-    src = fetchurl {
-      url = https://dl.google.com/android/repository/sys-img/android/x86_64-28_r04.zip;
-      sha1 = "d47a85c8f4e9fd57df97814ad8884eeb0f3a0ef0";
-    };
-  };
-}
diff --git a/pkgs/development/mobile/androidenv/tools.nix b/pkgs/development/mobile/androidenv/tools.nix
new file mode 100644
index 00000000000..9957168f7af
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/tools.nix
@@ -0,0 +1,26 @@
+{deployAndroidPackage, requireFile, lib, packages, toolsVersion, autoPatchelfHook, makeWrapper, os, pkgs, pkgs_i686, postInstall ? ""}:
+
+if toolsVersion == "26.0.1" then import ./tools/26.nix {
+  inherit deployAndroidPackage lib autoPatchelfHook makeWrapper os pkgs pkgs_i686 postInstall;
+  package = {
+    name = "tools";
+    path = "tools";
+    revision = "26.0.1";
+    archives = {
+      linux = requireFile {
+        url = https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip;
+        sha256 = "185yq7qwxflw24ccm5d6zziwlc9pxmsm3f54pm9p7xm0ik724kj4";
+      };
+      macosx = requireFile {
+        url = https://dl.google.com/android/repository/sdk-tools-darwin-3859397.zip;
+        sha256 = "1ycx9gzdaqaw6n19yvxjawywacavn1jc6sadlz5qikhgfr57b0aa";
+      };
+    };
+  };
+} else if toolsVersion == "26.1.1" then import ./tools/26.nix {
+  inherit deployAndroidPackage lib autoPatchelfHook makeWrapper os pkgs pkgs_i686 postInstall;
+  package = packages.tools."${toolsVersion}";
+} else import ./tools/25.nix {
+  inherit deployAndroidPackage lib autoPatchelfHook makeWrapper os pkgs pkgs_i686 postInstall;
+  package = packages.tools."${toolsVersion}";
+}
diff --git a/pkgs/development/mobile/androidenv/tools/25.nix b/pkgs/development/mobile/androidenv/tools/25.nix
new file mode 100644
index 00000000000..80b5858031d
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/tools/25.nix
@@ -0,0 +1,62 @@
+{deployAndroidPackage, lib, package, autoPatchelfHook, makeWrapper, os, pkgs, pkgs_i686, postInstall ? ""}:
+
+deployAndroidPackage {
+  name = "androidsdk";
+  buildInputs = [ autoPatchelfHook makeWrapper ]
+    ++ lib.optional (os == "linux") [ pkgs.glibc pkgs.xlibs.libX11 pkgs.xlibs.libXext pkgs.xlibs.libXdamage pkgs.xlibs.libxcb pkgs.xlibs.libXfixes pkgs.xlibs.libXrender pkgs.fontconfig.lib pkgs.freetype pkgs.libGL pkgs.zlib pkgs.ncurses5 pkgs.libpulseaudio pkgs_i686.glibc pkgs_i686.xlibs.libX11 pkgs_i686.xlibs.libXrender pkgs_i686.fontconfig pkgs_i686.freetype pkgs_i686.zlib ];
+  inherit package os;
+
+  patchInstructions = ''
+    ${lib.optionalString (os == "linux") ''
+      # Auto patch all binaries
+      addAutoPatchelfSearchPath $PWD/lib64
+      addAutoPatchelfSearchPath $PWD/lib64/libstdc++
+      addAutoPatchelfSearchPath $PWD/lib64/qt/lib
+      addAutoPatchelfSearchPath $PWD/lib
+      addAutoPatchelfSearchPath $PWD/lib/libstdc++
+      autoPatchelf .
+    ''}
+
+    # Wrap all scripts that require JAVA_HOME
+    for i in bin
+    do
+        find $i -maxdepth 1 -type f -executable | while read program
+        do
+            if grep -q "JAVA_HOME" $program
+            then
+                wrapProgram $PWD/$program --prefix PATH : ${pkgs.jdk8}/bin
+            fi
+        done
+    done
+
+    # Wrap programs that require java
+    for i in draw9patch jobb lint screenshot2
+    do
+        wrapProgram $PWD/$i \
+          --prefix PATH : ${pkgs.jdk8}/bin
+    done
+
+    # Wrap programs that require java and SWT
+    for i in android ddms hierarchyviewer monitor monkeyrunner traceview uiautomatorviewer
+    do
+        wrapProgram $PWD/$i \
+          --prefix PATH : ${pkgs.jdk8}/bin \
+          --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ pkgs.xlibs.libX11 pkgs.xlibs.libXtst ]}
+    done
+
+    ${lib.optionalString (os == "linux") ''
+      wrapProgram $PWD/emulator \
+        --prefix PATH : ${pkgs.file}/bin:${pkgs.glxinfo}/bin:${pkgs.pciutils}/bin \
+        --set QT_XKB_CONFIG_ROOT ${pkgs.xkeyboard_config}/share/X11/xkb \
+        --set QTCOMPOSE ${pkgs.xorg.libX11.out}/share/X11/locale
+    ''}
+
+    # Patch all script shebangs
+    patchShebangs .
+
+    cd ..
+    ${postInstall}
+  '';
+
+  meta.licenses = lib.licenses.unfree;
+}
diff --git a/pkgs/development/mobile/androidenv/tools/26.nix b/pkgs/development/mobile/androidenv/tools/26.nix
new file mode 100644
index 00000000000..ed1dfe3d263
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/tools/26.nix
@@ -0,0 +1,40 @@
+{deployAndroidPackage, lib, package, autoPatchelfHook, makeWrapper, os, pkgs, pkgs_i686, postInstall ? ""}:
+
+deployAndroidPackage {
+  name = "androidsdk";
+  inherit os package;
+  buildInputs = [ autoPatchelfHook makeWrapper ]
+    ++ lib.optional (os == "linux") [ pkgs.glibc pkgs.xlibs.libX11 pkgs.xlibs.libXrender pkgs.xlibs.libXext pkgs.fontconfig pkgs.freetype pkgs_i686.glibc pkgs_i686.xlibs.libX11 pkgs_i686.xlibs.libXrender pkgs_i686.xlibs.libXext pkgs_i686.fontconfig pkgs_i686.freetype pkgs_i686.zlib ];
+
+  patchInstructions = ''
+    ${lib.optionalString (os == "linux") ''
+      # Auto patch all binaries
+      autoPatchelf .
+    ''}
+
+    # Wrap all scripts that require JAVA_HOME
+    for i in bin
+    do
+        find $i -maxdepth 1 -type f -executable | while read program
+        do
+            if grep -q "JAVA_HOME" $program
+            then
+                wrapProgram $PWD/$program --prefix PATH : ${pkgs.jdk8}/bin
+            fi
+        done
+    done
+
+    # Wrap monitor script
+    wrapProgram $PWD/monitor \
+      --prefix PATH : ${pkgs.jdk8}/bin \
+      --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ pkgs.xlibs.libX11 pkgs.xlibs.libXtst ]}
+
+    # Patch all script shebangs
+    patchShebangs .
+
+    cd ..
+    ${postInstall}
+  '';
+
+  meta.licenses = lib.licenses.unfree;
+}
diff --git a/pkgs/development/mobile/flashtool/default.nix b/pkgs/development/mobile/flashtool/default.nix
index 601b0b319bc..f78a10d8266 100644
--- a/pkgs/development/mobile/flashtool/default.nix
+++ b/pkgs/development/mobile/flashtool/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, requireFile, p7zip, jre, libusb1, platformTools, gtk2, glib, libXtst }:
+{ stdenv, requireFile, p7zip, jre, libusb1, platform-tools, gtk2, glib, libXtst }:
 
 # TODO:
 #
@@ -29,8 +29,8 @@ stdenv.mkDerivation rec {
   '';
 
   buildPhase = ''
-    ln -s ${platformTools}/platform-tools/adb x10flasher_lib/adb.linux
-    ln -s ${platformTools}/platform-tools/fastboot x10flasher_lib/fastboot.linux
+    ln -s ${platform-tools}/libexec/android-sdk/platform-tools/adb x10flasher_lib/adb.linux
+    ln -s ${platform-tools}/libexec/android-sdk/platform-tools/fastboot x10flasher_lib/fastboot.linux
     ln -s ${libusb1.out}/lib/libusb-1.0.so.0 ./x10flasher_lib/linux/lib32/libusbx-1.0.so
 
     chmod +x x10flasher_lib/unyaffs.linux.x86 x10flasher_lib/bin2elf x10flasher_lib/bin2sin
diff --git a/pkgs/development/mobile/titaniumenv/build-app.nix b/pkgs/development/mobile/titaniumenv/build-app.nix
index 0250e5bf2e2..472f85fbc45 100644
--- a/pkgs/development/mobile/titaniumenv/build-app.nix
+++ b/pkgs/development/mobile/titaniumenv/build-app.nix
@@ -1,200 +1,181 @@
-{stdenv, androidsdk, titaniumsdk, titanium, alloy, xcodewrapper, jdk, python, nodejs, which, file, xcodeBaseDir}:
-{ name, src, preBuild ? "", target, androidPlatformVersions ? [ "25" ], androidAbiVersions ? [ "armeabi" "armeabi-v7a" ], tiVersion ? null
+{stdenv, composeAndroidPackages, composeXcodeWrapper, titaniumsdk, titanium, alloy, jdk, python, nodejs, which, file}:
+{ name, src, preBuild ? "", target, tiVersion ? null
 , release ? false, androidKeyStore ? null, androidKeyAlias ? null, androidKeyStorePassword ? null
-, iosMobileProvisioningProfile ? null, iosCertificateName ? null, iosCertificate ? null, iosCertificatePassword ? null, iosVersion ? "11.2"
-, enableWirelessDistribution ? false, iosBuildStore ? false, installURL ? null
-}:
+, iosMobileProvisioningProfile ? null, iosCertificateName ? null, iosCertificate ? null, iosCertificatePassword ? null, iosVersion ? "11.3", iosBuildStore ? false
+, enableWirelessDistribution ? false, installURL ? null
+, xcodeBaseDir ? "/Applications/Xcode.app"
+, androidsdkArgs ? {}
+, xcodewrapperArgs ? {}
+, ...
+}@args:
 
 assert (release && target == "android") -> androidKeyStore != null && androidKeyAlias != null && androidKeyStorePassword != null;
 assert (release && target == "iphone") -> iosMobileProvisioningProfile != null && iosCertificateName != null && iosCertificate != null && iosCertificatePassword != null;
 assert enableWirelessDistribution -> installURL != null;
 
 let
-  androidsdkComposition = androidsdk {
-    platformVersions = androidPlatformVersions;
-    abiVersions = androidAbiVersions;
-    useGoogleAPIs = true;
-  };
+  realAndroidsdkArgs = {
+    platformVersions = [ "26" ];
+  } // androidsdkArgs;
+
+  androidsdk = (composeAndroidPackages realAndroidsdkArgs).androidsdk;
+
+  realXcodewrapperArgs = {
+    inherit xcodeBaseDir;
+  } // xcodewrapperArgs;
+
+  xcodewrapper = composeXcodeWrapper xcodewrapperArgs;
 
   deleteKeychain = ''
-    security default-keychain -s login.keychain
-    security delete-keychain $keychainName
-    rm -f $HOME/lock-keychain
+    if [ -f $HOME/lock-keychain ]
+    then
+        security default-keychain -s login.keychain
+        security delete-keychain $keychainName
+        rm -f $HOME/lock-keychain
+    fi
   '';
+
+  extraArgs = removeAttrs args [ "name" "preRebuild" "androidsdkArgs" "xcodewrapperArgs" ];
 in
-stdenv.mkDerivation {
+stdenv.mkDerivation ({
   name = stdenv.lib.replaceChars [" "] [""] name;
-  inherit src;
 
-  buildInputs = [ nodejs titanium alloy jdk python which file ] ++ stdenv.lib.optional (stdenv.hostPlatform.system == "x86_64-darwin") xcodewrapper;
-  
+  buildInputs = [ nodejs titanium alloy python which file jdk ]
+    ++ stdenv.lib.optional (target == "iphone") xcodewrapper;
+
   buildPhase = ''
     ${preBuild}
 
-    export HOME=$TMPDIR
-    
+    export HOME=${if target == "iphone" then "/Users/$(whoami)" else "$TMPDIR"}
+
     ${stdenv.lib.optionalString (tiVersion != null) ''
       # Replace titanium version by the provided one
       sed -i -e "s|<sdk-version>[0-9a-zA-Z\.]*</sdk-version>|<sdk-version>${tiVersion}</sdk-version>|" tiapp.xml
     ''}
-    
+
     # Simulate a login
     mkdir -p $HOME/.titanium
     cat > $HOME/.titanium/auth_session.json <<EOF
     { "loggedIn": true }
     EOF
-    
+
+    # Configure the paths to the Titanium SDK and modules
     echo "{}" > $TMPDIR/config.json
     titanium --config-file $TMPDIR/config.json --no-colors config sdk.defaultInstallLocation ${titaniumsdk}
     titanium --config-file $TMPDIR/config.json --no-colors config paths.modules ${titaniumsdk}
-    
+
     mkdir -p $out
-    
-    ${if target == "android" then
-        ''
-          titanium config --config-file $TMPDIR/config.json --no-colors android.sdkPath ${androidsdkComposition}/libexec
-
-          export PATH=$(echo ${androidsdkComposition}/libexec/tools):$(echo ${androidsdkComposition}/libexec/build-tools/android-*):$PATH
-          export GRADLE_USER_HOME=$TMPDIR/gradle
-
-          ${if release then
-            ''
-              ${stdenv.lib.optionalString stdenv.isDarwin ''
-                # Signing the app does not work with OpenJDK on macOS, use host SDK instead
-                export JAVA_HOME="$(/usr/libexec/java_home -v 1.8)"
-              ''}
-              titanium build --config-file $TMPDIR/config.json --no-colors --force --platform android --target dist-playstore --keystore ${androidKeyStore} --alias ${androidKeyAlias} --store-password ${androidKeyStorePassword} --output-dir $out
-            ''
-          else
-            ''titanium build --config-file $TMPDIR/config.json --no-colors --force --platform android --target emulator --build-only -B foo --output $out''}
-        ''
-      else if target == "iphone" then
-        ''
-          ${if release then
-            ''
-              export HOME=/Users/$(whoami)
-              export keychainName=$(basename $out)
-            
-              # Create a keychain with the component hash name (should always be unique)
-              security create-keychain -p "" $keychainName
-              security default-keychain -s $keychainName
-              security unlock-keychain -p "" $keychainName
-              security import ${iosCertificate} -k $keychainName -P "${iosCertificatePassword}" -A
-              security set-key-partition-list -S apple-tool:,apple: -s -k "" $keychainName
-              provisioningId=$(grep UUID -A1 -a ${iosMobileProvisioningProfile} | grep -o "[-A-Za-z0-9]\{36\}")
-   
-              # Ensure that the requested provisioning profile can be found
-        
-              if [ ! -f "$HOME/Library/MobileDevice/Provisioning Profiles/$provisioningId.mobileprovision" ]
-              then
-                  mkdir -p "$HOME/Library/MobileDevice/Provisioning Profiles"
-                  cp ${iosMobileProvisioningProfile} "$HOME/Library/MobileDevice/Provisioning Profiles/$provisioningId.mobileprovision"
-              fi
-            
-              # Simulate a login
-              mkdir -p $HOME/.titanium
-              cat > $HOME/.titanium/auth_session.json <<EOF
-              { "loggedIn": true }
-              EOF
-              
-              # Configure the path to Xcode
-              titanium --config-file $TMPDIR/config.json --no-colors config paths.xcode ${xcodeBaseDir}
-              
-              # Make plutil available
-              mkdir -p $TMPDIR/bin
-              ln -s /usr/bin/plutil $TMPDIR/bin
-              export PATH=$TMPDIR/bin:$PATH
-              
-              # Link the modules folder
-              if [ ! -e modules ]
-              then
-                  ln -s ${titaniumsdk}/modules modules
-              fi
-
-              # Take precautions to prevent concurrent builds blocking the keychain
-              while [ -f $HOME/lock-keychain ]
-              do
-                  echo "Keychain locked, waiting for a couple of seconds, or remove $HOME/lock-keychain to unblock..."
-                  sleep 3
-              done
-
-              touch $HOME/lock-keychain
-
-              security default-keychain -s $keychainName
-
-              # Do the actual build
-              titanium build --config-file $TMPDIR/config.json --force --no-colors --platform ios --target ${if iosBuildStore then "dist-appstore" else "dist-adhoc"} --pp-uuid $provisioningId --distribution-name "${iosCertificateName}" --keychain $HOME/Library/Keychains/$keychainName-db --device-family universal --ios-version ${iosVersion} --output-dir $out
-            
-              # Remove our generated keychain
-              ${deleteKeychain}
-            ''
-          else
-            ''
-              # Copy all sources to the output store directory.
-              # Why? Debug application include *.js files, which are symlinked into their
-              # sources. If they are not copied, we have dangling references to the
-              # temp folder.
-            
-              cp -av * $out
-              cd $out
-              
-              # We need to consult a real home directory to find the available simulators
-              export HOME=/Users/$(whoami)
-              
-              # Configure the path to Xcode
-              titanium --config-file $TMPDIR/config.json --no-colors config paths.xcode ${xcodeBaseDir}
-              
-              # Link the modules folder
-              if [ ! -e modules ]
-              then
-                  ln -s ${titaniumsdk}/modules modules
-                  createdModulesSymlink=1
-              fi
-              
-              # Execute the build
-              titanium build --config-file $TMPDIR/config.json --force --no-colors --platform ios --target simulator --build-only --device-family universal --ios-version ${iosVersion} --output-dir $out
-              
-              # Remove the modules symlink
-              if [ "$createdModulesSymlink" = "1" ]
-              then
-                  rm $out/modules
-              fi
-          ''}
-        ''
-
-      else throw "Target: ${target} is not supported!"}
+
+    ${if target == "android" then ''
+      titanium config --config-file $TMPDIR/config.json --no-colors android.sdkPath ${androidsdk}/libexec/android-sdk
+
+      export PATH=${androidsdk}/libexec/android-sdk/tools:$(echo ${androidsdk}/libexec/android-sdk/build-tools/android-*):$PATH
+      export GRADLE_USER_HOME=$TMPDIR/gradle
+
+      ${if release then ''
+        ${stdenv.lib.optionalString stdenv.isDarwin ''
+          # Signing the app does not work with OpenJDK on macOS, use host SDK instead
+          export JAVA_HOME="$(/usr/libexec/java_home -v 1.8)"
+        ''}
+        titanium build --config-file $TMPDIR/config.json --no-colors --force --platform android --target dist-playstore --keystore ${androidKeyStore} --alias "${androidKeyAlias}" --store-password "${androidKeyStorePassword}" --output-dir $out
+      '' else ''
+        titanium build --config-file $TMPDIR/config.json --no-colors --force --platform android --target emulator --build-only -B foo --output $out
+      ''}
+    ''
+    else if target == "iphone" then ''
+      # Configure the path to Xcode
+      titanium --config-file $TMPDIR/config.json --no-colors config paths.xcode ${xcodeBaseDir}
+
+      # Link the modules folder
+      if [ ! -e modules ]
+      then
+          ln -s ${titaniumsdk}/modules modules
+          createdModulesSymlink=1
+      fi
+
+      ${if release then ''
+        # Create a keychain with the component hash name (should always be unique)
+        export keychainName=$(basename $out)
+
+        security create-keychain -p "" $keychainName
+        security default-keychain -s $keychainName
+        security unlock-keychain -p "" $keychainName
+        security import ${iosCertificate} -k $keychainName -P "${iosCertificatePassword}" -A
+        security set-key-partition-list -S apple-tool:,apple: -s -k "" $keychainName
+        provisioningId=$(grep UUID -A1 -a ${iosMobileProvisioningProfile} | grep -o "[-A-Za-z0-9]\{36\}")
+
+        # Ensure that the requested provisioning profile can be found
+
+        if [ ! -f "$HOME/Library/MobileDevice/Provisioning Profiles/$provisioningId.mobileprovision" ]
+        then
+            mkdir -p "$HOME/Library/MobileDevice/Provisioning Profiles"
+            cp ${iosMobileProvisioningProfile} "$HOME/Library/MobileDevice/Provisioning Profiles/$provisioningId.mobileprovision"
+        fi
+
+        # Take precautions to prevent concurrent builds blocking the keychain
+        while [ -f $HOME/lock-keychain ]
+        do
+            echo "Keychain locked, waiting for a couple of seconds, or remove $HOME/lock-keychain to unblock..."
+            sleep 3
+        done
+
+        touch $HOME/lock-keychain
+
+        security default-keychain -s $keychainName
+
+        # Do the actual build
+        titanium build --config-file $TMPDIR/config.json --force --no-colors --platform ios --target ${if iosBuildStore then "dist-appstore" else "dist-adhoc"} --pp-uuid $provisioningId --distribution-name "${iosCertificateName}" --keychain $HOME/Library/Keychains/$keychainName-db --device-family universal --ios-version ${iosVersion} --output-dir $out
+
+        # Remove our generated keychain
+        ${deleteKeychain}
+      '' else ''
+        # Copy all sources to the output store directory.
+        # Why? Debug application include *.js files, which are symlinked into their
+        # sources. If they are not copied, we have dangling references to the
+        # temp folder.
+
+        cp -av * $out
+        cd $out
+
+        # Execute the build
+        titanium build --config-file $TMPDIR/config.json --force --no-colors --platform ios --target simulator --build-only --device-family universal --ios-version ${iosVersion} --output-dir $out
+
+        # Remove the modules symlink
+        if [ "$createdModulesSymlink" = "1" ]
+        then
+            rm $out/modules
+        fi
+      ''}
+    '' else throw "Target: ${target} is not supported!"}
   '';
-  
+
   installPhase = ''
-    mkdir -p $out
-    
-    ${if target == "android" && release then ""
-      else
-        if target == "android" then
-          ''cp "$(ls build/android/bin/*.apk | grep -v '\-unsigned.apk')" $out''
-        else if target == "iphone" && release then
-           ''
-             cp -av build/iphone/build/* $out
-             mkdir -p $out/nix-support
-             echo "file binary-dist \"$(echo $out/*.ipa)\"" > $out/nix-support/hydra-build-products
-             
-             ${stdenv.lib.optionalString enableWirelessDistribution ''
-               appname=$(basename $out/*.ipa .ipa)
-               bundleId=$(grep '<id>[a-zA-Z0-9.]*</id>' tiapp.xml | sed -e 's|<id>||' -e 's|</id>||' -e 's/ //g')
-               version=$(grep '<version>[a-zA-Z0-9.]*</version>' tiapp.xml | sed -e 's|<version>||' -e 's|</version>||' -e 's/ //g')
-               
-               sed -e "s|@INSTALL_URL@|${installURL}?bundleId=$bundleId\&amp;version=$version\&amp;title=$appname|" ${../xcodeenv/install.html.template} > "$out/$appname.html"
-               echo "doc install \"$out/$appname.html\"" >> $out/nix-support/hydra-build-products
-             ''}
-           ''
-        else if target == "iphone" then ""
-        else throw "Target: ${target} is not supported!"}
-    
     ${if target == "android" then ''
+      ${if release then ""
+      else ''
+        cp "$(ls build/android/bin/*.apk | grep -v '\-unsigned.apk')" $out
+      ''}
+
+      mkdir -p $out/nix-support
+      echo "file binary-dist \"$(ls $out/*.apk)\"" > $out/nix-support/hydra-build-products
+    ''
+    else if target == "iphone" then
+      if release then ''
         mkdir -p $out/nix-support
-        echo "file binary-dist \"$(ls $out/*.apk)\"" > $out/nix-support/hydra-build-products
-    '' else ""}
+        echo "file binary-dist \"$(echo $out/*.ipa)\"" > $out/nix-support/hydra-build-products
+
+        ${stdenv.lib.optionalString enableWirelessDistribution ''
+          appname="$(basename "$out/*.ipa" .ipa)"
+          bundleId=$(grep '<id>[a-zA-Z0-9.]*</id>' tiapp.xml | sed -e 's|<id>||' -e 's|</id>||' -e 's/ //g')
+          version=$(grep '<version>[a-zA-Z0-9.]*</version>' tiapp.xml | sed -e 's|<version>||' -e 's|</version>||' -e 's/ //g')
+
+          sed -e "s|@INSTALL_URL@|${installURL}?bundleId=$bundleId\&amp;version=$version\&amp;title=$appname|" ${../xcodeenv/install.html.template} > "$out/$appname.html"
+          echo "doc install \"$out/$appname.html\"" >> $out/nix-support/hydra-build-products
+        ''}
+      ''
+      else ""
+    else throw "Target: ${target} is not supported!"}
   '';
-  
+
   failureHook = stdenv.lib.optionalString (release && target == "iphone") deleteKeychain;
-}
+} // extraArgs)
diff --git a/pkgs/development/mobile/titaniumenv/default.nix b/pkgs/development/mobile/titaniumenv/default.nix
index f411a8d61fd..e9f6344680b 100644
--- a/pkgs/development/mobile/titaniumenv/default.nix
+++ b/pkgs/development/mobile/titaniumenv/default.nix
@@ -1,27 +1,19 @@
-{pkgs, xcodeVersion ? "9.2", xcodeBaseDir ? "/Applications/Xcode.app", tiVersion ? "7.1.0.GA"}:
+{pkgs, pkgs_i686, androidenv, xcodeenv, tiVersion ? "7.1.0.GA"}:
 
 rec {
-  androidenv = pkgs.androidenv;
-
-  xcodeenv = if pkgs.stdenv.hostPlatform.system == "x86_64-darwin" then pkgs.xcodeenv.override {
-    version = xcodeVersion;
-    inherit xcodeBaseDir;
-  } else null;
-  
   titaniumsdk = let
-    titaniumSdkFile = if tiVersion == "6.3.1.GA" then ./titaniumsdk-6.3.nix
-      else if tiVersion == "7.1.0.GA" then ./titaniumsdk-7.1.nix
+    titaniumSdkFile = if tiVersion == "7.1.0.GA" then ./titaniumsdk-7.1.nix
       else throw "Titanium version not supported: "+tiVersion;
     in
     import titaniumSdkFile {
-      inherit (pkgs) stdenv fetchurl unzip makeWrapper python jdk;
+      inherit (pkgs) stdenv fetchurl unzip makeWrapper;
     };
-  
+
   buildApp = import ./build-app.nix {
     inherit (pkgs) stdenv python which file jdk nodejs;
-    inherit (pkgs.nodePackages_6_x) alloy titanium;
-    inherit (androidenv) androidsdk;
-    inherit (xcodeenv) xcodewrapper;
-    inherit titaniumsdk xcodeBaseDir;
+    inherit (pkgs.nodePackages_8_x) alloy titanium;
+    inherit (androidenv) composeAndroidPackages;
+    inherit (xcodeenv) composeXcodeWrapper;
+    inherit titaniumsdk;
   };
 }
diff --git a/pkgs/development/mobile/titaniumenv/examples/default.nix b/pkgs/development/mobile/titaniumenv/examples/default.nix
deleted file mode 100644
index 78f91dd39fb..00000000000
--- a/pkgs/development/mobile/titaniumenv/examples/default.nix
+++ /dev/null
@@ -1,91 +0,0 @@
-{ nixpkgs ? <nixpkgs>
-, systems ? [ "x86_64-linux" "x86_64-darwin" ]
-, xcodeVersion ? "9.2"
-, xcodeBaseDir ? "/Applications/Xcode.app"
-, tiVersion ? "7.1.0.GA"
-, rename ? false
-, newBundleId ? "com.example.kitchensink", iosMobileProvisioningProfile ? null, iosCertificate ? null, iosCertificateName ? "Example", iosCertificatePassword ? "", iosVersion ? "11.2"
-, enableWirelessDistribution ? false, installURL ? null
-}:
-
-let
-  pkgs = import nixpkgs {};
-in
-rec {
-  kitchensink_android_debug = pkgs.lib.genAttrs systems (system:
-  let
-    pkgs = import nixpkgs { inherit system; };
-  in
-  import ./kitchensink {
-    inherit (pkgs) fetchgit;
-    titaniumenv = pkgs.titaniumenv.override { inherit xcodeVersion xcodeBaseDir tiVersion; };
-    inherit tiVersion;
-    target = "android";
-  });
-  
-  kitchensink_android_release = pkgs.lib.genAttrs systems (system:
-  let
-    pkgs = import nixpkgs { inherit system; };
-  in
-  import ./kitchensink {
-    inherit (pkgs) fetchgit;
-    titaniumenv = pkgs.titaniumenv.override { inherit xcodeVersion xcodeBaseDir tiVersion; };
-    inherit tiVersion;
-    target = "android";
-    release = true;
-  });
-  
-  emulate_kitchensink_debug = pkgs.lib.genAttrs systems (system:
-  let
-    pkgs = import nixpkgs { inherit system; };
-  in
-  import ./emulate-kitchensink {
-    inherit (pkgs) androidenv;
-    kitchensink = builtins.getAttr system kitchensink_android_debug;
-  });
-  
-  emulate_kitchensink_release = pkgs.lib.genAttrs systems (system:
-  let
-    pkgs = import nixpkgs { inherit system; };
-  in
-  import ./emulate-kitchensink {
-    inherit (pkgs) androidenv;
-    kitchensink = builtins.getAttr system kitchensink_android_release;
-  });
-  
-} // (if builtins.elem "x86_64-darwin" systems then 
-  let
-    pkgs = import nixpkgs { system = "x86_64-darwin"; };
-  in
-  rec {
-  kitchensink_ios_development = import ./kitchensink {
-    inherit (pkgs) fetchgit;
-    titaniumenv = pkgs.titaniumenv.override { inherit xcodeVersion xcodeBaseDir tiVersion; };
-    inherit tiVersion iosVersion;
-    target = "iphone";
-  };
-
-  simulate_kitchensink = import ./simulate-kitchensink {
-    inherit (pkgs) stdenv;
-    xcodeenv = pkgs.xcodeenv.override { version = xcodeVersion; inherit xcodeBaseDir; };
-    kitchensink = kitchensink_ios_development;
-    bundleId = if rename then newBundleId else "com.appcelerator.kitchensink";
-  };
-} else {}) // (if rename then
-  let
-    pkgs = import nixpkgs { system = "x86_64-darwin"; };
-  in
-  {
-    kitchensink_ipa = import ./kitchensink {
-      inherit (pkgs) stdenv fetchgit;
-      titaniumenv = pkgs.titaniumenv.override { inherit xcodeVersion xcodeBaseDir tiVersion; };
-      target = "iphone";
-      inherit tiVersion;
-      release = true;
-      rename = true;
-      inherit newBundleId iosMobileProvisioningProfile iosCertificate iosCertificateName iosCertificatePassword iosVersion;
-      inherit enableWirelessDistribution installURL;
-    };
-  }
-  
-else {})
diff --git a/pkgs/development/mobile/titaniumenv/examples/emulate-kitchensink/default.nix b/pkgs/development/mobile/titaniumenv/examples/emulate-kitchensink/default.nix
deleted file mode 100644
index cad4503dc96..00000000000
--- a/pkgs/development/mobile/titaniumenv/examples/emulate-kitchensink/default.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{androidenv, kitchensink}:
-
-androidenv.emulateApp {
-  name = "emulate-${kitchensink.name}";
-  app = kitchensink;
-  platformVersion = "16";
-  useGoogleAPIs = true;
-  package = "com.appcelerator.kitchensink";
-  activity = ".KitchensinkActivity";
-}
diff --git a/pkgs/development/mobile/titaniumenv/examples/kitchensink/default.nix b/pkgs/development/mobile/titaniumenv/examples/kitchensink/default.nix
deleted file mode 100644
index 70ab1b168c4..00000000000
--- a/pkgs/development/mobile/titaniumenv/examples/kitchensink/default.nix
+++ /dev/null
@@ -1,44 +0,0 @@
-{ titaniumenv, fetchgit, target, androidPlatformVersions ? [ "25" "26" ], tiVersion ? "7.1.0.GA", release ? false
-, rename ? false, stdenv ? null, newBundleId ? null, iosMobileProvisioningProfile ? null, iosCertificate ? null, iosCertificateName ? null, iosCertificatePassword ? null, iosVersion ? "11.2"
-, enableWirelessDistribution ? false, installURL ? null
-}:
-
-assert rename -> (stdenv != null && newBundleId != null && iosMobileProvisioningProfile != null && iosCertificate != null && iosCertificateName != null && iosCertificatePassword != null);
-
-let
-  src = fetchgit {
-    url = https://github.com/appcelerator/kitchensink-v2.git;
-    rev = "94364df2ef60a80bd354a4273e3cb5f4c5185537";
-    sha256 = "0q4gzidpsq401frkngy4yk5kqvm8dz00ls74bw3fnpvg4714d6gf";
-  };
-
-  # Rename the bundle id to something else
-  renamedSrc = stdenv.mkDerivation {
-    name = "KitchenSink-renamedsrc";
-    inherit src;
-    buildPhase = ''
-      sed -i -e "s|com.appcelerator.kitchensink|${newBundleId}|" tiapp.xml
-    '';
-    installPhase = ''
-      mkdir -p $out
-      mv * $out
-    '';
-  };
-in
-titaniumenv.buildApp {
-  name = "KitchenSink-${target}-${if release then "release" else "debug"}";
-  src = if rename then renamedSrc else src;
-  preBuild = ''
-    sed -i -e "s|23|25|" tiapp.xml
-  ''; # Raise minimum android SDK from 23 to 25
-  inherit tiVersion;
-
-  inherit target androidPlatformVersions release;
-
-  androidKeyStore = ./keystore;
-  androidKeyAlias = "myfirstapp";
-  androidKeyStorePassword = "mykeystore";
-
-  inherit iosMobileProvisioningProfile iosCertificate iosCertificateName iosCertificatePassword iosVersion;
-  inherit enableWirelessDistribution installURL;
-}
diff --git a/pkgs/development/mobile/titaniumenv/examples/kitchensink/generatekeystore.sh b/pkgs/development/mobile/titaniumenv/examples/kitchensink/generatekeystore.sh
deleted file mode 100755
index 57451e8a507..00000000000
--- a/pkgs/development/mobile/titaniumenv/examples/kitchensink/generatekeystore.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh -e
-
-( echo "John Doe"
-  echo "My Company"
-  echo "My Organization"
-  echo "My City"
-  echo "My State"
-  echo "US"
-  echo "yes"
-) | keytool --genkeypair --alias myfirstapp --keystore ./keystore --storepass mykeystore
diff --git a/pkgs/development/mobile/titaniumenv/examples/kitchensink/keystore b/pkgs/development/mobile/titaniumenv/examples/kitchensink/keystore
deleted file mode 100644
index ee0a9c7989b..00000000000
--- a/pkgs/development/mobile/titaniumenv/examples/kitchensink/keystore
+++ /dev/null
Binary files differdiff --git a/pkgs/development/mobile/titaniumenv/examples/simulate-kitchensink/default.nix b/pkgs/development/mobile/titaniumenv/examples/simulate-kitchensink/default.nix
deleted file mode 100644
index bbd94cb7882..00000000000
--- a/pkgs/development/mobile/titaniumenv/examples/simulate-kitchensink/default.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{xcodeenv, kitchensink, bundleId}:
-
-xcodeenv.simulateApp {
-  name = "simulate-${kitchensink.name}";
-  inherit bundleId;
-  app = "${kitchensink}/build/iphone/build/Products/Debug-iphonesimulator";
-}
diff --git a/pkgs/development/mobile/titaniumenv/titaniumsdk-6.3.nix b/pkgs/development/mobile/titaniumenv/titaniumsdk-6.3.nix
deleted file mode 100644
index b8c2688708b..00000000000
--- a/pkgs/development/mobile/titaniumenv/titaniumsdk-6.3.nix
+++ /dev/null
@@ -1,43 +0,0 @@
-{stdenv, fetchurl, unzip, makeWrapper}:
-
-stdenv.mkDerivation {
-  name = "mobilesdk-6.3.1.GA";
-  src = if (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") then fetchurl {
-    url = http://builds.appcelerator.com/mobile/6_3_X/mobilesdk-6.3.1.v20171101154403-linux.zip;
-    sha256 = "0g8dqqf5ffa7ll3rqm5naywipnv2vvfxcj9fmqg1wnvvxf0rflqj";
-  }
-  else if stdenv.hostPlatform.system == "x86_64-darwin" then fetchurl {
-    url = http://builds.appcelerator.com/mobile/6_3_X/mobilesdk-6.3.1.v20171101154403-osx.zip;
-    sha256 = "00bm8vv70mg4kd7jvmxd1bfqafv6zdpdx816i0hvf801zwnak4nj";
-  }
-  else throw "Platform: ${stdenv.hostPlatform.system} not supported!";
-  
-  buildInputs = [ unzip makeWrapper ];
-  
-  buildCommand = ''
-    mkdir -p $out
-    cd $out
-    (yes y | unzip $src) || true
-    
-    # Rename ugly version number
-    cd mobilesdk/*
-    mv * 6.3.1.GA
-    cd *
-    ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-darwin") ''
-      # Fixes a bad archive copying error when generating an IPA file
-      sed -i -e "s|cp -rf|/bin/cp -rf|" iphone/cli/commands/_build.js
-    ''}
-
-    # Patch some executables
-    
-    ${if stdenv.hostPlatform.system == "i686-linux" then
-      ''
-        patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 android/titanium_prep.linux32
-      ''
-      else if stdenv.hostPlatform.system == "x86_64-linux" then
-      ''
-        patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 android/titanium_prep.linux64
-      ''
-      else ""}
-  '';
-}
diff --git a/pkgs/development/mobile/titaniumenv/titaniumsdk-7.1.nix b/pkgs/development/mobile/titaniumenv/titaniumsdk-7.1.nix
index 4d3bd420969..13abc18f76e 100644
--- a/pkgs/development/mobile/titaniumenv/titaniumsdk-7.1.nix
+++ b/pkgs/development/mobile/titaniumenv/titaniumsdk-7.1.nix
@@ -35,7 +35,7 @@ let
     sha256 = "11nwdb9y84cghcx319nsjjf9m035s4s1184zrhzpvaxq2wvqhbhx";
   };
 
-  # Put the download plugins in a fake Maven repository
+  # Put the downloaded plugins in a fake Maven repository
   fakeMavenRepo = stdenv.mkDerivation {
     name = "fake-maven-repo";
     buildCommand = ''
@@ -54,15 +54,15 @@ let
 in
 stdenv.mkDerivation {
   name = "mobilesdk-7.1.0.GA";
-  src = if (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") then fetchurl {
+  src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") then fetchurl {
     url = http://builds.appcelerator.com/mobile/7_1_X/mobilesdk-7.1.0.v20180314133955-linux.zip;
     sha256 = "18b3jnr65sdn5wj191bcl48gvhyklxmighxakv4vrz1fb59kyvqn";
   }
-  else if stdenv.hostPlatform.system == "x86_64-darwin" then fetchurl {
+  else if stdenv.system == "x86_64-darwin" then fetchurl {
     url = http://builds.appcelerator.com/mobile/7_1_X/mobilesdk-7.1.0.v20180314133955-osx.zip;
     sha256 = "1f62616biwsw1fqxz2sq7lpa6bsfjazffliplyf5dpnh298cnc1m";
   }
-  else throw "Platform: ${stdenv.hostPlatform.system} not supported!";
+  else throw "Platform: ${stdenv.system} not supported!";
 
   buildInputs = [ unzip makeWrapper ];
 
@@ -89,11 +89,11 @@ stdenv.mkDerivation {
 
     # Patch some executables
 
-    ${if stdenv.hostPlatform.system == "i686-linux" then
+    ${if stdenv.system == "i686-linux" then
       ''
         patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 android/titanium_prep.linux32
       ''
-      else if stdenv.hostPlatform.system == "x86_64-linux" then
+      else if stdenv.system == "x86_64-linux" then
       ''
         patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 android/titanium_prep.linux64
       ''
diff --git a/pkgs/development/mobile/xcodeenv/build-app.nix b/pkgs/development/mobile/xcodeenv/build-app.nix
index d7dd2d1190d..90fa307fbf2 100644
--- a/pkgs/development/mobile/xcodeenv/build-app.nix
+++ b/pkgs/development/mobile/xcodeenv/build-app.nix
@@ -1,14 +1,13 @@
-{stdenv, xcodewrapper}:
+{stdenv, composeXcodeWrapper}:
 { name
 , src
-, sdkVersion ? "11.2"
+, sdkVersion ? "11.3"
 , target ? null
 , configuration ? null
 , scheme ? null
 , sdk ? null
 , xcodeFlags ? ""
 , release ? false
-, codeSignIdentity ? null
 , certificateFile ? null
 , certificatePassword ? null
 , provisioningProfile ? null
@@ -18,24 +17,23 @@
 , enableWirelessDistribution ? false
 , installURL ? null
 , bundleId ? null
-, version ? null
-, title ? null
-, meta ? {}
-}:
+, appVersion ? null
+, ...
+}@args:
 
-assert release -> codeSignIdentity != null && certificateFile != null && certificatePassword != null && provisioningProfile != null && signMethod != null;
-assert enableWirelessDistribution -> installURL != null && bundleId != null && version != null && title != null;
+assert release -> certificateFile != null && certificatePassword != null && provisioningProfile != null && signMethod != null;
+assert enableWirelessDistribution -> installURL != null && bundleId != null && appVersion != null;
 
 let
   # Set some default values here
-  
+
   _target = if target == null then name else target;
 
   _configuration = if configuration == null
     then
       if release then "Release" else "Debug"
     else configuration;
-    
+
   _sdk = if sdk == null
     then
       if release then "iphoneos" + sdkVersion else "iphonesimulator" + sdkVersion
@@ -46,41 +44,45 @@ let
     security default-keychain -s login.keychain
     security delete-keychain $keychainName
   '';
+
+  xcodewrapperFormalArgs = builtins.functionArgs composeXcodeWrapper;
+  xcodewrapperArgs = builtins.intersectAttrs xcodewrapperFormalArgs args;
+  xcodewrapper = composeXcodeWrapper xcodewrapperArgs;
+
+  extraArgs = removeAttrs args ([ "name" "scheme" "xcodeFlags" "release" "certificateFile" "certificatePassword" "provisioningProfile" "signMethod" "generateIPA" "generateXCArchive" "enableWirelessDistribution" "installURL" "bundleId" "version" ] ++ builtins.attrNames xcodewrapperFormalArgs);
 in
-stdenv.mkDerivation {
-  name = stdenv.lib.replaceChars [" "] [""] name;
-  inherit src;
-  inherit meta;
+stdenv.mkDerivation ({
+  name = stdenv.lib.replaceChars [" "] [""] name; # iOS app names can contain spaces, but in the Nix store this is not allowed
   buildInputs = [ xcodewrapper ];
   buildPhase = ''
     ${stdenv.lib.optionalString release ''
-        export HOME=/Users/$(whoami)
-        keychainName="$(basename $out)"
-        
-        # Create a keychain
-        security create-keychain -p "" $keychainName
-        security default-keychain -s $keychainName
-        security unlock-keychain -p "" $keychainName
-        
-        # Import the certificate into the keychain
-        security import ${certificateFile} -k $keychainName -P "${certificatePassword}" -A 
-
-        # Grant the codesign utility permissions to read from the keychain
-        security set-key-partition-list -S apple-tool:,apple: -s -k "" $keychainName
-        
-        # Determine provisioning ID
-        PROVISIONING_PROFILE=$(grep UUID -A1 -a ${provisioningProfile} | grep -o "[-A-Za-z0-9]\{36\}")
-
-        if [ ! -f "$HOME/Library/MobileDevice/Provisioning Profiles/$PROVISIONING_PROFILE.mobileprovision" ]
-        then
-            # Copy provisioning profile into the home directory
-            mkdir -p "$HOME/Library/MobileDevice/Provisioning Profiles"
-            cp ${provisioningProfile} "$HOME/Library/MobileDevice/Provisioning Profiles/$PROVISIONING_PROFILE.mobileprovision"
-        fi
-        
-        # Check whether the identity can be found
-        security find-identity -p codesigning $keychainName
-      ''}
+      export HOME=/Users/$(whoami)
+      keychainName="$(basename $out)"
+
+      # Create a keychain
+      security create-keychain -p "" $keychainName
+      security default-keychain -s $keychainName
+      security unlock-keychain -p "" $keychainName
+
+      # Import the certificate into the keychain
+      security import ${certificateFile} -k $keychainName -P "${certificatePassword}" -A 
+
+      # Grant the codesign utility permissions to read from the keychain
+      security set-key-partition-list -S apple-tool:,apple: -s -k "" $keychainName
+
+      # Determine provisioning ID
+      PROVISIONING_PROFILE=$(grep UUID -A1 -a ${provisioningProfile} | grep -o "[-A-Za-z0-9]\{36\}")
+
+      if [ ! -f "$HOME/Library/MobileDevice/Provisioning Profiles/$PROVISIONING_PROFILE.mobileprovision" ]
+      then
+          # Copy provisioning profile into the home directory
+          mkdir -p "$HOME/Library/MobileDevice/Provisioning Profiles"
+          cp ${provisioningProfile} "$HOME/Library/MobileDevice/Provisioning Profiles/$PROVISIONING_PROFILE.mobileprovision"
+      fi
+
+      # Check whether the identity can be found
+      security find-identity -p codesigning $keychainName
+    ''}
 
     # Do the building
     export LD=clang # To avoid problem with -isysroot parameter that is unrecognized by the stock ld. Comparison with an impure build shows that it uses clang instead. Ugly, but it works
@@ -116,10 +118,11 @@ stdenv.mkDerivation {
         # Add IPA to Hydra build products
         mkdir -p $out/nix-support
         echo "file binary-dist \"$(echo $out/*.ipa)\"" > $out/nix-support/hydra-build-products
-        
+
         ${stdenv.lib.optionalString enableWirelessDistribution ''
-          appname=$(basename $out/*.ipa .ipa)
-          sed -e "s|@INSTALL_URL@|${installURL}?bundleId=${bundleId}\&amp;version=${version}\&amp;title=$appname|" ${./install.html.template} > $out/$appname.html
+          # Add another hacky build product that enables wireless adhoc installations
+          appname="$(basename "$out/*.ipa" .ipa)"
+          sed -e "s|@INSTALL_URL@|${installURL}?bundleId=${bundleId}\&amp;version=${appVersion}\&amp;title=$appname|" ${./install.html.template} > $out/$appname.html
           echo "doc install \"$out/$appname.html\"" >> $out/nix-support/hydra-build-products
         ''}
       ''}
@@ -127,13 +130,13 @@ stdenv.mkDerivation {
         mkdir -p $out
         mv "${name}.xcarchive" $out
       ''}
-      
+
       # Delete our temp keychain
       ${deleteKeychain}
     ''}
   '';
-  
+
   failureHook = stdenv.lib.optionalString release deleteKeychain;
-  
+
   installPhase = "true";
-}
+} // extraArgs)
diff --git a/pkgs/development/mobile/xcodeenv/xcodewrapper.nix b/pkgs/development/mobile/xcodeenv/compose-xcodewrapper.nix
index 38afe86c5aa..d0093ffac91 100644
--- a/pkgs/development/mobile/xcodeenv/xcodewrapper.nix
+++ b/pkgs/development/mobile/xcodeenv/compose-xcodewrapper.nix
@@ -1,4 +1,7 @@
-{stdenv, version, xcodeBaseDir}:
+{stdenv}:
+{version ? "9.3", xcodeBaseDir ? "/Applications/Xcode.app"}:
+
+assert stdenv.isDarwin;
 
 stdenv.mkDerivation {
   name = "xcode-wrapper-"+version;
@@ -9,6 +12,7 @@ stdenv.mkDerivation {
     ln -s /usr/bin/security
     ln -s /usr/bin/codesign
     ln -s /usr/bin/xcrun
+    ln -s /usr/bin/plutil
     ln -s "${xcodeBaseDir}/Contents/Developer/usr/bin/xcodebuild"
     ln -s "${xcodeBaseDir}/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator"
 
diff --git a/pkgs/development/mobile/xcodeenv/default.nix b/pkgs/development/mobile/xcodeenv/default.nix
index b3b9dbdf07a..47686e6d69e 100644
--- a/pkgs/development/mobile/xcodeenv/default.nix
+++ b/pkgs/development/mobile/xcodeenv/default.nix
@@ -1,15 +1,15 @@
-{stdenv, version ? "9.2", xcodeBaseDir ? "/Applications/Xcode.app"}:
+{stdenv}:
 
 rec {
-  xcodewrapper = import ./xcodewrapper.nix {
-    inherit stdenv version xcodeBaseDir;
+  composeXcodeWrapper = import ./compose-xcodewrapper.nix {
+    inherit stdenv;
   };
 
   buildApp = import ./build-app.nix {
-    inherit stdenv xcodewrapper;
+    inherit stdenv composeXcodeWrapper;
   };
 
   simulateApp = import ./simulate-app.nix {
-    inherit stdenv xcodewrapper;
+    inherit stdenv composeXcodeWrapper;
   };
 }
diff --git a/pkgs/development/mobile/xcodeenv/install.html.template b/pkgs/development/mobile/xcodeenv/install.html.template
index 833b1994162..d48fda7f38b 100644
--- a/pkgs/development/mobile/xcodeenv/install.html.template
+++ b/pkgs/development/mobile/xcodeenv/install.html.template
@@ -4,14 +4,14 @@
     <head>
         <title>Install IPA</title>
     </head>
-    
+
     <body>
         <a id="forwardlink" href="@INSTALL_URL@">Go to the install page or wait a second</a>
-        
+
         <script type="text/javascript">
             setTimeout(function() {
                 var link = document.getElementById('forwardlink');
-                
+
                 if(document.createEvent) {
                     var eventObj = document.createEvent('MouseEvents');
                     eventObj.initEvent('click', true, false);
diff --git a/pkgs/development/mobile/xcodeenv/simulate-app.nix b/pkgs/development/mobile/xcodeenv/simulate-app.nix
index 04b6f2cbc83..1a55f8366a3 100644
--- a/pkgs/development/mobile/xcodeenv/simulate-app.nix
+++ b/pkgs/development/mobile/xcodeenv/simulate-app.nix
@@ -1,47 +1,56 @@
-{stdenv, xcodewrapper}:
-{name, bundleId, app}:
+{stdenv, composeXcodeWrapper}:
+{name, app ? null, bundleId ? null, ...}@args:
 
+assert app != null -> bundleId != null;
+
+let
+  xcodewrapperArgs = builtins.intersectAttrs (builtins.functionArgs composeXcodeWrapper) args;
+
+  xcodewrapper = composeXcodeWrapper xcodewrapperArgs;
+in
 stdenv.mkDerivation {
   name = stdenv.lib.replaceChars [" "] [""] name;
   buildCommand = ''
     mkdir -p $out/bin
     cat > $out/bin/run-test-simulator << "EOF"
     #! ${stdenv.shell} -e
-    
+
     if [ "$1" = "" ]
     then
         # Show the user the possibile UDIDs and let him pick one, if none is provided as a command-line parameter
         xcrun simctl list
-        
+
         echo "Please provide a UDID of a simulator:"
         read udid
     else
         # If a parameter has been provided, consider that a device UDID and use that
         udid="$1"
     fi
-    
+
     # Open the simulator instance
     open -a "$(readlink "${xcodewrapper}/bin/Simulator")" --args -CurrentDeviceUDID $udid
-    
-    # Copy the app and restore the write permissions
-    appTmpDir=$(mktemp -d -t appTmpDir)
-    cp -r "$(echo ${app}/*.app)" "$appTmpDir"
-    chmod -R 755 "$(echo $appTmpDir/*.app)"
-    
-    # Wait for the simulator to start
-    echo "Press enter when the simulator is started..."
-    read
-    
-    # Install the app
-    xcrun simctl install "$udid" "$(echo $appTmpDir/*.app)"
-    
-    # Remove the app tempdir
-    rm -Rf $appTmpDir
-    
-    # Launch the app in the simulator
-    xcrun simctl launch $udid "${bundleId}"
-    EOF
-
-    chmod +x $out/bin/run-test-simulator
+
+    ${stdenv.lib.optionalString (app != null) ''
+      # Copy the app and restore the write permissions
+      appTmpDir=$(mktemp -d -t appTmpDir)
+      cp -r "$(echo ${app}/*.app)" "$appTmpDir"
+      chmod -R 755 "$(echo $appTmpDir/*.app)"
+
+      # Wait for the simulator to start
+      echo "Press enter when the simulator is started..."
+      read
+
+      # Install the app
+      xcrun simctl install "$udid" "$(echo $appTmpDir/*.app)"
+
+      # Remove the app tempdir
+      rm -Rf $appTmpDir
+
+      # Launch the app in the simulator
+      xcrun simctl launch $udid "${bundleId}"
+      EOF
+
+      chmod +x $out/bin/run-test-simulator
+    ''}
   '';
 }
diff --git a/pkgs/development/ocaml-modules/ppx_deriving_yojson/default.nix b/pkgs/development/ocaml-modules/ppx_deriving_yojson/default.nix
index 26fa24d8dc0..53e8265c3a7 100644
--- a/pkgs/development/ocaml-modules/ppx_deriving_yojson/default.nix
+++ b/pkgs/development/ocaml-modules/ppx_deriving_yojson/default.nix
@@ -1,29 +1,30 @@
-{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, topkg, cppo
-, ppx_deriving, yojson, ounit
+{ lib, buildDunePackage, fetchFromGitHub, ppxfind, ounit
+, ppx_deriving, yojson
 }:
 
-stdenv.mkDerivation rec {
-  name = "ocaml${ocaml.version}-ppx_deriving_yojson-${version}";
-  version = "3.1";
+buildDunePackage rec {
+  pname = "ppx_deriving_yojson";
+  version = "3.3";
+
+  minimumOCamlVersion = "4.04";
 
   src = fetchFromGitHub {
     owner = "ocaml-ppx";
     repo = "ppx_deriving_yojson";
     rev = "v${version}";
-    sha256 = "1pwfnq7z60nchba4gnf58918ll11w3gj5i88qhz1p2jm45hxqgnw";
+    sha256 = "1gbfziw03r9azqlsmyn6izrgrf1xc30s88jgdany1kblpgq41rsz";
   };
 
-  buildInputs = [ ocaml findlib ocamlbuild cppo ounit ];
+  buildInputs = [ ppxfind ounit ];
 
   propagatedBuildInputs = [ ppx_deriving yojson ];
 
-  inherit (topkg) installPhase;
+  doCheck = true;
 
   meta = {
-    description = "A Yojson codec generator for OCaml >= 4.02.";
+    description = "A Yojson codec generator for OCaml >= 4.04";
     inherit (src.meta) homepage;
-    license = stdenv.lib.licenses.mit;
-    maintainers = [ stdenv.lib.maintainers.vbgl ];
-    inherit (ocaml.meta) platforms;
+    license = lib.licenses.mit;
+    maintainers = [ lib.maintainers.vbgl ];
   };
 }
diff --git a/pkgs/development/ocaml-modules/ppxfind/default.nix b/pkgs/development/ocaml-modules/ppxfind/default.nix
new file mode 100644
index 00000000000..ebb592dddd2
--- /dev/null
+++ b/pkgs/development/ocaml-modules/ppxfind/default.nix
@@ -0,0 +1,21 @@
+{ lib, buildDunePackage, fetchurl, ocaml-migrate-parsetree }:
+
+buildDunePackage rec {
+	pname = "ppxfind";
+	version = "1.2";
+	src = fetchurl {
+		url = "https://github.com/diml/ppxfind/releases/download/${version}/ppxfind-${version}.tbz";
+		sha256 = "1687jbgii5w5dvvid3ri2cx006ysv0rrspn8dz8x7ma8615whz2h";
+	};
+
+	minimumOCamlVersion = "4.03";
+
+	buildInputs = [ ocaml-migrate-parsetree ];
+
+	meta = {
+		homepage = "https://github.com/diml/ppxfind";
+		description = "ocamlfind ppx tool";
+		license = lib.licenses.bsd3;
+		maintainers = [ lib.maintainers.vbgl ];
+	};
+}
diff --git a/pkgs/development/python-modules/affine/default.nix b/pkgs/development/python-modules/affine/default.nix
index 5bd957ae731..e2fd802cf80 100644
--- a/pkgs/development/python-modules/affine/default.nix
+++ b/pkgs/development/python-modules/affine/default.nix
@@ -2,11 +2,11 @@
 
 buildPythonPackage rec {
   pname = "affine";
-  version = "2.2.1";
+  version = "2.2.2";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "0j3mvcnmgjvvm0znqyf7xylq7i89zjf4dq0g8280xs6bwbl5cvih";
+    sha256 = "146slzpj2b220dmbmrxib030wymvplawxzn7gcgnbahgm500y3gz";
   };
 
   checkInputs = [ pytest ];
diff --git a/pkgs/development/python-modules/biopython/default.nix b/pkgs/development/python-modules/biopython/default.nix
index 39be67e6e51..beb03c894be 100644
--- a/pkgs/development/python-modules/biopython/default.nix
+++ b/pkgs/development/python-modules/biopython/default.nix
@@ -6,11 +6,11 @@
 
 buildPythonPackage rec {
   pname = "biopython";
-  version = "1.72";
+  version = "1.73";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "ab6b492443adb90c66267b3d24d602ae69a93c68f4b9f135ba01cb06d36ce5a2";
+    sha256 = "1q55jhf76z3k6is3psis0ckbki7df26x7dikpcc3vhk1vhkwribh";
   };
 
   propagatedBuildInputs = [ numpy ];
diff --git a/pkgs/development/python-modules/dpkt/default.nix b/pkgs/development/python-modules/dpkt/default.nix
index e45d651f324..c8c7f255afa 100644
--- a/pkgs/development/python-modules/dpkt/default.nix
+++ b/pkgs/development/python-modules/dpkt/default.nix
@@ -2,11 +2,11 @@
 
 buildPythonPackage rec {
   pname = "dpkt";
-  version = "1.9.1";
+  version = "1.9.2";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "0rr9ygczhxkfb61778jx0cxs0sq46zwlcj5l3wn6xmd3iy3yx9y6";
+    sha256 = "0m0ym219zsqfjl6jwivw5as3igjbmhpcn4dvabc5nkd0bk6jxaaj";
   };
 
   meta = with stdenv.lib; {
diff --git a/pkgs/development/python-modules/easyprocess/default.nix b/pkgs/development/python-modules/easyprocess/default.nix
index dc5784aafb7..46948f2485c 100644
--- a/pkgs/development/python-modules/easyprocess/default.nix
+++ b/pkgs/development/python-modules/easyprocess/default.nix
@@ -2,11 +2,11 @@
 
 buildPythonPackage rec {
   pname = "EasyProcess";
-  version = "0.2.3";
+  version = "0.2.5";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "07z6485bjxkmx26mp1p1ww19d10qavw0s006bidzailsvk543qll";
+    sha256 = "0gdl6y37g8rns2i26d2zlx7x4kbpql9h5qd8k23ka69q6frcpb8k";
   };
 
   # No tests
diff --git a/pkgs/development/python-modules/nvchecker/default.nix b/pkgs/development/python-modules/nvchecker/default.nix
index a015a124738..c636346a5e3 100644
--- a/pkgs/development/python-modules/nvchecker/default.nix
+++ b/pkgs/development/python-modules/nvchecker/default.nix
@@ -2,11 +2,11 @@
 
 buildPythonPackage rec {
   pname = "nvchecker";
-  version = "1.2.7";
+  version = "1.3";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "19qc2wwkdr701mx94r75ayq5h2jz3q620hcqaj2ng9qdgxm90940";
+    sha256 = "0lgcc05c515d7692zvcmf36n2qpyn0bi018i1z3jy73abm04230j";
   };
 
   propagatedBuildInputs = [ setuptools structlog tornado pycurl ];
diff --git a/pkgs/development/python-modules/peewee/default.nix b/pkgs/development/python-modules/peewee/default.nix
index 09ee7dc92ea..a18168eaa5a 100644
--- a/pkgs/development/python-modules/peewee/default.nix
+++ b/pkgs/development/python-modules/peewee/default.nix
@@ -10,14 +10,14 @@
 buildPythonPackage rec {
 
   pname = "peewee";
-  version = "3.7.1";
+  version = "3.8.0";
 
   # pypi release does not provide tests
   src = fetchFromGitHub {
     owner = "coleifer";
     repo = pname;
     rev = version;
-    sha256 = "0chn8mknzvkmcmysy2291hanf0vg3sfzqgfc5hqx1nnrd6qkiq8r";
+    sha256 = "0kqhpalw1587zaz3fcj13mpzs5950l6fm3qlcfqsfp16h8w0s89f";
   };
 
 
diff --git a/pkgs/development/python-modules/pytesseract/default.nix b/pkgs/development/python-modules/pytesseract/default.nix
index 7d96f4d39bd..8fae56e9a23 100644
--- a/pkgs/development/python-modules/pytesseract/default.nix
+++ b/pkgs/development/python-modules/pytesseract/default.nix
@@ -2,11 +2,11 @@
 
 buildPythonPackage rec {
   pname = "pytesseract";
-  version = "0.2.5";
+  version = "0.2.6";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "0wlz1vbg1k8cdrpzvrahjnbsfs4ki6xqhbkv17ycfchh7h6kfkfm";
+    sha256 = "0w4phjw0gn52hqlm3ixs2cmj25x7y7nk6ijr9f82wvjvb4hh7hhi";
   };
 
   patches = [
diff --git a/pkgs/development/python-modules/shellingham/default.nix b/pkgs/development/python-modules/shellingham/default.nix
index 6fa265517df..b2c63ea97e3 100644
--- a/pkgs/development/python-modules/shellingham/default.nix
+++ b/pkgs/development/python-modules/shellingham/default.nix
@@ -3,11 +3,11 @@
 
 buildPythonPackage rec {
   pname = "shellingham";
-  version = "1.2.7";
+  version = "1.2.8";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "06biyiwq9571mryzbr50am3mxpc3blscwqhiq8c66ac4xm3maszm";
+    sha256 = "115k1z2klgsvyzg4q5ip0iqxyb565pkchhf2fsr846k68gqcgrjn";
   };
 
   meta = with stdenv.lib; {
diff --git a/pkgs/development/tools/apktool/default.nix b/pkgs/development/tools/apktool/default.nix
index 17b0265fddd..c811b8a99e9 100644
--- a/pkgs/development/tools/apktool/default.nix
+++ b/pkgs/development/tools/apktool/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, makeWrapper, jre, buildTools }:
+{ stdenv, fetchurl, makeWrapper, jre, build-tools }:
 
 stdenv.mkDerivation rec {
   name = "apktool-${version}";
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
     mkdir -p "$out/bin"
     makeWrapper "${jre}/bin/java" "$out/bin/apktool" \
         --add-flags "-jar $out/libexec/apktool/apktool.jar" \
-        --prefix PATH : "${buildTools.v25_0_1}/build-tools/25.0.1/"
+        --prefix PATH : "${builtins.head build-tools}/libexec/android-sdk/build-tools/28.0.3"
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/development/tools/continuous-integration/gitlab-runner/default.nix b/pkgs/development/tools/continuous-integration/gitlab-runner/default.nix
index 04f0c5cb66f..93f389e6879 100644
--- a/pkgs/development/tools/continuous-integration/gitlab-runner/default.nix
+++ b/pkgs/development/tools/continuous-integration/gitlab-runner/default.nix
@@ -1,16 +1,16 @@
 { lib, buildGoPackage, fetchFromGitLab, fetchurl }:
 
 let
-  version = "11.5.0";
+  version = "11.6.0";
   # Gitlab runner embeds some docker images these are prebuilt for arm and x86_64
   docker_x86_64 = fetchurl {
     url = "https://gitlab-runner-downloads.s3.amazonaws.com/v${version}/helper-images/prebuilt-x86_64.tar.xz";
-    sha256 = "1siiws19qzfv2nnyp9fy215yd08iv70x830b61kr1742ywc0jcbn";
+    sha256 = "16xwj962biny18ci8lvfc6r6jq9vcdlc8vs6w7d5yzvd9x55rvwd";
   };
 
   docker_arm = fetchurl {
     url = "https://gitlab-runner-downloads.s3.amazonaws.com/v${version}/helper-images/prebuilt-arm.tar.xz";
-    sha256 = "0d7wnpry4861dcmpspbaar97mkf0jf2bcxvr4nph9xnkw8w7fs2z";
+    sha256 = "05wb7imly0c5zqmxrgdpls8izsq1g409nh31yf6j0sr76m8qkvf9";
   };
 in
 buildGoPackage rec {
@@ -29,7 +29,7 @@ buildGoPackage rec {
     owner = "gitlab-org";
     repo = "gitlab-runner";
     rev = "v${version}";
-    sha256 = "028bl249yfccdnwskbn6sxzf1xsg94chbm107n2h83j7a81cz8kw";
+    sha256 = "1g9wyi9n9xvynvn7c8kjzm5pznyw7w4ziklxjniaa69idzgvbl5g";
   };
 
   patches = [ ./fix-shell-path.patch ];
diff --git a/pkgs/development/tools/skopeo/default.nix b/pkgs/development/tools/skopeo/default.nix
index 7f39376dc06..d44b3d4ec4f 100644
--- a/pkgs/development/tools/skopeo/default.nix
+++ b/pkgs/development/tools/skopeo/default.nix
@@ -5,13 +5,13 @@
 with stdenv.lib;
 
 let
-  version = "0.1.32";
+  version = "0.1.34";
 
   src = fetchFromGitHub {
     rev = "v${version}";
     owner = "containers";
     repo = "skopeo";
-    sha256 = "0pyii4z9xf23lsdx4d3m5pkdyrsi4v1pbjj8l7fjgyfv8ncrjyn8";
+    sha256 = "1drbbjqih69nvgynjcz0js0vi6sgsax8565zbrmf8fkbk609c7r3";
   };
 
   defaultPolicyFile = runCommand "skopeo-default-policy.json" {} "cp ${src}/default-policy.json $out";
diff --git a/pkgs/games/boohu/default.nix b/pkgs/games/boohu/default.nix
index 2504e6935ab..1e70a92066d 100644
--- a/pkgs/games/boohu/default.nix
+++ b/pkgs/games/boohu/default.nix
@@ -3,13 +3,13 @@
 buildGoPackage rec {
 
   name = "boohu-${version}";
-  version = "0.11.1";
+  version = "0.12.0";
 
   goPackagePath = "git.tuxfamily.org/boohu/boohu.git";
 
   src = fetchurl {
     url = "https://download.tuxfamily.org/boohu/downloads/boohu-${version}.tar.gz";
-    sha256 = "0m0ajxiyx8qwxj2zq33s5qpjr65cr33f7dpirg6b4w4y9gyhhv1g";
+    sha256 = "0nf3xj3lda8279cqvjv5c3vpsb7d2kynwwna5yrsy7gq8c9n4rh8";
   };
 
   buildFlags = "--tags ansi";
diff --git a/pkgs/misc/scrcpy/default.nix b/pkgs/misc/scrcpy/default.nix
index afe8c0b7b67..87762eb4b25 100644
--- a/pkgs/misc/scrcpy/default.nix
+++ b/pkgs/misc/scrcpy/default.nix
@@ -3,7 +3,7 @@
 , ninja
 , pkgconfig
 
-, platformTools
+, platform-tools
 , ffmpeg
 , SDL2
 }:
@@ -53,7 +53,7 @@ stdenv.mkDerivation rec {
     ln -s "${prebuilt_server}" "$out/share/scrcpy/scrcpy-server.jar"
 
     # runtime dep on `adb` to push the server
-    wrapProgram "$out/bin/scrcpy" --prefix PATH : "${platformTools}/bin"
+    wrapProgram "$out/bin/scrcpy" --prefix PATH : "${platform-tools}/bin"
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/os-specific/linux/kernel/linux-4.20.nix b/pkgs/os-specific/linux/kernel/linux-4.20.nix
new file mode 100644
index 00000000000..838ef4a5b80
--- /dev/null
+++ b/pkgs/os-specific/linux/kernel/linux-4.20.nix
@@ -0,0 +1,18 @@
+{ stdenv, buildPackages, fetchurl, perl, buildLinux, modDirVersionArg ? null, ... } @ args:
+
+with stdenv.lib;
+
+buildLinux (args // rec {
+  version = "4.20";
+
+  # modDirVersion needs to be x.y.z, will automatically add .0 if needed
+  modDirVersion = if (modDirVersionArg == null) then concatStrings (intersperse "." (take 3 (splitString "." "${version}.0"))) else modDirVersionArg;
+
+  # branchVersion needs to be x.y
+  extraMeta.branch = concatStrings (intersperse "." (take 2 (splitString "." version)));
+
+  src = fetchurl {
+    url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
+    sha256 = "0f14l6mb5c4rwpqjbcb2yrvk1bmmiyh0mpw24fbl7rr26lc2625d";
+  };
+} // (args.argsOverride or {}))
diff --git a/pkgs/os-specific/linux/kernel/linux-libre.nix b/pkgs/os-specific/linux/kernel/linux-libre.nix
index 104dc457d6c..fa9b41b928e 100644
--- a/pkgs/os-specific/linux/kernel/linux-libre.nix
+++ b/pkgs/os-specific/linux/kernel/linux-libre.nix
@@ -1,11 +1,11 @@
 { stdenv, lib, fetchsvn, linux
 , scripts ? fetchsvn {
     url = "https://www.fsfla.org/svn/fsfla/software/linux-libre/releases/tags/";
-    
+
     # Update this if linux_latest-libre fails to build.
     # $ curl https://www.fsfla.org/svn/fsfla/software/linux-libre/releases/tags/ | grep -Eo 'Revision [0-9]+'
-    rev = "15715";
-    sha256 = "1mz1xv860ddxz7dfp4l6q25hlsh532aapvylq703jskgbzsfinxh";
+    rev = "15814";
+    sha256 = "10y2nh9sqd5kw1331apq50ikd8585gsja8hbjzyiskl3x5ak5xzh";
   }
 , ...
 }:
diff --git a/pkgs/os-specific/linux/sysdig/default.nix b/pkgs/os-specific/linux/sysdig/default.nix
index 1a89ff57491..2a614e22c9a 100644
--- a/pkgs/os-specific/linux/sysdig/default.nix
+++ b/pkgs/os-specific/linux/sysdig/default.nix
@@ -5,13 +5,13 @@
 with stdenv.lib;
 stdenv.mkDerivation rec {
   name = "sysdig-${version}";
-  version = "0.24.1";
+  version = "0.24.2";
 
   src = fetchFromGitHub {
     owner = "draios";
     repo = "sysdig";
     rev = version;
-    sha256 = "04y6cqi2j0qpr5bgxyn6zz9f33v5v4lmkcl21c3sg5hmpjwibg3w";
+    sha256 = "16gz6gcp0zfhrqldw9cms38w0x5h3qhlx64dayqgsqbkw914b31a";
   };
 
   nativeBuildInputs = [ cmake perl ];
diff --git a/pkgs/stdenv/cross/default.nix b/pkgs/stdenv/cross/default.nix
index 7d98e5cf488..aafc0855dbe 100644
--- a/pkgs/stdenv/cross/default.nix
+++ b/pkgs/stdenv/cross/default.nix
@@ -53,7 +53,7 @@ in lib.init bootStages ++ [
       cc = if crossSystem.useiOSPrebuilt or false
              then buildPackages.darwin.iosSdkPkgs.clang
            else if crossSystem.useAndroidPrebuilt or false
-             then buildPackages.androidenv."androidndkPkgs_${crossSystem.ndkVer}".gcc
+             then buildPackages."androidndkPkgs_${crossSystem.ndkVer}".gcc
            else buildPackages.gcc;
 
       extraNativeBuildInputs = old.extraNativeBuildInputs
diff --git a/pkgs/tools/graphics/guff/default.nix b/pkgs/tools/graphics/guff/default.nix
new file mode 100644
index 00000000000..db218a812e6
--- /dev/null
+++ b/pkgs/tools/graphics/guff/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "guff";
+  version = "0.1.0";
+
+  src = fetchFromGitHub {
+    owner = "silentbicycle";
+    repo = "guff";
+    rev = "v${version}";
+    sha256 = "0n8mc9j3044j4b3vgc94ryd2j9ik6g73fqja54yxfdfrks4ksyds";
+  };
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  doCheck = true;
+
+  meta = with stdenv.lib;  {
+    description = "A plot device";
+    homepage = https://github.com/silentbicycle/guff;
+    license = licenses.isc;
+    maintainers = [ maintainers.marsam ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/tools/misc/diskus/default.nix b/pkgs/tools/misc/diskus/default.nix
index 7b0681f3166..346ae141819 100644
--- a/pkgs/tools/misc/diskus/default.nix
+++ b/pkgs/tools/misc/diskus/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, rustPlatform }:
+{ stdenv, fetchFromGitHub, rustPlatform, Security }:
 
 rustPlatform.buildRustPackage rec {
   name = "diskus-${version}";
@@ -11,6 +11,8 @@ rustPlatform.buildRustPackage rec {
     sha256 = "18scxspi5ncags8bnxq4ah9w8hrlwwlgpq7q9qfh4d81asmbyr8n";
   };
 
+  buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];
+
   cargoSha256 = "1syrmm5qpz7d1h17xpw1wa3d2snaz9n7d1avsjp7xz8s2qcx1wdc";
 
   meta = with stdenv.lib; {
@@ -18,6 +20,6 @@ rustPlatform.buildRustPackage rec {
     homepage = https://github.com/sharkdp/diskus;
     license = with licenses; [ asl20 /* or */ mit ];
     maintainers = [ maintainers.fuerbringer ];
-    platforms = platforms.linux;
+    platforms = platforms.unix;
   };
 }
diff --git a/pkgs/tools/networking/gnirehtet/default.nix b/pkgs/tools/networking/gnirehtet/default.nix
index d40b85591b5..69ad0e39c94 100644
--- a/pkgs/tools/networking/gnirehtet/default.nix
+++ b/pkgs/tools/networking/gnirehtet/default.nix
@@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec {
   patches = [
     (substituteAll {
       src = ./paths.patch;
-      adb = "${androidenv.platformTools}/bin/adb";
+      adb = "${androidenv.androidPkgs_9_0.platform-tools}/bin/adb";
       inherit apk;
     })
   ];
diff --git a/pkgs/tools/system/osquery/default.nix b/pkgs/tools/system/osquery/default.nix
index 6cdaec10868..c7faf4d3889 100644
--- a/pkgs/tools/system/osquery/default.nix
+++ b/pkgs/tools/system/osquery/default.nix
@@ -4,7 +4,7 @@
 , beecrypt, augeas, libxml2, sleuthkit, yara, lldpd, google-gflags
 , thrift, boost, rocksdb_lite, glog, gbenchmark, snappy
 , openssl, file, doxygen
-, gtest, sqlite, fpm, zstd, rdkafka, rapidjson
+, gtest, sqlite, fpm, zstd, rdkafka, rapidjson, fetchgit
 }:
 
 let
@@ -43,6 +43,20 @@ stdenv.mkDerivation rec {
     gflags' = google-gflags.overrideAttrs (old: {
       cmakeFlags = stdenv.lib.filter (f: isNull (builtins.match ".*STATIC.*" f)) old.cmakeFlags;
     });
+
+    # use older `lvm2` source for osquery, the 2.03 sourcetree
+    # will break osquery due to the lacking header `lvm2app.h`.
+    #
+    # https://github.com/NixOS/nixpkgs/pull/51756#issuecomment-446035295
+    lvm2' = lvm2.overrideAttrs (old: rec {
+      name = "lvm2-${version}";
+      version = "2.02.183";
+      src = fetchgit {
+        url = "git://sourceware.org/git/lvm2.git";
+        rev = "v${version}";
+        sha256 = "1ny3srcsxd6kj59zq1cman5myj8kzw010wbyc6mrpk4kp823r5nx";
+      };
+    });
   in [
     udev audit
 
@@ -51,7 +65,7 @@ stdenv.mkDerivation rec {
       customMemoryManagement = false;
     })
 
-    lvm2 libgcrypt libarchive libgpgerror libuuid iptables dpkg
+    lvm2' libgcrypt libarchive libgpgerror libuuid iptables dpkg
     lzma bzip2 rpm beecrypt augeas libxml2 sleuthkit
     yara lldpd gflags' thrift boost
     glog gbenchmark snappy openssl
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 23b159049e7..d89ecf338d4 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -539,7 +539,7 @@ in
   ansifilter = callPackage ../tools/text/ansifilter {};
 
   apktool = callPackage ../development/tools/apktool {
-    buildTools = androidenv.buildTools;
+    inherit (androidenv.androidPkgs_9_0) build-tools;
   };
 
   appimage-run = callPackage ../tools/package-management/appimage-run {};
@@ -699,7 +699,9 @@ in
 
   deskew = callPackage ../applications/graphics/deskew { };
 
-  diskus = callPackage ../tools/misc/diskus { };
+  diskus = callPackage ../tools/misc/diskus {
+    inherit (darwin.apple_sdk.frameworks) Security;
+  };
 
   djmount = callPackage ../tools/filesystems/djmount { };
 
@@ -814,26 +816,29 @@ in
 
   ssh-agents = callPackage ../tools/networking/ssh-agents { };
 
-  titaniumenv = callPackage ../development/mobile/titaniumenv { };
+  titaniumenv = callPackage ../development/mobile/titaniumenv {
+    pkgs_i686 = pkgsi686Linux;
+  };
 
   abootimg = callPackage ../development/mobile/abootimg {};
 
   adbfs-rootless = callPackage ../development/mobile/adbfs-rootless {
-    adb = androidenv.platformTools;
+    adb = androidenv.androidPkgs_9_0.platform-tools;
   };
 
-  adb-sync = callPackage ../development/mobile/adb-sync { };
+  adb-sync = callPackage ../development/mobile/adb-sync {
+    inherit (androidenv.androidPkgs_9_0) platform-tools;
+  };
 
   androidenv = callPackage ../development/mobile/androidenv {
     pkgs_i686 = pkgsi686Linux;
-    licenseAccepted = (config.android_sdk.accept_license or false);
+    licenseAccepted = config.android_sdk.accept_license or false;
   };
 
-  inherit (androidenv) androidndk;
+  androidndkPkgs = androidndkPkgs_18b;
+  androidndkPkgs_18b = (callPackage ../development/androidndk-pkgs {})."18b";
 
-  androidsdk = androidenv.androidsdk_8_0;
-
-  androidsdk_extras = res.androidenv.androidsdk_8_0_extras;
+  androidsdk_9_0 = androidenv.androidPkgs_9_0.androidsdk;
 
   webos = recurseIntoAttrs {
     cmake-modules = callPackage ../development/mobile/webos/cmake-modules.nix { };
@@ -2661,7 +2666,7 @@ in
   flamerobin = callPackage ../applications/misc/flamerobin { };
 
   flashtool = pkgsi686Linux.callPackage ../development/mobile/flashtool {
-    platformTools = androidenv.platformTools;
+    inherit (androidenv.androidPkgs_9_0) platform-tools;
   };
 
   flashrom = callPackage ../tools/misc/flashrom { };
@@ -5291,7 +5296,7 @@ in
   };
 
   scrcpy = callPackage ../misc/scrcpy {
-    inherit (androidenv) platformTools;
+    inherit (androidenv.androidPkgs_9_0) platform-tools;
   };
 
   screen-message = callPackage ../tools/X11/screen-message { };
@@ -8663,6 +8668,8 @@ in
 
   gtkdialog = callPackage ../development/tools/misc/gtkdialog { };
 
+  guff = callPackage ../tools/graphics/guff { };
+
   guile-lint = callPackage ../development/tools/guile/guile-lint {
     guile = guile_1_8;
   };
@@ -9310,7 +9317,7 @@ in
 
   # TODO(@Ericson2314): Build bionic libc from source
   bionic = assert stdenv.hostPlatform.useAndroidPrebuilt;
-    androidenv."androidndkPkgs_${stdenv.hostPlatform.ndkVer}".libraries;
+    pkgs."androidndkPkgs_${stdenv.hostPlatform.ndkVer}".libraries;
 
   bobcat = callPackage ../development/libraries/bobcat { };
 
@@ -10651,6 +10658,8 @@ in
 
   libde265 = callPackage ../development/libraries/libde265 {};
 
+  libdeflate = callPackage ../development/libraries/libdeflate { };
+
   libdevil = callPackage ../development/libraries/libdevil {
     inherit (darwin.apple_sdk.frameworks) OpenGL;
   };
@@ -14516,6 +14525,16 @@ in
       ];
   };
 
+  linux_4_20 = callPackage ../os-specific/linux/kernel/linux-4.20.nix {
+    kernelPatches =
+      [ kernelPatches.bridge_stp_helper
+        # See pkgs/os-specific/linux/kernel/cpu-cgroup-v2-patches/README.md
+        # when adding a new linux version
+        # kernelPatches.cpu-cgroup-v2."4.11"
+        kernelPatches.modinst_arg_list_too_long
+      ];
+  };
+
   linux_testing = callPackage ../os-specific/linux/kernel/linux-testing.nix {
     kernelPatches = [
       kernelPatches.bridge_stp_helper
@@ -14694,7 +14713,7 @@ in
   linux = linuxPackages.kernel;
 
   # Update this when adding the newest kernel major version!
-  linuxPackages_latest = linuxPackages_4_19;
+  linuxPackages_latest = linuxPackages_4_20;
   linux_latest = linuxPackages_latest.kernel;
 
   # Build the kernel modules for the some of the kernels.
@@ -14704,6 +14723,7 @@ in
   linuxPackages_4_9 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_9);
   linuxPackages_4_14 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_14);
   linuxPackages_4_19 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_19);
+  linuxPackages_4_20 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_20);
   # When adding to this list:
   # - Update linuxPackages_latest to the latest version
   # - Update the rev in ../os-specific/linux/kernel/linux-libre.nix to the latest one.
diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix
index ba583418163..c670db81772 100644
--- a/pkgs/top-level/ocaml-packages.nix
+++ b/pkgs/top-level/ocaml-packages.nix
@@ -580,6 +580,8 @@ let
     piqi = callPackage ../development/ocaml-modules/piqi { };
     piqi-ocaml = callPackage ../development/ocaml-modules/piqi-ocaml { };
 
+    ppxfind = callPackage ../development/ocaml-modules/ppxfind { };
+
     ppxlib = callPackage ../development/ocaml-modules/ppxlib { };
 
     psmt2-frontend = callPackage ../development/ocaml-modules/psmt2-frontend { };