I built an Android-like OS that runs in the browser

  • Posted 34 minutes ago by haozaz
  • 1 points
After burning through tens of billions of tokens, I built an Android-like OS that runs entirely in the browser

The title is a bit clickbaity, but it is not that far from what actually happened.

Over the past few months, we built MobileGym: a fully browser-based, Android-like simulation environment implemented in TypeScript + React.

It currently includes 28 simulated apps, including WeChat, Alipay, Xiaohongshu/RED, bilibili, X, Reddit, WeChat Read, China Railway 12306, Tencent Meeting, Spotify, and eBay, plus system apps such as Home, Settings, Contacts, Messages, Photos, Calendar, Files, and Browser.

The system supports Xiaomi theme packs and custom widgets. We also reimplemented a number of Android-like system mechanisms directly in the browser, including the Activity stack, Intents, gesture navigation, back handling, and soft keyboard behavior.

MobileGym was originally built for GUI agent research, but it is also open for anyone who wants to play with it, study Android-like UI/system mechanisms, or fork the code and build something else on top of it.

Online demo: https://mobilegym.dev GitHub: https://github.com/Purewhiter/mobilegym

Features

Lightweight and highly concurrent A single MobileGym instance uses only around 400 MB of memory, compared with roughly 4–10 GB for a typical Android emulator. A single server can run hundreds or even thousands of environment instances in parallel.

416 task templates The task templates are parameterized, so they can generate an effectively unlimited number of task instances. Evaluation is deterministic and finishes in milliseconds, without relying on LLM-as-a-judge.

Sim-to-real transfer that actually works In our tests, models trained with GRPO-style reinforcement learning in the simulated environment transferred more than 95% of their gains to real devices.

Easy to extend MobileGym is designed to be extensible. Adding a new app only requires creating a folder and a manifest file. Adding a new task only requires writing a Python class, and the shortest tasks can be implemented in as little as three lines of code.

Fully sandboxed, with no real-world consequences MobileGym does not connect to real services, transfer real money, or send real messages. You can safely click around without worrying about side effects.

Although the project started as infrastructure for GUI agent training and evaluation, it ended up becoming a fairly complete browser-based Android-like playground. Would love to hear feedback from anyone who finds this useful, interesting, or just fun to play with.

1 comments

    Loading..