Commit graph

5 commits

Author SHA1 Message Date
Dario Freni
d5ed6019c9 Move CtsShim and CtsPrivShim APKs out of system.
These packages are now available in the shim apex package, which is made
available in both flattened and unflattened apex configurations.

Bug: 138429615
Test: atest CtsPrivilegedUpdateTests CtsPermissionTestCases
CtsStagedInstallHostTestCases; (on both flattened and unflattened
configurations)
Merged-In: I03939f6c3e711d5887da201e32173f86a6b0289e
Change-Id: I03939f6c3e711d5887da201e32173f86a6b0289e
2019-12-17 13:47:17 +00:00
Roland Levillain
b3a503df7f Introduce build variable OVERRIDE_TARGET_FLATTEN_APEX.
When `OVERRIDE_TARGET_FLATTEN_APEX` is defined (e.g. set in the
environment), `TARGET_FLATTEN_APEX` is forcibly assigned its value.

This is useful to enable/disable APEX flattening from the command
line (thus ignoring the product's default configuration), for testing
purposes.

Note: Previously it was possible to set `TARGET_FLATTEN_APEX` directly
and have the same effect, but recent changes in the build
configuration now prevent that option.

Test: Check that:
        export OVERRIDE_TARGET_FLATTEN_APEX=true \
          && . ./build/envsetup.sh \
          && lunch aosp_walleye-userdebug \
          && export OVERRIDE_TARGET_FLATTEN_APEX=true \
          && build/soong/soong_ui.bash --dumpvar-mode TARGET_FLATTEN_APEX
      returns:
        true
Bug: 121117762

Change-Id: Ib9ccae38430340de38e4758b4f55df2c65ea60d5
2019-10-04 18:35:49 +01:00
Jiyong Park
09dcc68663 updatable_apex.mk is not inherited from mainline_system.mk
mainline_system.mk is inherited by not only Pixels but also products
like GSI and sdk_gphone where kernel isn't capable of supporting
updatable APEX.

Stop inheriting updatable_apex.mk from mainline_system.mk and let each
product to decide whether or not to inherit updatable_apex.mk.

Also, TARGET_FLATTEN_APEX is not set to true for GSI as it is the
default setting.

Bug: 132664085
Test: choosecombo 1 aosp_arm64 userdebug; get_build_var
TARGET_FLATTEN_APEX shows true
choosecombo 1 sdk_gphone userdebug; get_build_var TARGET_FLATTEN_APEX
shows true

Change-Id: I3c4e1e4b2bbebd675904d148dd18acb57ecbdfe9
Merged-In: I3c4e1e4b2bbebd675904d148dd18acb57ecbdfe9
(cherry picked from commit 5fd45bbeb0)
2019-07-02 13:38:23 +00:00
Jiyong Park
02426e6118 Ensure TARGET_FLATTEN_APEX == true when ro.apex.updatable is not set
TARGET_FLATTEN_APEX and ro.apex.updatable cannot be independently set.
For a device where updating APEXes is not supported, ro.apex.updatable
should not be set (or set to false) and TARGET_FLATTEN_APEX should be
set to true. For APEX-supporting devices, it is the opposite;
ro.apex.updatable == true and TARGET_FLATTEN_APEX is false (or not set).

To ensure this relationship, TARGET_FLATTEN_APEX is by default set to
true, and overridden to false when updatable_apex.mk is inherited.

Bug: 130623080
Test: choosecombo to Pixels 2 and later; get_build_var
TARGET_FLATTEN_APEX returns false.
choosecombo to the original Pixel and other non-Pixel targets;
get_build_var TARGET_FLATTEN_APEX returns true.
choosecombo to the cuttlefish; get_build_var TARGET_FLATTEN_APEX
returns false

Merged-In: Id73a594dd9838457e68e2793122592c11a84fc83
Change-Id: Id73a594dd9838457e68e2793122592c11a84fc83
(cherry picked from commit 18411a42f0)
2019-05-09 09:56:55 +09:00
Jiyong Park
5645a3a9a0 Add updatable_apex.mk
The product abstracts configs that need to be set to support updating of
APEXes.

Bug: 130418467
Test: m
Test: adb shell getprop ro.apex.updatable in Pixel 2 and 3
Test: adb shell /system/apex/com.android.apex.cts.shim.apex exists.
Merged-In: Idb44388a0cf6338f8b4500a1d0d2762ed59476bf
Change-Id: Idb44388a0cf6338f8b4500a1d0d2762ed59476bf
(cherry picked from commit fa51bedf8b)
2019-04-17 16:18:56 +09:00