Skip to content

luoshixin93-sudo/android-emulator-cloud-run

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Android Emulator Cloud Runner

License: MIT Docker Pulls

Android Emulator Cloud Runner is a containerized Android emulator with native ARM translation support, Google GAPPS, Magisk root, and a built-in web interface. Designed for cloud-native CI/CD pipelines, it enables scalable Android testing and development in any Docker or Kubernetes environment.

🔥 Key Feature: Web Interface Access 🌐

Access and control the Android emulator directly in your browser with the integrated scrcpy-web interface. No extra software required — just open your browser and start interacting with the virtual device.

Benefits:

  • Zero client-side installation
  • Access from any device with a web browser
  • Full touch + keyboard support
  • Perfect for remote teams and cloud infrastructure

📜 Table of Contents

🔧 Features

  • 🌐 Web Interface: Browser-based emulator control via scrcpy-web
  • 🔄 ARM Translation: Run ARM/ARM64 native apps on x86_64 using ndk_translation
  • Root + Magisk: Preinstalled root access with Magisk manager
  • PICO GAPPS: Essential Google services included
  • Seamless ADB: Connect via ADB from host or network
  • scrcpy Mirror: Native desktop mirroring support
  • Multi-Architecture: Runs on both x86_64 and arm64 hosts
  • Docker/K8s Ready: Built for cloud infrastructure and CI/CD pipelines
  • Supervisor Managed: Reliable process management inside container

🛠️ Prerequisites

  • Docker installed on your system (Installation Guide)
  • Docker Compose for orchestration (Installation Guide)
  • KVM Support for hardware acceleration:
    egrep -c '(vmx|svm)' /proc/cpuinfo

🚀 Quick Start

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

Access the web interface at http://localhost:8000

First boot takes 10-15 minutes. Monitor progress with docker logs -f android-emulator-cloud-run

📡 Usage

Web Interface

  1. Open browser → http://localhost:8000
  2. Device appears as "android-emulator-cloud-run:5555"
  3. Choose streaming option: H264 (recommended), Tiny H264, or Broadway.js

ADB Access

adb connect localhost:5555
adb devices
# localhost:5555 device

scrcpy Mirror

scrcpy -s localhost:5555

Ensure scrcpy is installed on your host (Installation Guide)

⚙️ Environment Variables

Variable Description Default
DNS Private DNS server one.one.one.one
RAM_SIZE RAM in MB 4096
SCREEN_RESOLUTION Screen WIDTHxHEIGHT device default
SCREEN_DENSITY Screen DPI device default
ROOT_SETUP Enable Magisk root (1=on) 0
GAPPS_SETUP Install PICO GAPPS (1=on) 0
ARM_TRANSLATION Enable ARM-on-x86 (1=on) 1

🔄 First Boot Process

The first boot performs:

  1. AVD creation (Android 30 / Android 11)
  2. GAPPS installation (if GAPPS_SETUP=1)
  3. Magisk rooting (if ROOT_SETUP=1)
  4. ARM translation layer (if ARM_TRANSLATION=1)
  5. Extras copied to /sdcard/Download

First boot complete when logs show:

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

📋 Container Logs

docker logs -f android-emulator-cloud-run

🐞 Troubleshooting

  • ADB Connection Refused: Ensure port 5555 is open; check docker logs
  • First Boot Slow: Normal; downloads and configures system on first run
  • ARM Apps Won't Install: Set ARM_TRANSLATION=1 and restart container
  • KVM Not Accessible: Check /dev/kvm permissions and host CPU virtualization

Made with ❤️ for cloud phone automation → qtphone.com

About

Dockerized Android emulator with ARM translation, GAPPS, and web access — KVM-accelerated cloud Android for testing and automation

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages