From c3a9452ccb3348e2fa8ed2c050294c28371648aa Mon Sep 17 00:00:00 2001 From: lambdadroid Date: Tue, 27 Aug 2019 11:54:30 +0200 Subject: [PATCH] Skip sparse image generation when installing to SD card (!1809) At the moment, attempting to install to SD card when flash_sparse is set to "true" will always fail because /home/pmos/rootfs does not exist in that case. Sparse images are only useful to speed up Fastboot flashing. Nothing will be able to read it from the SD card. The problem can therefore be avoided by simply skipping the generation of the sparse image when SD card installation is used. --- pmb/install/_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmb/install/_install.py b/pmb/install/_install.py index a4a022db..83624718 100644 --- a/pmb/install/_install.py +++ b/pmb/install/_install.py @@ -398,7 +398,7 @@ def install_system_image(args): pmb.chroot.shutdown(args, True) # Convert rootfs to sparse using img2simg - if args.deviceinfo["flash_sparse"] == "true" and not args.split: + if args.deviceinfo["flash_sparse"] == "true" and not args.split and not args.sdcard: logging.info("(native) make sparse rootfs") pmb.chroot.apk.install(args, ["libsparse"]) sys_image = args.device + ".img"