Commit graph

28004 commits

Author SHA1 Message Date
Aaron Tsai
cbfd8e2d10 Fix emergencyDial tests in VTS 1.6
- Change to calling getVoiceRegistrationState_1_6() instead of getVoiceRegistrationState().
 - Fix incorrect voice registration state value

Bug: 187488263
Test: atest VtsHalRadioV1_6TargetTest
Change-Id: Iba5dcef20683bc6dca00b1c49899cfec5e1aac03
2021-05-19 00:40:14 +00:00
David Drysdale
cad5403270 Merge changes I10c4beea,I0efc30f3
* changes:
  KeyMint VTS: local RSA encryption
  KeyMint VTS: local asymmetric verification
2021-05-17 17:12:40 +00:00
David Drysdale
8d1d302ffa Merge "KeyMint HAL: cert dates are in milliseconds" 2021-05-17 13:45:21 +00:00
Tommy Chiu
77aae9e40e Merge "KeyMint vts: Correct the EC curve parameter and some return code" 2021-05-15 01:50:30 +00:00
Treehugger Robot
4862e3f6f3 Merge "KeyMint VTS: fix 3DES key sizes" 2021-05-14 21:55:00 +00:00
Treehugger Robot
44c294e621 Merge changes Id027b742,I486ccad8
* changes:
  Add additional DVBT settings example usage to sample_tuner_vts_config.xml
  Add additional DVBT settings to TunerTestingConfig
2021-05-14 20:59:39 +00:00
Gareth Fenn
b9722f1236 Add additional DVBT settings example usage to sample_tuner_vts_config.xml
Test: atest VtsHalTvTunerV1_0TargetTest

Change-Id: Id027b74267e97822f76607545bf23174a623e74e
Merged-In: I58bd8b941f6340d9e69153702b5269cc35c646da
2021-05-14 18:23:21 +00:00
Gareth Fenn
8fa4cff4ce Add additional DVBT settings to TunerTestingConfig
Test: atest VtsHalTvTunerV1_0TargetTest

Change-Id: I486ccad855662e6b9fa7cd1be3eb3949356d6a1f
Merged-In: I58bd8b941f6340d9e69153702b5269cc35c646da
2021-05-14 16:34:36 +00:00
Treehugger Robot
9f7a1e8317 Merge "Adding 1s time gap between slot1 & slot2 setDataThrottling tests" 2021-05-14 06:13:08 +00:00
Aaron Tsai
058de98e44 Merge "Fix VTS crash for getAvailableNetworks in Radio 1.6" 2021-05-14 03:02:50 +00:00
Treehugger Robot
0a3ca7b629 Merge "Use proper alignment and padding for pointer arguments -- HAL." 2021-05-14 00:23:33 +00:00
Anthony Stange
c75b96410e Merge "sensors: trivial fixes in comments" 2021-05-13 14:31:40 +00:00
Tommy Chiu
ced9a11bbe Merge "KeyMaster vts: Allow --dump_attestations to show whole DEVICE_UNIQUE_ATTESTATION" 2021-05-13 00:37:08 +00:00
Sergii Piatakov
59bb6f9394 sensors: trivial fixes in comments
Fix trivial typos in HAL and VTS comments.

Test: n/a
Change-Id: Ib52d6e1e8e83290cb4b1cf142677b8c772d606e7
Signed-off-by: Sergii Piatakov <sergii.piatakov@globallogic.com>
2021-05-12 20:43:21 +00:00
Aaron Tsai
845f0fbd1e Fix VTS crash for getAvailableNetworks in Radio 1.6
Bug: 187494016
Test: atest VtsHalRadioV1_6TargetTest -- --test-arg com.android.tradefed.testtype.GTest:native-test-flag:"--gtest_filter=*getAvailableNetworks/0_slot1"
Change-Id: I3a3b5a0121cc97fbf6782da863d0ff6226504ee8
2021-05-12 20:31:07 +00:00
Aaron Tsai
b10493e757 Adding 1s time gap between slot1 & slot2 setDataThrottling tests
Modem has restriction that it can not process back-to-back thermal actions.
  For DSDS device, after slot-1 test finished, a 1s delay is needed before start slot-2 test.

Bug: 187968151
Test: atest VtsHalRadioV1_6TargetTest -- --test-arg com.android.tradefed.testtype.GTest:native-test-flag:"--gtest_filter=*setDataThrottling*"
Change-Id: I052d0d9c7c0ccc86a7590204679295268973c6cf
2021-05-12 20:27:27 +00:00
David Drysdale
59cae644e7 KeyMint VTS: local RSA encryption
Change RSA encryption (with public key) so it happens locally in the
test, rather than by invoking an ENCRYPT operation against KeyMint.

 - Specify MGF1 digest for OAEP mode as (now) required by AIDL spec.
 - Drop tests for too-long encryption inputs.
 - Adjust test comments to reflect decryption-only nature.
 - Change parameter checking tests to do so on DECRYPT rather than ENCRYPT.

Test: VtsAidlKeyMintTargetTest
Change-Id: I10c4beea28387eecfd0bc7c5dfd59a1b66fec21e
2021-05-12 16:09:44 +01:00
Andrew Scull
29ba064996 identity: fix CBOR 8-byte integer encoding
8-byte intergers are identified by the additional information having the
value 27.

Test: atest VtsHalIdentityTargetTest
Change-Id: I986162c4966275d7589d99c08c7323445e1f9e80
2021-05-12 15:08:51 +00:00
Tommy Chiu
c93c439ad3 KeyMint vts: Correct the EC curve parameter and some return code
Strongbox doens't support p-224. Change the curve to p-256 for better
compatibility.
Also update the tags to be filtered on the hw-enforcement list.

Change-Id: I3f587c5471ca68b88a565ee9ec2e27d1e9e11b17
2021-05-12 19:13:55 +08:00
David Drysdale
df8f52ee8d KeyMint VTS: local asymmetric verification
Change verification of ECDSA and RSA signatures so it happens locally
in the test, rather than by invoking a VERIFY operation against KeyMint.

Test: VtsAidlKeyMintTargetTest
Change-Id: I0efc30f3c96cd70ac636d34718eff53cc23f1480
2021-05-12 11:51:24 +01:00
Tommy Chiu
566d1cb6e0 KeyMaster vts: Allow --dump_attestations to show whole DEVICE_UNIQUE_ATTESTATION
This debug option used to dump only leaf certificate.

Bug: 187803288
Change-Id: I6cd55597e5127f8aada3dc31ab3e81595f4affbf
2021-05-12 18:04:19 +08:00
Benjamin Schwartz
75d7e5de7c Merge "power/stats: Correct language surrounding timestamps" 2021-05-11 23:42:59 +00:00
Benjamin Schwartz
1a16edd42b power/stats: Correct language surrounding timestamps
Bug: 187408125
Test: build
Change-Id: Ib3bdb7a16f4e9a5acec2e2afad41bbd6c036a27a
2021-05-11 10:22:13 -07:00
Xusong Wang
e3d0dad8d5 Use proper alignment and padding for pointer arguments -- HAL.
This CL modifies the shared memory allocation for pointer arguments to
use proper alignment and padding. We use default alignment (64) and
min padding (1) for HIDL drivers, and default alignment (64) and default
padding (64) for sAIDL drivers.

Bug: 184164929
Test: NNT_static
Change-Id: I22591640fa047d5f75d437edac1a7645d3b05526
Merged-In: I22591640fa047d5f75d437edac1a7645d3b05526
(cherry picked from commit 8bfa243972)
2021-05-11 09:17:34 -07:00
Treehugger Robot
43ae2ecfe4 Merge changes from topic "aosp-nnapi-reusable-execution-canonical"
* changes:
  Introduce reusable burst to canonical interface -- HAL.
  Introduce reusable execution to canonical interface -- HAL.
2021-05-11 07:02:17 +00:00
Treehugger Robot
7dc7626822 Merge "Fix bug for none fe test case" 2021-05-10 23:56:36 +00:00
Xusong Wang
b2e8085ce2 Introduce reusable burst to canonical interface -- HAL.
This CL modifies the canonical interface for reusable burst executions:
- Add new method IBurst::createExecution

The reusable burst execution will not fallback to another execution path
if sending request packet fails. The behavior of single-time burst
execution remains unchanged.

Additionally, this CL enables pointer -> shared memory conversion in
1.2/1.3 burst implementation.

Bug: 184073769
Test: NNT_static
Test: neuralnetworks_utils_hal_1_0_test
Test: neuralnetworks_utils_hal_1_1_test
Test: neuralnetworks_utils_hal_1_2_test
Test: neuralnetworks_utils_hal_1_3_test
Test: neuralnetworks_utils_hal_common_test
Change-Id: Iaac81668d247c2cb76d70e6abbd10f00b397b19f
Merged-In: Iaac81668d247c2cb76d70e6abbd10f00b397b19f
(cherry picked from commit ead6d37ae9)
2021-05-10 15:22:08 -07:00
Xusong Wang
5f6bedb43a Introduce reusable execution to canonical interface -- HAL.
This CL modifies the canonical interface for reusable executions:
- Add new interface: IExecution with compute and computeFenced methods
- Add new method IPreparedModel::createExecution

In NNAPI runtime, the new interface IExecution is used to
memoize request-specific execution resources (e.g. converted HAL
request). The expected usage is that, IPreparedModel::createExecution
will be invoked in the first computation of a reusable NDK ANNExecution
object, and IExecution::compute* will be invoked repeatedly.

The IPreparedModel::execute* methods are preserved to avoid redundant
object creation and memoization overhead for a single-time
(non-reusable) execution.

For a vendor implementing the canonical interfaces, only the
IPreparedModel::execute* methods will be called because there is
currently no reusable execution at HAL interface. A DefaultExecution
implementation is provided to reduce the work needed on the vendor side.

Bug: 184073769
Test: NNT_static
Test: neuralnetworks_utils_hal_1_0_test
Test: neuralnetworks_utils_hal_1_1_test
Test: neuralnetworks_utils_hal_1_2_test
Test: neuralnetworks_utils_hal_1_3_test
Test: neuralnetworks_utils_hal_common_test
Test: neuralnetworks_utils_hal_aidl_test
Change-Id: I91790bb5ccf5ae648687fe603f88ffda2c9fd2b2
Merged-In: I91790bb5ccf5ae648687fe603f88ffda2c9fd2b2
(cherry picked from commit 727a7b2104)
2021-05-10 15:21:36 -07:00
Henry Fang
dfb386f9f3 Fix bug for none fe test case
Test: atest VtsHalTvTunerV1_0TargetTest

bug: 182519645
Change-Id: I5deca5fe7f4f023cbadaf54f894657c1c6efe38a
Merged-In: I86458142ba4155274594a793eb939567bea24734
2021-05-10 16:09:40 +00:00
David Drysdale
2a73db3d9e KeyMint VTS: fix 3DES key sizes
DES key size is 7/8 of what's provided.

Test: VtsAidlKeyMintTargetTest
Change-Id: I645c1df11646d129a9421630cb6e5ed86edb8899
2021-05-10 10:59:19 +01:00
junyulai
88b237cfb5 [SP37] Change requirement of older event callback.
Currently, vendors are asked to duplicate old events to onEvent()
and onEvent_1_1(). This is not the typically way other modules
would do. Thus, remove the requirement of duplicate events,
and replace it with only firing onEvent_1_1 when feasible.

Note no VTS is added currently, from vendor feedback, there is
no reliable way to guarantee the callbacks will be called in the
test.

Test: hidl-gen -L hash -r android.hardware:hardware/interfaces \
      android.hardware.tetheroffload.control@1.1
Bug: 149467454
Merged-In: I75c1a7788e5d48fb3e2836d54b4fd854c0247214
Change-Id: I75c1a7788e5d48fb3e2836d54b4fd854c0247214
  (cherry-picked from ag/14408065)
2021-05-10 11:37:57 +08:00
David Drysdale
e650667341 KeyMint HAL: cert dates are in milliseconds
Test: None, comment change only
Change-Id: I6251d4a0ba74d111f4c107f9a54a5c45811aa90f
2021-05-06 08:25:33 +01:00
David Drysdale
6d454d5f28 Merge changes I32ad8ad2,I86047955
* changes:
  KeyMint VTS: symmetric import test with bad keylen
  KeyMint HAL: restore getKeyCharacteristics() docs
2021-05-06 05:26:31 +00:00
Shawn Willden
aef2a7562e Merge "Added a new test case to validate AES algorithm with invalid key sizes." 2021-05-05 19:48:28 +00:00
David Drysdale
c9bc2f742d KeyMint VTS: symmetric import test with bad keylen
Test: VtsAidlKeyMintTargetTest
Change-Id: I32ad8ad2ca2b18d3279ebe77ba63b34457ab888d
2021-05-05 15:59:39 +01:00
David Drysdale
d0bc4b9e64 KeyMint HAL: restore getKeyCharacteristics() docs
Commit 40eb8f53ea ("KeyMint AIDL tweaks") removed references to
getKeyCharacteristics() in docs, as it was a KeyMaster entrypoint
that wasn't present on the KeyMint HAL.

Commit dadb18dd29 ("Add getKeyCharacteristics method to KeyMint")
added the getKeyCharacteristics() entrypoint to KeyMint, as it
turned out it was needed after all.

This commit restores references to getKeyCharacteristics() in the
Tag.aidl documentation.

Test: VtsAidlKeyMintTargetTest
Change-Id: I860479554b85f4adfeddd4eee70a09cf5265c938
2021-05-05 15:58:43 +01:00
Tommy Chiu
384c82dd14 Merge "vts: Correct the parameters on strongbox" 2021-05-05 14:08:48 +00:00
Andy Hung
66ffc5b99a Merge "StreamOut: Fix STREAM_EVENT_CBK_TYPE_CODEC_FORMAT_CHANGED" 2021-05-04 20:49:44 +00:00
Shawn Willden
da2b9ae9f8 Merge changes Ic8949e22,Ia3a6363d
* changes:
  Update DeviceUniqueAttestationTest to match spec
  Make AttestKeyTest not crash if no cert is returned.
2021-05-04 19:50:41 +00:00
Tommy Chiu
3950b45a44 vts: Correct the parameters on strongbox
If GenerateKey() with user-provide key_blob, it needs to be specified in
the following begin() operations as well. Update the test case just to
take key_blob from private member instead of creating a local one.

Note:
- Remove redudent TAG_NO_AUTH_REQUIRED in DeviceUniqueAttestationTest

Change-Id: I81860294e1e7e01a57e66e08e75507a8292ec0c3
2021-05-04 23:09:56 +08:00
David Drysdale
3368b3c6b0 Merge "More KeyMint VTS testcases" 2021-05-04 08:00:41 +00:00
Shawn Willden
ced5c2c23a Update DeviceUniqueAttestationTest to match spec
Test: VtsAidlKeyMintTargetTest
Change-Id: Ic8949e223eb7ba2445d4738dcd9b31a1d244bb46
2021-05-03 16:36:49 -06:00
Shawn Willden
c410f6fb44 Make AttestKeyTest not crash if no cert is returned.
Test: VtsAidlKeyMintTargetTest
Change-Id: Ia3a6363d854742681f684ff989b98b7cfda30746
2021-05-03 16:36:33 -06:00
Marco Nelissen
a3645d38e9 Merge "Expand Gatekeeper test" 2021-05-03 21:32:08 +00:00
Shawn Willden
cc68516bd2 Make keymaster optional.
Keymaster is now optional because KeyMint can be used instead.  This
CL makes this change retroactively back to compatibility matrix v3,
per discussion with the Treble team.

Test: Replace Keymaster with KeyMint & build
Change-Id: Id26d5bac326c494e1810516582fdd56a42c04e0d
2021-05-03 09:08:12 -06:00
Shawn Willden
c46f9da49f Merge "AttestationKey documentation" 2021-05-03 15:07:38 +00:00
Andy Hung
e6e3a17126 StreamOut: Fix STREAM_EVENT_CBK_TYPE_CODEC_FORMAT_CHANGED
Use audio_metadata_byte_string_len method in asyncEventCallback.

Test: atest metadata_tests
Bug: 186894288
Change-Id: I04914bc5b2c778002b53b8f8da5bf29fff5c80f8
2021-04-30 21:07:33 -07:00
Paul Crowley
8b25958b75 Merge "Add getKeyCharacteristics method to KeyMint" 2021-04-30 21:06:14 +00:00
Andy Hung
b76d8e27fb Merge changes from topics "dra", "dts_uhd", "earc"
* changes:
  Audio: Add AUDIO_FORMAT_DRA
  audio: Add device constants for HDMI EARC
  Audio: Add AUDIO_FORMAT_DTS_UHD
2021-04-30 20:29:48 +00:00
David Drysdale
d2cc8c2c5e More KeyMint VTS testcases
Tests for:
 - non-prime RSA exponent (fails with CF KeyMint)
 - RSA exponent value of 3
 - key size > 512 for `STRONGBOX`
 - unknown tag inclusion
 - CBC input size not block size multiple
 - challenge omitted for attestation (fails with CF KeyMint)
 - import RSA key with implicit params
 - vestigial upgradeKey test
 - importWrappedKey errors
 - importWrappedKey sids ignored
 - duplicate/missing params on begin()
 - more tests for incompatible params on begin()
 - HMAC size not multiple of 8 (fails with CF KeyMint)
 - wrong size caller IV for 3DES rejected
 - too large MIN_MAC_LENGTH for HMAC
 - invalid AES-GCM minimum MAC length values
 - check failed updateAad() cancels operation
 - check that auto-generated nonces are distinct
 - (DISABLED_) invoke destroyAttestationIds()
 - omitting optional RSA keygen tags

Also add commenting to illustrate the ASN.1 structure of hex data.

Test: VtsKeyMintAidlTargetTest
Change-Id: I4663c42671cbb094ffe8d603e0352ffa9f1dbf2e
2021-04-30 19:15:39 +01:00