Skip to content

Add Maps Sync raw typed and sent map query artifacts - #2735

Merged
abrignoni merged 12 commits into
abrignoni:mainfrom
nwish:feat/map-place-raw-queries
Nov 17, 2026
Merged

abrignoni merged 12 commits into
abrignoni:mainfrom
nwish:feat/map-place-raw-queries

Conversation

@nwish

@nwish nwish commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

What this changes

Adds Query (Sent) and Query (Raw) columns to the Maps Sync artifact, extracted from base64 placeRequest= payloads embedded in the ZMAPITEMSTORAGE/ZROUTEREQUESTSTORAGE BLOBs (protobuf fields 8.1.3 and 10000 under 8.1.7). The raw field carries the partial text typed before an autocomplete suggestion was accepted — text that exists nowhere else in the store.

For a new or changed artifact

  • Ran the tool against a real extraction and confirmed the row counts, not just that it imports. Full ileapp.py -t zip run against the dexter_ios18 FFS extraction: 50 rows, 30 with Query (Sent), 30 with Query (Raw) — matches the recorded baseline.
  • Ran python admin/scripts/check_artifact_output.py <report folder> on that report and fixed or documented every finding. 488 exports checked; Maps Sync produced no findings. On pre-iOS-18 extractions both columns are empty on every row; the notes name the columns and state they were absent from every row of the four pre-18 stores tested.
  • Checked it against a second app data directory where the platform provides one (a second user, account, or container). Not applicable: MapsSync_0.0.1 lives in a single shared AppGroup container; the extraction holds one store. The MapsSync_0.0.1_deviceLocalCache.db sidecar carries the same history schema but held 0 history rows on all three stores tested where present (see below).
  • notes, description and sample_data say only what the data shows, and the numbers were re-derived from the finished run. All cited corpora are already registered entries, and I left my uncited test data out of the key list.

Anything reviewers should know

  • Version-dependent: payloads were present on the iOS 18.3.2 (30/50 rows) and 26.3 (4/9) stores tested, and absent from every row of the iOS 15.3.1, 16.5, 17.3 and 17.5.1 stores tested.
  • Prior artifacts: appleMapsSearchHistory.py has extracted the same 8.1.7.10000 position from GeoHistory.mapsdata since 2021 — independent corroboration of the field path; that store is gone on modern iOS, so this applies the known pattern to the live store.
  • deviceLocalCache.db gap (future work): the sidecar shares the history schema and is skipped by the module's endswith('MapsSync_0.0.1') filter. It was empty of history rows on every corpus image tested, but on real devices it could hold local-only rows — including payloads — that this artifact never surfaces.
  • AI Usage: OMP (harness) running Qwen 3.8 Flash Next was used here for the initial research of these artifacts, code generation, automating test runs and generating various verbiage.

Windows test-harness snag

I hit a snag running test_module.py on Windows - the script stages case files into a relative admin/test/temp dir. On Windows, get_sqlite_db_path prepends the extended-length prefix (\\?\), which SQLite can only resolve against an absolute path — every SQLite-backed artifact fails with "unable to open database file", then crashes on the None handle. I fixed this temporarily with base_temp_dir = Path('admin/test/temp').resolve() on line ~194 of test_module.py but left it out of this PR.

nwish and others added 12 commits November 16, 2026 09:49
…stored in ZMAPITEMSTORAGE and ZROUTEREQUESTSTORAGE BLOBs
Select each history column only when the store has it, so stores
without ZLATITUDE1 (the iOS 14 to 17 stores tested) keep their route
and map item BLOBs. Type fields 8.1.3 and 8.1.7.10000 as bytes so short
text is not read as a nested message, join distinct queries across
payloads, and add the two query columns to Maps Favorites.

Co-authored-by: nwish <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-authored-by: nwish <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@nwish

nwish commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

Python runtime contract CI failures should be fixed in 27f8f28 (I forgot to update the header count assertion)

@abrignoni

Copy link
Copy Markdown
Owner

Thanks @nwish for this one. The raw query field is a great find. It keeps the text someone typed before they picked a suggestion, and nothing else in the store has that. Thanks also for the header count fix, I rebased on top of it.

I pushed a few commits on top of yours:

  • The history query now picks each column on its own. Before, any store without ZLATITUDE1 (every iOS 14 to 17 store in our corpus) skipped the route and map item BLOBs, so the query and address columns came out empty there. Across the 22 corpus stores, Query (Sent) now fills on 123 of 248 rows.
  • The two query fields are typed as bytes, the way appleMapsSearchHistory.py does it, so short text is no longer read as a nested message.
  • Distinct queries from several payloads on one row are joined instead of keeping only the first.
  • Maps Favorites gets the same two columns.
  • Added tests for the above, re-recorded the snapshots and dropped the duplicate one. The test strings are now made up, since a few matched the fixture's data.
  • Rewrote the notes with counts from the corpus run and added you to the author line on both artifacts.

One question before I merge: is the iPhone 13 behind case_ip13_ios263 a dedicated test device? The fixture carries the full MapsSync store and its WAL, and once merged it stays in the history for good.

Your Windows note about test_module.py and the relative temp path is a good catch too. I'll look at that one separately.

@nwish

nwish commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

Thanks! I appreciate the additional commits - I'm a freshie here, so at least I can follow along with what you add and save you some time on the next PR. The iPhone 13 behind case_ip13_ios263 is indeed a test device and its fixture can safely live in the history. That said, I will definitely still fabricate any future test strings!

@abrignoni
abrignoni merged commit 7eca891 into abrignoni:main Nov 17, 2026
26 checks passed
@nwish
nwish deleted the feat/map-place-raw-queries branch November 17, 2026 04:30
nwish pushed a commit to nwish/iLEAPP that referenced this pull request Nov 17, 2026
On Windows get_sqlite_db_path puts the extended-length prefix in front
of every database path, and SQLite cannot open a relative path with it,
so every SQLite-backed case failed with "unable to open database file".
process_artifact and test_module_output.py now resolve admin/test/temp.
process_data takes the working directory off staged paths so snapshots
still record admin/test/temp/... and hold no local folder. The new test
runs on the Windows smoke job, where the open actually fails.

Reported by the contributor of abrignoni#2735.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

2 participants