Disable sparse image for GSI products
There are a couple of use cases where we don't want sparse image:
1. `DynamicSystemInstallationService` in Q framework doesn't support
sparse images.
2. Super image manipulation tools (like `lpadd`) doesn't play nice with
sparse images.
Force non-sparse GSI so we don't break backwards compatibility (1) and
we don't need to write `simg2img` everywhere (2).
Bug: 167695592
Test: Prepare a device flashed with Q framework
Test: Build system.img and create system.img.zip; the image is non-sparsed
Test: m tradefed-all && \
tradefed.sh run commandAndExit template/atest_local_min \
--template:map preparers=template/preparers/dsu-preparer \
--extra-file system-img.zip=out/.../system.img.zip \
--dynamic-system-update:disable-tear-down
Change-Id: Ib7667165ce53e87eb86bc7d3f56c80a418123a62
diff --git a/target/board/BoardConfigGsiCommon.mk b/target/board/BoardConfigGsiCommon.mk
index 9d55f42..e34dc23 100644
--- a/target/board/BoardConfigGsiCommon.mk
+++ b/target/board/BoardConfigGsiCommon.mk
@@ -11,7 +11,9 @@
# This flag is set by mainline but isn't desired for GSI.
BOARD_USES_SYSTEM_OTHER_ODEX :=
-# system.img is always ext4 with sparse option
+# system.img is always ext4 and non-sparsed.
+TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
+
# GSI also includes make_f2fs to support userdata parition in f2fs
# for some devices
TARGET_USERIMAGES_USE_F2FS := true