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

inode(inum: int, type: int | None = None, parent: INode | None = None) INode#
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)#
name() str#
class dissect.jffs.jffs2.INode(fs: JFFS2, inum: int, type: int | None = None, parent: INode | None = None)#
__repr__() str#

Return repr(self).

inodes() list[tuple[dissect.jffs.c_jffs2.c_jffs2.jffs2_raw_inode, int]]#
inode() dissect.jffs.c_jffs2.c_jffs2.jffs2_raw_inode#
size() int#
mode() int#
type() int#
atime() datetime.datetime#
mtime() datetime.datetime#
ctime() datetime.datetime#
uid() int#
gid() int#
is_dir() bool#
is_file() bool#
listdir() dict#
iterdir() 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.