Guard schema drift in 4 artifacts found sweeping new Android corpora - #1100
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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