You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Saving an Android baseline fails: config.ini has spaces around = #1369
bug:readyAn agent may fix it.fast-trackBug set ready by the fast-track check, not the maintainer (rule 17).platform:androidAndroid emulators or devices
Saving an Android baseline through the gateway fails, and the lease ends anyway, so the prepared emulator is lost:
$ simlock --gateway baseline save demo --lease <android lease>
BASELINE_SAVE_FAILED … Android device dev_… cannot be saved: its AVD names no system image. Lease lse_b8196590-6055-4eab-bef2-dd9a321d1ef8 has ended.
The cause is savedKindOf in src/drivers/android/seeds.ts:55. Its regexes expect key=value with no spaces:
So the image line never matches. The model would also fall back to unknown. The test fixtures use no spaces, so the tests pass.
What you expected
The save succeeds and makes demo v1 for Android, the way it does for iOS.
How to reproduce
simlock lease --platform android --detach (directly or through a gateway)
simlock baseline save demo --lease <id>
It fails every time.
Environment
Simlock 0.6.0 from main at 6674ad0, on both sides. Gateway: macOS 26.6.1 arm64. Worker (connected to the gateway over Tailscale): macOS 27.0.1 arm64, Xcode 27.1 (27A9275), emulator 37.2.13, platform-tools 36.0.0, cmdline-tools 19.0. Image: system-images;android-36;google_apis;arm64-v8a.
Logs and evidence
The same save on iOS worked (demo v1, iPhone 17, iOS 26.5, 2.3 GB). Suggested fix: allow optional whitespace around = in both regexes, and add a fixture in avdmanager's real format.
Confirmed. src/drivers/android/index-lifecycle.test.ts, "saves a device whose config.ini has spaces around =, as avdmanager writes it, with the model and image it names", on bug/1369-repro. The fixture uses hw.device.name = pixel_6 and image.sysdir.1 = system-images/android-34/google_apis/arm64-v8a/. The test expects the save to succeed and the source to list model pixel_6, API 34, tag google_apis.
$ pnpm exec vitest run --project unit src/drivers/android/index-lifecycle.test.ts -t "spaces around"
AssertionError: promise rejected "DriverCrashError: Android device simlock_…" instead of resolving
Caused by: DriverCrashError: Android device simlock_one cannot be saved: its AVD names no system image
❯ Seeds.#kindOfDevice src/drivers/android/seeds.ts:338:13
The format depends on who wrote the file last. On this Mac (emulator 36.5.11) the files look like this:
Defect. savedKindOf (src/drivers/android/seeds.ts:63 and :70) matches key=value with no spaces. A config.ini that avdmanager wrote keeps =. Here the emulator rewrites the file without spaces when it boots, which is why the save works on this host. On the reporter's emulator 37.2.13 the spaces stay, so the image regex never matches and #kindOfDevice (seeds.ts:338) throws. The module already has a parser that accepts spaces: iniValues (avd-config.ts:174), which foreignDevices uses on the user's own AVDs.
Simplest fix
Read both keys through iniValues, then match the image path on its value.
$ pnpm exec vitest run --project unit src/drivers/android/
Test Files 23 passed (23)
Tests 709 passed | 1 skipped (710)
Alternatives rejected
\s*=\s* in both regexes (as the reporter suggests): it works (709 pass), but it adds a second ini parser, and \s under /m can match across a line break.
Rewrite config.ini without spaces when copying: this changes a file the emulator owns, to work around a parser.
Risk
iniValues takes the first =, so a value that contains = stays whole. Check that hw.device.name never needs more than that.
bug:readyAn agent may fix it.fast-trackBug set ready by the fast-track check, not the maintainer (rule 17).platform:androidAndroid emulators or devices
Activity
V3RON commentedon Nov 6, 2026
Written by an agent.
V3RON commentedon Nov 6, 2026
Reproduction
Confirmed.
src/drivers/android/index-lifecycle.test.ts, "saves a device whose config.ini has spaces around=, as avdmanager writes it, with the model and image it names", onbug/1369-repro. The fixture useshw.device.name = pixel_6andimage.sysdir.1 = system-images/android-34/google_apis/arm64-v8a/. The test expects the save to succeed and the source to list modelpixel_6, API 34, taggoogle_apis.The format depends on who wrote the file last. On this Mac (emulator 36.5.11) the files look like this:
Root cause
Defect.
savedKindOf(src/drivers/android/seeds.ts:63and:70) matcheskey=valuewith no spaces. Aconfig.inithat avdmanager wrote keeps=. Here the emulator rewrites the file without spaces when it boots, which is why the save works on this host. On the reporter's emulator 37.2.13 the spaces stay, so the image regex never matches and#kindOfDevice(seeds.ts:338) throws. The module already has a parser that accepts spaces:iniValues(avd-config.ts:174), whichforeignDevicesuses on the user's own AVDs.Simplest fix
Read both keys through
iniValues, then match the image path on its value.Alternatives rejected
\s*=\s*in both regexes (as the reporter suggests): it works (709 pass), but it adds a second ini parser, and\sunder/mcan match across a line break.config.iniwithout spaces when copying: this changes a file the emulator owns, to work around a parser.Risk
iniValuestakes the first=, so a value that contains=stays whole. Check thathw.device.namenever needs more than that.Fast track
Written by an agent.
fix(android): read the saved device's config.ini through iniValues (#…
V3RON commentedon Nov 6, 2026
Delivery run
Merged: #1379 (#1369)
Parked: none
Waiting: none
Decided: none
Written by an agent.
fix(android): saving a device reads a config.ini with spaces around = (…
test(drivers): one contract suite holds both fake drivers to the real…