Fix Samsung recovery history reporting zero rows on current devices - #1109
Merged
Conversation
sRecoveryhist only appended a record when it hit a line that is exactly a lone dash. Older devices (e.g. the Galaxy S10 image) end each record that way, so they parsed. Current devices write no separator: each record runs until the next '+ [tag | timestamp | build]' header. On those the append never fired and the artifact reported zero rows even though /efs/recovery/history was present and populated, which is what Mattia Epifani reported. Records are now closed by the next header or end of file, so both layouts parse. The header's firmware build and entry tag are captured, --carry_out is added, and reboot_reason is split on the first '=' only (it contains more than one, so the old split lost the tail). The Samsung EFS partition survives a user wipe, so this recovers the device's firmware-update and factory-reset history from images where it was being dropped. Verified with aleapp.py profile runs: galaxys10_a10 stays 4 rows (no regression), and anne_a15 0 -> 9, sharon_a14 0 -> 13, samsunga53_a14 0 -> 50, the last carrying 5 --wipe_data factory-reset events and 16 distinct firmware builds. Also parsed clean against two Android 15/16 history files supplied by the reporter (22 and 23 records). Co-Authored-By: Claude Opus 5 <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.
Summary
sRecoveryhistappended a record only when it hit a line that is exactly a lone-. Older devices (the Galaxy S10 image) end each record that way and parsed fine (4 rows). Current devices write no separator — each record runs until the next+ [tag | timestamp | build]header — so the append never fired and the artifact reported zero rows even with/efs/recovery/historypresent and populated. Mattia Epifani reported this.Changes
+header or end of file, so both the old (lone-dash) and new (no-separator) layouts parse.--carry_out.reboot_reasonis split on the first=only — it contains more than one=, so the oldsplit('=')dropped the tail.The Samsung EFS partition is not wiped when the user wipes the phone, so this recovers the device's firmware-update and factory-reset history from images where it was silently dropped.
Validation (real aleapp.py profile runs)
--wipe_datafactory resets, 16 distinct firmware buildsLAVA record counts match; output has all 13 columns;
wipe='Yes'populates on factory-reset records. Also parsed clean against two Android 15/16historyfiles supplied by the reporter (22 and 23 records). Pylint 10.00, claim-language and validate_sample_data clean. Reporter samples are private and not committed;sample_datarecords counts from the registered corpora only.Co-Authored-By: Claude Opus 5 noreply@anthropic.com
🤖 Generated with Claude Code