Skip to content

Commit a1e11da

Browse files
authored
feat: add web emulator access via scrcpy-web (#7)
* Adding web interface of [scrcpy](https://github.com/Shmayro/ws-scrcpy-docker) * update the readme
1 parent 3fd8b85 commit a1e11da

4 files changed

Lines changed: 75 additions & 22 deletions

File tree

README.md

Lines changed: 58 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
11
# Dockerify Android
22

3+
<img align="right" src="/doc/dockerify-android-web-preview.png" />
4+
35
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
46
[![Docker Pulls](https://img.shields.io/docker/pulls/shmayro/dockerify-android)](https://hub.docker.com/r/shmayro/dockerify-android)
57
[![GitHub Issues](https://img.shields.io/github/issues/shmayro/dockerify-android)](https://github.com/shmayro/dockerify-android/issues)
68
[![GitHub Stars](https://img.shields.io/github/stars/shmayro/dockerify-android?style=social)](https://github.com/shmayro/dockerify-android/stargazers)
79

8-
**Dockerify Android** is a Dockerized Android emulator supporting multiple CPU architectures (**x86** and **arm64** in the near future ...) with native performance and seamless ADB access. It allows developers to run Android virtual devices (AVDs) efficiently within Docker containers, facilitating scalable testing and development environments.
10+
**Dockerify Android** is a Dockerized Android emulator supporting multiple CPU architectures (**x86** and **arm64** in the near future ...) with native performance and seamless ADB & Web access. It allows developers to run Android virtual devices (AVDs) efficiently within Docker containers, facilitating scalable testing and development environments.
11+
12+
### 🔥 **Key Feature: Web Interface Access** 🌐
13+
14+
Access and control the Android emulator directly in your web browser with the integrated [scrcpy-web](https://github.com/Shmayro/ws-scrcpy-docker) interface! No additional software needed - just open your browser and start using Android.
15+
16+
> **Benefits of Web Interface:**
17+
> - No extra software to install
18+
> - Access from any computer with a web browser
19+
> - Full touchscreen and keyboard support
20+
> - Perfect for remote work or sharing the emulator with team members
21+
22+
<br clear="right"/>
923

1024
## 🏠 **Homepage**
1125

@@ -18,6 +32,9 @@
1832
- [Prerequisites](#-prerequisites)
1933
- [Installation](#-installation)
2034
- [Usage](#-usage)
35+
- [Using Web Interface](#use-the-web-interface-to-access-the-emulator)
36+
- [Using ADB](#connect-via-adb)
37+
- [Using Desktop scrcpy](#use-scrcpy-to-mirror-the-emulator-screen)
2138
- [Roadmap](#-roadmap)
2239
- [Troubleshooting](#-troubleshooting)
2340
- [Contributing](#-contributing)
@@ -26,6 +43,7 @@
2643

2744
## 🔧 **Features**
2845

46+
- **🌐 Web Interface:** Access the emulator directly from your browser with the integrated [scrcpy-web](https://github.com/Shmayro/ws-scrcpy-docker) interface.
2947
- **Root and Magisk Preinstalled:** Comes with root access and Magisk preinstalled for advanced modifications.
3048
- **PICO GAPPS Preinstalled:** Includes PICO GAPPS for essential Google services.
3149
- **Seamless ADB Access:** Connect to the emulator via ADB from the host and other networked devices.
@@ -67,32 +85,51 @@ To simplify the setup process, you can use the provided [docker-compose.yml](htt
6785
docker-compose up -d
6886
```
6987

70-
> **Note:** This command runs the container in detached mode, grants necessary privileges for KVM, and shares the host's network stack for seamless ADB access.
88+
> **Note:** This command launches the Android emulator and web interface. First boot takes some time to initialize. Once ready, the device will appear in the web interface at http://localhost:8000.
7189

7290
## 📡 **Usage**
7391

74-
1. **Connect via ADB:**
92+
### 🌐 Use the Web Interface to Access the Emulator
7593

76-
```bash
77-
adb connect localhost:5555
78-
adb devices
79-
```
94+
The **quickest and easiest way** to interact with the Android emulator is through your web browser:
8095

81-
**Expected Output:**
96+
1. Open your browser and go to `http://localhost:8000`
97+
2. You should see the device listed as "dockerify-android:5555" automatically connected
98+
3. Select one of the available streaming options:
99+
- **H264 Converter** (recommended for best overall experience)
100+
- Tiny H264 (good for low-bandwidth connections)
101+
- Broadway.js (fallback option)
82102

83-
```
84-
connected to localhost:5555
85-
List of devices attached
86-
localhost:5555 device
87-
```
103+
![scrcpy-web interface](/doc/scrcpy-web-preview.png)
88104

89-
2. **Use scrcpy to Mirror the Emulator Screen:**
105+
> **Note:** First boot may take some time as the Android emulator needs to fully initialize. When everything is ready, the device will appear in the web interface as shown in the screenshot above.
90106

91-
```bash
92-
scrcpy -s localhost:5555
93-
```
107+
### Connect via ADB
108+
109+
If you need direct ADB access to the emulator:
110+
111+
```bash
112+
adb connect localhost:5555
113+
adb devices
114+
```
115+
116+
**Expected Output:**
117+
118+
```
119+
connected to localhost:5555
120+
List of devices attached
121+
localhost:5555 device
122+
```
123+
124+
### Use scrcpy to Mirror the Emulator Screen
125+
126+
For a native desktop experience, you can use scrcpy:
127+
128+
```bash
129+
scrcpy -s localhost:5555
130+
```
94131

95-
> **Note:** Ensure `scrcpy` is installed on your host machine. [Installation Guide](https://github.com/Genymobile/scrcpy#installation)
132+
> **Note:** Ensure `scrcpy` is installed on your host machine. [Installation Guide](https://github.com/Genymobile/scrcpy#installation)
96133
97134
## 🚧 **Roadmap**
98135

@@ -101,7 +138,7 @@ To simplify the setup process, you can use the provided [docker-compose.yml](htt
101138
- [ ] Support ARM64 CPU architecture
102139
- [x] Preinstall PICO GAPPS
103140
- [x] Support Magisk
104-
- [ ] Adding web interface of scrcpy
141+
- [x] Adding web interface of [scrcpy](https://github.com/Shmayro/ws-scrcpy-docker)
105142

106143
## 🐞 **Troubleshooting**
107144

@@ -114,14 +151,14 @@ To simplify the setup process, you can use the provided [docker-compose.yml](htt
114151
- **Check Emulator Status:** Ensure the emulator has fully booted by checking logs.
115152

116153
```bash
117-
docker logs android-emulator
154+
docker logs dockerify-android
118155
```
119156

120157
- **Emulator Not Starting:**
121158
- **Check Supervisor Logs:**
122159

123160
```bash
124-
docker exec -it android-emulator bash
161+
docker exec -it dockerify-android bash
125162
cat /var/log/supervisor/emulator.out.log
126163
cat /var/log/supervisor/emulator.err.log
127164
```
123 KB
Loading

doc/scrcpy-web-preview.png

65.7 KB
Loading

docker-compose.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
services:
22
dockerify-android:
3+
container_name: dockerify-android
34
image: shmayro/dockerify-android:latest
45
build:
56
context: .
@@ -14,4 +15,19 @@ services:
1415
privileged: true
1516
devices:
1617
- /dev/kvm
17-
container_name: dockerify-android
18+
19+
scrcpy-web:
20+
container_name: scrcpy-web
21+
restart: unless-stopped
22+
image: shmayro/scrcpy-web:latest
23+
privileged: true
24+
ports:
25+
- 8000:8000
26+
depends_on:
27+
dockerify-android:
28+
condition: service_healthy
29+
command: >
30+
sh -c "
31+
adb connect dockerify-android:5555 &&
32+
npm start
33+
"

0 commit comments

Comments
 (0)