3152a7136593c4ade513d50c7fad513f642a0aa3
4 # Install desired parts of the Android SDK:
5 test -f
$HOME/.termuxrc
&& .
$HOME/.termuxrc
6 : ${ANDROID_HOME:="${HOME}/lib
/android-sdk
"}
7 : ${NDK:="${HOME}/lib/android-ndk"}
9 if [ ! -d
$ANDROID_HOME ]; then
10 mkdir
-p
$ANDROID_HOME
12 rm -Rf
`basename $ANDROID_HOME`
14 # https://developer.android.com/studio/index.html#command-tools
15 # The downloaded version below is 26.0.1.:
16 curl
--fail
--retry
3 \
18 https
://dl.google.com
/android
/repository
/sdk-tools-linux-3859397.
zip
20 unzip -q tools.
zip -d android-sdk
24 if [ ! -d
$NDK ]; then
27 rm -Rf
`basename $NDK`
29 curl
--fail
--retry
3 -o ndk.
zip \
30 http
://dl.google.com
/android
/repository
/android-ndk-
${NDK_VERSION}-`uname`-x86_64.
zip
32 rm -Rf android-ndk-
$NDK_VERSION
34 mv android-ndk-
$NDK_VERSION `basename $NDK`
38 mkdir
-p
$ANDROID_HOME/licenses
39 echo -e
-n
"\n8933bad161af4178b1185d1a37fbf41ea5269c55" > $ANDROID_HOME/licenses
/android-sdk-license
40 $ANDROID_HOME/tools
/bin
/sdkmanager
"build-tools;25.0.3" "platforms;android-25"