Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions aospdtgen/device_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def dump_to_folder(self, folder: Path):

# Proprietary files list
(folder / "proprietary-files.txt").write_text(
self.proprietary_files_list.get_formatted_list(self.device_info.build_description))
self.proprietary_files_list.get_formatted_list(self.device_info.build_description), encoding="utf-8")

# Dump build props
for partition in self.partitions.get_all_partitions():
Expand Down Expand Up @@ -135,10 +135,10 @@ def dump_to_folder(self, folder: Path):
for file in self.rootdir_etc_files + self.rootdir_recovery_etc_files:
(rootdir_etc_path / file.name).write_bytes(file.read_bytes())

(rootdir_etc_path / self.fstab.fstab.name).write_text(self.fstab.format())
(rootdir_etc_path / self.fstab.fstab.name).write_text(self.fstab.format(), encoding="utf-8")

# Manifest
(folder / "manifest.xml").write_text(str(self.vendor.manifest))
(folder / "manifest.xml").write_text(str(self.vendor.manifest), encoding="utf-8")

def cleanup(self) -> None:
"""
Expand Down
2 changes: 1 addition & 1 deletion aospdtgen/utils/format_props.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def dump_partition_build_prop(build_prop: BuildProp, destination_file_path: Path
section_to_props["Miscellaneous"] = filtered_build_props

# Write the properties to the file
with destination_file_path.open("w") as f:
with destination_file_path.open("w", encoding="utf-8") as f:
for section, props in section_to_props.items():
f.write(f"# {section}\n")
for prop in sorted(props.keys()):
Expand Down