Created
June 5, 2026 23:36
-
-
Save amirrajan/2672d903a03d1fa24bb254a7a4adddd0 to your computer and use it in GitHub Desktop.
DragonRuby Game Toolkit - download all the things for Android and deploy apk
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
| cd YOUR_DR_DIRECTORY | |
| # ============================================ | |
| # Download command line tools | |
| # ============================================ | |
| rm -rf ./.android | |
| mkdir ./.android | |
| wget --directory-prefix=./.android https://dl.google.com/android/repository/commandlinetools-mac-7583922_latest.zip | |
| cd ./.android | |
| unzip -o ./commandlinetools-mac-7583922_latest.zip | |
| mv ./cmdline-tools ./latest | |
| mkdir -p ./cmdline-tools | |
| mv ./latest ./cmdline-tools/ | |
| cd .. | |
| # =========================================== | |
| # Install toolchain | |
| # =========================================== | |
| echo "y" | ./.android/cmdline-tools/latest/bin/sdkmanager --install "ndk;28.2.13676358" | |
| echo "y" | ./.android/cmdline-tools/latest/bin/sdkmanager --install "build-tools;35.0.0" | |
| echo "y" | ./.android/cmdline-tools/latest/bin/sdkmanager --install "platform-tools" | |
| echo "y" | ./.android/cmdline-tools/latest/bin/sdkmanager --install "platforms;android-35" | |
| echo "y" | ./.android/cmdline-tools/latest/bin/sdkmanager --install "system-images;android-35;google_apis_playstore;arm64-v8a" | |
| echo "y" | ./.android/cmdline-tools/latest/bin/avdmanager delete avd --name Pixel >/dev/null 2>&1 || true | |
| # =========================================== | |
| # Create debug key to sign apk with | |
| # =========================================== | |
| keytool -genkeypair \ | |
| -keystore ./.android/debug.keystore \ | |
| -alias androiddebugkey \ | |
| -keyalg RSA \ | |
| -keysize 2048 \ | |
| -validity 10000 \ | |
| -storepass android \ | |
| -keypass android \ | |
| -dname "CN=Android Debug,O=Android,C=US" | |
| # =========================================== | |
| # Create emulator and boot | |
| # =========================================== | |
| echo "no" | ./.android/cmdline-tools/latest/bin/avdmanager create avd \ | |
| --name Pixel \ | |
| --package "system-images;android-35;google_apis_playstore;arm64-v8a" \ | |
| --device pixel \ | |
| --force | |
| cat <<S | |
| # Boot Device | |
| Start up a terminal and run: | |
| ./.android/emulator/emulator -avd Pixel -no-snapshot-save | |
| # Build and Deploy: | |
| In another terminal you can then do: | |
| rm -rf ./builds | |
| ./dragonruby-publish --package | |
| ./.android/build-tools/35.0.0/apksigner sign --min-sdk-version 26 --ks .android/debug.keystore --ks-pass pass:android --ks-key-alias androiddebugkey --key-pass pass:android ./builds/YOUR-GAME.apk | |
| ./.android/platform-tools/adb install ./builds/YOUR-GAME.apk | |
| S |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment