1#!/bin/sh 2V=r21d 3O="" 4case `uname` in 5Linux) 6 O=linux 7 ;; 8Darwin) 9 O=darwin 10 ;; 11*) 12 echo "Unsupported platform" 13 exit 1 14 ;; 15esac 16echo Downloading NDK $V... 17wget -c -q https://dl.google.com/android/repository/android-ndk-$V-$O-x86_64.zip 18echo Unzipping in /tmp/ndkzip 19unzip -q *.zip -d /tmp/ndkzip 20export NDK=$(ls -d /tmp/ndkzip/* | head -n1) 21echo NDK=${NDK} 22echo NDK=${NDK} > $HOME/.r2androidrc 23python $NDK/build/tools/make_standalone_toolchain.py \ 24 --arch arm64 --api 28 --install-dir toolchain 25