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`
13 curl
--fail
--retry
3 -o android-sdk.tgz https
://dl.google.com
/android
/android-sdk_r24.4
.1-linux.tgz
15 rm -Rf android-sdk-linux
16 tar xzf android-sdk.tgz
17 mv android-sdk-linux
`basename $ANDROID_HOME`
21 if [ ! -d
$NDK ]; then
24 rm -Rf
`basename $NDK`
25 curl
--fail
--retry
3 -o ndk.
zip http
://dl.google.com
/android
/repository
/android-ndk-r12-
`uname`-x86_64.
zip
27 rm -Rf android-ndk-r12
29 mv android-ndk-r12
`basename $NDK`
33 echo y |
$ANDROID_HOME/tools
/android update sdk
--no-ui
--all
--no-https
-t
"build-tools-23.0.3,android-23"