M pmb/flasher/frontend.py => pmb/flasher/frontend.py +7 -0
@@ 122,6 122,11 @@ def flash_lk2nd(args):
pmb.flasher.run(args, "flash_lk2nd")
+def flash_all(args):
+ for action in ["flash_rootfs", "flash_kernel", "flash_vbmeta", "flash_dtbo"]:
+ pmb.flasher.run(args, action, ignore_errors=True)
+
+
def frontend(args):
action = args.action_flasher
method = args.flash_method or args.deviceinfo["flash_method"]
@@ 151,6 156,8 @@ def frontend(args):
sideload(args)
if action in ["flash_lk2nd"]:
flash_lk2nd(args)
+ if action == "flash_all":
+ flash_all(args)
extra = args.action_extra
if extra and "fastboot" in method and action != "boot":
M pmb/parse/arguments.py => pmb/parse/arguments.py +4 -1
@@ 277,8 277,11 @@ def arguments_flasher(subparser):
help="partition to flash the dtbo to (defaults"
" to deviceinfo_flash_*_partition_dtbo)")
+ flash_all = sub.add_parser("flash_all",
+ help="Flash all partitions needed for the device")
+
for action in [flash_kernel, flash_lk2nd, flash_rootfs,
- flash_vbmeta, flash_dtbo]:
+ flash_vbmeta, flash_dtbo, flash_all]:
extra = action.add_argument(dest="action_extra",
metavar="EXTRA",
help="Additional commands to flasher"