Since these were combined into libhidlbase.
Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: I6cc85a91afb603e31b85090917f9f3b59d82a4d1
Protobuf 3.9.1 redefines google::protobuf::uint64 from unsigned long
long to uint64_t, which is sometimes unsigned long and sometimes
unsigned long long. Use PRIu64 to print it.
Bug: 117607748
Test: m checkbuild
Change-Id: Idb741c8be97df1c752083350fb8fed257903944c
Merged-In: Idb741c8be97df1c752083350fb8fed257903944c
Protobuf 3.9.1 redefines google::protobuf::uint64 from unsigned long
long to uint64_t, which is sometimes unsigned long and sometimes
unsigned long long. Use PRIu64 to print it.
Bug: 117607748
Test: m checkbuild
Exempt-From-Owner-Approval: approved at https://android-review.googlesource.com/q/Idb741c8be97df1c752083350fb8fed257903944c
Change-Id: Idb741c8be97df1c752083350fb8fed257903944c
See build/soong/README.md for more information about soong
Bug: 122331945
Test: treehugger
Test: cd frameworks/av/drm/mediacas/plugins; mma
Change-Id: I7a3ab863c4e589bd0c1954d3735602fed7cf79b4
This does two things:
- makes sure that HALs configured as lazy HALs will be retrieved
- will detect bad manifest entries earlier
Bug: 131703193
Test: boot
Change-Id: I69fb80b023cc17f94e4f6a10203ee077a5e61e19
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
Merged-In: Ie15e3012a4068824f72371a66e9fca2ee27180f8
cas@1.1 hal interface and implementation are available.
Fix a bug in default plugin for CTS test.
Test: Manual
bug: 123903559
Change-Id: Icd41736c45bb70e4f9e275bd989eca4f64ba3dac
This reverts commit a4f9d509c0.
Reason for revert: <original CL isn't related to public API which triggered this revert, so revert this revert>
Change-Id: I31fda92c2915dc04bc100cb97d36cf4bead234b7
Fix inconsistent naming of offline license states
bug:120489407
bug:120488811
test:cts and gts media tests
Change-Id: I8473211d96383977ad33e4bd770fc4c71d9bd15f
When the system partition is a later version than vendor,
new MediaDrm APIs will not have HAL implementations. In
this case throw java.lang.UnsupportedOperationException.
bug:110701831
bug:123375769
test: cts media test cases, gts media tests
Change-Id: Ib631bf4d4d245d857e61bd3fe0e5808e430a034d
Implement sendSessionEvent and onSessionEvent in ClearKeyCasPlugin and MockCasPlugin
Test: manual
Bug: 122472761
Change-Id: Iceb3e14f35cf3178b70e43b59fd492255ab205bc
To support lazy drm HALs, libmediadrm needs to list all available HALs
that are defined in the manifest. Otherwise, it will only list HALs that
are currently running. This change is necessary because lazy HALs do not
run until they are requested. Without this change, libmediadrm would not
be aware that the lazy HALs are present, and it would not know to call
getService() to start them.
Test: Run gts
Bug: 112386116
Change-Id: I9b41c60d574b9c8c857b8838a5bbdc64388c9ddb
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
libicuuc and libicui18n are moved into APEX, but
they have no stable ABI due to the version suffix.
Use libandroidicu which provides stable symbol.
See http://go/apex-stable-icu4c-interface for the design.
See http://aosp/801855 for libandroidicu implementation.
Bug: 117094880
Test: m checkbuild
Merged-In: Ida6aac85dfb79bf8e7a3a2540e567ee211279e09
Change-Id: Ida6aac85dfb79bf8e7a3a2540e567ee211279e09
(cherry picked from commit b6826d9e88)
Before, it was possible for mPlugin, mPluginV1_1, and mPluginV1_2 to be
assigned to different plugins. Now, they are guaranteed to always point
to the same object. Also to be safe, mPlugin is set to NULL if there is
an initailization error.
Test: Run gts on blueline
Bug: 112386116
Bug: 121382196
Change-Id: Ie3ff7369e0c66d4502fab3f4a1d18b2882140143
libicuuc and libicui18n are moved into APEX, but
they have no stable ABI due to the version suffix.
Use libandroidicu which provides stable symbol.
See http://go/apex-stable-icu4c-interface for the design.
See http://aosp/801855 for libandroidicu implementation.
Bug: 117094880
Test: m checkbuild
Change-Id: Ida6aac85dfb79bf8e7a3a2540e567ee211279e09
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
Protobuf 3.5.2 redefines google::protobuf::uint64 from unsigned long
long to uint64_t, which is sometimes unsigned long and sometimes
unsigned long long. Use PRIu64 to print it.
Bug: 117607748
Test: m checkbuild
Change-Id: Ifdbc33cdafca5b82a1ffbcbfa4e292a819deb244
Also extend clearkey plugin to allow testing
of this change.
Author: Lubin Yin <lubiny@codeaurora.org>
Change-Id: Ie9b9fcd8920a6c843845700e7bba01ffc20a9507
Change the session to shared_ptr and use atomic_load/store.
Test: POC; CTS MediaCasTest; CTS MediaDrmClearkeyTest#
testClearKeyPlaybackMpeg2ts
bug: 113027383
Change-Id: I75f4cb33a022f28d45918442d64c5c46df2640ef
(cherry picked from commit 7934a8f7ee)
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
Change the session to shared_ptr and use atomic_load/store.
Test: POC; CTS MediaCasTest; CTS MediaDrmClearkeyTest#
testClearKeyPlaybackMpeg2ts
bug: 113027383
Change-Id: I75f4cb33a022f28d45918442d64c5c46df2640ef
Letting the library be statically linked does a couple of bad things:
- (importantly) allows its internal implementation details to become frozen
- (still important) uses extra space on this device
For these reasons, it is being made shared-only.
Test: boot Pixel 2
Bug: 111454508
Test:
atest android.drm.cts.DRMTest
...
=============== Summary ===============
Total Run time: 36s
1/1 modules completed
Total Tests : 11
PASSED : 11
FAILED : 0
============== End of Results ==============
Change-Id: I3b6b208a6cc7dcfdd8255db38509e616a7e375d0
When clearHeapBase is called after a plugin is
closed, a null pointer is dereferenced. Protect
against it with a null pointer check.
Test: GTS media tests, check logcat for faults
bug:80434750
Change-Id: Ib568694c44fe22887c3db4f88e67cb598fd9e36a
CryptoHal in mediadrmserver was not releasing the
shared memory allocated remotely in the drm HAL
module until the HAL was closed, which could cause
shared memory allocation failures in situations
where multiple memory regions get mapped during
playback. This change releases the shared mapping
in the HAL when it is no longer needed.
bug:80104026
test:
1. manual tests with logging to ensure
shared memory is released
2. gts media tests on walleye
Change-Id: Ie2f306bce6aec697ae584da3f55b3cf72edaa07b
CryptoHal was not checking that the memory heap set by setHeap
was the same one that was actually used for the decrypt call, allowing
the caller to spoof the decrypt call into accessing arbitrary memory.
bug:76221123
test: mediadrmserverpoc included in the bug & GTS media tests
Change-Id: I35214a1a6d0a4b864123e147d1a1adc2377bfbc5
Merged-in: I4ae6d1080be406bf53e3617c59c75206cc5066c6
CryptoHal was not checking that the memory heap set by setHeap
was the same one that was actually used for the decrypt call, allowing
the caller to spoof the decrypt call into accessing arbitrary memory.
bug:76221123
test: mediadrmserverpoc included in the bug & GTS media tests
Change-Id: I35214a1a6d0a4b864123e147d1a1adc2377bfbc5
A method in CryptoHal was not checking the
hidl transaction status which causes an abort
if the transaction fails.
bug:79170524
test:gts media tests, netflix playback
Change-Id: Ia58500f0f2c64f987809360d3d7ead810ee01180
This is a trivial fix for an incorrect check.
Bug: 77262269
Test: Re-ran unit tests and GTS tests. Verified Google Play.
Change-Id: I807d8488f65c60c03779064cb92bbbd6c60267e4
This changes slightly the way metrics are converted from the HIDL
interface to the MediaDrm interface. This provides a cleaner
representation for querying metrics.
Bug: 73724453
Test: New and existing unit tests. Updated and existing GTS. Google Play
manual.
Change-Id: I9be170784a19ca3e89add53cea1cdfcaad6d65eb
Two methods in DrmHal were not checking the
hidl transaction status which causes an abort
if the transaction fails.
Change-Id: Ie4b6d4ae6507f073efa55412c21ceba317e2881d
related-to-bug:78646354
test:gts media tests, netflix playback
In the onTransact DECRYPT case, the allocated subSamples
are not freed when we encounter an error. Use unique_ptr
to manage memory instead.
Test: Play Movies & TV, Netflix
Test: Gts
bug: 73628269
Change-Id: I36b7deeff0380ee3be31ad5f93a5598cfe02e381
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
Uses an updated proto model that's more efficient for serialization.
Test: Unit tests, google play and CTS tests.
Bug: 73724218
Change-Id: I936bc18216c0c67de580424b4c62344d94be6b38
Some drm HAL methods were not properly checking
their hidl Return<Status> values which would cause
aborts in some cases. This CL adds checks as needed
Test: GTS media tests
bug:73500808
Change-Id: I47ae0f82d4e614b1e78923ed48fbe4c024df5d71
Adds support to fetch metrics from vendor and convert them to a proto
bundle returned from a call to getMetrics.
Bug: 64001676
Test: CTS test for metrics and GPlay test
Change-Id: I05634dd1bf092e64e2d0e77c4c0e243340af48e3
Relocate drm and crypto headers from media
to mediadrm to have finer grained ownership
bug:73556221
Change-Id: I7d1b5944f261f9b1fdeed7605e4c0b4b4ca43e1a
closeAllSessions() was calling into the hidl interface closeSession
directly, and neglected to check the return status which resulted in
an abort. Instead, call the DrmHal::closeSession() method which handles
the hidl return status correctly.
Test: gts media tests
bug:72400509
Change-Id: I697997eb73ef6d8746fe695509671c4695124cee
Adds proto serialization and logging support for media drm framework metrics.
Bug: 64001676
Test: Ran CTS tests, unit tests and Google Play.
Change-Id: Ie350ac93caa6b35610eb63e4acc860c8e8a5cf5b
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
Some metrics required a conversion to using PersistableBundle to support
slightly richer structure (lists, and nested PBs).
BUG: 64001676
Test: Ran updated CTS test and verified Google Play works.
Change-Id: I8f8d67ba04b234f2ac5ac348a8945e20837f98d6
This reverts commit a3c77911df.
Reason for revert: build cop here. The original CL broke build git_master / walleye_asan, hence I'm reverting.
https://android-build.googleplex.com/builds/submitted/4597721/walleye_asan-userdebug/latest/view/logs/build_error.log
In file included from vendor/google/tools/security/fuzzers/libFuzzer/ICrypto_fuzzer/ICrypto_fuzzer.cpp:24:
frameworks/av/include/media/CryptoHal.h:23:10: fatal error: 'android/hardware/drm/1.1/ICryptoFactory.h' file not found
Change-Id: I185d5310cadb9990b864d71e42bba94f4740160c
This change in DrmHal allows us to transfer a PersistableBundle containing
previously unavailable metrics.
Bug: 64001676
Test: CTS test for metrics and GPlay test
Change-Id: I1fa87c76dd980a3f91b4e2d02b37329f6c0a88ec
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
Also check for NULL mDrmPlugin before casting to V1_1.
Test: Play Movies and NetFlix
bug: 72687425
Change-Id: I47aa18730332a17860b7e27440d417ffd612810f
This reverts commit 09a90ab544.
Fix for regressed b/72666743
Test: manual test to confirm problem is fixed.
See bug for repro steps.
Change-Id: Ifac9a2c3a3a92063d544e39ace48ab14c90b8050
the 'finalized' concept didn't pan out -- remove references to it.
Simplifies the code flow.
Also purged some uses of generateSessionID().
Bug: 71874686
Test: logcat/dumpsys
Change-Id: I39e48526a5696158d8195f47154881ca6ecda266
Methods are needed to release a secure stop by ID and
return a list of secure stops.
Tests: gts media tests
bug:67361434
bug:64001680
Change-Id: If6cb180cb4d2e3b655028955d105aee0cb8d70b6
The metric names need to be consistent with related APIs (e.g.
MediaCodec#getMetrics). Those APIs use dot separators rather than
slashes.
Bug 64001676
Test: Re-ran CTS, unit tests. Smoke with GPlay Movies.
Change-Id: I606e4c4bcbf630d584b9dea80471ad256764a42b
Adds nearly all of the remaining specified framework level metrics.
Also adds a basic unit test to verify that metrics are exported
correctly. A follow-up CL will update the CTS test to touch all metric
values in DrmHal.
BUG: 64001676
Test: New unit test. Smoke tested with GPlay/Walleye.
Change-Id: I4df90675ae304d3c62b7886537328b3d848fd77c
Adds an EventMetric class, associated unit tests, and an instance of the
EventMetric to DrmHal. Also added a unit test for CounterMetric and
created a class to hold all of the future metric instances.
BUG: 64001676
Test: Added and ran unit tests. Also added a CTS test case.
Change-Id: Ic94bedd5f8293a58a939613a4ae69ce656a772be
closeAllSessions() was calling into the hidl interface closeSession
directly, and neglected to check the return status which resulted in
an abort. Instead, call the DrmHal::closeSession() method which handles
the hidl return status correctly.
Test: gts media tests
bug:72400509
Change-Id: I444be998702aeaca2905ddf560a5138d5775a316
This adds a new class CounterMetric which is used to hold metric
information. It also adds a single use case for recording and
reporting a counter metric.
BUG: 64001676
Test: Added and ran a new test for the specific CounterMetric use case.
Change-Id: I39cab8328f135e579f80b6c2fab721da5f569795
Two additional KeyRequestTypes have been added, None and Update. None
indicates that no key request is needed as keys have already been
loaded. Update indicates that while keys have previously been loaded,
an additional (non-renewal) license request is needed.
Bug: 70335058
Test: GtsMediaTestCases
Change-Id: I36a8b334c70140098a01e4a3bea3159fc0a4584f
Methods for querying HDCP, security levels and
number of sessions
bug:64001680
bug:33657579
Test: cts: MediaDrmMockTest, ClearKeySystemTest
gts: GtsMediaTestCases
Change-Id: I7c84df02ec33d305b6bd5ac7479922f87aa64863