mirror of
https://github.com/ihaveamac/custom-install.git
synced 2025-12-06 06:41:45 +00:00
custominstall: use bytes(cia.tmd) instead of reading tmd file directly
This commit is contained in:
@@ -274,10 +274,9 @@ class CustomInstall:
|
|||||||
# write the tmd
|
# write the tmd
|
||||||
enc_path = content_root_cmd + '/' + tmd_filename
|
enc_path = content_root_cmd + '/' + tmd_filename
|
||||||
self.log(f'Writing {enc_path}...')
|
self.log(f'Writing {enc_path}...')
|
||||||
with cia.open_raw_section(CIASection.TitleMetadata) as s:
|
|
||||||
with open(join(content_root, tmd_filename), 'wb') as o:
|
with open(join(content_root, tmd_filename), 'wb') as o:
|
||||||
self.copy_with_progress(s, o, cia.sections[CIASection.TitleMetadata].size, enc_path,
|
with self.crypto.create_ctr_io(Keyslot.SD, o, self.crypto.sd_path_to_iv(enc_path)) as e:
|
||||||
fire_event=False)
|
e.write(bytes(cia.tmd))
|
||||||
|
|
||||||
# write each content
|
# write each content
|
||||||
for co in cia.content_info:
|
for co in cia.content_info:
|
||||||
|
|||||||
Reference in New Issue
Block a user