Skip to content

Guard schema drift in 4 artifacts found sweeping new Android corpora - #1100

Merged
abrignoni merged 3 commits into
mainfrom
fix/new-corpus-sweep-schema-drift
Aug 11, 2026
Merged

Guard schema drift in 4 artifacts found sweeping new Android corpora#1100
abrignoni merged 3 commits into
mainfrom
fix/new-corpus-sweep-schema-drift

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

Sweeping two newly added Android corpora, a Cookbook Android 11 image (Samsung SM-G991U) and the Cellebrite CTF23 Sharon image (Android 13, SM-G991B), turned up four artifacts that crashed on schema or data-shape drift and returned nothing. All four are leaf-level guards, each validated with a real aleapp.py run against the image, not a mock harness.

samsungWifiConfigStoreDb: older One UI builds have no NETWORK_DISABLE_REASON column in the configs table, so the SELECT threw "no such column" and dropped every saved WiFi config. Guarded the column the same way the function already guards CREATION_TIME. Recovered the saved config on the Android 11 image.

airtagAlerts: this build's DeviceData table has no deviceType or optionalDeviceData column. Guarded both, substitute NULL when absent.

airtagScans: a scan row with no location fix has a locationScan protobuf with no field 4/5, so proto['4'] raised KeyError and killed the whole artifact. Made the protobuf reads defensive. Recovered all 20 BLE tracker-scan records on the Sharon image, where it had been returning zero. Latitude and longitude stay blank when the scan recorded no coordinates, confirmed by decoding the actual blobs: this schema's locationScan carries only fields 1, 2 and 3.

samsungScpmDevices: this build's scpmv2.db has no devices table at all (it uses wearable_device, empty here), so the query threw "no such table". The columns are not reachable under another table on this schema, so there is nothing to remap. Guarded with does_table_exist_in_db. The four corpora that carry a devices table are unaffected.

🤖 Generated with Claude Code

abrignoni and others added 3 commits August 10, 2026 22:13
…e UI

Older One UI builds do not have the NETWORK_DISABLE_REASON column in the
configs table of WifiConfigStore.db. The artifact hardcoded it in the SELECT,
so on those builds it threw "no such column" and returned nothing, silently
losing every saved WiFi config.

Same tolerance guard the function already uses for CREATION_TIME: substitute
'' when the column is absent, so the positional row mapping is unchanged and
both old and new schemas parse.

Verified on an Android 11 image (Samsung SM-G991U): the artifact previously
threw "no such column: NETWORK_DISABLE_REASON" and returned nothing, and now
returns the saved WiFi config that was being dropped.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Found sweeping a new Android 13 image (Samsung SM-G991B). Two failures in
airtagAndroid against personalsafety_db:

airtagAlerts: the DeviceData table on this build has no deviceType or
optionalDeviceData column, so the hardcoded SELECT threw "no such column" and
the artifact errored out. Guard both columns and substitute NULL when absent,
so it returns cleanly on either schema.

airtagScans: a Scan row whose locationScan protobuf carries no location fix has
no field 4/5, so location_scan_proto['4'] raised KeyError and killed the whole
artifact, dropping every scan row. On this image all 20 rows hit it, so the
artifact returned nothing. Read the proto fields defensively (RSSI, latitude,
longitude), leaving lat/long blank when the scan recorded no coordinates.
Verified: the artifact now recovers all 20 BLE tracker-scan records with signal
strength, where before it returned zero.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Found sweeping a new Android 13 image (Samsung SM-G991B). That build's scpmv2.db
has no devices table at all (it uses wearable_device/product_item instead, and
wearable_device is empty here), so the query raised "no such table: devices" and
the artifact errored. The devices columns are not reachable under another table
on this schema, so there is nothing to remap.

Guard with does_table_exist_in_db and skip those files. The four corpora that
carry a devices table are unaffected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@abrignoni
abrignoni merged commit 147ea7d into main Aug 11, 2026
8 checks passed
@abrignoni
abrignoni deleted the fix/new-corpus-sweep-schema-drift branch August 11, 2026 02:48
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