Commit graph

73615 commits

Author SHA1 Message Date
Treehugger Robot
28f4f37161 Merge "Update shell_and_utilities docs for T." 2022-03-05 21:29:52 +00:00
Elliott Hughes
fe3af716e4 Update shell_and_utilities docs for T.
Change-Id: I5a1aedebe558ad8deafb13933df437b6bb9eb2f2
2022-03-05 08:12:29 -08:00
Treehugger Robot
1821237a1e Merge "Reserve a UID for AID_SDK_SANDBOX" 2022-03-04 19:39:58 +00:00
Hanna Nizhnikava
4dc57edc1d Merge "Create utility method for converting sdk_sandbox_uid to app_uid" 2022-03-04 11:27:40 +00:00
Dmitri Plotnikov
8303dd695f Reserve a UID for AID_SDK_SANDBOX
Bug: 219080829
Bug: 219077358
Test: N/A
Change-Id: Iddc4e29668e7d6f2490b5d6acb9b4e5f0082d064
2022-03-03 18:03:30 -08:00
Elliott Hughes
d07d694175 Merge "Define AIDs for Weaver, Keymint and IdentityCredential applets." 2022-03-04 01:40:37 +00:00
Hanna Nizhnikava
fb78816593 Create utility method for converting sdk_sandbox_uid to app_uid
Method is needed for further use in statsd mapping process.

Bug: 217695033
Test: atest installd_service_test
Change-Id: I508a58da5f8d2e32264002db515425134d18aece
2022-03-03 21:49:43 +00:00
Bart Van Assche
40080208c1 Merge changes I4b9b76c9,I6f329491,I9c783193,I0798cc94
* changes:
  healthd: Convert multiple private methods into static nonmember functions
  healthd: Fix readFromFile()
  healthd: Make initHealthInfo() easier to read
  healthd: Improve readability of BatteryMonitor::init()
2022-03-03 21:18:17 +00:00
Bart Van Assche
095c944b48 healthd: Convert multiple private methods into static nonmember functions
The private methods in class BatteryMonitor do not use the 'this'
pointer. Hence convert these into static nonmember functions.

Test: Compile-tested only.
Change-Id: I4b9b76c9697f1db894ba9fb939ce096ee6b7ff3b
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-03-03 18:46:12 +00:00
Bart Van Assche
5a7e5083e6 healthd: Fix readFromFile()
Not all readFromFile() callers pass an empty string. Make sure that
readFromFile() returns 0 (failure) if the *buf argument is not empty and
if reading fails.

Fixes: 3217c5c7d9 ("batterymonitor: simplify readFromFile and use std::string buffers")
Test: Compile-tested only.
Change-Id: I6f329491f8aa4a6d378eb7c3cbc17038eb6aa64d
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-03-03 18:46:12 +00:00
Bart Van Assche
024e18f060 healthd: Make initHealthInfo() easier to read
Use aggregate initialization instead of memberwise initialization. This
patch does not change any functionality.

Test: Compile-tested only.
Change-Id: I9c7831936e449aec8a48336b1ee76d26638e4f72
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-03-03 18:46:12 +00:00
Bart Van Assche
25b2a8de53 healthd: Improve readability of BatteryMonitor::init()
Declare and assign in a single statement instead of in two separate
statements. This patch does not change any functionality.

Test: Compile-tested only.
Change-Id: I0798cc940f5f2ca329548568ab68e96891521dd8
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-03-03 18:46:12 +00:00
Samiul Islam
242ed1bb20 Merge changes I310feb08,I2b6d6b08
* changes:
  Rename SupplementalProcess to SdkSandbox
  Create utility method for calculating supplemental_uid from app_uid
2022-03-03 09:06:28 +00:00
Yi-yo Chiang
fb81cf765a Merge "fs_mgr: Fix misleading comment text regarding __ANDROID_RECOVERY__" 2022-03-03 06:23:14 +00:00
Thiébaud Weksteen
1f2ea5504f Merge "Document firmware_class.path" 2022-03-03 05:17:21 +00:00
David Anderson
390851dd29 Merge "fs_mgr: Restrict dt fstabs to < Q devices." 2022-03-03 05:05:19 +00:00
Treehugger Robot
412eacb7e1 Merge "Invert history." 2022-03-03 04:25:15 +00:00
Treehugger Robot
d297b88e3e Merge "inspect_cow: Print OTA ops for debugging" 2022-03-03 03:35:04 +00:00
Treehugger Robot
4618fa3e2a Merge "libsnapshot: Edit OWNERS file" 2022-03-03 03:15:04 +00:00
Thiébaud Weksteen
87050874bd Document firmware_class.path
This kernel command-line parameter may be used to alter the loading of
firmware.

Bug: 222166126
Test: n/a
Change-Id: I6dc1ae92694cf08b11ab6c3c41aa3d62c992a72a
2022-03-03 13:00:20 +11:00
Elliott Hughes
e2d9fb2116 Invert history.
Change logs are usually easier to read when the newest stuff is at the top...

Change-Id: I6ec76e96a6def88e3594949567b4afb397835d7d
2022-03-03 01:52:15 +00:00
Akilesh Kailash
d49321a6fc libsnapshot: Edit OWNERS file
Bug: 220991038
Test: Presubmit
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: If1f3529b731fb19193857e4009de42dc081edbf9
2022-03-03 01:18:07 +00:00
Yifan Hong
0326984c42 Merge "healthd: batterymonitor uses AIDL HealthInfo." 2022-03-02 19:20:31 +00:00
Nikita Ioffe
45f8837c90 Rename SupplementalProcess to SdkSandbox
Ignore-AOSP-First: code is not in AOSP yet
Bug: 220320098
Test: presubmit
Change-Id: I310feb08a903c2ee9cd544e3b9751c2e02ce5951
Merged-In: I310feb08a903c2ee9cd544e3b9751c2e02ce5951
(cherry picked from commit 6e124aac7c)
2022-03-02 16:12:41 +00:00
Samiul Islam
b18fea1abb Create utility method for calculating supplemental_uid from app_uid
Every app will now have a corresponding supplemental process associated
with it. We need an utility method to map one to the other.

Implementation details: supplemental process uid will be between range
20k-30k. As such, it will be a 10k offset from app id. See ag/16621743.

Bug: 211763739
Test: atest installd_service_test
Ignore-AOSP-First: Feature is being developed in internal branch
Change-Id: I2b6d6b086985bcb24c837eaa95a937d429d6a583
Merged-In: I2b6d6b086985bcb24c837eaa95a937d429d6a583
(cherry picked from commit 1c7acfdb67)
2022-03-02 13:29:40 +00:00
Yifan Hong
b99d15c529 healthd: batterymonitor uses AIDL HealthInfo.
This change cleans up technical debt. As a side
effect, this change also exposes chargerDockOnline
properly to health HAL implementations.

Test: TH
Bug: 222120465
Change-Id: I306bd0538d94b310a69befb93b5862dd7208447f
2022-03-02 16:20:35 +08:00
subrahmanyaman
8b83ce6186 Define AIDs for Weaver, Keymint and IdentityCredential applets.
Bug: b/222112165
Test: Run vts/cts tests
Change-Id: I2fc9144fe4a2d55bf091d8371ba2b78486b1b9c7
2022-03-02 02:35:24 +00:00
Treehugger Robot
1e80f2d47d Merge "vts_fs_test: Statically link libfs_mgr." 2022-03-02 02:29:44 +00:00
David Anderson
0a9c083b87 vts_fs_test: Statically link libfs_mgr.
Bug: 222065493
Test: builds
Change-Id: I9ce4aa2594a4e946c79a51f0ed3d2121c7eaee36
2022-03-01 14:12:26 -08:00
Bart Van Assche
8b162ac936 Merge changes I5a6f587e,I972f4e60,Ib8e1e87f
* changes:
  Introduce the RunService() method
  Introduce the ConfigureMemcg() method
  Introduce the Service::CheckConsole() method
2022-03-01 15:20:03 +00:00
Bart Van Assche
bd73665e68 Introduce the RunService() method
The Service::Start() method is so long that its length negatively
affects readability of the code. Hence this patch that splits
Service::Start().

Test: Booted Android in Cuttlefish.
Change-Id: I5a6f587ecc5e6470137de6cceda7e685bce28ced
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-03-01 15:17:33 +00:00
Bart Van Assche
f2222aab6a Introduce the ConfigureMemcg() method
The Service::Start() method is so long that its length negatively
affects readability of the code. Hence this patch that splits
Service::Start().

Test: Booted Android in Cuttlefish.
Change-Id: I972f4e60844bb0d133b1cca1fd4e06bb89fc5f37
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-03-01 15:17:33 +00:00
Bart Van Assche
847b80a112 Introduce the Service::CheckConsole() method
The Service::Start() method is so long that its length negatively
affects readability of the code. Hence this patch that splits
Service::Start().

Test: Booted Android in Cuttlefish.
Change-Id: Ib8e1e87fbd335520cbe3aac2a88d250fcf3b4ff0
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-03-01 15:17:33 +00:00
David Drysdale
b99ace4af1 Merge "Include correct authorization_set.h header" 2022-03-01 10:31:26 +00:00
Wei Wang
a323e0233d Merge "Support process path for WriteFileAction" 2022-03-01 00:06:57 +00:00
Akilesh Kailash
d494442f90 inspect_cow: Print OTA ops for debugging
Bug: 220991038
Test: inspect_cow
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: Id77518c7c102aca4979e6eccf45c7cc822f9ccd1
2022-02-28 22:05:21 +00:00
Treehugger Robot
8e4b2bfd5b Merge "Update to KeyMint & iRPC v2" 2022-02-28 21:46:00 +00:00
Shawn Willden
0485712141 Update to KeyMint & iRPC v2
Bug: 221390931
Test: run vts -m vts_treble_vintf_vendor_test
Change-Id: I1749439700f78433d31b52067edb32a031cc8777
2022-02-28 09:35:43 -07:00
Rick Yiu
9221b1eeae Support process path for WriteFileAction
Currently, there is no distinguish between SetTaskProfiles and
SetProcessProfiles in WriteFileAction because they use the same task
path. Add ProcFilePath attribute so that WriteFileAction could use
a separate path for process in SetProcessProfiles.

Bug: 218684257
Test: function works
Change-Id: I004b8c8799240c54f1ef1fed0566fa5057341cf4
2022-02-26 12:38:03 +00:00
Devin Moore
192b5569b0 Merge "Update init/README.md to mention bootconfig for androidboot argument" 2022-02-25 23:00:17 +00:00
Treehugger Robot
5a1f51b070 Merge "Fix OkOrFail<status_t> conversion ambiguities" 2022-02-25 21:15:57 +00:00
Atneya Nair
dde6034eac Fix OkOrFail<status_t> conversion ambiguities
OkOrFail<status_t> has specialized conversions for Result<int, StatusT>
to avoid ambiguous implicit conversion sequences. Since user conversion
operators sequences can be followed by integral promotion, specializing
for integral types is necessary.

Specialize ResultError<StatusT> so calling code() returns a status_t
instead of a StatusT and message() is implemented even when not carrying
a string.
Eventually, these classes should be combined.

Add equality operators for ResultError<StatusT>.

Bug: 219580167
Test: atest Errors_test.cpp
Merged-In: I14acecfd2aef33c40e79ddb091e2f4af9291d837
Change-Id: Ifb5ed3c2d3452b10901e4aeb19368d873225d9ce
2022-02-25 14:27:41 -05:00
Tri Vo
96686aaf60 Merge "Bumping the HAL client version." 2022-02-25 18:03:20 +00:00
Devin Moore
07ec259a54 Update init/README.md to mention bootconfig for androidboot argument
In Android S and later, androidboot.* kernel cmdline parameters are
moved to bootconfig instead the kernel cmdline. This includes the
androidboot.force_normal_boot.

Bug: 219951268
Test: N/A
Change-Id: Id0328ad09a34d654de9936e37a576a8a9f44de6c
2022-02-25 17:04:45 +00:00
Akilesh Kailash
806c29721a Merge "snapuserd: Fallback to synchronous I/O if any errors observed during async merge." 2022-02-25 00:58:19 +00:00
Akilesh Kailash
325e2acbb9 snapuserd: Fallback to synchronous I/O if any errors observed during
async merge.

If there are any I/O errors during async merge, we will
retry the I/O in synchronous I/O path. For this to happen,
we have to reset the iterator so that we replay the blocks
which were partially completed during async merge. Furthermore,
we will disable the async merge and continue to do the I/O
in synchronous path.

Additionally, cut down the queue depth to 8 so that
it will decerease the number of the async offload. We don't
want to have a big queue depth with async offload.

Bug: 220991038
Test: Instrument the code to fail the Async I/O's
randomly and make sure merge is completed. Instrumentation
was done both on readahead and merge code path.

Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I0db6d0f46054ca5b8423201a598c726b2c3d21ac
2022-02-24 06:08:26 +00:00
Treehugger Robot
7a7c8e4607 Merge "Make task profiles easier to debug" 2022-02-24 02:27:55 +00:00
Treehugger Robot
df62d41eeb Merge "Provide alternate SE RoT provisioning path." 2022-02-23 18:13:01 +00:00
Tri Vo
7da30bd9f8 Merge "trusty: Convert Trusty driver tests to python_test" 2022-02-23 17:58:06 +00:00
Yi-Yo Chiang
8f73f02e43 fs_mgr: Fix misleading comment text regarding __ANDROID_RECOVERY__
This piece of comment was misleading because it only applies to
BOARD_USES_RECOVERY_AS_BOOT devices. Update the text to give a more
accurate description.

If BOARD_USES_RECOVERY_AS_BOOT is true,
* Recovery ramdisk IS boot ramdisk.
* init_first_stage is actually a symbolic link to
  init_second_stage.recovery, which links libfs_mgr.recovery.

If BOARD_USES_RECOVERY_AS_BOOT is not true,
* init_first_stage is a real binary in the generic ramdisk.
* init_first_stage links libfs_mgr.ramdisk.
* During recovery boot, the '/init' binary could be the
  init_first_stage from the generic ramdisk (A/B), or
  init_second_stage.recovery from the recovery ramdisk (non-A/B;
  standalone recovery partition).

Bug: 219811240
Test: None
Change-Id: Ib395a796f61869c13f1a5f1735ef17c224c26c8c
2022-02-23 16:33:24 +08:00