Commit graph

64207 commits

Author SHA1 Message Date
Fabien Sanglard
0f29f54695 Refactor zipalign to allow unit tests
Test: Self-tested
Bug: NA
Change-Id: I322b78c5e18082f7abf7427cdc62dbabcb18b4a0
2020-11-03 10:03:30 -08:00
Artur Satayev
a97b43e4bd Revert^2 "Add a check for apex/allowed_deps.txt to droidcore."
67e8be4b9c

Test: presubmit
Change-Id: I5695dd1003386191dbbe0ea511ef5b615d0d5e4e
Merged-In: I5695dd1003386191dbbe0ea511ef5b615d0d5e4e
(cherry picked from commit 0efeca6a25)
2020-11-03 17:49:30 +00:00
Ulya Trafimovich
1bca532106 Rework class loader context implementation.
In Soong, the old flat representation is changed to a map of trees
(keyed on SDK versions). In Make, the new representation is not as
advanced as in Soong -- it is a map of flat lists rather than trees.
It works for now, because there is only one app that has a non-& class
loader context, and it is simple enough to use flat lists.

Test: lunch aosp_cf_x86_phone-userdebug && m
Bug: 132357300
Bug: 168686456
Change-Id: If1080295a2fafa6772383ee9fbffd7c458462c18
2020-11-03 11:23:42 +00:00
SzuWei Lin
d418471390 Phase out Legacy GSI
Legacy GSI is the GSI for the O/O-MR1 launching devices. VINTF and
VNDK do not support O/O-MR1 now. It is the time to phase out Legacy
GSI.

Bug: 162277261
Test: none
Change-Id: I55901604da21daa58b51ee6676cd61bb9e4ff5e6
2020-11-03 18:23:57 +08:00
Jiyong Park
c02b1c463e Export SOONG_HOST_OUT as ANDROID_SOONG_HOST_OUT
Some host tools (launch_cvd, etc.) have been using HOST_OUT.
As their dependencies are now installed by soong, the tools should refer
to SOONG_HOST_OUT. Export it as ANDROID_SOONG_HOST_OUT.

Bug: 172065015
Test: build aosp_cf_x86_phone, execute launch_cvd
Change-Id: Ie175049f15b89485feec0d33d82e756b12a7ad8a
2020-11-03 11:06:39 +09:00
Treehugger Robot
0806152b83 Merge "Fix partition timestamps for secondary payload" 2020-11-02 21:22:17 +00:00
Yifan Hong
c10e367912 Enable BOARD_USES_GKI on aosp_arm64
Enable BOARD_USES_GENERIC_KERNEL_IMAGE := true. In addition:
- Disable recovery_as_boot
- Disable recovery (PRODUCT_BUILD_RECOVERY_IMAGE=false)

Test: builds, and mmma packages/modules/Gki
Bug: 156098440
Change-Id: If6988f6b44f098ed8f1dc214eee1f2223fd03ae8
2020-11-02 11:28:20 -08:00
Kelvin Zhang
a59bb27754 Fix partition timestamps for secondary payload
When generating secondary payload, we exclude many partitions. These
partitions should be excluded from partition timestamps as well.

Bug: 172022126
Test: ota_from_target_files --include_secondary
Change-Id: Ia3121919154181dc882c4694ad2591dcb81e719f
2020-10-30 14:54:40 -04:00
Yifan Hong
d2ae9989cd Merge changes I7bd61f74,Ia84e604a,I75e13b92,I0db2af20,I4feac435
* changes:
  Mount generic ramdisk as readwrite.
  Do not put GENERIC_KERNEL_CMDLINE in recovery image.
  Move common code out of the conditional.
  Remove device-specific bits if recovery_as_boot
  Do not assume GKI just with vendor_boot.
2020-10-30 16:52:28 +00:00
Paul Duffin
58d6758ea1 Merge "Move boot jars package check to Soong" 2020-10-30 10:06:46 +00:00
Alistair Delva
38d49ca61a Merge "Allow flashing erofs system imgs" 2020-10-30 06:41:25 +00:00
yawanng
522710f378 Add a rule to get numbers greater or equal to a minimum number.
Cherry-pick from b235859ac0

Bug: 171217392
Test: Make
Change-Id: I04df72f813f892f0b6dec8b48e2a113af4545148
Merged-In: I04df72f813f892f0b6dec8b48e2a113af4545148
2020-10-29 22:29:27 +00:00
Daniel Norman
b8d52a2fdc Finds APK shared UID violations when merging target files.
This involved moving the find-shareduid-violation.py script to
releasetools to simplify the cross-tool usage. This new location aligns
this script with other similar python host tools.

In a future change this violation file will be used to check for
shared UID violations across the input build partition boundary.

Bug: 171431774
Test: test_merge_target_files
Test: Use merge_target_files.py to merge two partial builds,
      observe shared UID violations file contents in the result.
Test: m dist out/dist/shareduid_violation_modules.json
      (Checking that existing behavior in core/tasks is presereved)
Change-Id: I7deecbe019379c71bfdbedce56edac55e7b27b41
2020-10-29 09:33:26 -07:00
Paul Duffin
bbd4fae4d7 Move boot jars package check to Soong
Passes the SKIP_BOOT_JARS_CHECK property through to Soong and removes
the boot jars check. Moves the check_boot_jars directory containing the
script and data file into build/soong/scripts.

Test: m check-boot-jars - for failing and passing cases
      verified manually that apart from path differences the same
      files (same check sum) were checked in both old make checks and
      the new Soong ones
Bug: 171479578
Change-Id: I61c128806065befce239bbdd5491567827e1b2f5
2020-10-29 11:07:55 +00:00
Yo Chiang
e73c5a074d Fix missing required dependency caused by circular dependency
Fix a bug where if module A requires module B, and for whatever reason
module A and B have some common installed files, then all required
dependencies of the common files would be lost.

For example:
```
 # A requires B
ALL_MODULES.A.INSTALLED := a
ALL_MODULES.B.INSTALLED := a b
```

Right now the build system wouldn't generate any dependency for `a`.
However the correct behavior should be: `a` has a order-only dependency
on `b`.

Bug: 157444528
Test: Check generated build-*.ninja
Change-Id: Iec60231f6597ec46077393d1defa109b9c07b208
2020-10-29 10:48:17 +00:00
Joseph Murphy
67e1341100 Merge "Changes Robolectric test suite tag to its own value to enable filtering these in ATP." 2020-10-29 10:35:17 +00:00
Janis Danisevskis
95799b056e Add keystore2 to PLATFORM_PACKAGES
Add keystore 2 to the PLATFORM_PACKAGES in anticipation for the Keystore
2.0 migration. This builds and installs keystore2 on the device, but it
does not get started yet. Staring keystore2 is currently controlled with
the platform property ro.android.security.keystore2.enable=true.

Bug: 171305684
Test: keystore2 builds and is present on the device but does not start
      unconditionally.
Change-Id: Id92cb2aa38022516067853d89d6c3210db1100a8
2020-10-28 19:40:51 -07:00
Yifan Hong
78b55b2244 Mount generic ramdisk as readwrite.
With this change, first stage init can prepare and move
resources to accomodate devices with and without a dedicated
recovery partition.

Test: build with and without recovery partition, and manually inspect
Bug: 171512004

Change-Id: I7bd61f74c16ee77f3f05dc208e0f3cfe81e302b0
2020-10-28 17:05:18 -07:00
Yifan Hong
78860164d0 Do not put GENERIC_KERNEL_CMDLINE in recovery image.
The GENERIC_KERNEL_CMDLINE should only be in the generic boot image.
If device uses recovery-as-boot, it never uses generic boot image
because on devices with generic boot image, recovery resources are
moved to vendor_boot instead.

Bug: 171512004
Test: builds

Change-Id: Ia84e604a8ded28af39c7f1861ff5d3b3af55849f
2020-10-28 17:05:18 -07:00
Yifan Hong
c56931c173 Move common code out of the conditional.
Test: builds
Change-Id: I75e13b929dbdb31785a59898579ed14bcc3eef60
2020-10-28 17:05:18 -07:00
Yifan Hong
3941a876de Remove device-specific bits if recovery_as_boot
On legacy devices (launched with R and below), if device:
- has a vendor_boot partition, and
- uses recovery_as_boot

Then, when building the recovery/boot partition, the
device-specific bits, including dtb/kernel base/pagesize should
be moved to vendor_boot.

Previously, it is incorrectly assumed that A/B => recovery_as_boot.
In reality, we do have A/B devices with a dedicated recovery partition.

Note that for devices that uses GKI (BOARD_USES_GENERIC_KERNEL_IMAGE),
recovery_as_boot is never set to true. Instead, recovery resources
are moved to vendor_boot. On these devices, the conditional
'vendor_boot && recovery-as-boot' is always false. Hence:

- If the device has a dedicated recovery partition, it should use V3 header,
  and dtb/base/pagesize won't be in recovery header.
- If device does not have a dedicated recovery partition, the recovery
  image won't be built.

Test: builds
Change-Id: I0db2af20470cbe8a21044a984cccf264590aaccf
2020-10-28 17:05:18 -07:00
Yifan Hong
46aff099d2 Do not assume GKI just with vendor_boot.
This change ensures changes to GENERIC_KERNEL_CMDLINE only affects
devices that explicitly says it uses GKI/generic boot image.

In details, if the device has vendor_boot, but does not explicitly
specify that it uses GKI/generic boot image, do not include
GENERIC_KERNEL_CMDLINE in boot. boot cmdline is left empty
in this case.

The old logic:
- If device uses GKI *OR* has vendor_boot:
  boot uses GENERIC_KERNEL_CMDLINE, and do not include kernel base
  and pagesize.
  - If device has vendor_boot, INTERNAL_KERNEL_CMDLINE, kernel base
    and pagesize goes in vendor_boot.
- If device does not use GKI nor have vendor_boot:
  boot uses INTERNAL_KERNEL_CMDLINE, and includes kernel base and
  pagesize.

The new logic:
- If using GKI, boot uses GENERIC_KERNEL_CMDLINE. Remove kernel base
   and pagesize because they are device-specific.
- If not using GKI:
  - If building vendor_boot, INTERNAL_KERNEL_CMDLINE, base and
    pagesize goes in vendor_boot; boot does not have cmdline, base or
    pagesize.
  - Otherwise, put them in boot

Comparison of the code before and after:
- If device uses GKI,
  - For boot partition:
    - cmdline continues to be GENERIC_KERNEL_CMDLINE
    - kernel base and pagesize continues to be excluded
  - For vendor_boot partition:
    - cmdline continues to be INTERNAL_KERNEL_CMDLINE
    - kernel base and pagesize continues to be included
- If device does not use GKI:
  - If device has a vendor_boot partition:
    - For boot partition:
      * cmdline changes from GENERIC_KERNEL_CMDLINE to empty
      - kernel base and pagesize continues to be excluded
    - For vendor_boot partition:
      - cmdline continues to be INTERNAL_KERNEL_CMDLINE
      - kernel base and pagesize continues to be included
  - If device does not have a vendor_boot partition:
    - For boot partition:
      - cmdline continues to be INTERNAL_KERNEL_CMDLINE
      - kernel base and pagesize continues to be included

Test: builds
Bug: 171512004

Change-Id: I4feac435698f43ac299b430bff66147057865a62
2020-10-28 17:05:18 -07:00
Baligh Uddin
865b6605ca Merge "Move {libbacktrace,libunwindstack} from system/core -> system/unwinding/" 2020-10-28 05:16:46 +00:00
Joseph Murphy
77c15cb2d4 Changes Robolectric test suite tag to its own value to enable filtering these in ATP.
Bug: b/157635117
Change-Id: I7748ccbef3dd44d1a4a79e9ded5182607c83a20b
2020-10-28 01:09:18 +00:00
Baligh Uddin
4dc00c60da Move {libbacktrace,libunwindstack} from system/core -> system/unwinding/
BUG: 170465278
Test: TH
Change-Id: I7f0d7b1254e7a28a55599aa4ee6bb6f2ac789b60
2020-10-27 19:44:34 +00:00
Gao Xiang
961041ac80 Allow flashing erofs system imgs
Bug: 158339527
Test: build & boot
Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
Change-Id: Ie74db8ebcd7214ffbec49d42b305b2f3ac2e8c9d
2020-10-28 01:24:39 +08:00
Anton Hansson
b979b79bd9 Merge "build: allow refreshmod with external out directory" 2020-10-27 17:01:31 +00:00
Treehugger Robot
76e225f9ad Merge "Let genrule have the entrance depend on signapk" 2020-10-27 16:30:55 +00:00
Felka Chang
b511e7f33a Let genrule have the entrance depend on signapk
Currently, it may be a good idea to let genrule module depend on
java_library_host by changing soong. To change signapk module type from
java_library_host to java_binary_host makes the genrule can depend on the
signapk module directly and generate the signapk.jar at the same time.

Test: for i in `seq 1 10` ; \
        do\
            make clean; \
            make -j64 apexer_test_host_tools; \
        done
Bug: 160632228
Bug: 157878202
Change-Id: I63ae661b9b419ddc6e69ccfc9a29fd28b116c0b5
Merged-In: I63ae661b9b419ddc6e69ccfc9a29fd28b116c0b5
(cherry picked from commit d8442b4c88)
2020-10-27 14:50:39 +00:00
Alessandro Astone
c8771bef56 build: allow refreshmod with external out directory
Get a relative path to out by using $(get_build_var PRODUCT_OUT)
instead of hardcoding it to out/target/product/$TARGET_DEVICE.
That will correctly return the path to the out directory
when setting an external OUT_DIR_COMMON_BASE.

Change-Id: I8a990b710222bc72755c6b6b88fd0c9e80711e14
2020-10-27 13:39:59 +01:00
Joanne Chung
2c892f8700 Merge "Revert "Refactor zipalign to allow unit tests"" 2020-10-27 04:32:43 +00:00
Treehugger Robot
89dccb3cf9 Merge "Cleanup references to system/core/liblog -> system/logging/liblog" 2020-10-27 03:33:37 +00:00
Joanne Chung
2736c6f046 Revert "Refactor zipalign to allow unit tests"
This reverts commit d4f71a97bd.

Reason for revert: Looks to have broken apsp master b/171754371

Change-Id: I17ec7ab20834f6b0dbdf49668c41d3e76c0c1e41
2020-10-27 03:22:02 +00:00
Treehugger Robot
d6bcec35ba Merge "Rename abazel() to bazel(), give a warning if clobbering an existing Bazel, and have it call tools/bazel (aka build/bazel/bazel.sh) to start Bazel." 2020-10-27 01:09:48 +00:00
Treehugger Robot
454e099c65 Merge "Refactor zipalign to allow unit tests" 2020-10-26 23:42:01 +00:00
Fabien Sanglard
d4f71a97bd Refactor zipalign to allow unit tests
Test: Self-tested
Bug: NA
Change-Id: If5e42735853e1508fbeb9fb420a9a9f129c2218f
2020-10-26 12:31:03 -07:00
Jaewoong Jung
3b27e9104b Merge "Remove duplicate quotation marks in apkcerts list." 2020-10-26 19:05:00 +00:00
Baligh Uddin
84280dfa4c Cleanup references to system/core/liblog -> system/logging/liblog
BUG: 170387172
Test: TH
Change-Id: I206a8c43ba914381771826518f369bad328cc257
2020-10-26 14:34:45 +00:00
Rupert Shuttleworth
5d60d02454 Rename abazel() to bazel(), give a warning if clobbering an existing Bazel, and have it call tools/bazel (aka build/bazel/bazel.sh) to start Bazel.
Test: Manually.
Change-Id: I5605571147db33c6b6a008cedbf279bb909ecdee
2020-10-26 09:21:55 +00:00
Baligh Uddin
fabc1f6757 Merge "Cleanup references to system/core/base -> system/libbase" 2020-10-24 01:40:48 +00:00
Yifan Hong
a7a900e256 Merge "Export BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT to Soong" 2020-10-24 01:08:16 +00:00
Treehugger Robot
13e76a3e8f Merge "Formatting and general cleanup of merge_target_files." 2020-10-23 21:04:20 +00:00
Jaewoong Jung
7b634d345d Remove duplicate quotation marks in apkcerts list.
Fixes: 160845661
Test: Modify dialer cert string && m apkcerts-list
Change-Id: I9da8dd70185057b2e13793dd14387223dc29b052
2020-10-23 14:02:16 -07:00
Dan Shi
e4d4188e4f Merge "Make *TS to include NOTICE file by default" 2020-10-23 16:09:35 +00:00
Baligh Uddin
71fab5c75a Cleanup references to system/core/base -> system/libbase
BUG: 157656545
Test: TH
Change-Id: I0dc00f5f90cfdf439e3dc5d63e5aff178b1e9206
2020-10-23 14:40:36 +00:00
Martin Stjernholm
48d34d8ac0 Merge "Rename ART release APEX to com.android.art." 2020-10-23 10:03:24 +00:00
Dan Shi
413a53066b Make *TS to include NOTICE file by default
Bug: 170487545
Test: none
Change-Id: Ib3f726b847bc2123f0b564d0c3a8f5584720c021
2020-10-22 21:29:37 -07:00
Daniel Norman
dbbf5a3912 Formatting and general cleanup of merge_target_files.
Also adds a new validation that IMAGES/<partition>.img must come from
the same build that provides <PARTITION>/*.

Bug: 171431774
Test: python3 -m unittest test_merge_target_files
Test: Use merge_target_files to merge a build.
Change-Id: Ia1f3f2e65a0ca90962216fb0c5cdd24c4c150cae
2020-10-22 16:37:13 -07:00
Dan Shi
0b8473591c Merge "Package host shared lib for art-host-tests" 2020-10-22 17:39:58 +00:00
Treehugger Robot
0b0d8d5b53 Merge "OTA: Support A/B devices custom images update." 2020-10-22 04:59:08 +00:00