Commit graph

73528 commits

Author SHA1 Message Date
Devin Moore
dd1eb8733d fastboot: Support flashing init_boot.img into init_boot partition
init_boot_a and init_boot_b partitions are used in A/B devices.

Bug: 203698939
Test: m

Change-Id: If00f581ab7ae340d78d7d55eebafd92ac15d2bc1
2022-01-06 22:32:28 +00:00
Hridya Valsaraju
b910961c16 Merge "libsync: remove hridya@ from OWNERS file" 2022-01-06 18:49:55 +00:00
David Anderson
dd620ccf24 libsnapshot: Fix CHECK failure during second phase merge
This CHECK prevents a release build from resuming a two-phase merge if
the merge initially failed in the first pass.

Bug: 213031779
Test: vts_libsnapshot_test
Test: update_engine_unittests
Change-Id: I8bf00e3016546ef7039bb0b18eb977cc3dc1066a
2022-01-06 04:32:39 +00:00
Josh Yang
30981724d0 Merge "Create /data/bootanim folder in init.rc." 2022-01-06 03:17:58 +00:00
Hridya Valsaraju
555f96580a healthd: remove hridya@ from OWNERS file
Test: N/A
Bug: N/A
Change-Id: I4a8d87a7c6d9ca288afefbd5c8c9b97d6848af3f
2022-01-05 16:59:20 -08:00
Hridya Valsaraju
9e6842258a libsync: remove hridya@ from OWNERS file
Test: N/A
Bug: N/A
Change-Id: I3f816efad4520507cacc635457d363d65bc7942e
2022-01-05 16:59:03 -08:00
Keith Mok
e3f4b84468 Merge changes I75017420,I3612e131
* changes:
  Fix userspace fastboot with fuzzy test
  Fix fuzzy test on too large command
2022-01-05 23:50:12 +00:00
Keith Mok
ba31ce8655 Merge "Fix typo in fuzzy_fastboot README" 2022-01-05 18:43:16 +00:00
Rafay Kamran
416cda9bc7 Merge changes from topic "revert-1935201-OUHHJQVSHH"
* changes:
  Revert "libsnapshot: Fix checks for compression to work with new..."
  Revert "libsnapshot: Fix libsnapshot_fuzzer_test."
2022-01-05 15:38:53 +00:00
Rafay Kamran
146f07e07b Revert "libsnapshot: Fix checks for compression to work with new..."
Revert submission 1935201

Reason for revert: DroidMonitor: Potential culprit for Bug http://b/213259099 - verifying through Forrest before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Reverted Changes:
I219f956ba:libsnapshot: Fix libsnapshot_fuzzer_test.
I281937e26:libsnapshot: Fix checks for compression to work wi...

Change-Id: I88955a533ce7103111509785ed5bb40e1779b130
2022-01-05 14:55:37 +00:00
Rafay Kamran
f140d4d584 Revert "libsnapshot: Fix libsnapshot_fuzzer_test."
Revert submission 1935201

Reason for revert: DroidMonitor: Potential culprit for Bug http://b/213259099 - verifying through Forrest before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Reverted Changes:
I219f956ba:libsnapshot: Fix libsnapshot_fuzzer_test.
I281937e26:libsnapshot: Fix checks for compression to work wi...

Change-Id: I33731556761cbdf603424fda94117973d3f21e21
2022-01-05 14:55:29 +00:00
Yi Kong
fe9b4ed7b8 Merge "Enable afdo for libutils" 2022-01-05 06:00:25 +00:00
David Anderson
58e554e7ed Merge "Remove support for AVB 1.0." 2022-01-05 03:57:20 +00:00
David Anderson
a216080a63 Merge changes I219f956b,I281937e2
* changes:
  libsnapshot: Fix libsnapshot_fuzzer_test.
  libsnapshot: Fix checks for compression to work with new snapuserd.
2022-01-05 00:02:06 +00:00
Keith Mok
3724bbcbe9 Fix userspace fastboot with fuzzy test
Add more checking for fastboot to detect malformed
requests.
Such as checking no control characters in the command
send from host.
Make sure the download command length is eight bytes.
And report FAIL if download length is zero.

Test: adb reboot fastboot
      fuzzy_fastboot --gtest_filter=Fuzz.DownloadInvalid1
      fuzzy_fastboot --gtest_filter=Fuzz.DownloadInvalid2
      fuzzy_fastboot --gtest_filter=Fuzz.DownloadInvalid7
      fuzzy_fastboot --gtest_filter=Fuzz.DownloadInvalid8
Bug: 212628476
Change-Id: I750174205377395b5328923fb00462d078f3310d
2022-01-04 19:24:23 +00:00
Keith Mok
921ad28a30 Fix fuzzy test on too large command
Device might return I/O error instead of FAIL message
if command send to device is too large.
Since maximum command size in fastboto protocol is 64 bytes.
The device might only try to read 64 bytes for the bulk transfer,
sending data more than that might result in USB I/O error.

Do proper handler for that in fuzzy_fastboot and reset the USB
if I/O error encounter during the Comman.dTooLarge test

Test: adb reboot fastboot
      fuzzy_fastboot --gtest_filter=Fuzz.CommandTooLarge
      fuzzy_fastboot --gtest_filter=Fuzz.BadCommandTooLarge
Bug: 212628476
Change-Id: I3612e131de02435ee3ed7d18f2b2d20b50ae6c3f
2022-01-04 19:24:05 +00:00
Treehugger Robot
5785297922 Merge "fastboot: Add system_dlkm flashing support" 2022-01-04 00:28:41 +00:00
Sean Anderson
95657f3e59 libsparse: Split off most of sparse_file_read_normal into a helper function
This carves out the core of sparse_file_read_normal and splits it off so
it can be reused in the next patch. No functional change intended.

Change-Id: Id00491fd7e5bb6fa28c517a0bb32b8b506539d4d
2021-12-30 15:50:20 -05:00
Keith Mok
66f6e63731 Fix typo in fuzzy_fastboot README
The fuzzy_fastboot does not output error
with invalid command line argument.

Fix typo in README for running with gtest_filter

Bug: 212628476
Test: N/A
Change-Id: I4a67a84807b59db50f063f1b9cf60dc964c1df20
2021-12-30 20:33:05 +00:00
David Anderson
34b726ddbe libsnapshot: Fix libsnapshot_fuzzer_test.
Rather than fix this up to work in all configurations, just
force-disable snapuserd testing for these tests.

This patch also adds a "UseUserspaceSnapshots" helper to IDeviceInfo so
we can simplify some checks in snapshot.cpp.

Bug: 208944665
Test: libsnapshot_fuzzer_test
Change-Id: I219f956ba09b090158d5ac757ef1f1d137d512e0
2021-12-29 22:17:26 -08:00
David Anderson
1637899632 libsnapshot: Fix checks for compression to work with new snapuserd.
Most checks for compression are used as a gate to decide whether dm-user
is enabled. However, dm-user can now be enabled without compression, so
these checks have to be audited and adjusted.

Once the "old" compression path is removed, these checks will become
simpler.

Bug: 208944665
Test: vts_libsnapshot_test -force_config vab
Change-Id: I281937e26427044f1ef2e1164d86d67e4170163a
2021-12-29 22:17:25 -08:00
Ramji Jiyani
b3ddb534c3 fastboot: Add system_dlkm flashing support
Bug: 200082547
Test: TreeHugger
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Change-Id: I35e081bbe8674c102324d22d440dcc38493ec25b
2021-12-29 21:00:25 +00:00
Josh Yang
ef76c8103d Create /data/bootanim folder in init.rc.
This folder is used to host bootanim data files.

Bug: 210757252
Test: /data/bootanim is correctly created.
Change-Id: I5019a92df4526865d53797bfd93cd68c3e6d2886
2021-12-23 14:55:40 -08:00
Yi Kong
6ee028f165 Enable afdo for libutils
Enable PGO (profile guided optimisation) for better performance.

Test: presubmit
Bug: 195134194
Change-Id: If9abecd830573946fc52b28afd7599800367aa09
2021-12-23 15:57:40 +08:00
Maciej Żenczykowski
fcf3fefe0b Merge "Move libipchecksum to frameworks/libs/net." 2021-12-17 06:34:42 +00:00
Treehugger Robot
e0461422e1 Merge changes Id0fe51d0,Ie3b3907b
* changes:
  Support building diagnose_usb against musl
  Support building fs_mgr against musl
2021-12-17 01:08:29 +00:00
Jiyong Park
f5caf5b2e1 Merge "android::base::ResultError/Error are template classes" 2021-12-16 23:54:16 +00:00
Jonglin Lee
8aa3bf90c9 Merge changes from topic "revert-1926977-NUIGVFOGKB"
* changes:
  Revert "libsnapshot: Fix checks for compression to work with new..."
  Revert "libsnapshot: Fix libsnapshot_fuzzer_test."
2021-12-16 22:37:25 +00:00
Colin Cross
9f0e6493e5 Support building diagnose_usb against musl
Support building diagnose_usb against musl by reimplementing
group_member, which doesn't exist in musl and isn't used anywhere
else in the tree.

Bug: 190084016
Test: m USE_HOST_MUSL=true host-native
Change-Id: Id0fe51d0bd8677561d0bbdb72d3b1a956127a11c
2021-12-16 14:04:06 -08:00
Jonglin Lee
21feb62ea0 Revert "libsnapshot: Fix checks for compression to work with new..."
Revert submission 1926977

Reason for revert: suspect cause of b/211025818
Reverted Changes:
I215635645:libsnapshot: Fix libsnapshot_fuzzer_test.
I2afd64446:libsnapshot: Fix checks for compression to work wi...

Bug: 211025818
Change-Id: I16741798f6e7409ee98a2cb58d070938811e1697
2021-12-16 21:36:56 +00:00
Jonglin Lee
ca00555865 Revert "libsnapshot: Fix libsnapshot_fuzzer_test."
Revert submission 1926977

Reason for revert: suspect cause of b/211025818
Reverted Changes:
I215635645:libsnapshot: Fix libsnapshot_fuzzer_test.
I2afd64446:libsnapshot: Fix checks for compression to work wi...

Bug: 211025818
Change-Id: Ic8b4b20812b13964a061c93a0193ef93b572a045
2021-12-16 21:36:56 +00:00
Colin Cross
5186681f58 Support building fs_mgr against musl
Support building fs_mgr against musl by including the missing
sys/types.h header.

Bug: 190084016
Test: m USE_HOST_MUSL=true host-native
Change-Id: Ie3b3907b1c60ba550c04e8780f11b7adf09a6471
2021-12-16 12:49:33 -08:00
Wei Wang
a5247158fb Merge "libprocessgroup: fall back to cpuset in get_sched_policy" 2021-12-16 19:38:54 +00:00
Lorenzo Colitti
ee1e35c1df Move libipchecksum to frameworks/libs/net.
Test: m
Change-Id: I7dfaef630a3415c30025e572a8981fadd44ee5e3
2021-12-16 19:38:01 +00:00
David Anderson
f3b02fc2db Merge changes I21563564,I2afd6444
* changes:
  libsnapshot: Fix libsnapshot_fuzzer_test.
  libsnapshot: Fix checks for compression to work with new snapuserd.
2021-12-16 18:35:46 +00:00
David Drysdale
f7eed000de Merge "Report Trusty KeyMint as KmVersion::KEYMINT_2" 2021-12-16 09:37:15 +00:00
David Anderson
00c0cb8020 libsnapshot: Fix libsnapshot_fuzzer_test.
Rather than fix this up to work in all configurations, just
force-disable snapuserd testing for these tests.

This patch also adds a "UseUserspaceSnapshots" helper to IDeviceInfo so
we can simplify some checks in snapshot.cpp.

Bug: 208944665
Test: libsnapshot_fuzzer_test
Change-Id: I215635645d49ad21e80af7fe084e25669c64110c
2021-12-15 22:09:05 -08:00
David Anderson
5c1d54e092 libsnapshot: Fix checks for compression to work with new snapuserd.
Most checks for compression are used as a gate to decide whether dm-user
is enabled. However, dm-user can now be enabled without compression, so
these checks have to be audited and adjusted.

Once the "old" compression path is removed, these checks will become
simpler.

Bug: 208944665
Test: vts_libsnapshot_test -force_config vab
Change-Id: I2afd644464935c965d1b84205ef54ca605d32d78
2021-12-15 22:09:05 -08:00
Ramji Jiyani
856817afe0 Merge "Create /system_dlkm mount point for GKI modules." 2021-12-16 02:41:24 +00:00
Treehugger Robot
e71fdca896 Merge "Diced: Added AID for Android's dice daemon diced." 2021-12-16 01:47:23 +00:00
Treehugger Robot
f54ebc7650 Merge "Add instant trace methods" 2021-12-15 18:11:52 +00:00
Treehugger Robot
9e0a218c74 Merge "Fix missing comma" 2021-12-15 16:43:51 +00:00
David Drysdale
37514bb907 Report Trusty KeyMint as KmVersion::KEYMINT_2
Bug: 194358913
Test: TreeHugger, VtsAidlKeyMintTargetTest
Change-Id: Ic5e321c739a66a384907539a339511e5418e9c6a
2021-12-15 12:02:06 +00:00
Yi Kong
b4b20ae65d Fix missing comma
This is discovered by Clang's -Wstring-concatenation diagnostic.

Test: presubmit
Bug: 175068488
Change-Id: Ied97b32e6707236621387bb06993d52a662d9d83
2021-12-15 17:23:46 +08:00
Lucas Dupin
2c2c5d998e Add instant trace methods
Bug: 207049735
Test: atest TraceDevTest
Change-Id: If2826a9bb1fb99d75ff3c9c03c16c2f5f1ec5d1b
2021-12-15 02:44:36 +00:00
David Anderson
c594ada00b Merge changes I875067c9,I0bb0fdc9
* changes:
  libsnapshot: Fix artifact cleanup.
  libsnapshot: Unify vts_libsnapshot_test harness.
2021-12-14 23:41:08 +00:00
Stephen Crane
7c5658b5fd storageproxyd: Use alternate data path if in DSU state
Adds a check for a DSU mode boot in storageproxyd. Changes path handling
so that storageproxyd will not allow opening a file in the root data
path in DSU mode. Instead, storageproxyd creates an "alternate/"
directory in the data directory and the TA must use this directory to
store its backing file.

Test: Boot into DSU and inspect logs for "Cannot open root data file"
Test: Test that TD writes in DSU mode don't corrupt host image storage
when using a compatible storage TA that supports alternate data mode.

Bug: 203719297
Change-Id: Iad68872dc6915f64eaf26cd3c92c04d9071ef169
2021-12-14 15:24:40 -08:00
Kalesh Singh
66b7ee851d Merge "Add group ID for reading tracefs" 2021-12-14 19:37:02 +00:00
Treehugger Robot
1d3b45e4fa Merge "canned fs_config accepts multiple lines having the same path" 2021-12-14 19:00:28 +00:00
Wei Wang
77ad7c798a libprocessgroup: fall back to cpuset in get_sched_policy
Since vendor has a way to override the group cpu/schedtune setup, we
cannot assume the group will always return valid data. This CL let
get_sched_policy to fallback to cpuset if no valid data found in
cpu/schedtune cgroup. In longer term, we should find a way to cache the
group or app's process state in framework other than relying on reading
cgroup back.

Test: /data/nativetest64/libcutils_test/libcutils_test
Bug: 210066228
Signed-off-by: Wei Wang <wvw@google.com>
Merged-In: I8b4396365a7fc2d93e3a22746195585c140eef3c
Change-Id: I8b4396365a7fc2d93e3a22746195585c140eef3c
(cherry picked from commit c8c0b5415c14af56277f5e543ebff5fbba7fb7b2)
2021-12-14 10:56:34 -08:00