Last active
May 21, 2025 14:21
-
-
Save jqntn/885e65688f161a87aeaad90f0a1cc7ce to your computer and use it in GitHub Desktop.
Minimal batch script to install OpenJDK, Android NDK, and Android SDK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
net session 1>NUL 2>NUL || goto :not_admin | |
cd C:\ | |
echo INFO: Installing latest OpenJDK 21 LTS from Microsoft at C:\open-jdk... | |
curl -LO https://aka.ms/download-jdk/microsoft-jdk-21.0.5-windows-x64.zip | |
tar -xf microsoft-jdk-21.0.5-windows-x64.zip | |
del -f microsoft-jdk-21.0.5-windows-x64.zip | |
ren jdk-21.0.5+11 open-jdk | |
echo INFO: Installing latest Android NDK LTS at C:\android-ndk... | |
curl -LO https://dl.google.com/android/repository/android-ndk-r27-windows.zip | |
tar -xf android-ndk-r27-windows.zip | |
del -f android-ndk-r27-windows.zip | |
ren android-ndk-r27 android-ndk | |
echo INFO: Installing Android SDK at C:\android-sdk (build-tools;35.0.0, platforms;android-34, platform-tools)... | |
md android-sdk\build-tools | |
cd android-sdk\build-tools | |
curl -LO https://dl.google.com/android/repository/build-tools_r35_windows.zip | |
tar -xf build-tools_r35_windows.zip | |
del -f build-tools_r35_windows.zip | |
ren android-15 35.0.0 | |
cd .. | |
curl -LO https://dl.google.com/android/repository/platform-tools-latest-windows.zip | |
tar -xf platform-tools-latest-windows.zip | |
del -f platform-tools-latest-windows.zip | |
md platforms | |
cd platforms | |
curl -LO https://dl.google.com/android/repository/platform-34-ext7_r03.zip | |
tar -xf platform-34-ext7_r03.zip | |
del -f platform-34-ext7_r03.zip | |
:not_admin | |
echo ERROR: Please run as administrator. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice script (☞゚ヮ゚)☞