Commit Graph

56 Commits

Author SHA1 Message Date
Rahul Frias
e92b739407 Revert "Add feature flag to change the CDM version to 18.0.2"
This reverts commit 10f6252e4d.

Reason for revert: Increase in memory size for android.hardware.drm-service.widevine

Bug: 324438957
Change-Id: I39c9ca1ebc1da6b9997f63082530fc258974c5ec
2024-02-12 08:39:23 +00:00
Rahul Frias
10f6252e4d Add feature flag to change the CDM version to 18.0.2
[ Merge of http://go/wvgerrit/191139 ]

Adding an initial flag that include identifiable differences when
the feature is enabled or disabled.

Bug: 311951236
Test: WVTS tests
Change-Id: I57a8e05d3b7c0cb6b43cbef022b436330985fe11
2024-02-07 21:33:22 -08:00
Robert Shih
35d09f3f00 Move wv service relative_install_path to defaults
Bug: 323289757
Test: TreeHugger
Change-Id: I4dfd8836527f4c2d376ee9dd7f3dbf04a058a233
2024-02-01 13:40:53 -08:00
Steven Moreland
ec6cb73143 widevine fuzzer: remove relative paths
breaks fuzzing packaging

Bug: 300993391
Test: run fuzzer, check lsof
Change-Id: Ibfbfcff377ffb3a15197de4c80cdd3d4e27c8b0a
2023-12-28 01:07:58 +00:00
Kyle Zhang
6b60fc3a76 Add property to check if user forces L3
[ Merge of go/wvgerrit/186611 ]

Android user can set the property using the developer option.

Bug: 301669353
Change-Id: I730b635f6cc28dfb0471c1d679627c94b9e16af1
2023-11-09 19:59:46 +00:00
Treehugger Robot
d9b24af07f Merge "Correct stability issues for SPOIDs for provisioning 4.0" into udc-qpr-dev am: 05f045d802 am: 2b9c29d110
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/24537206

Change-Id: I718342725a8025d4e1f6e6d2ec547a4b0e600cf6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-20 22:07:10 +00:00
Treehugger Robot
05f045d802 Merge "Correct stability issues for SPOIDs for provisioning 4.0" into udc-qpr-dev 2023-09-20 20:15:28 +00:00
Rahul Frias
2f83cd0e49 Correct stability issues for SPOIDs for provisioning 4.0
[ Merge of http://go/wvgerrit/183472 ]

For provisioning 4.0 devices, the DRM certificate serial number
was changing on a reprovisioning attempt or factory reset. The
app parameters sent up in the client identification name-value
pair field were being filtered out in provisioning requests.
This has been corrected for provisioning 4.0 stage 2
(DRM certificate request). There is no need to include them for
stage 1 (OEM certificate request).

The test case WvCdmRequestLicenseTest.ProvisioningSpoidTest
was created earlier to ensure that SPOIDs and DRM certificates are
stable. Unfortunately due to another bug b/250099615, the RKP service
was holding a connection to the Widevine TA for provisioning 4.0
devices. When native tests ran as their own process, L1 would fail
to load due to a connection failure and the test would run as L3.
The tests passed for provisioning 4.0 devices Pixel 7 and 8 when
they should have failed. This gave us a false sense of confidence
that the SPOIDs were stable.

For now a workaround is to run a shell command to kill the widevine
TA before running native tests.

$ adb shell pkill -f -9 widevine

New tests have been introduced to provide integration coverage
WVPluginTest at the WV plugin level and CoreIntegrationTest
for core. GTS tests are also being written in b/295538002.

Bug: 294451432
Bug: 293950895
Test: WVPluginTest.ProvisioningStableSpoidTestL1, WVTS tests
Change-Id: Ib9ace4387866ea38bb1840feb69cea78d2d2c09c
2023-09-19 09:39:13 -07:00
Robert Shih
d2ae81db2a Update Widevine apex min_sdk_version to 34 am: d81cdbae42 am: 0734bab945
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/24326594

Change-Id: Ia18fc314eaa00fa7a4bdc8e58d624b667680e896
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-30 21:03:01 +00:00
Robert Shih
d81cdbae42 Update Widevine apex min_sdk_version to 34
Bug: 287567070
Bug: 294568360
Test: v2/widevine-eng/drm_compliance_apex
Change-Id: Iad45bf7a66ff0217724376aa8648ecd613af32c1
2023-08-28 12:30:36 -07: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
Kyle Zhang
9a44708e37 Merge "Set drm@latest to widevine service NOT apex" into udc-dev am: 6fda7dfc49 am: a15cf030ea
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/22655798

Change-Id: If7bba9c5626fd60e3f8f2fc4fca2de91f3f48d2f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-25 20:20:17 +00:00
Kyle Zhang
555b381e81 Set drm@latest to widevine service NOT apex
Bug: 277761241
Change-Id: I71f8a7e6b6a1c3cce24a8b33e0bb7748bbdd7230
2023-04-20 17:29:54 +00:00
Steven Moreland
680b990aee fix widevine fuzzer: c++_static and cc_fuzz
c++_static and cc_fuzz interact badly

Fixes: 275500903
Test: widevine fuzzer starts and runs
Change-Id: I06b89b710c6f1f11d05756651391df3f682f872b
2023-04-14 00:49:37 +00:00
Alex Dale
de779e7545 Moved OEMCryptoResult string converter.
[ Merge of http://go/wvgerrit/170073 ]

Removed the file "error_string_util.cpp" and its header, moving the
OEMCryptoResult to string converter to "wv_cdm_types.cpp".  This extra
file served little purpose, and created a dependency on the CDM utils
to the CDM itself.

This is part of the effort to fix the formatting of WV metrics; making
enum-to-string conversion uniform throughout the CDM.

Bug: 239462891
Test: adb shell dumpsys android.hardware.drm.IDrmFactory/widevine -m
Test: Manual testing with Google TV
Change-Id: I4bf95d26b623f5b8fa86bdb2578cbc4ee65125cb
2023-04-11 14:08:30 -07:00
Kyle Zhang
ce1fb4f089 Integrate apex version info to Widevine CDM property
Bug: 272587114
Test: dumpsys android.hardware.drm.IDrmFactory/widevine -p
Change-Id: Ica99867511391c252b67f40162665380bd2d8740
2023-03-28 18:14:02 +00:00
Jooyung Han
a4de7eb9b5 Set min_sdk_version for the Widevine APEX
also remove `use_vndk_as_stable: true` to remove dependency to VNDK
libs.

Bug: 251299786
Test: build WV APEX with V and install it on U device
Change-Id: Ie7f7f9b699119478d4b33f95ab9e6ba7f459346c
2023-03-28 06:57:46 +00:00
Jooyung Han
81171a7e75 Link dependencies statically
This reduces the APEX size from 6754304 to 4378624.

Bug: 274818387
Test: m com.google.android.widevine
Test: adb install $OUT/vendor/apex/com.google.android.widevine.apex
Test: adb reboot
Change-Id: Ib31291e5ee35297b9d85120f5eca118ebf10f55f
(cherry picked from commit 78f0b81ece)
2023-03-27 23:43:17 +00:00
Fred Gylys-Colwell
bfa8d39a63 Remove some names
Merge from Widevine repo of http://go/wvgerrit/168657

Some people who have left were still in OWNERS files and TODOs.

Bug: 274772704
Test: comments only
Change-Id: I583da815586e5ca52316b2e238d1c1bb3a5e919a
2023-03-27 02:45:01 +00:00
Jooyung Han
f63f6011fa Adding ApexInfo utility
This is to get name/version when the HAL is started from an APEX. This
is the initial work and just prints name/version on startup.

Bug: 268439003
Test: adb logcat | grep com.google.android.widevine
Change-Id: I756c042d544f973999738f7d17022d916b9712cd
2023-03-03 00:02:38 +00:00
Bob Badour
080bfc7414 Merge "Cleanup vendor projects are proprietary." into tm-qpr-dev-plus-aosp am: cbb6177df2
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/21276850

Change-Id: I7ba871f7714ba4eb5dcb5b0571b6024533a25217
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-05 03:54:39 +00:00
Bob Badour
6f047790e0 Cleanup vendor projects are proprietary.
Test: m droid dist
Change-Id: I0bdec38c4d12710fa97b91665d211ba6c0d4b24d
2023-02-03 14:37:11 -08:00
Robert Shih
1fdbd3cd2c aidl plugin: add error details to return status
Merged from http://go/wvgerrit/163639

Bug: 253271674
Test: Google TV
Test: atest MediaDrmParameterizedTests
Test: atest DrmSessionManagerTest
Change-Id: I9f0e83774d405466a389d2fd90d693830682dde4
2022-12-15 14:50:56 +00:00
Edwin Wong
6d3457b9d9 Remove hidl support.
Merged from http://go/wvgerrit/161857

Test: streaming(Netflix, Play Movies & TV)
Test: ./build_and_run_all_unit_tests.sh
Test: adb shell ps | grep drm
Test: metrics_dump
Test: hardware/interfaces/drm/aidl/vts$ atest VtsAidlHalDrmTargetTest

Bug: 259299992
Change-Id: I76bcc82bbfb3fc60987b66265a580946a16c341d
2022-11-22 19:03:30 +00:00
John "Juce" Bruce
ff73463d0b Add String Formatting Util
(Merged from http://go/wvgerrit/160042.)

Since we don't have access to std::format yet, this patch adds a
function to wvutil to format text into a std::string.

Bug: 255466913
Test: x86-64
Test: raven
Change-Id: I28043da76af5b4772a29fa7e7241343caf9b54a1
2022-11-15 05:24:19 +00:00
Edwin Wong
c70e3deb8b Output metrics in YAML format
Merge from http://go/wvgerrit/158917

Use go/yamllint as reference and obfuscate portion of output to
run on an online yaml validator.

Sample output: http://go/cl/481370906

Test: Netflix, Play TV and Movies, Youtube
Test: adb shell dumpsys android.hardware.drm.IDrmFactory/widevine
Test: ./build_and_run_all_unit_tests.sh

Bug: 239462891
Change-Id: I1abf1aa50aa25b97b1f6c10995c324d6de04d056
2022-11-03 19:50:27 +00:00
Kyle Zhang
249404a8df Add widevine vendor apex
Bug: 243699259
Change-Id: Ie1ff0aa9c82f19e0c5412508ac6b67d9083c0cab
2022-09-14 05:31:29 +00:00
Kyle Zhang
eee0d4b88e Revert "Add widevine vendor apex"
Revert submission 19794159-wv-vapex

Reason for revert: Breaking build in branch ndk_translation_all
Reverted Changes:
I48004b8cb:Add widevine apex
Ifa5c1b621:Add widevine vendor apex

Change-Id: I056369265fb341d723b8ff31a0efd7ae3eeec0bb
2022-09-13 18:05:51 +00:00
Kyle Zhang
b9c4bfdaf7 Add widevine vendor apex
Bug: 243699259
Change-Id: Ifa5c1b621a9fc0b6d370124fad7de1334c537c65
2022-09-13 01:29:10 +00:00
Edwin Wong
5400741601 Rename aidl_ include and src directories.
[ Merged from http://go/wvgerrit/152549 ]

Test: unit tests
Test: Google TV and Netflix
Test: atest GtsMediaTestCases

Bug: 216527109
Change-Id: Id70e43315550508e6fedacfee4f4ec009a24d0e3
2022-09-01 19:01:23 +00:00
Pawan
7b5fd271e1 Updating cc_fuzz with default service fuzzer config
Using service_fuzzer_defaults in
	- android.hardware.drm-service.widevine.aidl_fuzzer

Bug: 240318902
Test: m android.hardware.drm-service.widevine.aidl_fuzzer
Change-Id: Ifde3a3f2e75ccaefeb92ee4e93c46f6fc7a8af4c
2022-08-22 21:50:16 +00:00
Alex Dale
6bc69d5005 Remove CORE_UTIL_EXPORT
[ Merge of http://go/wvgerrit/155070 ]

These functions are internal utilities and should not be exported from
our library.  IIRC, this was added to aid in Windows tests, but this is
no longer needed.

Bug: 236317198
Test: build_and_run_all_unit_tests.sh
Change-Id: I19beb35a15f0f87dc8f968e1dd5302aed9463e54
2022-08-19 14:38:55 -07:00
Edwin Wong
a285b363d9 Fuzz Widevine AIDL drmFactory binder interface.
[Merged from http://go/wvgerrit/152150 ]

Test: build and run test

Bug: 226948319
Change-Id: I717d119cbf455fe76e4bb1f818d00141f4e7fa7c
2022-06-26 05:49:03 +00:00
Edwin Wong
af5f57a46c Only use libbinder_ndk for aidl service.
[ Merged from http://go/wvgerrit/151169 ]

Test: Netflix and Google TV streaming and downloaded playback
Test: unit tests
Test: atest VtsAidlHalDrmTargetTest
Test: adb shell readelf -d /vendor/bin/hw/android.hardware.drm-service.widevine
Test: adb shell readelf -d /vendor/lib64/libwvaidl.so

Bug: 230791937
Change-Id: Ia60d9fc838bf228b40d99b076a837ae789fa2d03
2022-05-05 15:12:55 +00:00
Edwin
253a804c57 Enable Widevine Aidl service.
Merged from http://go/wvgerrit/146409

The original http://go/ag/16984707 was reverted due a
merge conflict from tm-dev to master, which
is now fixed by http://go/ag/17035190.

Bug: 219538389
Test: atest GtsMediaTestCases
Test: ./build_and_run_all_unit_tests
Change-Id: I95b639cf7ec138e809540db7a3fc0a234c7f4b2a
2022-03-22 10:17:01 +00:00
Edwin
28feb283f3 Add lazy service for Widevine AIDL HAL.
Merged from http://go/wvgerrit/147329

Test: atest VtsAidlHalDrmTargetTest
Test: atest GtsMediaTestCases

Bug: 221078453
Change-Id: I4345816f18c44de4187f03a087d58e890a6d6b01
2022-03-09 23:30:31 +00:00
Sam Dubey
304da5e399 Revert "Enable Widevine Aidl service."
This reverts commit 2269503129.

Reason for revert: Breaking hal_implementation_test

Bug: 221773661
Change-Id: I85e483fe1fc4f7d71c2cc5c2fc8892b1a57476ab
2022-02-28 05:57:22 +00:00
Edwin
2269503129 Enable Widevine Aidl service.
Merged from http://go/wvgerrit/146409

Bug: 219538389
Test: atest GtsMediaTestCases
Change-Id: I93f1270b304816636babe5a8d76325835793a137
2022-02-23 17:06:11 +00:00
Edwin
9654d29be6 Widevine drm aidl: address API review
Interface update in change 16810770

Bug: 214410088
Test: atest VtsAidlHalDrmTargetTest
Change-Id: I19da51ef75952f5ff6c7c02e0393f574e69ee30b
2022-02-09 22:19:36 -08:00
Edwin
3c3da01d58 Use aidl interface for Widevine service.
The interface is defined in
hardware/interfaces/drm/aidl(http://go/ag/15329852).

Test: build
  m android.hardware.drm-service.widevine -j128

Test: build_and_run_all_unit_tests.sh
  for hidl tests

Test: atest VtsAidlHalDrmTargetTest

Test:   atest vts_treble_vintf_vendor_test:vts_treble_vintf_vendor_test.DeviceManifest/SingleManifestTest#ManifestAidlHalsServed/0 -- --abi x86_64

Bug: 200055138
Bug: 170964303
Change-Id: I5654d90d8a4b0bae4b4a78e79b27c1cafec36be7
2022-02-01 22:20:04 -08:00
Kyle Zhang
fdc585a55d Fix files mis-synced from cdm repo to Android
Test: build
Bug: 161477208
Change-Id: I2d48dff987fe37a54ffdfc47a7896fba975a0e20
2022-02-01 18:08:38 +00:00
Yohei Yukawa
a4d835af3a Revert "Use aidl interface for Widevine service."
This reverts commit 96a8ccd4a1.

Reason for revert:
Could break DeviceManifest/SingleManifestTest#ManifestAidlHalsServed

Bug: 200055138
Bug: 170964303
Bug: 217241995
Change-Id: I9c42df15defec428c9ef8c62439c63d4a603fee6
2022-01-31 22:01:25 +00:00
Edwin
96a8ccd4a1 Use aidl interface for Widevine service.
The interface is defined in
hardware/interfaces/drm/aidl(http://go/ag/15329852).

Test: build
  m android.hardware.drm-service.widevine -j128

Test: build_and_run_all_unit_tests.sh
  for hidl tests

Test: atest VtsAidlHalDrmTargetTest

Bug: 200055138
Bug: 170964303
Change-Id: If2f2a129914436ba5cef1c46f6cb9415e12c3d1c
2022-01-28 20:29:14 -08:00
Kyle Zhang
642965c678 Merge latest oemcrypto-v17 change
No-Typo-Check: Not related to this change.

Bug: 161477208
Change-Id: I99e4780f6855b7045aa0cd5a49c13d2d0d51ed64
2022-01-27 20:07:15 -08:00
TreeHugger Robot
0b02296014 Removing Non-HIDL Widevine DRM Plugin for Android
[ Merge of http://go/wvgerrit/138089 ]

Non-hidl code is no longer needed in the widevine android plugin. By
doing work this cleanup will save the team from having to keep
maintaining code that isn't needed anymore.
Clean up steps taken as follows:
    1. Remove non-hidl code but keep commonly used code
    2. Remove legacy test code
    3. Remove legacy test build and test entry

Bug: 69573078
Bug: 172285246
Test: unit tests, GtsMediaTestCases, CtsMediaDrmTestCases
Change-Id: I75938d69413c631ef6be82da3d885ba173efc581
2021-11-11 02:06:15 +00:00
Robert Shih
2a33c82d81 Create "latest" Widevine service build target
Bug: 190952785
Test: avd/avd_boot_test
Change-Id: I3214092841700cc69402552630d0ad615b5d1433
2021-08-11 18:43:45 +00:00
Robert Shih
20b7762982 Add 1.3 widevine hidl target
libwvhidl picked from the following builds:
+--------+---------+
| arch   | build   |
+--------+---------+
| arm    | 7520386 |
| arm64  | 7511028 |
| x86    | 7511028 |
| x86_64 | 7511028 |
+--------+---------+

Ran patchelf to set DT_SONAME to libwvhidl@1.3.so

Bug: 191881462
Test: atest MediaDrmTest#testOemCryptoVersion
Change-Id: I0f6c6750124d89145ef54c47d7dc8c95a7207063
2021-07-02 23:24:38 -07:00
Robert Shih
a81ace2ea4 Use drm@1.4 vintf fragments for drm@1.3
This avoids widevine crashloops in case partners updated
vendor/widevine without updating device makefiles.

[ Merge of http://go/wvgerrit/126103 ]

Bug: 178110290
Bug: 186502089
Test: GtsMediaTestCases
Change-Id: Iafd9e62beadf5a099a76ab6a987ffd9598e5ef25
2021-06-04 19:45:16 +00:00
Bob Badour
376f47047c [LSC] Add LOCAL_LICENSE_KINDS to vendor/widevine
Added SPDX-license-identifier-Apache-2.0 legacy_by_exception_only to:
  Android.bp
  libwvdrmengine/Android.bp
  libwvdrmengine/vts/vendor_module/Android.bp

Added legacy_by_exception_only to:
  libwvdrmengine/cdm/Android.bp
  libwvdrmengine/cdm/core/src/Android.bp
  libwvdrmengine/cdm/core/test/Android.bp
  libwvdrmengine/cdm/metrics/src/Android.bp
  libwvdrmengine/cdm/test/integration-test.mk
  libwvdrmengine/cdm/test/unit-test.mk
  libwvdrmengine/level3/Android.bp
  libwvdrmengine/mediacrypto/Android.bp
  libwvdrmengine/mediacrypto/test/Android.mk
  libwvdrmengine/mediadrm/Android.bp
  libwvdrmengine/mediadrm/test/Android.mk
  libwvdrmengine/oemcrypto/odk/Android.bp
  libwvdrmengine/oemcrypto/odk/test/fuzzing/Android.bp
  libwvdrmengine/oemcrypto/odk/test/fuzzing/corpus_generator/Android.bp
  libwvdrmengine/oemcrypto/test/Android.mk
  libwvdrmengine/test/unit/Android.mk
  libwvdrmengine/tools/metrics_dump/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I41ef520b6e394a7708f453a706e6ef1a5f46c36a
2021-03-25 09:52:52 -07:00
Robert Shih
7cb52c1ccf wvcdm: filter logs by app uid
This commit is a combination of the following:
* http://go/wvgerrit/117003
* http://go/wvgerrit/118303

Bug: 162255728
Test: MediaDrmTest#testGetLogMessages
Change-Id: I5699b64d5c4bab463e5b587595fa7d324dc1d93f
2021-03-01 11:56:37 -08:00