Skip to content

Commit

Permalink
firmware_creator: update vendor excluded files list
Browse files Browse the repository at this point in the history
Closes #23

Signed-off-by: yshalsager <ysh-alsager@hotmail.com>
  • Loading branch information
yshalsager committed May 28, 2021
1 parent 7ba1aa9 commit 92ac7c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xiaomi_flashable_firmware_creator/firmware_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def __init__(self, input_file, _extract_mode, out_dir=""):
self.firmware_excluded_files = ['dtbo', 'logo', 'splash', 'vbmeta', 'boot.img', 'system',
'vendor', 'product', 'odm', 'exaid',
'dynamic_partitions_op_list']
self.vendor_excluded_files = ['logo', 'splash', 'vbmeta', 'system', 'product.', 'odm.', 'exaid',]
self.extractor = ZipExtractor(self.input_file, self._tmp_dir)
self.init()

Expand Down Expand Up @@ -163,8 +164,7 @@ def get_files_list(self) -> List[str]:
return [n for n in self.extractor.files if not n.startswith('firmware-update/')] \
if self.type is ZipTypes.qcom else []
if self.extract_mode is ProcessTypes.vendor:
return [n for n in self.extractor.files if not n.startswith('system')
and not n.startswith('vbmeta')]
return [i for i in self.extractor.files if all(n not in i for n in self.vendor_excluded_files)]
return [] # Will never happen

def get_updater_script_lines(self) -> str:
Expand Down

0 comments on commit 92ac7c6

Please sign in to comment.