Skip to content

Conversation

@Kaushalt2004
Copy link
Contributor

@Kaushalt2004 Kaushalt2004 commented Feb 10, 2026

PR Title
gh-144418: Android testbed managed emulator uses 4GB RAM
Android testbed: ensure managed emulator has 4GB RAM
PR Description (paste into GitHub)
Fixes #144418.

The Android testbed’s Gradle Managed Devices sometimes create AVDs with only 2 GB RAM, which is borderline for running CPython’s test suite and requires manual post-creation edits. This change makes the RAM setting reproducible (including on fresh VMs like GitHub Actions / cibuildwheel users) by patching the managed AVD configuration after creation.

Changes

Adds minVersionPatchAvdRam / maxVersionPatchAvdRam Gradle tasks that set hw.ramSize=4096 in the AVD’s config.ini and hardware-qemu.ini.
Ensures the patch runs automatically:
after each *Setup task, and
before each *DebugAndroidTest task (so the RAM fix applies even if *Setup is up-to-date).
Locates the managed AVD robustly (uses .ini pointer path= when present; supports Windows paths and Gradle’s gradle-managed/ directory).
Removes the manual “edit hw.ramSize” paragraph from Android/README.md (the emulator is now configured automatically).
Makes Android/android.py require ANDROID_HOME lazily (only when SDK/adb is needed), which helps setup flows that download the Gradle wrapper before SDK configuration.
Testing

Windows:
.\gradlew.bat :app:minVersionSetup --rerun-tasks (observed minVersionPatchAvdRam logging ramMb=4096)
.\gradlew.bat :app:maxVersionSetup --rerun-tasks (observed maxVersionPatchAvdRam logging ramMb=4096)
Notes

Android/testbed/local.properties may be used locally to point Gradle at the SDK on Windows, but it is not intended to be committed.
If you want, I can also give you a one-liner “PR checklist” (branch name, exact git add, commit message, push, PR link) tailored to your fork remote names.

@python-cla-bot
Copy link

python-cla-bot bot commented Feb 10, 2026

All commit authors signed the Contributor License Agreement.

CLA signed

@Kaushalt2004 Kaushalt2004 force-pushed the gh-144418-android-testbed-ram branch from f708d44 to 7f41bcf Compare February 10, 2026 05:15
@picnixz
Copy link
Member

picnixz commented Feb 10, 2026

This is clearly LLM generated. Read the devguide please because unreviewed LLM code is forbidden (and there are too many unrelated change).

@picnixz picnixz closed this Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android testbed emulator needs more RAM

2 participants