Commit Graph

3403 Commits

Author SHA1 Message Date
Alex Dale
ed81ae2b11 Remove duplicate session ID in metrics dump.
[ Merge of http://go/wvgerrit/174932 ]

Bug: 281794097
Test: adb shell dumpsys android.hardware.drm.IDrmFactory/widevine -m
Change-Id: Id29e1c4298ed5b86453f22012cfccc2cb5ee7d05
2023-05-10 16:20:45 -07:00
Kyle Zhang
79575fcdf6 Merge changes Icd280b53,I6eed117e into udc-dev am: 1a42aed25b am: 41990b43b9
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/23049485

Change-Id: Ib59bb191ea45d18ae29240abad4ed59a9010d7aa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-10 22:53:48 +00:00
Kyle Zhang
1a42aed25b Merge changes Icd280b53,I6eed117e into udc-dev
* changes:
  Cast Receiver integration test
  Combine provisioning code for tests and improve logging
2023-05-10 18:40:30 +00:00
Fred Gylys-Colwell
d211195f92 Cast Receiver integration test
Merge from Widevine repo of http://go/wvgerrit/169471

Remove the test in android tests and add it to the
core tests.

Bug: 276464340
Test: GTEST_FILTER="CorePIGTest.CastReceiverProvisioning*" jenkins/run_fake_l1_tests
Change-Id: Icd280b532ddae274f66b2fab3e65520e96adb7cb
2023-05-10 18:40:21 +00:00
Fred Gylys-Colwell
836b1a30a6 Combine provisioning code for tests and improve logging
Merge from Widevine repo of http://go/wvgerrit/169018

This CL adds a provisioning holder that attempts to
provision and logs the request and response for
failures. The server team can replay the request to debug
problems on their end.

Bug: 276464340
Test: ran cast and ota tests
Change-Id: I6eed117e504ae3287f2ba16c3c507cfdc7456f8d
2023-05-10 18:38:50 +00:00
Rahul Frias
8e57831133 Fix oec session id in dynamic adpater am: 09d7572ece am: 6dbee88175
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/23104917

Change-Id: I3fc0abfc7987afb5680a5a24f2ec500ca88f35eb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-10 07:52:39 +00:00
Pawan Wagh
acbfc3ce7d Disable leak detection in widevine aidl fuzzer
Setting up ASAN and HWASAN options to ignore leaks while fuzzing.

Test: m android.hardware.drm-service.widevine.aidl_fuzzer
Bug: 272721367
Change-Id: Icc9aebeb579a224b0f1aa4c0e4e60cb282830682
2023-05-09 19:01:43 +00:00
Rahul Frias
09d7572ece Fix oec session id in dynamic adpater
[ Merge of http://go/wvgerrit/174572 ]

Pass the real oemcrypto session id from `pair.session` instead of
`session` for CopyBuffer, since `session` can be changed when L1
and L3 are running in parallel and `session` in that case may not
be the correct oemcrypto session id any more.

Bug: 279967915
Test: wvts
Change-Id: Ic5e21ccb227d4c4992ef500435fa3b68812c4d9b
2023-05-08 23:21:47 -07:00
Treehugger Robot
daada605c0 Merge "Skip RenewOnLicenseLoad tests for v17 OEMCrypto" into udc-dev am: 24c3bbb783 am: 49891001a6
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/23049486

Change-Id: I197ded77d47304a7e0f62b5cf8ee60634547163b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-09 02:08:08 +00:00
Treehugger Robot
5c07b90b2b Merge "Expect failure on license load for expired LDL license" into udc-dev am: 6511d44f3c am: e7a5379e2b
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/23049483

Change-Id: I660eb6bba17a58c9d0fb427fc4f762cf93a67be9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-09 01:43:55 +00:00
Alex Dale
3e2a153669 Updated usage test to expect v16 duration values. am: f2bf164914 am: 766904974b am: 340fd56fe1 am: ecb9cef2f6
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/23066555

Change-Id: I34f29cdd6cda47f01fd4483265063d5e6cb3b1df
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-08 21:16:48 +00:00
Treehugger Robot
24c3bbb783 Merge "Skip RenewOnLicenseLoad tests for v17 OEMCrypto" into udc-dev 2023-05-08 20:38:47 +00:00
Treehugger Robot
6511d44f3c Merge "Expect failure on license load for expired LDL license" into udc-dev 2023-05-08 19:03:33 +00:00
Rahul Frias
fa4f9ca07d Skip RenewOnLicenseLoad tests for v17 OEMCrypto
[ Merge of http://go/wvgerrit/173950 ]

Bug: 280641992
Test: duration use case tests
Change-Id: If81df367c9359592b1ba797f6192d413afe55273
2023-05-08 11:55:40 -07:00
Alex Dale
f2bf164914 Updated usage test to expect v16 duration values.
[ Merge of http://go/wvgerrit/174431 ]

It is possible that the initial license duration was limited due to
the finit rental duration; however, if the license has a soft rental
duration, it will be considered unlimited after playback has begun.

The *.UsageTest* have been updated to ignore cases where initial
license durations are finit, but later report as unlimited.

Bug: 275651559
Test: cdm_extended_duration_test
Change-Id: I689163b1066b2bc9f9345e2279e9373010f844cc
2023-05-05 17:30:13 -07:00
Fred Gylys-Colwell
65d52908af Expect failure on license load for expired LDL license
Merge from Widevine repo of http://go/wvgerrit/170970

RenewOnLicenseLoad.Case2 tests are failing because they
are expecting to load an expired license. However, the spec
says that the license should return KEY_EXPIRED. The test is
being updated.

Some other RenewOnLicenseLoad tests were failing because
they forgot to request the renewal.

Bug: 278750980
Test: Run tests on Luci
Change-Id: I7196db11fcf43859ba9310b87fd8ccb609e47039
2023-05-04 21:18:06 -07:00
Treehugger Robot
160dfd26d4 Merge "Drop prebuilt files to android source tree." into udc-dev am: 651776f475 am: 7056d1cf9c
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/22975314

Change-Id: I883a752df82e3da2b99400635bdd998f7bfbfbdb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-03 20:24:34 +00:00
Treehugger Robot
fff77cba30 Merge "Widevine apex cleanup" into udc-dev am: 630fbd2251 am: 2d6a8e0adf
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/22938238

Change-Id: Id3257fdd4cb5aaf4b972b58f95fa7c354f8dc900
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-03 20:24:33 +00:00
Alex Dale
3d0e4aa1d3 Merge "Exclude the default CDM from metrics history." into udc-dev am: 2e84e8b5f7 am: e8a9de1414
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/22957292

Change-Id: I76b4f72e611236b7586b82106ac143474852783c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-03 20:18:49 +00:00
Treehugger Robot
651776f475 Merge "Drop prebuilt files to android source tree." into udc-dev 2023-05-03 19:34:04 +00:00
Treehugger Robot
630fbd2251 Merge "Widevine apex cleanup" into udc-dev 2023-05-03 19:34:04 +00:00
Alex Dale
2e84e8b5f7 Merge "Exclude the default CDM from metrics history." into udc-dev 2023-05-03 18:44:06 +00:00
Kyle Zhang
dc9fbae1b4 Widevine apex cleanup
1. Remove prerelease tag.
2. Add TARGET_BUILD_WIDEVINE_USE_PREBUILT to control building from source.
3. Unify config namespace to "widevine".

Bug: 251299786
Bug: 277764729
Change-Id: I2f19bcf8efd280a1a3aa86f595599d79e20b4ff4
2023-05-03 17:38:43 +00:00
Alex Dale
aa0886b85a Merge "DRM Pluging uses CDM core's generic crypto API." into udc-dev am: 82709ebab0 am: fd481de76f
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/22956431

Change-Id: I45055578f0614842ac9b811d7ac83bf0fd6e4bac
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-03 02:37:07 +00:00
Treehugger Robot
ad94c2e960 Merge "Piped CdmEngine's generic crypto operations to Android CDM." into udc-dev am: c77b0a6bf2 am: 3fa190202b
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/22824317

Change-Id: Ie6b0eaee344b45e23b31c943d0ab7305e808d684
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-03 02:36:11 +00:00
Alex Dale
82709ebab0 Merge "DRM Pluging uses CDM core's generic crypto API." into udc-dev 2023-05-03 02:02:45 +00:00
Treehugger Robot
c77b0a6bf2 Merge "Piped CdmEngine's generic crypto operations to Android CDM." into udc-dev 2023-05-03 01:16:23 +00:00
Rahul Frias
6c316a7a48 Merge "Add error details when offline license is not found" into udc-dev am: a4dc63581f am: c03e8abf39
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/22808261

Change-Id: I95968919fd7ef8996c260f6d6d3bf73a06400080
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-03 00:51:15 +00:00
Alex Dale
628d1ac38c DRM Pluging uses CDM core's generic crypto API.
[ Merge of http://go/wvgerrit/173170 ]

This CL updates the Widevine's Android DRM plugin to use the generic
crypto operations provided by CDM core rather than its own
implementation.

Bug: 274984456
Test: atest WvtsDeviceTestCases
Change-Id: I94e1c92c7da577aad5ec43bd3bf0bb380b607b80
2023-05-02 16:51:23 -07:00
Rahul Frias
a4dc63581f Merge "Add error details when offline license is not found" into udc-dev 2023-05-02 23:41:30 +00:00
Kyle Zhang
d3f2693e17 Drop prebuilt files to android source tree.
The following files have been updated as part of this change:

libwvdrmengine/apex/prebuilt/com.google.android.widevine.lazy.apks[standalones/standalone-arm64_v8a.apex]
package: name=com.google.android.widevine.lazy
versionCode=340613000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/com.google.android.widevine.lazy.apks[standalones/standalone-armeabi_v7a.apex]
package: name=com.google.android.widevine.lazy
versionCode=340613000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/com.google.android.widevine.lazy.apks[standalones/standalone-x86.apex]
package: name=com.google.android.widevine.lazy
versionCode=340613000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/com.google.android.widevine.lazy.apks[standalones/standalone-x86_64.apex]
package: name=com.google.android.widevine.lazy
versionCode=340613000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/com.google.android.widevine.nonupdatable.apks[standalones/standalone-arm64_v8a.apex]
package: name=com.google.android.widevine.nonupdatable
versionCode=340613000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/com.google.android.widevine.nonupdatable.apks[standalones/standalone-armeabi_v7a.apex]
package: name=com.google.android.widevine.nonupdatable
versionCode=340613000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/com.google.android.widevine.nonupdatable.apks[standalones/standalone-x86.apex]
package: name=com.google.android.widevine.nonupdatable
versionCode=340613000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

libwvdrmengine/apex/prebuilt/com.google.android.widevine.nonupdatable.apks[standalones/standalone-x86_64.apex]
package: name=com.google.android.widevine.nonupdatable
versionCode=340613000
versionName=
platformBuildVersionName=UpsideDownCake
compileSdkVersion=34
compileSdkVersionCodename=UpsideDownCake
sdkVersion:34
targetSdkVersion:34

Built here: ab/10026699

The change is generated with prebuilt drop tool.

Bug: 251299786
Change-Id: I51b971baddaa43156a7aecbc6fc7ba37cf94e72a
2023-05-02 21:28:37 +00:00
Cong Lin
09ffb9919a Fix session id in dynamic adapter and re-generate L3 am: 9651c61e25 am: cdf5ef3879
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/22953666

Change-Id: Iff89968f42419270510ef39a4e1d946f9dc21e4f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-02 01:50:08 +00:00
Kyle Alexander
cf47b70b0b Update gts/cts helper script with WVTS paths
Test: ./run_gts_and_cts_tests.sh

Bug: 276784713
Change-Id: Ifede9156403c24812da12fe1a3182060d97ecd04
2023-05-02 01:32:56 +00:00
Alex Dale
37f125a491 Piped CdmEngine's generic crypto operations to Android CDM.
[ Merge of http://go/wvgerrit/172010 ]

The CdmEngine provides an API for generic crypto operations that are
already used for the CE CDM.  This API is being exposed in the Android
CDM.  The parameter order of the Android CDM is modified to match the
existing generic crypto parameters used in the media DRM plugin.

Bug: 274984456
Bug: 29400687
Test: build x86-64 and Android
Change-Id: I3b286ebb011bd58754b7b8ea814ed46daf1f62f9
2023-05-01 15:50:39 -07:00
Alex Dale
da6437fe5e Exclude the default CDM from metrics history.
[ Merge of http://go/wvgerrit/173410 ]

The DRM plugin opens and closes many CDMs using the default identifier.
These metrics are not needed when checking the metric history and will
no longer be stored.  Default CDM metrics will continue to appear in
the live metrics list.

Bug: 239462891
Bug: 270166158
Test: adb shell dumpsys android.hardware.drm.IDrmFactory/widevine -m
Change-Id: I64662a44e9c084cc0f08c5a3f013dbf86374ac2d
2023-05-01 15:37:34 -07:00
Cong Lin
9651c61e25 Fix session id in dynamic adapter and re-generate L3
Merge of https://widevine-internal-review.googlesource.com/c/cdm/+/173330

Skipping files that are not in android from the CL above.

Original commit message:

Pass the real oemcrypto session id from `pair.session` instead of
`session`, since `session` can be changed when L1 and L3 are running in parallel and `session` in that case may not be the correct oemcrypto session id any more.

Also adding a few missing v18 L3 functions pointers to the dynamic
adapter.

Need to re-generate L3 since the L3 sources changed.

Test: L3 unit tests
Test: GTS dash policy tests and Dexter tests
Bug: 271290471
Bug: 279967915
Change-Id: Idc44d57ca38eb1de24c0038917800e37c25b9afc
2023-05-01 19:25:27 +00:00
Alex Dale
1020db3fd7 Merge "Allow metrics history to outlive the Android CDM." into udc-dev am: 3e650cfd9f am: 7c24330ea9
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/22914977

Change-Id: Ic460c355c0054022bdd9d42774fa899834174c78
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-29 00:48:24 +00:00
Alex Dale
92e4664459 Merge "Include metric history in dumpsys." into udc-dev am: 7b32faf9f8 am: e61b02b417
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/22794477

Change-Id: Ic5b8ed9b5c9b0088cb03b5d41fcb2a6c7360c184
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-29 00:46:41 +00:00
Alex Dale
153de982ca Merge "Added metrics history for WV CDM for Android." into udc-dev am: b5a7412675 am: e4593c5836
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/22794476

Change-Id: I54c088c8fd6cbf06edb332510f080bf205d60206
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-29 00:45:43 +00:00
Alex Dale
3e650cfd9f Merge "Allow metrics history to outlive the Android CDM." into udc-dev 2023-04-29 00:17:49 +00:00
Alex Dale
7b32faf9f8 Merge "Include metric history in dumpsys." into udc-dev 2023-04-29 00:15:57 +00:00
Alex Dale
b5a7412675 Merge "Added metrics history for WV CDM for Android." into udc-dev 2023-04-28 23:39:33 +00:00
Rahul Frias
9d1c9ca76a Add error details when offline license is not found
[ Merge of http://go/wvgerrit/171310 ]

Offline license not found errors are identified by CdmResponseEnum
347 (KEYSET_ID_NOT_FOUND_4). No addition file system information
is shared.

Checks for file existance use the stat command. The stat call can
return error codes from errno.h when the command fails.
These are now converted into sub error codes and returned along with
the offline license file not found error.

This also includes a change to log stat errors other than
ENOENT (no such file or directory) as a warning rather than verbose.

Bug: 276225520
Test: file_store_unittest, file_utils_unittest, GtsMediaTestCases
Change-Id: Ic09d036549582cd65783b49fa96ffefc4bf562c7
2023-04-28 02:38:35 -07:00
Kyle Zhang
fa7062e2c1 Merge "Fix prebuilt apexes" into udc-dev am: 5409567ef9 am: 0ef103b048
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/22787524

Change-Id: Ie325ed43cbc9f476c37cd641417182b65797deec
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-27 22:45:43 +00:00
Kyle Zhang
2c0eff8b38 Merge "Create different targets for each Widevine apex" into udc-dev am: c01cd91d92 am: 7d3b62c8f6
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/22604302

Change-Id: I00c93833499f31682a5ac1d5825185e3c5d85699
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-27 22:45:39 +00:00
Alex Dale
4b267e37f9 Allow metrics history to outlive the Android CDM.
[ Merge of http://go/wvgerrit/172910 ]

The lifecycle of the Android CDM is controlled by Android's strong/
weak pointer functionality.  Unfortunately, it does not provide an
easily predictable point in the code where the CDM is to be deleted
along with the saved metrics.  In order to allow the CDM to keep a
list of metrics that are persistent with the life of the service, a
global thread safe queue is provided which is created when the first
CDM is created, but will out live the CDM.

The metrics will still be deleted when the DRM service is terminated.

Bug: 270166158
Test: adb shell dumpsys android.hardware.drm.IDrmFactory/widevine -m
Change-Id: Id98676d8b5278798b4de332cc272cd5b85024244
2023-04-27 15:31:39 -07:00
Alex Dale
666e26284f Include metric history in dumpsys.
[ Merge of http://go/wvgerrit/171470 ]

Dumping the DRM plugin metrics will now include any saved instances of
the CDM metrics that may be available.

Bug: 239462891
Bug: 270166158
Test: adb shell dumpsys android.hardware.drm.IDrmFactory/widevine -m
Test: atest GtsMediaTestCases
Change-Id: I24d3e0771b50fd20212568a7fd5654691ae51f93
2023-04-27 14:54:17 -07:00
Alex Dale
c42627a23e Added metrics history for WV CDM for Android.
[ Merge of http://go/wvgerrit/171271 ]

There is a need to maintain a short history of metrics from CDMs which
have been deleted.  This CL adds this ability to the Android version
of the WV CDM.  The history cannot yet be maintained for long, as the
WV CDM instance is destroyed if unused.

Further changes are required to the plugin to maintain the history
beyond the life-cycle of the CDM instance, and to properly format
its output.

Bug: 239462891
Bug: 270166158
Test: adb shell dumpsys android.hardware.drm.IDrmFactory/widevine -m
Test: atest GtsMediaTestCases
Change-Id: I81c0996602722a9795fc3951030d20bb39b5816b
2023-04-27 14:54:17 -07:00
Kyle Zhang
5409567ef9 Merge "Fix prebuilt apexes" into udc-dev 2023-04-27 21:21:11 +00:00
Kyle Zhang
c01cd91d92 Merge "Create different targets for each Widevine apex" into udc-dev 2023-04-27 21:21:11 +00:00