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 curl
--fail
--retry
3 -o tools.
zip https
://dl.google.com
/android
/repository
/tools_r25.2
.3-linux.
zip
16 unzip -q tools.
zip -d android-sdk
20 if [ ! -d
$NDK ]; then
23 rm -Rf
`basename $NDK`
25 curl
--fail
--retry
3 -o ndk.
zip \
26 http
://dl.google.com
/android
/repository
/android-ndk-
${NDK_VERSION}-`uname`-x86_64.
zip
28 rm -Rf android-ndk-
$NDK_VERSION
30 mv android-ndk-
$NDK_VERSION `basename $NDK`
34 echo y |
$ANDROID_HOME/tools
/android update sdk
--no-ui
--all
--no-https
-t
"build-tools-25.0.1,android-24"