Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to sdk version 33 #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Docker Image CI

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ENV ANDROID_SDK ${ANDROID_HOME}
ENV PATH "${PATH}:${ANDROID_HOME}/cmdline-tools/latest/bin"
ENV PATH "${PATH}:${ANDROID_HOME}/cmdline-tools/tools/bin"
ENV PATH "${PATH}:${ANDROID_HOME}/tools/bin"
ENV PATH "${PATH}:${ANDROID_HOME}/build-tools/32.0.0"
ENV PATH "${PATH}:${ANDROID_HOME}/build-tools/33.0.1"
ENV PATH "${PATH}:${ANDROID_HOME}/platform-tools"
ENV PATH "${PATH}:${ANDROID_HOME}/emulator"
ENV PATH "${PATH}:${ANDROID_HOME}/bin"
Expand All @@ -30,9 +30,9 @@ WORKDIR /opt/android-sdk-linux
RUN /opt/tools/entrypoint.sh built-in

RUN /opt/android-sdk-linux/cmdline-tools/tools/bin/sdkmanager "cmdline-tools;latest"
RUN /opt/android-sdk-linux/cmdline-tools/tools/bin/sdkmanager "build-tools;32.0.0"
RUN /opt/android-sdk-linux/cmdline-tools/tools/bin/sdkmanager "build-tools;33.0.1"
RUN /opt/android-sdk-linux/cmdline-tools/tools/bin/sdkmanager "platform-tools"
RUN /opt/android-sdk-linux/cmdline-tools/tools/bin/sdkmanager "platforms;android-31"
RUN /opt/android-sdk-linux/cmdline-tools/tools/bin/sdkmanager "system-images;android-31;google_apis;x86_64"
RUN /opt/android-sdk-linux/cmdline-tools/tools/bin/sdkmanager "platforms;android-33"
RUN /opt/android-sdk-linux/cmdline-tools/tools/bin/sdkmanager "system-images;android-33;google_apis;x86_64"

CMD /opt/tools/entrypoint.sh built-in
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Docker for Android SDK 31
# Docker for Android SDK 33

Docker for Android SDK 31 with preinstalled build tools and emulator image
Docker for Android SDK 33 with preinstalled build tools and emulator image

> Edit from [mindrunner/docker-android-sdk](https://github.com/mindrunner/docker-android-sdk)

Expand All @@ -9,24 +9,24 @@ Docker for Android SDK 31 with preinstalled build tools and emulator image
# sdkmanager --list
Path | Version | Description | Location
------- | ------- | ------- | -------
build-tools;32.0.0 | 32.0.0 | Android SDK Build-Tools 32 | build-tools/32.0.0
build-tools;33.0.1 | 33.0.1 | Android SDK Build-Tools 33 | build-tools/33.0.1
cmdline-tools;latest | 6.0 | Android SDK Command-line Tools (latest) | cmdline-tools/latest
emulator | 31.2.8 | Android Emulator | emulator
emulator | 32.1.12 | Android Emulator | emulator
patcher;v4 | 1 | SDK Patch Applier v4 | patcher/v4
platform-tools | 32.0.0 | Android SDK Platform-Tools | platform-tools
platforms;android-31 | 1 | Android SDK Platform 31 | platforms/android-31
system-images;android-31;google_apis;x86_64 | 8 | Google APIs Intel x86 Atom_64 System Image | system-images/android-31/google_apis/x86_64
platform-tools | 33.0.0 | Android SDK Platform-Tools | platform-tools
platforms;android-33 | 1 | Android SDK Platform 33 | platforms/android-33
system-images;android-33;google_apis;x86_64 | 8 | Google APIs Intel x86 Atom_64 System Image | system-images/android-33/google_apis/x86_64
```

**Usage**

- Interactive way
```bash
$ docker run -it --rm --device /dev/kvm androidsdk/android-31:latest bash
$ docker run -it --rm --device /dev/kvm androidsdk/android-33:latest bash
# check installed packages
$ sdkmanager --list
# create and run emulator
$ avdmanager create avd -n first_avd --abi google_apis/x86_64 -k "system-images;android-31;google_apis;x86_64"
$ avdmanager create avd -n first_avd --abi google_apis/x86_64 -k "system-images;android-33;google_apis;x86_64"
$ emulator -avd first_avd -no-window -no-audio &
$ adb devices
# You can also run other Android platform tools, which are all added to the PATH environment variable
Expand All @@ -38,8 +38,8 @@ Docker for Android SDK 31 with preinstalled build tools and emulator image
- Non-interactive way
```bash
# check installed packages
$ docker run -it --rm androidsdk/android-31:latest sdkmanager --list
$ docker run -it --rm androidsdk/android-33:latest sdkmanager --list
# list existing emulators
$ docker run -it --rm androidsdk/android-31:latest avdmanager list avd
$ docker run -it --rm androidsdk/android-33:latest avdmanager list avd
# You can also run other Android platform tools, which are all added to the PATH environment variable
```
2 changes: 1 addition & 1 deletion tools/android-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export ANDROID_SDK=${ANDROID_HOME}
export PATH=${PATH}:${ANDROID_HOME}/cmdline-tools/latest/bin
export PATH=${PATH}:${ANDROID_HOME}/cmdline-tools/tools/bin
export PATH=${PATH}:${ANDROID_HOME}/tools/bin
export PATH=${PATH}:${ANDROID_HOME}/build-tools/32.0.0
export PATH=${PATH}:${ANDROID_HOME}/build-tools/33.0.1
export PATH=${PATH}:${ANDROID_HOME}/platform-tools
export PATH=${PATH}:${ANDROID_HOME}/emulator
export PATH=${PATH}:${ANDROID_HOME}/bin
Expand Down