Docker for Android SDK with preinstalled build tools and emulator image
Go to file
juanmi 4fc9e7866a Update to Android SDK 33 (#1)
Reviewed-on: http://gitea:3000/juanmi/android-sdk-docker/pulls/1
2022-07-17 06:59:53 +00:00
licenses initial commit 2020-10-07 17:58:47 -04:00
tools Update to Android SDK 33 (#1) 2022-07-17 06:59:53 +00:00
.gitignore initial commit 2020-10-07 17:58:47 -04:00
Dockerfile Update to Android SDK 33 (#1) 2022-07-17 06:59:53 +00:00
README.md Update to Android SDK 33 (#1) 2022-07-17 06:59:53 +00:00

README.md

Docker for Android SDK

Docker for Android SDK with preinstalled build tools and emulator image

Edit from docker-android-sdk/android-31

Installed Packages

# sdkmanager --list
  Path                                        | Version | Description                                | Location                                   
  -------                                     | ------- | -------                                    | -------                                    
  build-tools;33.0.0                          | 33.0.0  | Android SDK Build-Tools 33                 | build-tools/33.0.0                         
  cmdline-tools;latest                        | 7.0     | Android SDK Command-line Tools (latest)    | cmdline-tools/latest                       
  emulator                                    | 31.2.10 | Android Emulator                           | emulator                                   
  patcher;v4                                  | 1       | SDK Patch Applier v4                       | patcher/v4                                 
  platform-tools                              | 33.0.2  | Android SDK Platform-Tools                 | platform-tools                             
  platforms;android-33                        | 2       | Android SDK Platform 33                    | platforms/android-33                       
  system-images;android-33;google_apis;x86_64 | 6       | Google APIs Intel x86 Atom_64 System Image | system-images/android-33/google_apis/x86_64

Usage

  • Interactive way

    $ docker run -it --rm --device /dev/kvm juanmi/android-sdk-docker:latest bash
    # check installed packages
    $ sdkmanager --list
    # create and run emulator
    $ avdmanager --verbose create avd --force --name "generic_33" --package "system-images;android-33;google_apis;x86_64" --tag "google_apis" --abi "x86_64"
    $ emulator -avd "generic_33" -no-window -no-audio -no-boot-anim -netdelay none -no-snapshot -wipe-data &
    $ adb devices
    # You can also run other Android platform tools, which are all added to the PATH environment variable
    

    To connect the emulator using adb on the docker host machine, start the container with --network host as well. You could also use scrcpy to do a screencast of the emulator.

  • Non-interactive way

    # check installed packages
    $ docker run -it --rm juanmi/android-sdk-docker:latest sdkmanager --list
    # list existing emulators
    $ docker run -it --rm juanmi/android-sdk-docker:latest avdmanager list avd
    # You can also run other Android platform tools, which are all added to the PATH environment variable