From be54e27dbd5a3fdcd5241ec55b0f4d3493093a9e Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Tue, 12 May 2020 00:01:38 -0400 Subject: [PATCH] modernize standalone SDK installation instructions --- static/build.html | 43 ++++++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/static/build.html b/static/build.html index e0226731..cea5c91f 100644 --- a/static/build.html +++ b/static/build.html @@ -762,20 +762,22 @@ git am --whitespace=nowarn ../patches/*.patch

Using the official releases of the SDK is recommended for simplicity, although with a lot of effort you can build everything yourself. Distribution packages are generally - quite out-of-date and should be avoided. To set up a minimal SDK installation without - Android Studio on Linux:

+ quite out-of-date and should be avoided. To set up a minimal SDK installation at + `~/android/sdk` without Android Studio:

-
mkdir ~/sdk
-cd ~/sdk
-curl -O https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
-unzip sdk-tools-linux-4333796.zip
-rm sdk-tools-linux-4333796.zip
+
mkdir -p ~/android/sdk/cmdline-tools
+cd ~/android/sdk/cmdline-tools
+curl -O https://dl.google.com/android/repository/commandlinetools-linux-6200805_latest.zip
+unzip commandlinetools-linux-6200805_latest.zip
+rm commandlinetools-linux-6200805_latest.zip
+mv tools latest
-

Add the directories to your PATH in your shell profile configuration and do the - same in your current shell:

+

Set ANDROID_HOME to point at the SDK installation in your current + shell and shell profile configuration. You also need to add the + cmdline-tools binaries to your PATH. For example:

-
export PATH="$HOME/sdk/tools:$HOME/sdk/tools/bin:$HOME/sdk/platform-tools:$HOME/sdk/build-tools/29.0.3:$PATH:$HOME/sdk/ndk-bundle"
-export ANDROID_HOME="$HOME/sdk"
+
export ANDROID_HOME="$HOME/android/sdk"
+export PATH="$HOME/android/sdk/cmdline-tools/latest/bin"

Run an initial update:

@@ -785,15 +787,27 @@ export ANDROID_HOME="$HOME/sdk"
sdkmanager platform-tools
+

Add the platform-tools executables to your PATH:

+ +
export PATH="$HOME/android/platform-tools:$PATH"
+

For running the Compatibility Test Suite you'll also need the build-tools for aapt:

sdkmanager 'build-tools;29.0.3'
+

Add the build-tools executables to your PATH:

+ +
export PATH="$HOME/android/sdk/build-tools/29.0.3:$PATH"
+

For working with native code, you need the NDK:

sdkmanager ndk-bundle
+

Add the ndk-bundle executables to your PATH:

+ +
export PATH="$HOME/android/sdk/ndk-bundle:$PATH"
+

You should update the sdk before use from this point onwards:

sdkmanager --update
@@ -836,10 +850,9 @@ export ANDROID_HOME="$HOME/sdk"

You'll need a device attached to your computer with ADB enabled along with the Android SDK installed. The build-tools and platform-tools packages need to be - installed and the binaries need to be added to your PATH. For example, with the SDK - located at /home/username:

-
export ANDROID_HOME="$HOME/sdk"
-export PATH="$PATH:$HOME/sdk/tools:$HOME/sdk/tools/bin:$HOME/sdk/platform-tools:$HOME/sdk/build-tools/29.0.3:$HOME/sdk/ndk-bundle"
+ installed and the binaries need to be added to your PATH. See the + standalone SDK installation instructions above.

+

Copy media onto the device:

cd android-cts-media-1.4
 ./copy_images.sh