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.
This commit is contained in:
lambdadroid 2019-08-27 11:54:30 +02:00
parent 896ec71dd9
commit c3a9452ccb
No known key found for this signature in database
GPG Key ID: 5AE7F5513E0885CB
1 changed files with 1 additions and 1 deletions

View File

@ -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"