X-Git-Url: https://git.distorted.org.uk/~mdw/termux-packages/blobdiff_plain/711e9e5b066ce374bbb258200f3d0bf785c5fe0a..80eb67dd0a2858dc3e0b41ae4e926589b69c639a:/scripts/setup-android-sdk.sh diff --git a/scripts/setup-android-sdk.sh b/scripts/setup-android-sdk.sh index c1038e0f..283f635c 100755 --- a/scripts/setup-android-sdk.sh +++ b/scripts/setup-android-sdk.sh @@ -11,27 +11,23 @@ if [ ! -d $ANDROID_HOME ]; then cd $ANDROID_HOME/.. rm -Rf `basename $ANDROID_HOME` - if [ `uname` = Darwin ]; then - curl --fail --retry 3 -o android-sdk.zip https://dl.google.com/android/android-sdk_r24.4.1-macosx.zip - rm -Rf android-sdk-macosx - unzip -q android-sdk.zip - mv android-sdk-macosx `basename $ANDROID_HOME` - rm android-sdk.zip - else - curl --fail --retry 3 -o android-sdk.tgz https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz - rm -Rf android-sdk-linux - tar xzf android-sdk.tgz - mv android-sdk-linux `basename $ANDROID_HOME` - rm android-sdk.tgz - fi + # https://developer.android.com/studio/index.html#command-tools + # The downloaded version below is 26.0.1.: + curl --fail --retry 3 \ + -o tools.zip \ + https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip + rm -Rf android-sdk + unzip -q tools.zip -d android-sdk + rm tools.zip fi if [ ! -d $NDK ]; then mkdir -p $NDK cd $NDK/.. rm -Rf `basename $NDK` - NDK_VERSION=r13 - curl --fail --retry 3 -o ndk.zip http://dl.google.com/android/repository/android-ndk-${NDK_VERSION}-`uname`-x86_64.zip + NDK_VERSION=r15b + curl --fail --retry 3 -o ndk.zip \ + http://dl.google.com/android/repository/android-ndk-${NDK_VERSION}-`uname`-x86_64.zip rm -Rf android-ndk-$NDK_VERSION unzip -q ndk.zip @@ -39,4 +35,6 @@ if [ ! -d $NDK ]; then rm ndk.zip fi -echo y | $ANDROID_HOME/tools/android update sdk --no-ui --all --no-https -t "build-tools-24.0.1,android-24" +mkdir -p $ANDROID_HOME/licenses +echo -e -n "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > $ANDROID_HOME/licenses/android-sdk-license +$ANDROID_HOME/tools/bin/sdkmanager "build-tools;25.0.3" "platforms;android-25"