To install Android SDK in Termux , you will have to follow some simple steps.

Requirements :

  • Java [apt install openjdk-17]

Steps :

  1. First of all you will have to download Android SDK

     https://github.com/Lzhiyong/termux-ndk/releases/download/android-sdk/android-sdk-aarch64.zip
    
  2. Extract into share directory

     unzip android-sdk-aarch64.zip -d $PREFIX/share
    
  3. Now make a wrapper for sdkmanager

     #!/data/data/com.termux/files/usr/bin/bash
    
     /data/data/com.termux/files/usr/share/android-sdk/tools/bin/sdkmanager \
         --sdk_root=/data/data/com.termux/files/usr/share/android-sdk "$@"
    

    and save it with name sdkmanager in $PREFIX/bin

  4. That’s it :)