Skip to content

Fix Samsung recovery history reporting zero rows on current devices - #1109

Merged
abrignoni merged 1 commit into
mainfrom
fix/srecoveryhist-record-boundary
Aug 14, 2026
Merged

Fix Samsung recovery history reporting zero rows on current devices#1109
abrignoni merged 1 commit into
mainfrom
fix/srecoveryhist-record-boundary

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

Summary

sRecoveryhist appended 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/history present and populated. Mattia Epifani reported this.

Changes

  • Records are now closed by the next + header or end of file, so both the old (lone-dash) and new (no-separator) layouts parse.
  • Capture the header's firmware build and entry tag; add --carry_out.
  • reboot_reason is split on the first = only — it contains more than one =, so the old split('=') dropped the tail.
  • Added a Source File column and multi-file source handling.

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)

corpus before after notes
galaxys10_a10 (A10) 4 4 no regression (old lone-dash format)
anne_a15 (A15) 0 9 3 wipe events
sharon_a14 (A14) 0 13 2 wipe events
samsunga53_a14 (A14) 0 50 5 --wipe_data factory resets, 16 distinct firmware builds

LAVA record counts match; output has all 13 columns; wipe='Yes' populates on factory-reset records. Also parsed clean against two Android 15/16 history files 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_data records counts from the registered corpora only.

Co-Authored-By: Claude Opus 5 noreply@anthropic.com

🤖 Generated with Claude Code

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>
@abrignoni
abrignoni merged commit 3b80f84 into main Aug 14, 2026
8 checks passed
@abrignoni
abrignoni deleted the fix/srecoveryhist-record-boundary branch August 14, 2026 22:27
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