September 13Sep 13 StrawDroid: a real Android emulator for UnraidA phone you can break.What is this?A straw droid is a practice dummy shaped like an Android phone: built like the real thing so somebody can strike at it without anybody getting hurt. This container runs the real Android emulator, the same AVD Android Studio starts, headless on a Selkies desktop. The screen arrives in your browser over WebRTC and is encoded on the box's own GPU, and adb reaches it over the network, so Android Studio deploys and debugs on it exactly like a phone on a cable.It is deliberately not Android-in-a-container. ReDroid and Waydroid run the Android userspace on the host kernel: no battery, no motion sensor, no power HAL. Doze therefore never fires and the limits on background work never apply, so a test rig built on one is green because it never asks the question. A real AVD asks, and it answers on demand.HighlightsAndroid 16, API 36, google_apis, x86_64. The newest level on purpose: it is the strictest about background work, and it carries Play services and a real SAF folder pickeradb over the network: adb connect <ip>:5555 and Android Studio lists it as an ordinary deviceDoze on demand, which is the whole point of a real AVD: adb shell dumpsys deviceidle force-idleA share that reaches the phone: anything dropped into /share turns up on the device under Download/share, so a build can be installed by tapping it, without a terminalWebRTC, not VNC: judging how an app feels is judging its scrolling and its transitions, which is exactly the part a framebuffer diff smearsThe device arrives set up: wallpaper, dark mode, an empty home screen and monochrome icons everywhere, done once on the first boot and never written again, so anything you change afterwards is yoursPersistent by design: /config holds the device itself, including installed apps and granted permissions, so a restart is not a factory resetA phone in full: a SIM that takes calls and SMS, front and back camera, sound in the browser tab, and every sensor the image offers, heart rate and wrist tilt among themTools for testing on board: Shizuku, started again after every boot, and PCAPdroid. ROOT=true gives apps root when a test needs itsk in the terminal: seed contacts, photos and music, switch the language, save the whole device and get back to it in seconds, record which hosts an app talks to, take screenshots and screen recordingsNothing lost on stop: Android writes its files to disk before the emulator endsImage: ghcr.io/junkerderprovinz/strawdroid:latest, and Android 14 as latest-api34RequirementsUnraid 6.10+/dev/kvm on the host, passed in via Extra Parameters (--device=/dev/kvm). On bare metal it is simply there; inside a VM it needs nested virtualisation. Without it the emulator does not start, and the container log says so in as many wordsMemory: an emulator is a virtual machine and holds its memory whether anybody is testing or not. Measured idle, with no app installed, about 6 GB. The template caps it at 8 GB and four coresFor Flutter apps, vm.overcommit_memory=1 on the host. Without it the emulator crashes as soon as one draws. Add sysctl vm.overcommit_memory=1 to /boot/config/go to keep it after a reboot; the container log warns while it is missingamd64 only. The system image is x86_64, so there is nothing for an arm64 build to runIt is deliberately not set to restart on its own. Start it when it is needed and stop it afterPosting a bug reportPlease post:Unraid version (Settings > System Information)Image tag (latest or a pinned vX.Y.Z)Output of docker logs --tail 200 StrawDroidWhether /dev/kvm is present on the host: ls -l /dev/kvmWhether you changed EMULATOR_GPU, EMULATOR_DEVICE, EMULATOR_RAM or the /config mountGitHub issues with the same information are just as welcome: github.com/junkerderprovinz/strawdroid/issuesCreditsBuilt on the Android emulator and Google's system images, on LinuxServer's Selkies base image. The device ships with Lawnchair (Apache-2.0) and the Arcticons icon pack (GPL-3.0) by Donnnno, and installs Shizuku (Apache-2.0) and PCAPdroid (GPL-3.0) for testing, all unmodified. budtmo/docker-android did this first and is well kept; this one differs in putting the emulator on a hardware-encoded desktop rather than behind noVNC. If StrawDroid saves you a spare phone, you can buy me a coffee.Self-hosted, AGPL-3.0 licensed. You run it, you own your data and the responsibility. Edited Thursday at 03:22 PM3 days by Junker der Provinz
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.