ReFirmLabs / binwalk

Firmware Analysis Tool
MIT License
11.18k stars 1.56k forks source link

Add support for LogFS Fillesystem #715

Open shiren00 opened 1 week ago

shiren00 commented 1 week ago

We would appreciate it if anyone with additional materials or actual dump files related to this could share them :D

shiren00 commented 2 days ago

I'm not sure how to mount it, but since only mkfs.logfs was successful, I'm sharing it just in case. logfs.zip

Apparently, 7a3a8e5cb9d5bf67 is the signature. image

LogFS Header (https://android.googlesource.com/kernel/msm/+/android-msm-marlin-3.18-nougat-dr1/fs/logfs/logfs_abi.h)

/**
 * struct logfs_disk_super - on-medium superblock
 *
 * @ds_magic:           magic number, must equal LOGFS_MAGIC

struct logfs_disk_super {
    struct logfs_segment_header ds_sh;
    __be64  ds_magic;
/**
 * struct logfs_segment_header - per-segment header in the ostore
 *
 * @crc:            crc32 of header (there is no data)
 * @pad:            unused, must be 0
 * @type:           segment type, see above
 * @level:          GC level for all objects in this segment
 * @segno:          segment number
 * @ec:             erase count for this segment
 * @gec:            global erase count at time of writing
 */

struct logfs_segment_header {
    __be32  crc;
    __be16  pad;
    __u8    type;
    __u8    level;
    __be32  segno;
    __be32  ec;
    __be64  gec;
};
#define LOGFS_MAGIC     0x7a3a8e5cb9d5bf67ull /* =ds_magic */