A one-command installer for Android SDK and NDK on Termux, providing a complete Android development environment.
- Complete Android SDK installation
- Android NDK (Native Development Kit)
- Automatic dependency management (OpenJDK 21, Gradle, p7zip)
- Multi-shell support (Bash, Zsh, Fish)
- Automatic environment configuration
- Clean installation with verification
Run this single command to install:
curl -sL https://github.com/Keyaru-code/android-sdk-termux/raw/main/android-sdk.sh | bashcurl -sL https://github.com/Keyaru-code/android-sdk-termux/raw/main/uninstall-android-sdk.sh | bash
- Android SDK (version 35.0.0)
- Android NDK
- OpenJDK 21
- Gradle build system
- p7zip for extraction
- SDK:
$PREFIX/opt/android-sdk - NDK:
$PREFIX/opt/android-ndk
The script automatically sets up:
ANDROID_HOME: Points to Android SDKANDROID_NDK_HOME: Points to Android NDKANDROID_NDK_ROOT: Points to Android NDK- Updates
PATHto include SDK tools
- Bash (
.bashrc) - Zsh (
.zshrc) - Fish (
config.fish) - Other shells (manual configuration required)
After installation, restart your shell or run:
source ~/.bashrc # For bash users
# or
source ~/.zshrc # For zsh usersVerify installation with:
sdkmanager --list
ndk-build --versionIf the automatic setup fails, add these lines to your shell configuration:
export ANDROID_HOME="$PREFIX/opt/android-sdk"
export ANDROID_NDK_HOME="$PREFIX/opt/android-ndk"
export ANDROID_NDK_ROOT="$PREFIX/opt/android-ndk"
export PATH="$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools:$ANDROID_NDK_HOME:$PATH"- Installation fails: Check your internet connection and storage space
- Environment variables not set: Restart your shell or manually add them
- Command not found: Verify the PATH was updated correctly
- Termux app (latest version)
- Internet connection
- Approximately 2GB of free storage
This project is open source and available under the MIT License.
This installer downloads pre-built Android SDK and NDK packages from GitHub releases. Use at your own risk for development purposes.
If you encounter issues:
- Check the troubleshooting section above
- Ensure you have enough storage space
- Verify your Termux installation is up to date