Skip to content

Commit ca0ebc9

Browse files
committed
feat: add web emulator access via scrcpy-web
1 parent 3fd8b85 commit ca0ebc9

3 files changed

Lines changed: 57 additions & 18 deletions

File tree

README.md

Lines changed: 40 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
- [Prerequisites](#-prerequisites)
1919
- [Installation](#-installation)
2020
- [Usage](#-usage)
21+
- [Using Web Interface](#use-the-web-interface-to-access-the-emulator)
22+
- [Using ADB](#connect-via-adb)
23+
- [Using Desktop scrcpy](#use-scrcpy-to-mirror-the-emulator-screen)
2124
- [Roadmap](#-roadmap)
2225
- [Troubleshooting](#-troubleshooting)
2326
- [Contributing](#-contributing)
@@ -26,6 +29,7 @@
2629

2730
## 🔧 **Features**
2831

32+
- **Web Interface:** Access the emulator directly from your browser with the integrated scrcpy-web interface.
2933
- **Root and Magisk Preinstalled:** Comes with root access and Magisk preinstalled for advanced modifications.
3034
- **PICO GAPPS Preinstalled:** Includes PICO GAPPS for essential Google services.
3135
- **Seamless ADB Access:** Connect to the emulator via ADB from the host and other networked devices.
@@ -71,28 +75,47 @@ To simplify the setup process, you can use the provided [docker-compose.yml](htt
7175
7276
## 📡 **Usage**
7377
74-
1. **Connect via ADB:**
78+
### Use the Web Interface to Access the Emulator
7579
76-
```bash
77-
adb connect localhost:5555
78-
adb devices
79-
```
80+
The easiest way to interact with the Android emulator is through the web interface:
8081
81-
**Expected Output:**
82+
1. Open your browser and navigate to `http://localhost:8000`
83+
2. You should see the device listed as "dockerify-android:5555" automatically connected
84+
3. Select one of the available streaming options:
85+
- **Tiny H264** (recommended for best performance)
86+
- Broadway.js
87+
- H264 Converter
8288
83-
```
84-
connected to localhost:5555
85-
List of devices attached
86-
localhost:5555 device
87-
```
89+
![scrcpy-web interface](/doc/scrcpy-web-preview.png)
8890
89-
2. **Use scrcpy to Mirror the Emulator Screen:**
91+
> **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.
9092
91-
```bash
92-
scrcpy -s localhost:5555
93-
```
93+
### Connect via ADB
94+
95+
If you need direct ADB access to the emulator:
96+
97+
```bash
98+
adb connect localhost:5555
99+
adb devices
100+
```
101+
102+
**Expected Output:**
103+
104+
```
105+
connected to localhost:5555
106+
List of devices attached
107+
localhost:5555 device
108+
```
109+
110+
### Use scrcpy to Mirror the Emulator Screen
111+
112+
For a native desktop experience, you can use scrcpy:
113+
114+
```bash
115+
scrcpy -s localhost:5555
116+
```
94117
95-
> **Note:** Ensure `scrcpy` is installed on your host machine. [Installation Guide](https://github.com/Genymobile/scrcpy#installation)
118+
> **Note:** Ensure `scrcpy` is installed on your host machine. [Installation Guide](https://github.com/Genymobile/scrcpy#installation)
96119
97120
## 🚧 **Roadmap**
98121
@@ -101,7 +124,7 @@ To simplify the setup process, you can use the provided [docker-compose.yml](htt
101124
- [ ] Support ARM64 CPU architecture
102125
- [x] Preinstall PICO GAPPS
103126
- [x] Support Magisk
104-
- [ ] Adding web interface of scrcpy
127+
- [x] Adding web interface of scrcpy
105128
106129
## 🐞 **Troubleshooting**
107130

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)