Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0ade0d43 authored by Jooyung Han's avatar Jooyung Han
Browse files

Emit PRODUCT_COMPRESSED_APEX as build prop

The value will be set as sysprop: apexd.config.compressed_apex. This
property tells apexd/init that there's no compressed apexes.

For go/mount-apex-before-data feature to work, there should be no
compressed apexes. If not, init/apexd should run with the feature
disabled.

PRODUCT_COMPRESSED_APEX is to control whether to install compressed
APEXes or not. (If it's `false`, there'll be no compressed apexes.)
Emitting this as sysprop helps init/apexd to know the fact.

Otherwise, apexd/init need to scan the builtin apex directories (e.g.
/system/apex) to see if there's no compressed apexes or not, which would
make the boot slower because it involves lots opening directories and
APEX files.

Bug: 381173074
Test: lunch aosp_cf_x86_64_phone-trunk_staging-userdebug
Test: m && cvd create && adb shell getprop apexd.config.compressed_apex
Change-Id: Ia3c172be5f0906b6fbaebaf450ee24b22bf358cb
parent ec378138
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -542,6 +542,10 @@ ifdef OVERRIDE_PRODUCT_COMPRESSED_APEX
else ifeq (,$(PRODUCT_COMPRESSED_APEX))
  PRODUCT_COMPRESSED_APEX := true
endif
ifeq (,$(filter true false,$(PRODUCT_COMPRESSED_APEX)))
  $(error PRODUCT_COMPRESSED_APEX should be either true or false)
endif
PRODUCT_SYSTEM_PROPERTIES += apexd.config.compressed_apex=$(PRODUCT_COMPRESSED_APEX)

ifdef OVERRIDE_PRODUCT_DEFAULT_APEX_PAYLOAD_TYPE
  PRODUCT_DEFAULT_APEX_PAYLOAD_TYPE := $(OVERRIDE_PRODUCT_DEFAULT_APEX_PAYLOAD_TYPE)