The output of the hook can viewed using the command:
> adb shell lshal debug android.hardware.drm@1.3::IDrmFactory/clearkey
The hook can be used to emit debug info from the ClearKey hidl process.
Currently only emit the total number of open sessions.
Bug: 153663446
Test: adb shell lshal debug \
android.hardware.drm@1.3::IDrmFactory/clearkey
Change-Id: Ie5918acbfbbb5cfc2a9bc5e138ab0320f3c6a558
Destroy sessions in following scenarios:
* when setSecurityLevel fail in openSession_1_1
* before handling mock errors in closeSession
* after releasing offline keySetIds
Bug: 153663446
Test: [Native]MediaDrmClearkeyTest
Test: VtsHalDrmV1_<0|1|2|3>TargetTest
Change-Id: I4357051e0be6daa199c5fc3e7505ce65d982e237
Fix destPtr was not pointing to destination raw pointer.
merge from qt-qpr1-dev: go/ag/9941940
bug: 144506242
Test: sts
ANDROID_BUILD_TOP= ./android-sts/tools/sts-tradefed run sts-engbuild-no-spl-lock -m StsHostTestCases --test android.security.sts.Poc19_12#testPocBug_144506242
Change-Id: I9fb4ad350ec25dd697940fee57748652745a951d
If the input SecureStopRelease size is less than sizeof(uint32_t)
in releaseSecureStops(), an out of bound read will occur.
bug: 144766455
bug: 144746235
bug: 147281068
Test: sts
ANDROID_BUILD_TOP= ./android-sts/tools/sts-tradefed run sts-engbuild-no-spl-lock -m StsHostTestCases --test android.security.sts.Poc19_11#testPocBug_144766455
Change-Id: I8c89797869addf83342a4f32e17bce0515713119
Security Vulnerability fix:- Heap use after free in getSecureStops
in android.hardware.drm@1.1-service.clearkey
Test: CTS tests
android.media.cts.MediaDrmClearkeyTest#testSecureStop
android.media.cts.MediaDrmClearkeyTest
Test: run drmpoc
no signal 6 on clearkey service after the fix
Test: adb shell ps | grep clearkey
pid ID does not change after running drmpoc
bug: 137878930
Change-Id: I78b2dc2bccde238a06398b3733cea8e574ea8ee7
Perform more checking for invalid input.
Test: CTS tests
android.media.cts.MediaDrmClearkeyTest#testSecureStop
android.media.cts.MediaDrmClearkeyTest
Test: run drmpoc
no signal 6 on clearkey service after the fix
Test: adb shell ps | grep clearkey
pid ID does not change after running drmpoc
bug: 137284652
Change-Id: I971bb33eec6d37ef86fa1a53501c1e6bda50fa3b
Security Vulnerability fix: Heap buffer overflow in clearkey
releaseSecureStops - android.hardware.drm@1.1-service.clearkey
Fix provided by researcher.
Test: CTS tests
android.media.cts.MediaDrmClearkeyTest#testSecureStop
android.media.cts.MediaDrmClearkeyTest
Test: run drmpoc
no signal 6 on clearkey service after the fix
Test: adb shell ps | grep clearkey
pid ID does not change after running drmpoc
bug: 137284652
Change-Id: Id085945943aa6b85c597dc8b7c32a3b990c54a2b
Since these were combined into libhidlbase.
Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: I6cc85a91afb603e31b85090917f9f3b59d82a4d1
New codes are being added to handle resource
contention, lost session state, frame size too
large and insufficient security level for
decryption. Also cleans up inconsistent use of
tamper detected error where invalid state error
should have been used.
bug:111504510
bug:111505796
test:cts and gts media test cases
Change-Id: I28ca04cdc8ce64047d189fcf4d59bab24208e1a7
This CL implements the offline license management
methods in drm HAL v1.2.
bug:110838441
bug:117570956
bug:116252891
test: android.media.cts.MediaDrmClearkeyTest#testOfflineKeyManagement
Change-Id: I6db7c7f8a76aefb12358fd316041ffbc43239e6c
Also extend clearkey plugin to allow testing
of this change.
Author: Lubin Yin <lubiny@codeaurora.org>
Change-Id: Ie9b9fcd8920a6c843845700e7bba01ffc20a9507
We must only create one DrmListener instance.
We then process different listeners in DrmListener::notify.
To facilitate testing, we call the listeners from clearkey plugin's
provideKeyResponse function. We have previously tested
EventType::VENDOR_DEFINED in the same manner.
bug: 77712870
Test: native CTS test testClearKeyPlaybackCenc
Test: CTS MediaDrmMockTest
Change-Id: Ie15e3012a4068824f72371a66e9fca2ee27180f8
When passing an invalid security level to
DrmPlugin::setSecurityLevel, an incorrect error code
was being returned, based on the drm@1.1 DrmPlugin.hal
documentation. This CL corrects the error code.
Change-Id: If560be07f3945320d28c42cb2cf18d8f8c718229
related-to-bug:73330999
bug:77308498
Test:VtsHalDrmV1_1Target
getKeyRequest_1_1 was using 1.0 callback.
This fix creates a common function for both 1.0 and 1.1
getKeyRequest to call. The function now calls the version
appropriate callback to return key request data, key type
and default url.
Test: CTS ClearKeySystemTest#testClearKeyPlaybackCenc
Test: CTS ClearKeySystemTest#testGetProperties
Test: CTS ClearKeySystemTest#testSetProperties
Test: Verify getKeyRequest_1_1 is called
bug: 73085826
Change-Id: Id70a92862473540f5a4eb815892a69dfe1601b92
kVersionValue should return 1.1. Also change getPropertyString
to get value from mStringProperties[] instead of using hard coded
values.
Test: CTS ClearKeySystemTest#testGetProperties
bug: 73031837
Change-Id: I9d108a42a75ac3685d2c6ef58697efffe6152284
Vendors implementing the newly added MediaDrm.setSecurityLevel
HAL found that it was difficult to implement properly. Also the
semantics are somewhat ambiguous from the Java platform API
level. This CL binds the security level assignment to openSession
which clarifies the API for apps as well as making it more
natural to implement in HAL modules.
bug:72831697
bug:64001680
test: VtsHalDrmV1_1TargetTest, GTS media tests
Change-Id: Iaa07727be86ec2bc92be907d5a48c92136dc2014
Adds an implementation of getMetrics to the ClearKey implementation.
BUG: 69635855
Test: VtsHalDrmV1_1TargetTest
Change-Id: I3e01037081e8855e1dc9ff332c27edb8c79040df
Create clearkey HIDL service to support new APIs for drm 1.1 HAL.
The directories are organized into common, default and hidl.
The old shared library source is in common and default.
The new clearkey service source is in common and hidl.
Test: VtsHalDrmV1_1TargetTest
bug: 69635855
Change-Id: I2e8e0e1a39b622aa274ecd32c873d81b95bdc4f8
Methods for querying HDCP, security levels and
number of sessions
bug:64001680
bug:33657579
Test: cts: MediaDrmMockTest, ClearKeySystemTest
gts: GtsMediaTestCases
Change-Id: I7c84df02ec33d305b6bd5ac7479922f87aa64863
Changes to the clearkey plugin broke existing vts
tests, and those tests can't be changed due to
backward compatibility requirements. This CL
reverts the parts of ag/3125606 that caused the
test failures, while retaining most of those
changes.
bug:70660219
Test: vts-tradefed run commandAndExit vts -m VtsHalDrmV1_0Target
Change-Id: Iab54b0917cc2e1edafc98bd97390bf9937b3d2ca