Commit Graph

6975 Commits

Author SHA1 Message Date
Seth Moore
25f180da45 Add dependency on split out RKP HAL
Bug: 254112961
Test: N/A
Change-Id: I87133e385db890bd50422c4cad226a7ddb4b8154
2022-11-02 21:44:23 -07:00
TreeHugger Robot
9c19e7bdf6 Merge "Adding vintf fragment to the apex" 2022-10-27 23:56:28 +00:00
TreeHugger Robot
859f26f1b7 Merge "Remove "rebootless" related stuff" 2022-10-26 02:58:19 +00:00
Tri Vo
a51fea4572 Add stub for IRPC v3
Bug: 254569740
Test: m android.hardware.security.keymint-service.widevine
Change-Id: Ia79d53921258ccd755f1b753c0081aad84a8e85e
2022-10-20 10:58:13 -07:00
Jooyung Han
ca21643c32 Adding vintf fragment to the apex
Now vintf fragments can be embedded to APEX.

Bug: 239054171
Test: m check-vintf-all
Change-Id: I09a136915820fa4b34d4063f488dee4b8623a159
2022-10-20 16:49:21 +09:00
Jooyung Han
10b782484d Remove "rebootless" related stuff
The widevine apex is supposed to be installed in a "staged" way.

- apex_manifest: remove supportsRebootlessUpdate flag
- .rc: remove apex.com.google.android.widevine.ready=true

Bug: 243333942
Test: m
Change-Id: Ibb963937e6d8d889d9281d22972e12a148f59b94
2022-10-20 16:17:48 +09:00
Alex Dale
8451afe58a Merge "Android CDM: Removed secure stop tests." 2022-10-19 21:04:25 +00:00
Alex Dale
d027236719 Android CDM: Removed secure stop tests.
[ Merge of http://go/wvgerrit/158720 ]

Support for secure stop licenses have been dropped.  The MediaDRM
APIs have already documented their deprecation.  Before support can
be removed from the plugin and CDM core implementation, the tests
associated with them must be removed.

This CL removes secure stop tests from the Android CDM integration
test `request_license_test` and from the MediaDRM plugin test
`libwvdrmdrmplugin_hal_test` and `libwvdrmdrmplugin_hidl_test`.

Bug: 242289743
Test: libwvdrmdrmplugin_hal_test request_license_test
Change-Id: Idb7ee53ab8115ce9b9a173eaf0a00f54325863a2
2022-10-14 12:57:49 -07:00
Robert Shih
6dd81b195e libwvhidl@1.3.so: use static libprotobuf am: c09bb48955
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/20181997

Change-Id: If66684ca3c591d4d97337bc35d3ec79e48d7375e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-13 20:22:09 +00:00
Robert Shih
c09bb48955 libwvhidl@1.3.so: use static libprotobuf
libwvhidl picked from the following builds
(built from change 20109884):

+--------+--------------+
| arch   | build        |
+--------+--------------+
| arm    | ab/P41744857 |
| arm64  | ab/P41675377 |
| x86    | ab/P41675376 |
| x86_64 | ab/P41675378 |
+--------+--------------+

Ran patchelf to set DT_SONAME to libwvhidl@1.3.so

Bug: 249811494
Change-Id: I1ec8304bab4d81b958b6be056a0b32da386bc997
(cherry picked from commit 6bad0134d3c9ca8d479f121c71d66ac2d3e017b9)
2022-10-13 00:58:58 +00:00
Kyle Zhang
af0168dbed Merge cdm changes to android repo
Bug: 251924225
Test: GtsMediaTestCases
Change-Id: I1b4e64c0abf701fe1f5017f14dc72b72c3ea6770
2022-10-11 00:40:42 +00:00
TreeHugger Robot
3cfe7c7299 Merge "Use devkeys for widevine apex only if they are available" 2022-10-07 01:37:19 +00:00
Jooyung Han
b6f624e85a Use devkeys for widevine apex only if they are available
In partner branches devkeys are not available. Use devkeys only when
they are available. Otherwise, use testkeys.

Bug: 249309699
Test: m com.google.android.widevine
Change-Id: I75fd50fe78d0fd2e797275c50ddf00b116700178
2022-10-06 23:27:52 +00:00
Jeffrey Kardatzke
8f9f25ca35 libwvdrmengine: Change ChromeOS ro.product props to ro.vendor
As of Android T, these need to start with the ro.vendor prefix. We are
doing it now so we can update ChromeOS to be in sync for either version.

Bug: 237492145, 248584954
Test: No properties errors in logcat during playback
Change-Id: Ic6fac64e621be65385d16808dbef52914a66967a
(cherry picked from commit 28a040d407b28d24dd4d5496dd08cfa2f6579d71)
(cherry picked from commit a932781fcc7d2d89d73c546bf244399daf02f5ac)
2022-09-30 18:30:01 +00:00
Jooyung Han
56ee5f052c Merge "Configure WV HAL APEX to be updatable" 2022-09-26 07:15:37 +00:00
Jeffrey Kardatzke
ea5825643b Merge "libwvdrmengine: Limit custom property check to ChromeOS" 2022-09-23 21:26:24 +00:00
Wilson Sung
538313c903 Merge "Revert "Apply dev keys for signing widevine apex"" 2022-09-23 15:23:17 +00:00
Wilson Sung
a0834d473e Revert "Apply dev keys for signing widevine apex"
This reverts commit 33796a29cf.

Reason for revert: PDK BB
Bug: 248436066
Change-Id: Ib0073f96e7b0326898b2384ea4279833211b1ff0
2022-09-23 06:25:30 +00:00
Kyle Zhang
f1c1e13019 Merge "Apply dev keys for signing widevine apex" 2022-09-22 18:54:39 +00:00
Jooyung Han
b278b4170e Configure WV HAL APEX to be updatable
- add "supportRebootless" to apex_manifest.json
- add <allowed-vendor-apex> sysconfig
- add "on property:apex.com.google.android.widevine.ready=true" to .rc

Now, we can test `adb install` new version of the APEX and see the
service is restarted from the new version.

Note that this doesn't mean that DRM Framework works fine with the
update.

Bug: 248192031
Test: adb install --force-non-staged \
   -i com.android.vending \
   $OUT/vendor/com.google.android.widevine.apex
Change-Id: I7c41b224f0bb55742c0023c23196bba4a09e555f
2022-09-22 19:22:57 +09:00
Kyle Zhang
33796a29cf Apply dev keys for signing widevine apex
Bug: 243699259
Change-Id: Idaeb65ea29c6a62edac0e30e44d444415c528afb
2022-09-22 05:26:19 +00:00
Alex Dale
84badb3109 Merge "Create custom gtest matcher for similar URLs." 2022-09-21 00:52:32 +00:00
Jeffrey Kardatzke
06c1343153 libwvdrmengine: Limit custom property check to ChromeOS
We added custom properties that are only used on ChromeOS and to avoid
having to bloat the sepolicy for all of Android we are adding a check
here so that we only query the properties on ChromeOS based on the
bertha hardware property.

Bug: b:237492145
Test: Access denied message is gone w/ ExoPlayer
Change-Id: I3a5781ad980dfae2e16501b655386287b5e245b7
(cherry picked from commit 890f71ef367aed683a89892000e40d0e0ca6fbdd)
(cherry picked from commit 4379b0545a2ae866ba9fc315551a5534fa163924)
2022-09-19 16:52:24 +00:00
Bob Badour
dcc11d56cb [LSC] Add LOCAL_LICENSE_KINDS to vendor/widevine
Added SPDX-license-identifier-Apache-2.0 to:
  libwvdrmengine/apex/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Change-Id: Ibd3b1e73709de25ddfdddbdd2ecc56abe87a4c2f
2022-09-15 07:10:54 -07:00
Kyle Zhang
249404a8df Add widevine vendor apex
Bug: 243699259
Change-Id: Ie1ff0aa9c82f19e0c5412508ac6b67d9083c0cab
2022-09-14 05:31:29 +00:00
TreeHugger Robot
20388e323d Merge "Revert "Add widevine vendor apex"" 2022-09-13 19:35:10 +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
c68012cd2f Merge "Add widevine vendor apex" 2022-09-13 16:57:54 +00:00
Kyle Zhang
b9c4bfdaf7 Add widevine vendor apex
Bug: 243699259
Change-Id: Ifa5c1b621a9fc0b6d370124fad7de1334c537c65
2022-09-13 01:29:10 +00:00
Alex Dale
66a3ec64d2 Create custom gtest matcher for similar URLs.
[ Cherry-pick of http://ag/19893913 ]
[ Merge of http://go/wvgerrit/157098 ]

Several of the Android integration tests perform direct URL comparisons
between fixed URLs and the server URL returned by the CDM.  With
provisioning 4.0, the CDM will append additional query parameters to
the server URL.  This updated URL still contains all of the original
expected information, but with additional parameters.  So long as the
URL contains the required fields, any additional parameter should be
considered valid.

The gtest framework used by the integration tests allow for the
creation of custom "matchers", rules that can be used to validate data
and create informative failure logs.  The CL creates a new matcher for
checking that a tested URL is a superset of content of the expected
URL.

Bug: 244319313
Test: request_license_test on prov 4 device
Change-Id: Ie721058fa628b3a4a74dc56f4172a3dfcb1f1ef3
(cherry picked from commit fa8c0a9a62)
2022-09-09 22:57:14 +00:00
Rahul Frias
536475dfd4 Log bad provisioning response
[ Merge of http://go/wvgerrit/156177 ]

If the json from a provisioning request is not parsed, we
log it as an error.

Bug: 242744857
Test: WV unit/integration tests
Change-Id: Ie8ff9388fb520c848b951d6102b23552ce309903
2022-09-08 15:00:36 -07:00
Tri Vo
f4732ee667 Merge "Use latest KM AIDL API" 2022-09-08 16:49:59 +00:00
Edwin Wong
c39a485e35 Merge "Rename aidl_ include and src directories." 2022-09-06 23:59:59 +00:00
Tri Vo
c46372cc57 Use latest KM AIDL API
This makes it easier to upgrade KM AIDL version.

Test: m android.hardware.security.keymint-service.widevine
Change-Id: I251d7f3222617cbb3ba8b084c146aeb629f8eb6f
2022-09-06 11:18:34 -07:00
Edwin Wong
e176b20509 Rename aidl_ include and src directories.
Test: unit tests
Test: Google TV and Netflix
Test: atest GtsMediaTestCases

Bug: 216527109
Change-Id: I3fd02c2c60da588dba3db27cea3593de25a7180f
2022-09-05 21:08:25 +00:00
TreeHugger Robot
ac23526e15 Merge "Revert "Rename aidl_ include and src directories."" 2022-09-02 18:28:20 +00:00
Edwin Wong
a7aa1c5013 Revert "Rename aidl_ include and src directories."
This reverts commit 5400741601.

Reason for revert: broke hidl build

Change-Id: I3954a1c0d6c0d7a663bd2a1c8c8888cae37cee80
2022-09-02 17:17:20 +00:00
TreeHugger Robot
3ec4679ff2 Merge "Allow running tests without test keybox." 2022-09-01 22:21:11 +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
Edwin Wong
a7b76187ea Merge "Call AIBinder_setRequestingSid from createBinder override function" 2022-08-31 17:16:27 +00:00
Alex Dale
458f4f68c4 Allow running tests without test keybox.
[ CDM CL http://go/wvgerrit/156286 ]

Local test scripts can now run the CDM unit tests without using a test
keybox / test RSA key by setting an environment variable:

  DISABLE_TEST_KEYBOX=yes

The default behavior will continue to be that the unit tests will load
a test keybox / test RSA key.

This is to enable testing different provisioning features when the
device uses keyboxes for its ROT.  Provisioning methods like 3.0 and
4.0 were never forcibly required to load a test ROT.

This is change is required for the ability to test ECC-enabled
keyboxes.

Bug: 135283522
Test: run_x86_64_tests and build_and_run_all_unit_tests.sh
Change-Id: I2a85be541deec3f60ab8fa82452a4d4cafaed339
2022-08-29 17:14:26 -07: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
Alex Dale
e3697c6595 Fix oemcrypto_decrypt_cenc_fuzz null reference
[ Merge of http://go/wvgerrit/153669 ]

The oemcrypto_decrypt_cenc_fuzz fuzz test found a null reference error.
This adds a check to ensure that the input_buffer vector used for the
sample descriptions is not empty before attempting to access it.

Bug: 192310854
Bug: 236317198
Change-Id: If3909b01d3bc19434bbd5b6b77e7cd76182b2bdf
2022-08-19 14:38:33 -07:00
Alex Dale
490696322f Added mutex protection for session_property_set_. am: 381f879ff7 am: 5b5c0fd770
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/19561012

Change-Id: If29bd2021c3d451822a0cd483da15140f622d723
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-16 22:56:32 +00:00
Alex Dale
5b5c0fd770 Added mutex protection for session_property_set_. am: 381f879ff7
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/19561012

Change-Id: Iec56b526fd95cafbd09aae9894796c959924f48a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-16 21:45:05 +00:00
Edwin Wong
6797b8eb8a Call AIBinder_setRequestingSid from createBinder override function
AIBinder_setRequestingSid must be called first upon creation of a
binder object before AIBinder_getCallingSid is called. Call
AIBinder_setRequestingSid in the createBinder override function
for WVDrmFactory, WVDrmPlugin and WVCryptoPlugin classes.

Test: Play TV streaming
Test: adb shell dumpsys android.hardware.drm.IDrmFactory/widevine -a

Bug: 237613676
Change-Id: I9dde4715ba2003deb463bd75b23e1ebc2f22a764
2022-08-11 21:49:50 +00:00
Alex Dale
381f879ff7 Added mutex protection for session_property_set_.
[ Merge of http://go/wvgerrit/154575 ]
[ Cherry-pick of http://ag/19498242 ]

There is a rare race condition experienced by some Android devices
where the a new client property set is being added while another is
being removed.  The C++ stl library does not provided thread
protection by default.

This CL adds a new mutex for the client property set map which prevents
multiple threads accessing the property sets concurrently.

Bug: 235238226
Test: GtsMediaTestCases on redfin
Change-Id: I32cf11bfb1332295ba1245071102ff0adc35259d
(cherry picked from commit aaa97a5d60)
(cherry picked from commit 6109ec6d66)
2022-08-10 21:34:32 +00:00
Alex Dale
6a0d1ce668 Merge "Added mutex protection for session_property_set_." 2022-08-02 16:33:45 +00:00
Alex Dale
cc29f745f9 Re-enabled OEMCrypto fuzz tests
[ Merge of http://go/wvgerrit/153121 ]

`run_oemcrypto_fuzz_tests` script was disabled while OPK was
transitioning between v16 and v17.  Now that OPK is v17, the
fuzz tests can be re-enabled.

Some targets could not be built due to a missing header file.
`oemcrypto/ref/src/cppbor.cpp` was updated to include the missing
header.

Bug: 235414753
Bug: 229160033
Bug: 236317198
Test: run_oemcrypto_fuzz_tests
Change-Id: Ieeebae1f6d84c5735a669d44ea45875675fdb5a3
2022-08-01 15:20:05 -07:00