Commit graph

74497 commits

Author SHA1 Message Date
David Anderson
3e8f9eaba3 Merge "libfiemap: Add a helper to verify image fiemaps." am: ed54a2f2be am: 2c2eaf77b4 am: eda7a3c207
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1942074

Change-Id: I9bba6fc3c40e50a2ddd6bb4881f750a8276f0057
2022-02-01 23:21:57 +00:00
David Anderson
eda7a3c207 Merge "libfiemap: Add a helper to verify image fiemaps." am: ed54a2f2be am: 2c2eaf77b4
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1942074

Change-Id: I5bc8f68a51f4cf41f1661ecc886366d131decb7a
2022-02-01 23:06:50 +00:00
David Anderson
2c2eaf77b4 Merge "libfiemap: Add a helper to verify image fiemaps." am: ed54a2f2be
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1942074

Change-Id: I069154ece4004e57655e43f03df087d231e2e70e
2022-02-01 22:56:10 +00:00
David Anderson
ed54a2f2be Merge "libfiemap: Add a helper to verify image fiemaps." 2022-02-01 22:43:46 +00:00
Jeffrey Vander Stoep
7126674c30 Merge "Revert "Use Apex sepolicy if it's available"" am: 2e7bc19fc2 am: 08b1da7276 am: 9f0a87fa07
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1966706

Change-Id: I67439211faeeb8089a4d41fc32b401345bb5ca15
2022-02-01 13:37:31 +00:00
Jeffrey Vander Stoep
9f0a87fa07 Merge "Revert "Use Apex sepolicy if it's available"" am: 2e7bc19fc2 am: 08b1da7276
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1966706

Change-Id: I1b94e5e77c9e949407b5f5dd16eb81c9123a7bab
2022-02-01 13:20:05 +00:00
Jeffrey Vander Stoep
08b1da7276 Merge "Revert "Use Apex sepolicy if it's available"" am: 2e7bc19fc2
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1966706

Change-Id: Icc1c415d6f4303447e8fb4f276eaa142e6b9ec49
2022-02-01 13:03:16 +00:00
Jeffrey Vander Stoep
2e7bc19fc2 Merge "Revert "Use Apex sepolicy if it's available"" 2022-02-01 12:42:11 +00:00
Jeffrey Vander Stoep
5638fcc22b Revert "Use Apex sepolicy if it's available"
Revert "Build precompiled_sepolicy.apex_sepolicy.sha256"

Revert submission 1965099-precompiled-apex-sepolicy

Reason for revert: Boot regression b/217252559
Reverted Changes:
I2dbe43e32:Use Apex sepolicy if it's available
Bug: 217252559

Change-Id: I1cca3a1ae833c21619de26b2610736170ec5463c
2022-02-01 11:21:38 +00:00
Treehugger Robot
1591045bc9 Merge "init: remove debug logging." am: d15b09f187 am: 43e805b862 am: 721f094823
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1964585

Change-Id: I094f9e12cdcffae691c9f6b71a7bae9c8160755d
2022-02-01 00:36:08 +00:00
Treehugger Robot
721f094823 Merge "init: remove debug logging." am: d15b09f187 am: 43e805b862
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1964585

Change-Id: I67abdeb7f4522935240fde5c6d0a5f75aac1feaa
2022-02-01 00:25:58 +00:00
Treehugger Robot
43e805b862 Merge "init: remove debug logging." am: d15b09f187
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1964585

Change-Id: I11e9e0177913e389c00ba74206b4addbd81e215a
2022-02-01 00:10:20 +00:00
Treehugger Robot
d15b09f187 Merge "init: remove debug logging." 2022-01-31 23:54:48 +00:00
Christopher Ferris
e758629132 Merge "Fix typo." am: e882aa841b am: b39aca9657 am: 877528dc08
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1966959

Change-Id: I9e3e9950b5675ffb985bb2983026fce8f20ad608
2022-01-31 23:36:14 +00:00
Ken Chen
87a5887151 Merge "[NETD-BPF#27] Require libnetd_updatable.so from APEX" am: d30232369d am: 51d80359c7 am: ccc2c6c8f2
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1850256

Change-Id: Ib6cfdd3e237552e89e866a38bce223430b246cfb
2022-01-31 23:36:02 +00:00
Christopher Ferris
877528dc08 Merge "Fix typo." am: e882aa841b am: b39aca9657
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1966959

Change-Id: I5986659cec7ca24a00c84ed3da28dd0defee7ebb
2022-01-31 23:26:03 +00:00
Ken Chen
ccc2c6c8f2 Merge "[NETD-BPF#27] Require libnetd_updatable.so from APEX" am: d30232369d am: 51d80359c7
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1850256

Change-Id: Ic20659df23e9ae2b021c0270c126c5f2f4da3664
2022-01-31 23:25:50 +00:00
Christopher Ferris
b39aca9657 Merge "Fix typo." am: e882aa841b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1966959

Change-Id: I377c71304202d4ae897c8a5470f993d26e6d6256
2022-01-31 23:09:14 +00:00
Ken Chen
51d80359c7 Merge "[NETD-BPF#27] Require libnetd_updatable.so from APEX" am: d30232369d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1850256

Change-Id: I6992267618e1348139734ff1af290cfb3b22c734
2022-01-31 23:09:00 +00:00
Christopher Ferris
e882aa841b Merge "Fix typo." 2022-01-31 23:05:41 +00:00
Ken Chen
d30232369d Merge "[NETD-BPF#27] Require libnetd_updatable.so from APEX" 2022-01-31 22:48:06 +00:00
Christopher Ferris
16a7bc2355 Fix typo.
Change use of new_ to old_ to save the old sigaction data. This hasn't
caused any issues, but it's obviously wrong.

Test: Ran unit tests on coral.
Change-Id: I96be5b0980c323c3aeafb422fbc06202577604a2
2022-01-31 13:08:54 -08:00
Elliott Hughes
0305cf0f19 init: remove debug logging.
I think this was left in by accident?

Test: treehugger
Change-Id: Ie954efe33f1f811f58c9df4934d50caf0f79e0ea
2022-01-31 13:03:29 -08:00
Treehugger Robot
b19913e3bd Merge "Use Apex sepolicy if it's available" am: 1412fee4a8 am: a7da55fde5 am: 8755e6ce44
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1964962

Change-Id: Ib7f85fdfa39ff76f21003df271d25b9f0e30fbab
2022-01-31 10:16:29 +00:00
Treehugger Robot
8755e6ce44 Merge "Use Apex sepolicy if it's available" am: 1412fee4a8 am: a7da55fde5
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1964962

Change-Id: Ic51c22b79ae4d0f88cda344a1f4eefe378c66a17
2022-01-31 09:59:10 +00:00
Treehugger Robot
a7da55fde5 Merge "Use Apex sepolicy if it's available" am: 1412fee4a8
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1964962

Change-Id: Ifb668058e38546e6af24183bdada3eeec4df794b
2022-01-31 09:29:39 +00:00
Treehugger Robot
1412fee4a8 Merge "Use Apex sepolicy if it's available" 2022-01-31 09:11:05 +00:00
Treehugger Robot
537eba9079 Merge "storageproxyd: Sync parent dir when creating a file" am: c89fed4b59 am: 48ad1a6c54 am: dbc39ea2e1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1921064

Change-Id: If5bd8d01c36adb363f7f5b2a528febe92148e414
2022-01-28 19:36:32 +00:00
Treehugger Robot
dbc39ea2e1 Merge "storageproxyd: Sync parent dir when creating a file" am: c89fed4b59 am: 48ad1a6c54
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1921064

Change-Id: I6e9823b9b5ea569316de3b17920f5570b4764868
2022-01-28 19:18:56 +00:00
Treehugger Robot
48ad1a6c54 Merge "storageproxyd: Sync parent dir when creating a file" am: c89fed4b59
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1921064

Change-Id: I8281704ea7d57b4de0d054422e915e2b9899af38
2022-01-28 19:01:14 +00:00
Treehugger Robot
c89fed4b59 Merge "storageproxyd: Sync parent dir when creating a file" 2022-01-28 18:48:51 +00:00
Jeff Vander Stoep
2e4b3ffa75 Use Apex sepolicy if it's available
[reland aosp/1910032]

Updatable sepolicy is shipped within an zip within an APEX. Because
it needs to be available before Apexes are mounted, apexd copies
the zip from the APEX and stores it in /metadata/sepolicy. If there is
not updatable sepolicy in /metadata/sepolicy, then updatable policy is
loaded from /system/etc/selinux/apex. Init performs the following
steps on boot:

1. Validates the zip by checking its signature against a public key
that is stored in /system/etc/selinux.
2. Extracts files from zip and stores them in /dev/selinux.
3. Checks if the apex_sepolicy.sha256 matches the sha256 of
precompiled_sepolicy. if so, the precompiled sepolicy is used.
Otherwise, an on-device compile of the policy is used. This is the
same flow as on-device compilation of policy for Treble.
4. Cleans up files in /dev/selinux which are no longer needed.
5. Restorecons the remaining files in /dev/selinux.
6. Sets selinux into enforcing mode and continues normal booting.

Bug: 199914227
Test: adb root
adb shell cp /apex/com.android.sepolicy.apex/etc/SEPolicy-33.zip \
/metadata/sepolicy/SEPolicy.zip
adb shell cp /apex/com.android.sepolicy.apex/etc/SEPolicy-33.zip.sig \
/metadata/sepolicy/SEPolicy.apk.sig
adb shell cp /apex/com.android.sepolicy.apex/etc/SEPolicy-33.zip.fsv_sig \
/metadata/sepolicy/SEPolicy.zip.fsv_sig
adb reboot
ls -laZ /dev/selinux/
Verify that files exist and that the labels are expected.

Change-Id: I2dbe43e329e91f46abedc7e44f7d24b220e19173
2022-01-28 13:47:24 +01:00
Treehugger Robot
3c6f10c664 Merge changes from topic "sparse-file-read-enum" am: f401dcdf5a am: 24d99d2d3a am: 7929d66996
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1935419

Change-Id: Iba9fa2e8f68c9e911b3be43ff3b504619c403fe5
2022-01-28 06:06:33 +00:00
Treehugger Robot
7929d66996 Merge changes from topic "sparse-file-read-enum" am: f401dcdf5a am: 24d99d2d3a
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1935419

Change-Id: I03db76f5996816305d944f3b69c0cdc63c8d8475
2022-01-28 05:56:12 +00:00
Treehugger Robot
24d99d2d3a Merge changes from topic "sparse-file-read-enum" am: f401dcdf5a
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1935419

Change-Id: Icbdc98f397254dc323e2ea298c209e032c122cb4
2022-01-28 05:43:11 +00:00
Treehugger Robot
f401dcdf5a Merge changes from topic "sparse-file-read-enum"
* changes:
  libsparse: Add "hole" mode to sparse_file_read
  libsparse: Split off most of sparse_file_read_normal into a helper function
2022-01-28 05:28:04 +00:00
Sean Anderson
f96466b055 libsparse: Add "hole" mode to sparse_file_read
This adds support for filesystem-level sparse files. These files have
holes which are not stored in the filesystem and when read are full of
zeros. While these zeros may be significant in some types of files,
other types of files may not care about the contents of holes. For
example, most filesystem creation tools write to all the blocks they
care about. Those blocks not written to will remain holes, and can be
safely represented by "don't care" chunks. Using "don't care" chunks
instead of fill chunks can result in a substantial reduction of the time
it takes to program a sparse image.

To accomplish this, we extend the existing "sparse" boolean parameter to
be an enum of mode types. This enum represents the strategy we take when
reading in a file. For the most part the implementation is
straightforward. We use lseek to determine where the holes in the file
are, and then use do_sparse_file_read_normal to create chunks for the
data section. Note that every file has an implicit hole at its end.

Change-Id: I0cfbf08886fca9a91cb753ec8734c84fcbe52c9f
2022-01-27 14:49:46 -05:00
Jeffrey Vander Stoep
fc8d4314d2 Merge "Revert "Use Apex sepolicy if it's available"" am: acd4121dbc am: f6b1066341 am: c0db88c919
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1963387

Change-Id: I345b18943029678adbd48d06e394bb0a1c5e550d
2022-01-27 18:51:34 +00:00
Jeffrey Vander Stoep
c0db88c919 Merge "Revert "Use Apex sepolicy if it's available"" am: acd4121dbc am: f6b1066341
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1963387

Change-Id: I51b2edd3d44d7342ee671fc211824fcd5dfc793e
2022-01-27 18:40:37 +00:00
Jeffrey Vander Stoep
f6b1066341 Merge "Revert "Use Apex sepolicy if it's available"" am: acd4121dbc
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1963387

Change-Id: I0bf3a860b0a87b283f94439a641249df8aad73ef
2022-01-27 18:22:15 +00:00
Jeffrey Vander Stoep
acd4121dbc Merge "Revert "Use Apex sepolicy if it's available"" 2022-01-27 18:04:28 +00:00
Jeffrey Vander Stoep
9759e248d1 Revert "Use Apex sepolicy if it's available"
This reverts commit 97ff3ab852.

Reason for revert: b/216491364 boot time regression

Bug: 216491364
Change-Id: I6c9af0887affa130cc61edf70506e79453dbd228
2022-01-27 17:49:40 +00:00
Treehugger Robot
03ecd75a87 Merge "charger: support screen rotation" am: e72c5c76db am: 07f1804075 am: 88be969602
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1867821

Change-Id: If330fcb43a234c83710a29644b5b7b3a21e6e13c
2022-01-27 12:13:32 +00:00
Treehugger Robot
88be969602 Merge "charger: support screen rotation" am: e72c5c76db am: 07f1804075
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1867821

Change-Id: I8147d1a1cc222c9495151583b62563cdcf8e30f6
2022-01-27 12:04:00 +00:00
Treehugger Robot
07f1804075 Merge "charger: support screen rotation" am: e72c5c76db
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1867821

Change-Id: I203db3e21f78d7ddda93756d105c472fbfcc02a6
2022-01-27 11:47:36 +00:00
Treehugger Robot
e72c5c76db Merge "charger: support screen rotation" 2022-01-27 11:24:55 +00:00
Jack Wu
56540a0509 charger: support screen rotation
Bug: 191831427
Test: charging animation can show in display correctly
Signed-off-by: Jack Wu <wjack@google.com>
Change-Id: Iedcd7d6c3cd841c44bdf1116701abcbd12a26959
2022-01-27 13:27:59 +08:00
Elliott Hughes
4ce86bfb11 Merge "libusbhost: factor out frameworks descriptors -> byte[] code." am: e3eada5200 am: d4022bc73c am: 93265a29a6
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1954696

Change-Id: I757e4f59279794ef3b9569795e7c6397c13241c3
2022-01-26 20:16:09 +00:00
Elliott Hughes
93265a29a6 Merge "libusbhost: factor out frameworks descriptors -> byte[] code." am: e3eada5200 am: d4022bc73c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1954696

Change-Id: I6b38ce80b6cb8a8cd653f0edbf68f6ef7603f6ac
2022-01-26 19:37:30 +00:00
Elliott Hughes
d4022bc73c Merge "libusbhost: factor out frameworks descriptors -> byte[] code." am: e3eada5200
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1954696

Change-Id: I57da1749d73088c92419c3e6508564d7df59be12
2022-01-26 19:26:58 +00:00