exefs - ExeFS reader
The exefs module enables reading application executable filesystems.
ExeFSReader objects
- class pyctr.type.exefs.ExeFSReader(fp, *, fs=None, closefd=True, _load_icon=True)[source]
Bases:
TypeReaderBaseReads the contents of the ExeFS, found inside NCCH containers.
The contents typically include
.code,icon, andbanner. For titles released before System Menu 5.0.0-11,logocan also one of the contents, otherwise logo has a dedicated NCCH section.The other notable use of an ExeFS is GodMode9’s essentials backup, which can include the files
frndseed,hwcal0,hwcal1,movable,nand_cid,nand_hdr,otp, andsecinfo..codecan sometimes be compressed which is indicated in the NCCH Extended Header. When decompressed, a new entry called.code-decompressedis added.If
iconis found, it is loaded into anSMDHobject.- Parameters:
- entries: dict[str, ExeFSEntry]
Entries in the ExeFS.
Data classes
Functions
- pyctr.type.exefs.decompress_code(code)[source]
Decompress the given code. This is called by
ExeFSReader.decompress_code(), and you should probably use that instead if you are loading the code from an ExeFS.
Exceptions
- exception pyctr.type.exefs.ExeFSNameError[source]
Name could not be decoded, likely making the file not a valid ExeFS.