Commit graph

27799 commits

Author SHA1 Message Date
Mikhail Naganov
cb766d2517 audio: Use get_audio_port_v7 in the default wrapper
get_audio_port_v7 interface method was added in aosp/1518624
but wasn't used in the default wrapper due to the refactoring
ongoing at that time. Fixing this omission.

Bug: 160352965
Test: atest VtsHalAudioV7_0TargetTest
Change-Id: I1e3594f30fe8fa319d0b5b4244531c9142870503
Merged-In: I1e3594f30fe8fa319d0b5b4244531c9142870503
2021-03-31 18:24:11 +00:00
David Drysdale
b39baeaa92 Merge changes I2f5187bf,Icb79e1e0,I833894d3,I54dcaa61,I47a810f2
* changes:
  Test that provisioned keys can be used with KeyMint
  Add tests with corrupted MAC on keypair
  Add more EEK variant tests and related fixes
  Commonize MacedPublicKey and ProtectedData checks
  Tweak IRemotelyProvisionedComponent AIDL docs
2021-03-31 14:48:41 +00:00
David Zeuthen
ae33614d00 Merge "identity: add TEST_MAPPING file to run CTS, VTS, and unit tests in presubmit." 2021-03-31 13:27:02 +00:00
Treehugger Robot
0ccd277dcb Merge "Adding jbires to keymint/aidl/OWNERS" 2021-03-31 10:06:21 +00:00
Bob Badour
0f81cab176 [LSC] Add LOCAL_LICENSE_KINDS to hardware/interfaces
Added SPDX-license-identifier-Apache-2.0 to:
  tv/cec/1.0/vts/functional/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I2ddf826c4af294e2b4ee76d2032c1efef90d93f3
2021-03-30 19:03:18 -07:00
Treehugger Robot
ebe635f8da Merge "audio: Fix fixed size char array conversions" 2021-03-31 00:25:55 +00:00
Mikhail Naganov
8fca300256 audio: Fix fixed size char array conversions
For legacy HAL strings that are fixed size arrays
the conversion code was using the array size for
the HIDL string size. This lead to logging of error
messages during reverse conversion.

Fixed issue and refactored code to avoid duplication.

Bug: 181269159
Test: atest android.hardware.audio.effect@7.0-util_tests
      also, verify that no error messages from EffectUtil
      appear during boot and audio playback
Change-Id: Iac36ff33e65c502966ac2b7a4870cb5830545b23
2021-03-30 15:53:00 -07:00
Mikhail Naganov
f6a701efeb Merge "audio: Fix flakiness of HalAudioStreamWorkerTest" 2021-03-30 17:58:01 +00:00
Treehugger Robot
93d82aca8f Merge "Clarify certificate chain requirements documentation." 2021-03-30 14:28:51 +00:00
Michal Olech
293d67a425 Merge changes from topic "vts_cec_10"
* changes:
  CEC: Add VTS test to get physical address
  CEC: Add methods to get device types
  CEC: Add VTS test to check is connected
  CEC: Add README for VTS tests
  CEC: Add VTS test to enable audio return channel
  CEC: Add VTS test to get port info
  CEC: Add VTS test to set language
  CEC: Add VTS test to set option
  CEC: Add VTS test to send CEC messages
  CEC: Add VTS test to clear and add logical address
  CEC: Add VTS test to get Vendor Id
  CEC: Add VTS test to get CEC version
2021-03-30 09:32:07 +00:00
Treehugger Robot
2175ee289a Merge "power/stats: Add host_supported" 2021-03-30 01:33:56 +00:00
Benjamin Schwartz
0744ccf5e3 power/stats: Add host_supported
Bug: 183946279
Test: build
Change-Id: I9e66a6a46becd1219817aea5759d0c8617e5094e
2021-03-29 17:27:52 -07:00
Mikhail Naganov
baf159701d audio: Fix flakiness of HalAudioStreamWorkerTest
Instead of relying on an atomic counter, use CV-based
synchronous switching.

Bug: 183713893
Test: atest --host --iterations 1000 HalAudioStreamWorkerTest
Change-Id: I586c3b8ec8b280cf68b97d3878627eb5a2bf9567
2021-03-29 18:37:39 +00:00
Mikhail Naganov
a620ab760b audio: Fix VTS PCM Input tests for certain h/w platforms
Some h/w platforms require more metadata to be provided
for input streams. Otherwise, opening of a stream was
failing internally in the vendor HAL code and capture
position queries were not succeeding.

Bug: 183688436
Test: atest VtsHalAudioV7_0TargetTest
  on C1, C2, R3, S4, B5
Change-Id: Icb6d2cdb9150eb65281df2a4bea6dbe1fc6034c2
2021-03-29 10:29:58 -07:00
Shawn Willden
5ae01f4539 Clarify certificate chain requirements documentation.
Test: N/A comment-only change
Change-Id: I8f27f9c6d550d970212f3e460be33b28929fda09
2021-03-29 08:44:03 -06:00
David Drysdale
f0d516d281 Test that provisioned keys can be used with KeyMint
Test: VtsRemotelyProvisionedComponentTests
Change-Id: I2f5187bfb4fd1572d10c306377e07a6d167689fa
2021-03-29 09:17:54 +01:00
David Drysdale
e99ed8667a Add tests with corrupted MAC on keypair
Test: VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: Icb79e1e03518ebb20430f33c3d30a44a383798ed
2021-03-29 09:17:51 +01:00
David Drysdale
cceca9f5f6 Add more EEK variant tests and related fixes
- Test with deliberately-invalid EEK in request:
    - corrupt signature
    - missing initial self-signed cert
 - Test with different sizes of EEK chain.

These tests will only really take effect when we have a valid GEEK to
test with.

Other changes:
 - Fix encoding of KeyUsage bitset.
 - Add a made-up allowed-root pubkey for prod mode. This needs to be
   replaced with the real GEEK when available.
 - Fix generateEek() so that the first private key isn't used for
   all signing operations.

Test: VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: I833894d33cd1757b7a0cfcf18f79b61e4e56a556
2021-03-29 09:17:18 +01:00
David Drysdale
c84007725b Commonize MacedPublicKey and ProtectedData checks
Test: VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: I54dcaa6175b243219cb333f82278ecce08f8bb17
2021-03-29 09:16:15 +01:00
David Drysdale
a5ddfbdcad Tweak IRemotelyProvisionedComponent AIDL docs
- Use P-256 in MacedPublicKey: The main place that MacedPublicKey is
   used requires a P-256 key, so use that as the example in the comment.
 - Fix leaf key type comment
 - Fix AES key size comment
 - Typo fix

Test: none, just comment change
Change-Id: I47a810f2a965facad6ddcd251341f233884e5f7c
2021-03-29 07:23:28 +00:00
Anthony Stange
6a022ad1c4 Merge "Don't assert while a callback is registered" 2021-03-25 19:48:16 +00:00
David Zeuthen
94b8b11324 Merge "KeyMint + KeyMaster: Include permissions for FEATURE_HARDWARE_KEYSTORE." 2021-03-25 18:27:48 +00:00
Anthony Stange
0b72e2e105 Don't assert while a callback is registered
If an assert fails while a callback is registered and some data
is delivered that attempts to invoke the callback, it'll cause a
segfault since the callback is allocated on a part of the stack
that's no longer valid.

Bug: 183362725
Change-Id: I3a1f8fbf15c24e344fde8e5b44bb93681ef47d38
Test: Run VTS
2021-03-25 16:36:10 +00:00
Anthony Stange
c0f1cc2aba Merge "Fix RefBase Explicit destruction" 2021-03-25 14:53:09 +00:00
David Zeuthen
7f8ccb5caf KeyMint + KeyMaster: Include permissions for FEATURE_HARDWARE_KEYSTORE.
This change includes permission files for the new permission
FEATURE_HARDWARE_KEYSTORE for the default KeyMaster and KeyMint
implementations.

Test: Manually inspected that permission files are installed.
Test: atest android.keystore.cts.KeyAttestationTest#testAttestationKmVersionMatchesFeatureVersion
Bug: 160616951
Change-Id: Ia35e1ba6c894624999eed62e8434a20ebc833b97
2021-03-25 08:07:03 -04:00
Treehugger Robot
4c912d9042 Merge "Fix setCarrierInfoForImsiEncryption in VTS 1.6" 2021-03-25 07:23:39 +00:00
Max Bires
127b72ac0e Merge "Require RemoteProvisioner app for HAL service" 2021-03-25 01:07:12 +00:00
Treehugger Robot
2bb0aa102d Merge "This fixes the potential vts test failures for devices with no registered shared secret services. It aso fixes the static dependency issue. Test: atest VtsAidlSharedSecretTargetTest, atest VtsAidlSecureClockTargetTest Bug: b/182913582" 2021-03-25 00:33:00 +00:00
Max Bires
459bf52740 Merge "IRemotelyProvisionedComponent returns DeviceInfo" 2021-03-24 23:29:13 +00:00
Robert Greenwalt
3e9cb7bc7b Merge "Optimize SIM phonebook feature with new batch APIs" 2021-03-24 20:33:50 +00:00
Treehugger Robot
b1fe78fb63 Merge "Fix emergencyDial_1_6_withServices in VTS 1.6" 2021-03-24 19:03:46 +00:00
Jiabin Huang
5bbfdbfbeb Merge "Add AudioTransport to replace AudioProfile in AudioPort." 2021-03-24 18:59:41 +00:00
Max Bires
501dcde8a7 Require RemoteProvisioner app for HAL service
Any device that provides an implementation for
IRemotelyProvisionedComponent will need the RemoteProvisioner system app
to actually drive the business logic and handle communicating out to
external servers. If this HAL is not present, then the app should not be
present on device either.

Test: app appears on CF, does not appear on e.g. blueline, coral
Change-Id: I84c3e450486ecff841b848b5e5e7a15f26895725
2021-03-24 11:00:52 -07:00
Max Bires
fdbb904a0c IRemotelyProvisionedComponent returns DeviceInfo
This alters the AIDL interface and underlying functionality to have the
component return the DeviceInfo CBOR blob that is used as AAD in
verification of a signature over a MAC key. Trying to reconstruct this
from userspace is very likely to lead to pain and subtle errors in the
future as adoption of this HAL increases, and multiple instances of this
HAL may exist on device simultaneously.

Test: atest VtsRemotelyProvisionedComponentTests
Change-Id: I44bd588586652630ed31a87cfda7e9c01cbf0a2f
2021-03-24 10:04:23 -07:00
Satya Tangirala
38b3bcee7f Merge "Keystore 2.0: add convertStorageKeyToEphemeral() to IKeymintDevice" 2021-03-24 03:43:38 +00:00
Chirag Pathak
f29ce36ecd This fixes the potential vts test failures for devices with no registered shared secret services. It aso fixes the static dependency issue.
Test: atest VtsAidlSharedSecretTargetTest, atest VtsAidlSecureClockTargetTest
Bug: b/182913582

Change-Id: Id526b729a7930bb081c794d9fae564eab9e300d5
2021-03-24 02:29:37 +00:00
jiabin
574a86fa36 Add AudioTransport to replace AudioProfile in AudioPort.
An AudioTransport contains AudioProfile or hardware descriptor to
describe the audio capabilities for an AudioPort and the encapsulation
type to represent the encapsualtion format that must be used when
sending the audio data with the format associated the AudioTransport to
Android.

The hardware descriptor will be used when the format is not recognized
by the platform.

Currently, the short audio descriptor is added as one of the hardware
descriptors. Short audio descriptor is reported from EDID for HDMI.

Bug: 131736540
Bug: 178619392
Test: atest android.hardware.audio.common@7.0-util_tests
Test: atest VtsHalAudioV7_0TargetTest
Change-Id: Ic5ed9ff9b694511fdd7e90cdcda2777bdfa74f65
2021-03-23 17:22:38 -07:00
Max Bires
928940ab07 Adding jbires to keymint/aidl/OWNERS
With great powers comes great responsibility. Or reverts.

Test: jbires can give owners vote on CLs in gerrit
Change-Id: I2efa65047b15be4a5138e6b343a534b3da245909
2021-03-23 11:26:14 -07:00
Mengjun Leng
48966f0583 Optimize SIM phonebook feature with new batch APIs
1. Declare new request and response for loading and updating SIM
contacts.
2. Add data dispatch function for new reponse and request APIs.

Bug: 23044962
Change-Id: I43d196c84558d7951d85bc938672091edeb378ec
2021-03-23 10:33:58 -07:00
David Zeuthen
793c7fe299 identity: add TEST_MAPPING file to run CTS, VTS, and unit tests in presubmit.
Bug: None
Test: N/A
Change-Id: Ia6a818b5d30f6e301891be1132310eb7e837467d
2021-03-23 12:12:58 -04:00
Satya Tangirala
c757c1ba39 Keystore 2.0: add convertStorageKeyToEphemeral() to IKeymintDevice
Add a function convertStorageKeyToEphemeral to IKeymintDevice that vold
can use to get a per-boot ephemeral key from a wrapped storage key.

Bug: 181806377
Bug: 181910578
Change-Id: I1b008423e3e24797132c8eb79ab3899e2b1c68e8
2021-03-22 17:39:36 -07:00
Janis Danisevskis
442a08d3ee security.sharedsecret: Add rust derives and fix docs.
Add rust derives to SecretSharingParameters.

Also fix some comments.

Test: N/A
Change-Id: Id3f02744d2880e59c678d781344bcbb83e8c8864
2021-03-22 15:35:38 -07:00
Treehugger Robot
2d56123a87 Merge "Security: Provide generated java sources." 2021-03-22 22:31:56 +00:00
Henry Fang
edd9dea02c Merge "Close stream at end of OpenAnOpenedStreamsTest" 2021-03-22 21:29:12 +00:00
Janis Danisevskis
61eadb7ce4 Security: Provide generated java sources.
Enable generation of java sources for AIDL interfaces. This allows
enabling the @SensitiveData annotation without causing circular build
dependencies.

Also mark doc comments as @hide to prevent the interface from being
included in the SDK.

Bug: 174857732
Test: N/A
Merged-In: If00e4dfc24bf776f87c7e2b2e3f42350aa4d4379
Change-Id: If00e4dfc24bf776f87c7e2b2e3f42350aa4d4379
2021-03-22 20:02:39 +00:00
Przemyslaw Szczepaniak
e24a7e57e2 Merge changes from topic "nnapi-aidl-burst"
* changes:
  Add Burst tests to NN AIDL HAL VTS
  Add IBurst to NN AIDL HAL -- hal
  Format NN AIDL HAL
2021-03-22 17:07:23 +00:00
Treehugger Robot
a23a3613bc Merge "Move NNAPI type information to types.spec" 2021-03-22 12:42:40 +00:00
Shraddha Basantwani
697a002eb2 CEC: Add VTS test to get physical address
Test: atest VtsHalTvCecV1_0TargetTest
Bug: 172316717
Change-Id: I9a4979703961e8e67de6bc1d197cec9e2274d41b
2021-03-22 17:37:02 +05:30
Shraddha Basantwani
3a19b4246f CEC: Add methods to get device types
Test: atest VtsHalTvCecV1_0TargetTest
Bug: 172316717
Change-Id: I4dd0c73865b9d12d4b0588cd92f4087cc0c556b4
2021-03-22 17:37:02 +05:30
Shraddha Basantwani
b75639ca66 CEC: Add VTS test to check is connected
Test: atest VtsHalTvCecV1_0TargetTest
Bug: 172316717
Change-Id: Iff1f5fb7566050e80590f99ac5db3cf7308db297
2021-03-22 17:36:46 +05:30