dissect.jffs.jffs2

Module Contents

Classes

JFFS2

Journalling Flash File System, version 2 implementation.

DirEntry

INode

DataStream

JFFS2 buffered stream that provides easy aligned reads.

Attributes

log

dissect.jffs.jffs2.log
class dissect.jffs.jffs2.JFFS2(fh: BinaryIO)

Journalling Flash File System, version 2 implementation.

Currently supports the most common compression formats (zlib, lzo, none and zero). CRC checksums are currently ignored. Compression formats rtime, rubinmips, copy and dynrubin are not supported.

References

fh
inode
root
get(path: str | int, node: INode | None = None) INode
class dissect.jffs.jffs2.DirEntry(fs: JFFS2, entry: dissect.jffs.c_jffs2.c_jffs2.jffs2_raw_dirent)
fs
entry
parent_inum
version
inum
type
property name: str
class dissect.jffs.jffs2.INode(fs: JFFS2, inum: int, type: int | None = None, parent: INode | None = None)
fs
inum
parent = None
listdir
__repr__() str
property inodes: list[tuple[dissect.jffs.c_jffs2.c_jffs2.jffs2_raw_inode, int]]
property inode: dissect.jffs.c_jffs2.c_jffs2.jffs2_raw_inode
property size: int
property mode: int
property type: int
property atime: datetime.datetime
property mtime: datetime.datetime
property ctime: datetime.datetime
property uid: int
property gid: int
is_dir() bool
is_file() bool
iterdir() collections.abc.Iterator[tuple[str, INode]]
open() dissect.util.stream.RunlistStream

Return data contained in all associated data inodes.

Supports JFFS2_COMPR_NONE, JFFS2_COMPR_ZERO, JFFS2_COMPR_ZLIB and JFFS2_COMPR_LZO.

Does not support JFFS2_COMPR_RTIME, JFFS2_COMPR_RUBINMIPS, JFFS2_COMPR_COPY and JFFS2_COMPR_DYNRUBIN.

class dissect.jffs.jffs2.DataStream(fs: JFFS2, inum: int, size: int)

Bases: dissect.util.stream.AlignedStream

JFFS2 buffered stream that provides easy aligned reads.

To read file contents, the log inodes are played back in version order, to recreate a map of where each range of data is located on the physical medium.

fs
inum