Skip to content

feat(android): add an opt-in Windows emulator RAM profile - #138

Draft
hannojg wants to merge 1 commit into
mainfrom
codex/windows-avd-ram-profile
Draft

hannojg wants to merge 1 commit into
mainfrom
codex/windows-avd-ram-profile

Conversation

@hannojg

@hannojg hannojg commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #132, based on 04a63198. Reduce emulator RAM adds an opt-in launch profile for eligible x86_64 phone AVDs on Windows x64. The switch applies at the next Mobile Dev start. Switching it off restores the AVD's configured allocation. The Windows profile passes only the additional -memory argument. Apple Silicon keeps its existing defaults and guest optimizers.

Windows device evidence

The MCP preference, boot, shutdown, install and launch tools ran against isolated WHPX AVDs. Android 16 Google APIs and Android 17 Google Play each completed stock → on → off → on → off. The final package repeated the Android 16 on/off pair on the retained AVD and ran the full Android 17 sequence. A fresh MCP server recognized the running profile on each image.

Final package, stock → profile Effective guest RAM QEMU working set QEMU private bytes
Android 16 Google APIs (one boot per mode) 4096 → 2560 MiB 4401.6 → 3344.0 MiB 5806.9 → 4311.0 MiB
Android 17 Google Play (two boots per mode) 6144 → 4096 MiB 5560.1 → 4905.8 MiB 7876.8 → 5824.0 MiB

The first stock boot on each image initialized the fixture. The installed APK digest, private test value and deliberately disabled Print Spooler matched on all 10 subsequent cold boots. All 250 Android 16 user-0 package flags matched. On Android 17, two NFC packages disabled themselves during setup. A separate stock-only AVD reproduced both changes. Measurements cover idle memory on one Windows 11 host. API 35 eligibility is covered by configuration tests. Method, devices and restoration results

Why package optimization remains open

After avdslim restored packages and removed its marker on Android 16, an immediate emulator stop left 38/38 packages disabled with v1.0.16 and 11/38 with v1.0.17 on the next cold boot. In an isolated synthetic adb test, v1.0.17 issued 70 distinct enable operations for either an empty or a null list, including a package disabled before the test. Even a successful single-package restore converted Android's default flag into explicitly enabled. Durable per-user state and recovery across interrupted boots remain separate work.

Validation

  • Windows Android and launcher regressions (204 passed, one skipped), RAM eligibility, device settings UI and telemetry opt-out.
  • Windows build, marketplace package and packaged plugin smoke test passed.
  • The new android.ram_profile.boot.duration distribution records boot completion time and outcome. Boot identifiers stay local and serve only to detect when a restart is required.
  • The Linux Docker visual runner was unavailable locally. The repository CI includes Linux visual and host coverage.

@vercel

vercel Bot commented Nov 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
mobile-dev Ready Ready Preview Nov 22, 2026 8:06am UTC

Request Review

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant