Commit graph

64255 commits

Author SHA1 Message Date
Zhanglong Xia
3c153add59 [threadnetwork] update the platform log API usages and implementations
The latest OpenThread has updated the usage of the platform log APIs.
This CL updates the log APIs usages and implementations.

Bug: b/333301206
Test: Run ThreadNetwork HAL and check logs.
Change-Id: I0c0999edbed1c041e2752d195e753d02b2c734f4
2024-04-08 17:07:57 +08:00
Charisee Chiw
0c2179c224 Merge "Update needed for Rust v1.77.1" into main 2024-04-04 17:59:39 +00:00
Ray Chin
863f96ecdd Refine infeasible frontend status check am: 9b13077c4c
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/3022524

Change-Id: I4a5f52304971ef1477147850eae9067455d1d221
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-03 23:57:27 +00:00
Charisee
5fc736d96d Update needed for Rust v1.77.1
error: field `0` is never read
  --> hardware/interfaces/security/keymint/aidl/default/main.rs:38:24
   |
38 | struct HalServiceError(String);
   |        --------------- ^^^^^^
   |        |
   |        field in this struct
   |
   = note: `HalServiceError` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
   = note: `-D dead-code` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(dead_code)]`
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
   |
38 | struct HalServiceError(());
   |                        ~~

error: aborting due to 1 previous err


Bug: http://b/330185853
Test: ./test_compiler.py --prebuilt-path dist/rust-dev.tar.xz  --target aosp_cf_x86_64_phone --image
Change-Id: I57f3bd1d702c97929f5fd34f909aa72aa2f2ba02
2024-04-03 20:05:19 +00:00
Gabriel Biren
48def07853 Merge "Copy legacy HAL header files to the wifi interface directory." into main 2024-04-03 18:54:27 +00:00
Orlando Arbildo
8e0b0ae117 Merge "HWCrypto AES non-authenticated AIDL definitions" into main 2024-04-03 14:34:19 +00:00
Roshan Pius
ffe8335846 nfc(interface): Align owner's file with other NFC locations
Bug: N/A
Test: N/A
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:21dde9152232bfda6b5c195806b030c37c385021)
Merged-In: Iddf46eb3f162992898403c2c4832ad2d87b6ac0e
Change-Id: Iddf46eb3f162992898403c2c4832ad2d87b6ac0e
2024-04-03 05:41:50 +00:00
Orlando Arbildo
d0470df3e3 HWCrypto AES non-authenticated AIDL definitions
AIDL definitions for non-authenticated AES-based commands.

Bug: 284152719
Test: qemu android build
Change-Id: Id2319bd186358b085788a3d8c318b78e592a1518
2024-04-02 23:14:13 +00:00
Orlando Arbildo
fbd08f8892 Merge "Add OWNERS file" into main 2024-04-02 22:34:50 +00:00
Devin Moore
aeab14d52c Merge "Fix fmq_test when HIDL is not supported" into main 2024-04-02 21:27:42 +00:00
Orlando Arbildo
2d9f5e9df9 Add OWNERS file
Adding an OWNERS file to the staging/security AIDL folders.

Bug: 284152719
Test: NA
Change-Id: I51838f772c4daf0a7da54c3fe0dd3c1d0edcd910
2024-04-02 19:51:49 +00:00
Gabriel Biren
97e48aa122 Copy legacy HAL header files to the wifi
interface directory.

No-Typo-Check: Unable to update misspelled variables
BYPASS_INCLUSIVE_LANGUAGE_REASON=Moving legacy code

Bug: 271177978
Test: atest VtsHalWifiChipTargetTest \
            VtsHalWifiStaIfaceTargetTest \
	    VtsHalWifiApIfaceTargetTest \
	    VtsHalWifiNanIfaceTargetTest \
	    VtsHalWifiRttControllerTargetTest
Change-Id: I9329c2bc8c816299cabacb4c3702a20b0056929f
2024-04-02 18:12:31 +00:00
Orlando Arbildo
648d748e35 Merge "HWCrypto authenticated symmetric cryptography AIDL definitions" into main 2024-04-02 17:56:10 +00:00
Orlando Arbildo
b4e55bd84d Merge "HWCrypto base AIDL definitions" into main 2024-04-02 17:55:56 +00:00
Shunkai Yao
e237f5bfaa Merge "Use customized toString for UUID in VTS" into main 2024-04-02 16:45:52 +00:00
Ray Chin
9b13077c4c Refine infeasible frontend status check
Bug: 322055872
Test: atest VtsHalTvTunerTargetTest
Change-Id: I43bef4b7c5b6bc0f85904916040617fbde16b894
2024-04-02 22:47:47 +08:00
Henri Chataing
bbd7bba074 Merge "VtsHalBluetoothTargetTest: Link with libbluetooth_log" into main 2024-04-01 23:40:57 +00:00
Treehugger Robot
926c26500c Merge changes I86ba4225,I04d8e19a into main
* changes:
  ExternalCameraHAL: fix CTS failures with callback for errors
  ExternalCameraHAL: improve buffer and error handling
2024-04-01 23:08:36 +00:00
Treehugger Robot
52815dd2b0 Merge "ExternalCameraHAL: Skip importing buffer from capture request" into main 2024-04-01 23:08:36 +00:00
Treehugger Robot
2fa41a801f Merge "ExternalCameraHAL: Prevent memory leak when manipulating native_handle" into main 2024-04-01 22:50:36 +00:00
Treehugger Robot
d741ab8a51 Merge "Package the rust_nonsecure keymint default HAL in an APEX" into main 2024-03-30 10:06:52 +00:00
Ray Chin
9022f45022 Support product specific VTS test configuration am: 7d03f49853
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/3018625

Change-Id: I2dfd15a88f8b3d749fce434e58edb7928f117cf0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-30 03:21:15 +00:00
Treehugger Robot
86d8bf593a Merge "Remove unnecessary "_external" suffix from libcppbor" into main 2024-03-29 21:18:28 +00:00
Shunkai Yao
fb8f39452a Use customized toString for UUID in VTS
Bug: 331955595
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Change-Id: I561d68645f3f159b029135b0dfa66511a2800d72
2024-03-29 18:49:15 +00:00
A. Cody Schuffelen
895ba8bdfa Package the rust_nonsecure keymint default HAL in an APEX
This will make it easier to swap in and out with the Cuttlefish remote
implementation.

Bug: 331474817
Test: m com.android.hardware.keymint.rust_nonsecure
Change-Id: I0e9a350b62a90ef6126db109195e19b4181d0cf8
2024-03-29 11:48:31 -07:00
Orlando Arbildo
0e5ffb776b HWCrypto authenticated symmetric cryptography AIDL definitions
AIDL definitions for authenticated symmetric commands.

Bug: 284152719
Test: qemu android build
Change-Id: Iab66449ad88c452f6d69e2e89ed230b9d4bf2fc0
2024-03-29 18:02:12 +00:00
Orlando Arbildo
5bc7a72132 HWCrypto base AIDL definitions
Base AIDL definitions for command processing interface. The entry point
to the interface is IHwCryptoOperations.aidl.

Bug: 284152719
Test: qemu android build
Change-Id: Id11b165dac07c9f73be30805f0d611a22fc5f3ff
2024-03-29 18:02:10 +00:00
Henri Chataing
11c3782296 VtsHalBluetoothTargetTest: Link with libbluetooth_log
Test: m VtsHalBluetoothTargetTest
Bug: 305066880
Change-Id: Id16fa4557a4152c5972fa6a3a71626840414ebf0
2024-03-29 17:16:11 +00:00
Devin Moore
2089deb22a Fix fmq_test when HIDL is not supported
If HIDL is not supported on the device, don't expect to be able to
register the HIDL service.

Test: atest fmq_test
Bug: 218588089
Change-Id: I1764b26f06ef8f280f719d8ab44db2ebfe562944
2024-03-29 16:12:51 +00:00
Ray Chin
7d03f49853 Support product specific VTS test configuration
The tuner vts will read the system property
ro.vendor.vts_tuner_configuration_variant as the suffix of the config
file to read. Vendor who wants to support multiple region for a single
SoC need to put all VTS config with different suffix as
/vendor/etc/tuner_vts_config_aidl_V1.{suffix}.xml on device.

Bug: 322899156
Test: atest VtsHalTvTunerTargetTest
Change-Id: I1f76d700671c07bc90965fba94f96b8be47198d7
2024-03-29 11:10:50 +08:00
Treehugger Robot
c523f76846 Merge "Remove reference to factory reset of K" into main 2024-03-29 03:06:38 +00:00
Shawn Willden
98125926c1 Remove unnecessary "_external" suffix from libcppbor
Test: Build
Change-Id: Ied163d1f40c3b86d7b85cae1700310f5cb674e2d
2024-03-28 20:42:34 -06:00
Shawn Willden
deaa5dd808 Remove reference to factory reset of K
The ISharedSecret.aidl description of the pre-shared secret K
mentioned that K was set up during factory reset.  While that could be
done, it is almost never done; most OEMs inject K in the factory.
Removed the reference to setup in factory reset to reduce confusion.

Test: N/A, comment-only change
Change-Id: Idbbd5a8d64197ef4713a75075a9730d06162ad05
2024-03-29 01:22:06 +00:00
Mikhail Naganov
69d60aa02c audio: Fix some VTS issues on real devices
1. Skip testing of stream I/O on certain types of mix ports.

2. Skip testing of connection of BT SCO device.

Bug: 300735639
Bug: 326888356
Bug: 328010709
Bug: 331516432
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I9b8bbf2014e223375c8f8400ff2af32268803706
2024-03-28 17:02:27 -07:00
Treehugger Robot
f814c97702 Merge "Update needed for Rust v1.77.0" into main 2024-03-28 06:26:30 +00:00
Charisee
c3a74935a1 Update needed for Rust v1.77.0
error: field `0` is never read
  --> hardware/interfaces/security/authgraph/default/src/main.rs:34:24
   |
34 | struct HalServiceError(String);
   |        --------------- ^^^^^^
   |        |
   |        field in this struct
   |
   = note: `HalServiceError` has derived impls for the traits `Clone` and `Debug`, but these are intenti
onally ignored during dead code analysis
   = note: `-D dead-code` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(dead_code)]`
help: consider changing the field to be of unit type to suppress this warning while preserving the field
 numbering, or remove the field
   |
34 | struct HalServiceError(());
   |                        ~~

error: aborting due to 1 previous error


Test: ./build.py --lto thin

bug: http://b/330185853
Change-Id: I08b79176fb5edea9e24990e4884e521c24660d68
2024-03-27 22:58:56 +00:00
Mikhail Naganov
efb45bc792 audio: Allow to inherit Binder RT priority in AIDL
This option is on by default for HIDL interfaces, however
in AIDL it needs to be enabled explicitly.

Bug: 331469541
Test: m
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:d975a9e6ec0b6f0eeac99673b9b06e11146874ba)
Merged-In: I971185a46da4222160fb04b8b77f805ef0396562
Change-Id: I971185a46da4222160fb04b8b77f805ef0396562
2024-03-27 16:20:33 +00:00
David Drysdale
c8b02ff6e7 Merge "Secretkeeper: more VTS tests" into main 2024-03-27 12:22:06 +00:00
A. Cody Schuffelen
ddc6a8dbdf Fix .rc file for keymint-service.nonsecure
This target was using the same `.rc` as the keymint-service target,
though it had a different name.

Bug: 331474817
Test: LOCAL_KEYMINT_PRODUCT_PACKAGE=android.hardware.security.keymint-service.nonsecure m && launch_cvd --noresume --secure_hals=keymint,oemlock
Change-Id: I0f744b75e451f6780d8f6c9bddbd5ea80c579a20
2024-03-26 15:40:37 -07:00
Doug Ferraz
cfa68a1fbb Merge "Bluetooth HCI: Add VTS requirement for HCI 4.2 - Annotations" into main 2024-03-26 14:02:54 +00:00
Tang Lee
45d7a9e1b4 ExternalCameraHAL: fix CTS failures with callback for errors
For every request, either requestStreamBuffers fails or
handling of the requested buffer fails, always trigger
the processCaptureResult callback by notifying the request
is ready. This avoids the errors like the service side
receives fewer results than the requests and waits until
timeout.

Bug: 299182874
Test: cts
cts-tradefed run cts \
  --include-filter  "CtsCameraTestCases android.hardware.camera2.cts.RobustnessTest" \
  --include-filter "CtsCameraTestCases android.hardware.camera2.cts.PerformanceTest" \
  --include-filter "CtsCameraTestCases android.hardware.camera2.cts.StillCaptureTest" \
  --include-filter "CtsCameraTestCases android.hardware.camera2.cts.SurfaceViewPreviewTest" \
  --include-filter "CtsCameraTestCases android.hardware.cts.CameraGLTest" \
  --include-filter "CtsCameraTestCases android.hardware.cts.LegacyCameraPerformanceTest" \

Merged-in: I86ba422524e79af6b318b50bd6eebe2cb27fa50a
Change-Id: I86ba422524e79af6b318b50bd6eebe2cb27fa50a
2024-03-25 17:28:06 -07:00
Tang Lee
895f5bbddc ExternalCameraHAL: improve buffer and error handling
After enabling HALL Buffer Management, it requires more careful
error handling and syncing. Process the buffer request error correctly.
Handle the lock and states correctly.

Bug: 299182874
Test: CTS passed, expecially
./cts-tradefed run cts -m CtsCameraTestCases -t android.hardware.camera2.cts.NativeCameraDeviceTest
./cts-tradefed run cts -m CtsCameraTestCases -t android.hardware.camera2.cts.RobustnessTest

Merged-in: I04d8e19a2ee78580e54340378122c724a3de8edb
Change-Id: I04d8e19a2ee78580e54340378122c724a3de8edb
2024-03-25 17:27:59 -07:00
Avichal Rakesh
a52542e856 ExternalCameraHAL: Skip importing buffer from capture request
ExternalCameraHAL supports HAL buffer management which means
cameraservice will not send it an output buffer along with the
capture request, and the HAL has the freedom to request an
output buffer when an output buffer is needed.

As a remnant of migration from HIDL to AIDL, the
ExternalCameraHAL still attempted to import buffers that
the cameraservice has sent with the CaptureRequest. However,
with HAL buffer manager enabled, this buffer is always null and
results in the HAL failing to process the capture request.

This CL removes the logic for importing output buffers when
processing capture requests from the cameraservice, and lets
the HAL call requestStreamBuffers when it needs an output buffer.

Bug: 299182874
Test: VTS Tests now pass
Merged-in: I00654836b7ae91a91a2afa4b149712977e07dcc5
Change-Id: I00654836b7ae91a91a2afa4b149712977e07dcc5
2024-03-25 17:27:47 -07:00
Avichal Rakesh
b3b02babbb ExternalCameraHAL: Prevent memory leak when manipulating native_handle
native_handle objects created by makeFromAidl need to be deleted
with native_handle_delete. Not doing so leads to a memory leak
every time makeFromAidl is called.

This CL ensures that native_handle_delete is called on the
return value of makeFromAidl wherever it is used.

Bug: 305638723
Test: n/a. No functional change.
Merged-in: Ia99ba6e3abbdf7dec75383450a60c944b92a9c74
Change-Id: Ia99ba6e3abbdf7dec75383450a60c944b92a9c74
2024-03-25 17:27:32 -07:00
Doug Ferraz
eff7b9102f Bluetooth HCI: Add VTS requirement for HCI 4.2 - Annotations
Bug: 285456310
Test: atest VtsHalBluetoothV1_1TargetTest
Test: atest VtsHalBluetoothV1_0TargetTest
Test: atest VtsHalBluetoothTargetTest
Change-Id: I5a910d2a7d778b2e64a524d0a389b911c080e189
2024-03-25 20:04:19 -04:00
Treehugger Robot
dc543a304b Merge "ExternalCameraHAL: dup fd when creating AIDL NativeHandle" into main 2024-03-25 23:54:31 +00:00
Doug Ferraz
7229b6bacc Merge "Bluetooth HCI: Add VTS requirement for HCI 4.2 - HIDL version" into main 2024-03-25 22:24:41 +00:00
Avichal Rakesh
ea30826bf3 ExternalCameraHAL: dup fd when creating AIDL NativeHandle
AIDL's NativeHandle do not have a concept of unowned file
descriptors. If a NativeHandle object is created with an
fd, NativeHandle implicitly assumes ownership of the fd.
When passing fds over binder, ExternalCameraHAL used
makeToAidl which which accidentally transferred ownership
to the AIDL objects. Additionally, NativeHandles close
owned fds on destruction, which led to multiple closure
of fences.

This CL changes the logic to use dupToAidl to ensure that
NativeHandle objects are given ownership of a duped fds
and don't interfere with any of the fds used for internal
bookkeeping.

Bug: 313115623
Test: Verified by partner that ExternalCameraHAL no longer double closes fds.
Merged-In: Ic406634de6f22a290abb414e80a7747927368b68
Change-Id: Ic406634de6f22a290abb414e80a7747927368b68
2024-03-25 21:59:11 +00:00
Andrew Scull
6cb40f35b6 Merge "Require proper DICE if StrongBox is present" into main 2024-03-25 20:57:47 +00:00
Doug Ferraz
2984a75096 Bluetooth HCI: Add VTS requirement for HCI 4.2 - HIDL version
Bug: 285456310
Test: atest VtsHalBluetoothV1_1TargetTest
Change-Id: I0af583e35428f8ec8c9c360d9e28c1c909ad9001
2024-03-25 16:37:29 -04:00