Last active
May 6, 2022 10:38
-
-
Save CypherpunkSamurai/12e6e8dfd71b34cf22aca916326e8972 to your computer and use it in GitHub Desktop.
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
| # VARIABLES | |
| ANDROID_COMPILE_SDK="30" | |
| ANDROID_BUILD_TOOLS="30.0.3" | |
| SDK_TOOLS="6858069" # from https://developer.android.com/studio/#command-tools | |
| EMULATOR_VERSION="24" | |
| wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/commandlinetools-linux-${SDK_TOOLS}_latest.zip | |
| unzip -qo android-sdk.zip -d android-sdk-linux | |
| rm android-sdk.zip | |
| export ANDROID_HOME=$PWD/android-sdk-linux | |
| export PATH=$PATH:$PWD/android-sdk-linux/cmdline-cmdline-tools/bin/ | |
| android-sdk-linux/cmdline-tools/bin/sdkmanager --sdk_root=${ANDROID_HOME} --update > update.log | |
| echo y | android-sdk-linux/cmdline-tools/bin/sdkmanager --sdk_root=${ANDROID_HOME} "platforms;android-${ANDROID_COMPILE_SDK}" "build-tools;${ANDROID_BUILD_TOOLS}" "extras;google;m2repository" "extras;android;m2repository" > installPlatform.log | |
| chmod +x ./gradlew | |
| # Test | |
| # apt-get --quiet update --yes | |
| # apt-get --quiet install --yes libx11-dev libpulse0 libgl1 libnss3 libxcomposite-dev libxcursor1 libasound2 | |
| # wget --quiet --output-document=android-wait-for-emulator https://raw.githubusercontent.com/travis-ci/travis-cookbooks/0f497eb71291b52a703143c5cd63a217c8766dc9/community-cookbooks/android-sdk/files/default/android-wait-for-emulator | |
| # chmod +x android-wait-for-emulator | |
| # android-sdk-linux/cmdline-tools/bin/sdkmanager --update > update.log | |
| # android-sdk-linux/cmdline-tools/bin/sdkmanager "platform-tools" "emulator" "system-images;android-${EMULATOR_VERSION};default;armeabi-v7a" > installEmulator.log | |
| # echo no | android-sdk-linux/cmdline-tools/bin/avdmanager create avd -n test -k "system-images;android-${EMULATOR_VERSION};default;armeabi-v7a" | |
| # android-sdk-linux/emulator/emulator -avd test -no-window -no-audio & | |
| # ./android-wait-for-emulator | |
| # adb shell input keyevent 82 | |
| # ./gradlew connectedCheck |
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
| # VARIABLES | |
| export ANDROID_HOME=/opt/android-sdk-linux | |
| mkdir -p $ANDROID_HOME | |
| # Install | |
| sudo apt update -qq && sudo apt install zip unzip | |
| cd /opt && \ | |
| wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip && \ | |
| unzip -qo *.zip -d $ANDROID_HOME && \ | |
| rm *.zip | |
| chmod -R 777 $ANDROID_HOME | |
| sudo apt clean -qq | |
| export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools | |
| bash -c "source ~/.sdkman/bin/sdkman-init.sh && \ | |
| sdk install java 8.0.232-open" | |
| echo yes | sdkmanager --licenses | |
| #echo RUN yes | sdkmanager --update --channel=3 | |
| # Please keep all sections in descending order! | |
| #RUN yes | sdkmanager \ | |
| # "platforms;android-29" \ | |
| # "platforms;android-28" \ | |
| # "platforms;android-27" \ | |
| # "platforms;android-26" \ | |
| # "platforms;android-25" \ | |
| # "platforms;android-24" \ | |
| # "platforms;android-23" \ | |
| # "platforms;android-22" \ | |
| # "platforms;android-21" \ | |
| # "platforms;android-19" \ | |
| # "platforms;android-17" \ | |
| # "platforms;android-15" \ | |
| # "build-tools;29.0.2" \ | |
| # "build-tools;29.0.1" \ | |
| # "build-tools;29.0.0" \ | |
| # "build-tools;28.0.3" \ | |
| # "build-tools;28.0.2" \ | |
| # "build-tools;28.0.1" \ | |
| # "build-tools;28.0.0" \ | |
| # "build-tools;27.0.3" \ | |
| # "build-tools;27.0.2" \ | |
| # "build-tools;27.0.1" \ | |
| # "build-tools;27.0.0" \ | |
| # "build-tools;26.0.2" \ | |
| # "build-tools;26.0.1" \ | |
| # "build-tools;25.0.3" \ | |
| # "build-tools;24.0.3" \ | |
| # "build-tools;23.0.3" \ | |
| # "build-tools;22.0.1" \ | |
| # "build-tools;21.1.2" \ | |
| # "build-tools;19.1.0" \ | |
| # "build-tools;17.0.0" \ | |
| # "system-images;android-29;google_apis;x86" \ | |
| # "system-images;android-28;google_apis;x86" \ | |
| # "system-images;android-26;google_apis;x86" \ | |
| # "system-images;android-25;google_apis;armeabi-v7a" \ | |
| # "system-images;android-24;default;armeabi-v7a" \ | |
| # "system-images;android-22;default;armeabi-v7a" \ | |
| # "system-images;android-19;default;armeabi-v7a" \ | |
| # "extras;android;m2repository" \ | |
| # "extras;google;m2repository" \ | |
| # "extras;google;google_play_services" \ | |
| # "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.2" \ | |
| # "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.1" \ | |
| # "add-ons;addon-google_apis-google-23" \ | |
| # "add-ons;addon-google_apis-google-22" \ | |
| # "add-ons;addon-google_apis-google-21" | |
| echo yes | sdkmanager \ | |
| "platforms;android-29" \ | |
| # INIT (for docker init) | |
| export PATH=$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools:$PATH | |
| source ~/.sdkman/bin/sdkman-init.sh && \ | |
| sdk install java 8.0.232-open | |
| # @CypherpunkSamurai | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment