Build libvtswidevine module relative to the directory
drm-vts-test-libs.
Test: make vts; libvtswidevine.so is in correct place.
Bug: 36889176
Bug: 36817233
Change-Id: Iadb5bd6e71a1a7c99a69feff2ecb7bded90af24d
This commit changes the unit tests and HAL Service to run as 64-bit on
devices that have enabled 64-bit DRM Plugins.
Bug: 36076017
Test: Turned on the flag for a device and used the file command to
verify that all binaries were built as 64-bit.
Test: Turned the flag back off and verified that all binaries were built
as 32-bit. This should affect no current devices.
Change-Id: Ieb7218f15b9359f2038a6f60b8c994b16d2b5b53
This module is used with the drm VTS tests as part of HIDL/HAL
testing. For background reference:
hardware/interfaces/drm/1.0/vts/doc/Drm_Vendor_Modules_v1.pdf
Change-Id: I38eb13696343e08fa2a1758219350d25698bfb7d
related-to-bug: 32815560
(This is a merge of wvgerrit/24922)
This contains several fixes and improvements to the
build_and_run_all_unit_tests.sh and run_all_unit_tests.sh scripts:
* All tests are now identified as vendor binaries and thus are stored in
the /vendor/bin/ directory instead of /system/bin/. Previously, some
tests had moved to /vendor/bin/ but the scripts had not been updated,
causing these tests to fail to run.
* The -j parameter can now be passed to build_and_run_all_unit_tests.sh,
for those who want to speed up their build by using multiple cores.
* The 64-bit library directories are now added to the library search
path, in anticipation of devices with 64-bit DRM Plugins.
* Checking for Verity protection is now done in
build_and_run_all_unit_tests.sh (which is the script that actually
modifies the file system) instead of just in run_all_unit_tests.sh.
* The library search path is no longer set unnecessarily for
libwvdrmengine_hidl_test.
* The Treble-only tests and non-Treble-only tests now only run on
devices that meet their respective criteria.
Bug: 36071236
Test: Ran build_and_run_all_unit_tests.sh
Change-Id: Iea236880c4445858111c801dfa278a528bca0f6c
Merge from go/wvgerrit/24882:
The result of crypto_session.GetApiVersion is misinterpreted.
Test: ANDROID_BUILD_TOP= -gts/tools/gts-tradefed run gts
-m GtsMediaTestCases --test com.google.android.media.gts.
MediaDrmTest#testOemCryptoVersion
Test: ANDROID_BUILD_TOP= -gts/tools/gts-tradefed run gts
-m GtsMediaTestCases --test com.google.android.media.gts.
MediaDrmTest
bug: 36728950
Change-Id: I72a05608f778fa81689013d3b231010b71329ea1
Widevine HAL is not part of framework/system image and thus it is not
permitted to use Binder. Binder-like mechanisms which are permitted are
HwBinder or VendorBinder (for communications only with vendor image
components).
Remove references to MediaAnalyticsItems used by ami_adapter.*.
Test: Play Movies & TV (streaming and pinned content)
Test: Netflix
Test: Widevine unit tests
bug: 36576915
Change-Id: I786f206c01d7c5ebfce719f3f51f5f7927f0359e
Merge from Widevine repo of http://go/wvgerrit/24863
The oemcrypto unit tests GenericKeyDecryptSameBuffer and
GenericKeyDecryptSameBuffer require features in oemcrypto v12, so they
should not be run on devices that report oemcrypto v11 or earlier.
b/36071236
Test: Unit tests run on Ryu and Bullhead.
Change-Id: Ia6645559ed98cae8d9807a14d6f0e514c5c4c615
(This is a merge of http://go/wvgerrit/24738)
The change to enable 64-bit as a possible target for Widevine Android
made all the unit tests build as 64-bit on compatible platforms. Since
none of these devices support 64-bit properly yet, this is a mistake.
This patch restores unit test builds to being 32-bit only for now.
In the future, when the switch for 64-bit-supporting devices is added,
it will also switch the unit tests to 64-bit mode.
Bug: 36071236
Test: Verified unit test format with "file" command.
Change-Id: Ib4d3678181f3221b85fe6409f1d842dd15af3daa
(This is a merge of go/wvgerrit/24739)
This cleans up some warnings in the Android glue code:
1) Checking if unsigned values are >= 0.
2) Using {0} initializer syntax instead of fully expanding to {0,0}.
Bug: 34394125
Test: Verified compilation passes
Change-Id: Id59730b97da7fce320f634451a44a4df4bf0b494
This library is local to vendor/widevine HAL service, rename to
indicate this is used only by widevine HAL.
Test: Play Movies & TV (streaming and pinned)
Test: Netflix
bug: 36430909
Change-Id: Iacaf78f4223bf305569e7f1d04dd4e4ad0a87727
MediaCodecTest.android.media.cts.MediaCodecTest.testCryptoError
was failing due to incorrect error code translation introduced
by the drm hidl hal.
Test: ANDROID_BUILD_TOP= ./android-cts/tools/cts-tradefed run cts
--module CtsMediaTestCases --test
android.media.cts.MediaCodecTest#testCryptoError
bug: 35137940
Change-Id: I5177367df7b57fe23a4b17c38462886786537140
[ Merge of http://go/wvgerrit/24600 ]
Test: Unit test only change. Verified by rerunning unittests.
b/36221430
Change-Id: I36a8a0a5df400673689280cbf53ba9394f827c90
Some tests code was not correctly merged from the widevine side.
An initializer in generic_crypto_unittest.cpp was missed in
http://go/wvgerrit/23767
bug: 35951647
Change-Id: I2f7052b621989a032179346edf43dcaf6cb7d921
Merge from widevine repo of http://go/wvgerrit/24421
A nonce generation error for a certificate provisioning request had a
generic name Error2. However, this is an actionable error by the
application: the application should wait 1 second and try again.
Therefore it deserves a more descriptive name.
bug: 35926133
bug: 35879493
Change-Id: I6c87a5a762cb970c9530a55c993d7acbed773a00
Adds code to the Widevine Glue Layer that drives the generation and use
of SPOIDs on platforms that support SPOIDs. (All devices whose first
release is Android O or later.) Note that this only applies to the new,
Treble-ized API. If the Widevine DRM Plugin is accessed through the old
API, it will not use SPOIDs. This is by design because the old API does
not provide an application package name, so SPOID generation is no
better than the existing, origin-based solution.
Bug: 27101531
Test: Unit tests
Test: GTS tests
Test: Google Play
Change-Id: I80f79fca84065105e218e9070a1d5299c8e33500
Merge from Widevine repo of http://go/wvgerrit/24311
This CL adds the error OEMCrypto_ERROR_ENTRY_IN_USE to unit tests, the
reference oemcrypto, and the level 3 haystack.
bug: 35879590
Change-Id: Ifbfaf97c0045147aed4498ec0b57d90b26f100d0
Merge from Widevine repo of http://go/wvgerrit/24241
The CL also only modifies existing tests so that they will pass
with an old version of OEMCrypto, or it filters out the tests so
that they do not run. This positions us so that we can more
easily verify how much backwards compatibility we expect to work.
bug: 35877886
Change-Id: Iadc06672d7f9cef75800662ff83389c504a3fd04
(This is a merge of go/wvgerrit/23686)
This patch removes the makefile lines that previously prevented the
Widevine DRM Plugin from being built as 64-bit on Android. 64-bit
builds are now fully supported.
Only one piece of CDM code has had to change. Due to a bug in
libprotobuf before v3.0, int64 values from protobufs are technically a
different type from int64_t values in code on some 64-bit
architectures. Both have the same in-memory representation at runtime
but are seen as distinct types by the compiler. The compiler will
automatically convert in most places, but template instantiation is
not one of them, so a few places that passed a Protobuf int64 directly
into a template had to be modified.
Please note that tweaks to the mediadrmserver (not covered by this
patch) are needed in order for it to run as 64-bit and load 64-bit DRM
Plugins. Please also note that, as we have no 64-bit L1 OEMCrypto on
any devices, using the 64-bit mediadrmserver and Widevine library will
make your device fall back to L3 for the time being.
Bug: 18949752
Test: OEMCrypto unit tests
Test: Widevine unit tests
Test: Google Play (on Marlin)
Test: Widevine GTS Tests (on Marlin)
Change-Id: Ib6cdf2dd1ff75a1c473cacdc5e22397caa0a656c
Merge from Widevine repo of http://go/wvgerrit/23581
This CL adds some unit tests to oemcrypto to verify that DecryptCENC
and the generic encrypt and decrypt functions behave correctly when
the input and output buffer is the same. i.e. decrypt in place.
The mock and haystack are also updated to pass the tests.
b/34080119
Change-Id: Ie295bdaddbb8058bebb36f6dab092d307f249ecd
Merge from Widevine repo of http://go/wvgerrit/24043
This CL simplifies the way the oemcrypto dynamic adapter handles
backwards compatibility while looking up old function pointers.
It also puts in guards for functions that do not have pointers.
Current Level 3 libraries merged from http://go/wvgerrit/23686/
level3/arm64/libwvlevel3.a Level3 Library 7283 Feb 15 2017 13:39:10
level3/mips64/libwvlevel3.a Level3 Library 7285 Feb 15 2017 13:51:12
level3/arm/libwvlevel3.a Level3 Library 4445 Feb 15 2017 14:20:04
level3/x86_64/libwvlevel3.a Level3 Library 7284 Feb 15 2017 13:43:04
level3/x86/libwvlevel3.a Level3 Library 4464 Feb 15 2017 14:14:55
level3/mips/libwvlevel3.a Level3 Library 4465 Feb 15 2017 14:10:04
Test: OEMCrypto Unit tests pass on bullhead, fugu, and all
six emulators. A bullhead was crippled to use L3 only, and
Play Movies worked OK. ExoPlayer tests were also run on the
bullhead. L1 was re-installed on the bullhead, and Play Movies and
ExoPlayer tests were repeated with no problems.
Bug: 18949752
Bug: 31458046
Change-Id: I8668fde1ce8a045c71bf33c566f3ff86e11821c5
Merge from Widevine repo of http://go/wvgerrit/24305
This CL adds a pdf of the document "Widevine L1 Provisiong Models"
to the source directory so we can share with partners.
bug: 35880276
Change-Id: I60ea958b2e4cefc783c692ad78784b7071f59e2e
Merge from Widevine repo of http://go/wvgerrit/24205
This adds a single retry to each call into cdm_engine that uses a
nonce. This should prevent spurious tests failing because they
accidentally generated a nonce flood.
bug: 35879493
Change-Id: I99a5f2063f04befb74361ff44c4ce8e34f41e89d
Merge from Widevine repo of http://go/wvgerrit/24042
This CL adjusts the tolerance in tests that check the license_received
time. This was periodically failing because a nonce flood might delay
the test by 1 second, which was being rounded up to 2. The tolerance
is now 3. The time is explicily used when it is available. Some
extra logging is also added to the mock.
bug:31458046
Change-Id: I450880cb3cd8bd5ef66cba13b94dd963d2663d9a
Merge from Widevine repo of http://go/wvgerrit/23482
Now that the documentation has been approved, it's time to
copy text from http://go/oemcrypto to OEMCryptoCENC.h
This also has all the little tweaks to the documents that have been
requested over the past couple of weeks.
b/31458046
Change-Id: I5b865031eb7945005c06bf1b00ecfaaedcad15f4
This CL removes some unused variables, and changes some integers to
unsigned integers. On some platforms, we were getting compiler errors
and unit test failures.
Merge from Widevine repo of http://go/wvgerrit/23840
Use unsigned integer literals
Merge from Widevine repo of http://go/wvgerrit/23767
Fix Gyp Files
Merge from Widevine repo of http://go/wvgerrit/23500
Remove unused variables
bug: 31458046
Change-Id: I4dfec95ae49187262552fbbf322f3310ab777826
Merge from Widevine repo of http://go/wvgerrit/23842
This CL updates the android make files and test scripts to include the
two new unit test suites in metrics/test.
Change-Id: Ie31bdc3ae3709ab116d2a340ee5b55c7c12d1d33
Merge from Widevine repo of http://go/wvgerrit/23865
This adds the following tests to the oemcrypto usage tables suite:
Forbid shrinking the usage table over open sessions.
Shrinking usage table must make it smaller, not larger.
Forbid creation of new usage table while open sessions using old.
Change-Id: Ia97a3f4d3ef53417c4f8c98f8ed6ef9ea06d7fad