Skip to content

Commit

Permalink
refactor: update hexpat
Browse files Browse the repository at this point in the history
  • Loading branch information
timschneeb committed Dec 18, 2024
1 parent e8bce67 commit 8ae5c53
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions docs/imhex_firmware_pattern.hexpat
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
#pragma author timschneeb
#pragma description Samsung Galaxy Buds firmware archive
#pragma pattern_limit 20000000

struct Segment {
u32 unknownHeader1;
u32 unknownHeader2;
u32 unknownHeader3;
u32 romOffsetMaybe;
u8 data[parent.size-16];
};

struct SegmentInfo {
u32 id;
u32 crc32;
Segment* position : u32;
u32 position;
u32 size;
Segment data @ position;
} [[single_color]];

struct Header {
struct FirmwareFile {
u32 magic;
u32 totalSize;
u32 segmentsCount;
SegmentInfo segments[segmentsCount];
SegmentInfo segments[segmentsCount];
u32 crc32 @ sizeof($) - 0x4;;
};

Header header @ 0x0;


u32 crc32 @ sizeof($) - 0x4;
FirmwareFile file @ 0x0;

0 comments on commit 8ae5c53

Please sign in to comment.