Commit graph

72791 commits

Author SHA1 Message Date
Yifan Hong
e3ffd1bfc2 charger: make libhealthd_charger_ui vendor_available.
This is a prerequisite to move charger to vendor partition.

Because vendor domains can't read ro.charger.*, they are all assumed
to be the default value. They aren't set in the ecosystem anyway,
so it is time to deprecate them.

Test: builds
Bug: 203246116
Change-Id: I0b17e62ab3ac5a89df091333fd9f24e33bdfd49a
2021-11-02 13:52:40 -07:00
Yifan Hong
b200c60221 libsuspend: vendor_available.
This is needed by charger in vendor.

Test: builds
Bug: 203246116
Change-Id: I55c5cace9dcd7b2fd475d61234bd469428b4caac
2021-11-02 13:52:40 -07:00
Yifan Hong
9cef8ea99a Merge changes from topic "charger-aidl"
* changes:
  charger: Add API to replace ro.charger.enable_suspend
  charger: separate UI and HAL access.
2021-11-02 17:58:30 +00:00
Shaju Mathew
cab12f8ae2 Merge "Addressing error-code propagation for remount service." 2021-11-02 02:11:57 +00:00
Shaju Mathew
7e5451a6ab Addressing error-code propagation for remount service.
Bug: 201596822

Test: Local test (isolated to host)

$ adb -s 8BDAY00CM6 root
adbd is already running as root
$ adb -s 8BDAY00CM6 remount
Disabling verity for /system
Using overlayfs for /system
Disabling verity for /system_ext
Using overlayfs for /system_ext
Disabling verity for /vendor
Using overlayfs for /vendor
Disabling verity for /product
Using overlayfs for /product
remount succeeded.. now reboot device for settings refresh
$ echo $?
0
$ adb -s 8BDAY00CM6 unroot
restarting adbd as non root
$ adb -s 8BDAY00CM6 remount
Not running as root. Try "adb root" first.
remount failed
$ echo $?
3

Signed-off-by: Shaju Mathew <shaju@google.com>
Change-Id: I8e6d0735d2da0ed58cae867db2e4736abb86d351
2021-11-01 18:05:45 -07:00
David Anderson
51f36da47a Merge "libfiemap: Only call FS_IOC_FIEMAP once." 2021-11-01 22:55:45 +00:00
David Anderson
de2ec0b427 libfiemap: Only call FS_IOC_FIEMAP once.
The kernel can return different compatible ranges on each call, depending on
how it decides to merge contiguous extents in the results. To avoid the
complexity of requerying the ioctl, just do one query up to the maximum
allowed extent size.

Bug: 204536075
Test: install DSU on cuttlefish
      fiemap_test
Change-Id: I4d569e3e6feed14c91a5f500296623888060dcad
2021-11-01 13:44:56 -07:00
Yifan Hong
8e55134f43 charger: Add API to replace ro.charger.enable_suspend
The system property is set by vendor partition but owned by platform,
hence vendor domains can't read this value. Add an API in
ChargerConfigurationInterface so that HAL implementations can override
its value.

Other ro.charger.* sysprops are unused, hence no APIs are created for
them.

Test: manual
Bug: 203246116

Change-Id: I583c21e58ed3d912b156e253d6a4b46a0378f11e
2021-11-01 12:38:56 -07:00
Yifan Hong
b5d7033dcc charger: separate UI and HAL access.
Abstract all the HIDL-ness from charger so an AIDL HAL
can later replace the HIDL HAL.

Created libhealthd_charger_ui that is responsible for
UI stuff in charger. Then libhealthd_charger is now the
charger library backed by HIDL HAL.

Bug: 170338625
Bug: 203246116

Test: charger_test

Change-Id: I193bb76afa18b3367f24796ac53b1760650e8683
2021-11-01 12:38:56 -07:00
David Drysdale
a86af7c9b1 Merge "KeyMint: don't mix Binder and std shared pointers" 2021-11-01 06:35:12 +00:00
Maciej Żenczykowski
04a1bf7c0b Merge "Fix 32-bit userspace on 64-bit kernel quota2 compatibility." 2021-10-30 20:04:29 +00:00
Christopher Ferris
e88e9922d5 Merge "Update for libunwindstack shared_ptr MapInfos." 2021-10-30 01:13:53 +00:00
Colin Cross
143ba0d31c Merge "Use HOST_OUT_EXECUTABLES instead of SOONG_HOST_OUT_EXECUTABLES" 2021-10-29 22:35:55 +00:00
Tianjie Xu
f1c8904e95 Merge "Fix unittest that checks build id" 2021-10-29 22:15:35 +00:00
Tianjie
c8cf2a4155 Fix unittest that checks build id
Should check ro.build.id instead of the ro.boot.build.id. The former
is a component of the build fingerprint.

Bug: 204507710
Test: run CtsInitTestCases
Change-Id: Iee13b30b195685c2461255f946685a288f352e06
2021-10-28 21:51:43 -07:00
Christopher Ferris
c67760611c Update for libunwindstack shared_ptr MapInfos.
Bug: 120606663

Test: Unit tests pass.
Change-Id: Ieae157388e8571345ed8968a2b5c2aa34464689f
Merged-In: Ieae157388e8571345ed8968a2b5c2aa34464689f
(cherry picked from commit 853733b627)
2021-10-28 15:05:39 -07:00
David Drysdale
fcf3fc08e4 KeyMint: don't mix Binder and std shared pointers
Bug: 203871378
Test: VtsAidlKeyMintTargetTest, TreeHugger
Change-Id: I8671342939af2bbdef643be9ce81b0bb9e7ae1a9
2021-10-28 15:39:34 +01:00
Yi-Yo Chiang
6a58c59269 Merge "Fix ubsan error path found by libfstab_fuzzer" 2021-10-27 12:08:12 +00:00
Yi-Yo Chiang
fb62a719a2 Fix ubsan error path found by libfstab_fuzzer
Fix: 204255714
Bug: 204056804
Test: Rerun the fuzzer
Change-Id: Ief4cd12c414033fc0a0c2891433a16c35c7a6e79
2021-10-27 12:06:41 +00:00
Treehugger Robot
af97deddb1 Merge "Sets 'verity_update_state' in init.rc" 2021-10-27 07:23:47 +00:00
Yi-Yo Chiang
a68b83fd60 Merge "libfstab_fuzzer: Add dictionary to guide the fuzzer" 2021-10-26 20:34:47 +00:00
Treehugger Robot
8d4993316b Merge "Add a bug component for test vts_libsnapshot_test." 2021-10-26 19:15:21 +00:00
Suren Baghdasaryan
43293deffe Merge "libprocessgroup: Prevent error spam when tests disable all cpus in a cpuset" 2021-10-26 16:23:24 +00:00
Yi-Yo Chiang
ed72e37c4a libfstab_fuzzer: Add dictionary to guide the fuzzer
This is probably an overkill, but still, add a collection of
interesting keywords that may appear in a fstab file.

Also add myself to the "CC" list of this fuzz target.

BYPASS_INCLUSIVE_LANGUAGE_REASON="slave" or MS_SLAVE is a mount flag

Bug: 204056804
Test: adb shell /data/fuzz/x86_64/libfstab_fuzzer/libfstab_fuzzer \
  -dict=/data/fuzz/x86_64/libfstab_fuzzer/fstab.dict
Change-Id: Ife55837212a711dcbeed4f00d97da0cb022c7156
2021-10-26 23:03:33 +08:00
Treehugger Robot
6aa256fdf6 Merge "Add libfstab_fuzzer that fuzzes ReadFstabFile()" 2021-10-26 07:50:24 +00:00
Yi-Yo Chiang
b398a0bc73 Add libfstab_fuzzer that fuzzes ReadFstabFile()
Just a modest initial implementation. Uses the fuzz data as the fstab
file content directly.

Bug: 204056804
Test: lunch aosp_cf_x86_64_phone-userdebug
  SANITIZE_TARGET=address m libfstab_fuzzer
  adb sync data
  adb shell /data/fuzz/x86_64/libfstab_fuzzer/libfstab_fuzzer
Change-Id: I7976a6ee124e9b5da59cfa7f4bae9699be3f1474
2021-10-26 14:22:36 +08:00
Colin Cross
8a87bdf80d Use HOST_OUT_EXECUTABLES instead of SOONG_HOST_OUT_EXECUTABLES
Soong is installing binaries directly to HOST_OUT_EXECUTABLES instead
of SOONG_HOST_OUT_EXECUTABLES, dist from the HOST_OUT_EXECUTABLES
location.

Bug: 204136549
Test: m checkbuild
Change-Id: Iee7ae8d1ed478aa2a0344fc9f54ad2c146841cb0
2021-10-25 22:41:07 -07:00
Wei Wang
3ef7c2373a Merge "init.rc: Create a new group for dex2oat" 2021-10-26 00:33:50 +00:00
Maciej Żenczykowski
28b94af1b2 Fix 32-bit userspace on 64-bit kernel quota2 compatibility.
Test: TreeHugger, manual testing of nearly identical code snippets.
Bug: 195716186
Bug: 203385942
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I42773c2b553a08919583b7932e757564b352c507
2021-10-25 16:24:49 -07:00
Suren Baghdasaryan
ec88556460 libprocessgroup: Prevent error spam when tests disable all cpus in a cpuset
UserLifecycleTests test disables all Little cores in the course of the
test, which causes attempts to add a process into /dev/cpuset/restricted
cpuset cgroup to fail with ENOSPC error code, indicating that a process
is joining a cpuset cgroup with no online cpus. Current libprocessgroup
implementation will log an error on each such occurrence, which spams
the logs and makes it hard to analyze test results. Because this
situation does not happen in production environment (we do not offline
cpus), we can prevent flooding the logs by identifying this case,
logging an appropriate error one time and ignore all later similar errors.

Bug: 158766131
Test: adb shell "echo 0 > /sys/devices/system/cpu/cpu[0-3]/online"
Test: start some apps, observe libprocessgroup errors in the logcat
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ia91d8839d86787569c255481bde077be51c43d93
2021-10-25 16:18:08 -07:00
Rick Yiu
014446d702 init.rc: Create a new group for dex2oat
Create a new group for dex2oat in cpu cgroup, which is dedicated for
dex2oat processes. Also modify task profiles for this change.

Bug: 201223712
Test: dex2oat group created
Change-Id: Ic61f4b8a64d01c03549b680970805e12b9ce4fcc
2021-10-22 22:20:07 +08:00
Bowgo Tsai
5998c74d7a Sets 'verity_update_state' in init.rc
This is required since Android 12, because
CtsNativeVerifiedBootTestCases will read property
"partition.${partition}.verified.hash_alg" to
check that sha1 is not used.

Also see https://r.android.com/1546980 for more details.

Bug: 175236047
Bug: 203720638
Test: build and boot a device
Change-Id: I300265f4af9c2781d40537f391bda9eaf62c27ba
2021-10-21 21:38:22 +08:00
Treehugger Robot
c39d42ddde Merge "Added fastboot_fuzzer" 2021-10-21 01:22:51 +00:00
Marco Nelissen
3bcaa4ebbb Merge "Fix 32-bit build" 2021-10-20 17:20:38 +00:00
Marco Nelissen
3e923cd527 Fix 32-bit build
Bug: None
Test: build
Change-Id: Id1a9c2bd4526750eca9b85896d0e90eed58b8f51
2021-10-20 10:11:52 -07:00
Marco Nelissen
1e7a8bd4fa Merge "Log if keymaster IPC takes too long" 2021-10-20 16:35:50 +00:00
Marco Nelissen
08fec49a3b Log if keymaster IPC takes too long
Bug: None
Test: run with very low timeout and verify it logs
Change-Id: I2818683f65c2191518373609c6171c056de55a9a
2021-10-20 07:51:05 -07:00
Treehugger Robot
5c8f756a50 Merge "Add a aid/uid for Thread subsystem" 2021-10-19 03:49:30 +00:00
zhanglongxia
1aac0c01a6 Add a aid/uid for Thread subsystem
Bug: b/202786090
Test: Compiles
Change-Id: I168cf2630c9591df161d0e5df71be0f93bf7ce9a
2021-10-19 09:22:06 +08:00
Yiming Pan
ac84a8ded6 Add a bug component for test vts_libsnapshot_test.
Test: Tree Hugger
Bug: 143903671
Change-Id: Ifaa406f6c7a94c4eb615ddc146119c12359ad198
2021-10-18 16:30:57 -07:00
Treehugger Robot
d08b1f7787 Merge "Fix the vendor api level" 2021-10-14 05:13:04 +00:00
Justin Yun
4446a85dc5 Fix the vendor api level
ro.vendor.api_level must be the minimum of ro.product.first_api_level
and ro.board.(first_)api_level.

Bug: 202919753
Test: getprop ro.vendor.api_level
Change-Id: Ie70dd64b21c01ed8cd5e43b01095e1e0d8ff4444
2021-10-14 12:16:27 +09:00
Ayushi Khopkar
ce5c033e2b Added fastboot_fuzzer
Test: ./fastboot_fuzzer
Bug: 189053436

Change-Id: Idf9be2f86238eb2c7090402adc54bbb9c0b43582
2021-10-14 00:32:38 +00:00
Treehugger Robot
74646e8774 Merge "Versioning for apex init.rc files" 2021-10-12 19:19:05 +00:00
Thurston Dang
d2ddb2a2f5 Merge "storageproxyd: discard writes when checkpointing, if necessary" 2021-10-12 05:29:40 +00:00
Thurston Dang
7e8dab775b storageproxyd: discard writes when checkpointing, if necessary
If a checkpointing operation is in progress, discard any write operations
that are flagged as STORAGE_MSG_FLAG_PRE_COMMIT_CHECKPOINT. In tandem
with trusty-side changes that set the flag appropriately, this avoids
the awkward case where the checkpoint is rolled back, which potentially
leads to inconsistency between the data and the superblock.

Based on Stephen's CL/1845477 "Add helper to check checkpoint state of
mounts".

Test: m storageproxyd
Bug: 194313068
Change-Id: Ib6a432db1bc1b034f803b743b0d7322e3f31d814
2021-10-12 03:47:24 +00:00
Ray Essick
35ffd69db5 Versioning for apex init.rc files
Support an "init.#rc" versioning scheme for apex init files.
chooses highest # <= current system sdk.
".rc" (aka the old init.rc) is treated as sdk 0
Document these semantics in README.md

Bug: 198186200
Test: booting, lots of logcat output
Change-Id: I2d0405be73dae9bafa6f22535b29ed6b053ddbc4
2021-10-11 19:02:47 -07:00
Jim Blackler
6fd74f0a1c Merge "Revert "Delete KM1"" 2021-10-11 14:04:30 +00:00
Jim Blackler
fc6e3d3de9 Revert "Delete KM1"
Revert "Delete KM1"

Revert "Delete KM1"

Revert "Delete KM1"

Revert "Delete KM1"

Revert "Delete KM1"

Revert submission 1844016-delkm1

Reason for revert: b/202675261
Reverted Changes:
Iba996962b:Delete KM1
Ia4c5359cd:Delete KM1
Iee6ec9816:Delete KM1
I6058e4d86:Delete KM1
I8abb9c570:Delete KM1
I9c4dc5c9e:Delete KM1

Change-Id: Ic347b5f9d5e9c372f0ddb05feeeb05abe43d5873
2021-10-11 13:38:59 +00:00
Shawn Willden
132f2341f9 Merge "Delete KM1" 2021-10-09 00:46:52 +00:00