Skip to content

luoshixin93-sudo/docker-android-cloud-run

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Docker Android Cloud Run

License: MIT Docker Pulls

Docker Android Cloud Run is a cloud-ready Dockerized Android emulator supporting multiple CPU architectures (x86 and ARM/ARM64 apps via ndk_translation) with native performance and seamless ADB & Web access. Run Android virtual devices (AVDs) efficiently within Docker containers -- ideal for scalable testing and CI/CD pipelines.

Key Features: Web Interface Access

Access and control the Android emulator directly in your web browser with the integrated scrcpy-web interface! No additional software needed.

Benefits:

  • No extra software to install on client
  • Access from any device with a web browser
  • Full touchscreen and keyboard support
  • Perfect for remote work and team collaboration

Prerequisites

  • Docker installed on your system. Installation Guide

  • Docker Compose for managing multi-container setups. Installation Guide

  • KVM Support for hardware acceleration:

    egrep -c '(vmx|svm)' /proc/cpuinfo

Quick Start

  1. Clone the repository:
git clone https://github.com/luoshixin93-sudo/docker-android-cloud-run.git
cd docker-android-cloud-run
  1. Start with Docker Compose:
docker compose up -d

Note: First boot takes 10-15 minutes to initialize. Once ready, the device will appear at http://localhost:8000 (web) or connect via ADB at localhost:5555.

Access Methods

Web Interface (Recommended)

Open your browser and go to http://localhost:8000. The device will auto-connect. Choose:

  • H264 Converter - best overall experience
  • Tiny H264 - for low-bandwidth connections
  • Broadway.js - fallback option

ADB Access

adb connect localhost:5555
adb devices

scrcpy Desktop Mirror

scrcpy -s localhost:5555

Environment Variables

Variable Description Default
DNS Private DNS server inside emulator one.one.one.one
RAM_SIZE RAM in MB allocated to emulator 4096
SCREEN_RESOLUTION Screen size (e.g. 1080x1920) device default
SCREEN_DENSITY Screen pixel density (DPI) device default
ROOT_SETUP Enable rooting & Magisk (1) ``
GAPPS_SETUP Install PICO GAPPS (1) ``
ARM_TRANSLATION Enable ARM translation (1) ``

First Boot Process

First boot performs:

  1. AVD creation (Android 11 / API 30)
  2. PICO GAPPS installation (if enabled)
  3. Root & Magisk setup (if enabled)
  4. ARM translation layer installation (if enabled)
  5. Device optimization configuration

Watch progress:

docker logs -f docker-android-cloud-run

First boot is complete when you see:

Broadcast completed: result=0
Success !!
2025-04-22 13:45:18,724 INFO exited: first-boot (exit status 0; expected)

Architecture

  • Base: Ubuntu 20.04 with OpenJDK 17
  • Android SDK: API 30 (Android 11)
  • Emulator: x86_64 with KVM acceleration
  • ARM Translation: ndk_translation for ARM64 apps on x86_64
  • Process Manager: Supervisor for reliable process management

Cloud Deployment

Deploy on any cloud VM with KVM support:

git clone https://github.com/luoshixin93-sudo/docker-android-cloud-run.git
cd docker-android-cloud-run
docker compose up -d

Access the web interface at http://YOUR_VM_IP:8000.

Troubleshooting

  • ADB Connection Refused: Ensure port 5555 is open and emulator is fully booted
  • KVM Not Accessible: Verify /dev/kvm permissions on the host
  • First Boot Taking Long: Normal; can take 10-15 minutes on first run
  • ARM Apps Not Working: Set ARM_TRANSLATION=1 and restart the container

License

MIT License - see LICENSE


Made with care for cloud phone automation - qtphone.com

About

Dockerized Android emulator with web interface, ADB, ARM translation, and KVM acceleration — run cloud Android anywhere

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors