Skip to content

Commit

Permalink
updater-script: don't copy dropped files lines
Browse files Browse the repository at this point in the history
* as splash, dtbo and vbmeta are no longer included in fw zip, there's
no need for including its lines in updater-script
  • Loading branch information
yshalsager committed Jul 3, 2019
1 parent b2155ac commit 8305d1f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions create_flashable_firmware.py
Expand Up @@ -144,7 +144,8 @@ def firmware_updater():
+ f"# {today} - {host}\n'\n")
out.writelines('ui_print("Flashing Normal firmware...");\n')
out.writelines(line for line in i if "getprop" in line or "Target" in line
or "firmware-update" in line)
or "firmware-update" in line and 'splash' not in line
and 'dtbo' not in line and 'vbmeta' not in line)
out.writelines('\nshow_progress(0.100000, 2);\nset_progress(1.000000);\n')
with open("out/updater-script", 'r') as i, \
open("out/META-INF/com/google/android/updater-script", "w", newline='\n') as out:
Expand Down Expand Up @@ -204,8 +205,8 @@ def vendor_updater():
+ f"# {today} - {host}\n'\n")
out.writelines('ui_print("Flashing firmware+vendor...");\n')
out.writelines(line for line in i if "getprop" in line or "Target" in line
or "firmware-update" in line
or "vendor" in line)
or "firmware-update" in line or "vendor" in line
and 'splash' not in line and 'dtbo' not in line and 'vbmeta' not in line)
out.writelines('\nshow_progress(0.100000, 2);\nset_progress(1.000000);\n')
with open("out/updater-script", 'r') as i, \
open("out/META-INF/com/google/android/updater-script", "w", newline='\n') as out:
Expand Down

0 comments on commit 8305d1f

Please sign in to comment.