wv hidl: upgrade Drm/Crypto factories to v1.3
Bug: 139134043 Test: MediaDrmTest Change-Id: I94d1cc8a323c144805d74d5568944dd48ae80e60
This commit is contained in:
@@ -66,6 +66,33 @@ LOCAL_VINTF_FRAGMENTS := manifest_android.hardware.drm@1.2-service.widevine.xml
|
|||||||
|
|
||||||
include $(BUILD_EXECUTABLE)
|
include $(BUILD_EXECUTABLE)
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# Builds android.hardware.drm@1.3-service.widevine
|
||||||
|
#
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
|
include $(LOCAL_PATH)/common_widevine_service.mk
|
||||||
|
LOCAL_SRC_FILES := src_hidl/service.cpp
|
||||||
|
LOCAL_MODULE := android.hardware.drm@1.3-service.widevine
|
||||||
|
LOCAL_INIT_RC := src_hidl/android.hardware.drm@1.3-service.widevine.rc
|
||||||
|
LOCAL_VINTF_FRAGMENTS := manifest_android.hardware.drm@1.3-service.widevine.xml
|
||||||
|
|
||||||
|
include $(BUILD_EXECUTABLE)
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# Builds android.hardware.drm@1.3-service-lazy.widevine
|
||||||
|
#
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
|
include $(LOCAL_PATH)/common_widevine_service.mk
|
||||||
|
LOCAL_SRC_FILES := src_hidl/serviceLazy.cpp
|
||||||
|
LOCAL_MODULE := android.hardware.drm@1.3-service-lazy.widevine
|
||||||
|
LOCAL_OVERRIDES_MODULES := android.hardware.drm@1.3-service.widevine
|
||||||
|
LOCAL_INIT_RC := src_hidl/android.hardware.drm@1.3-service-lazy.widevine.rc
|
||||||
|
LOCAL_VINTF_FRAGMENTS := manifest_android.hardware.drm@1.3-service.widevine.xml
|
||||||
|
|
||||||
|
include $(BUILD_EXECUTABLE)
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Builds libcdm_utils.a
|
# Builds libcdm_utils.a
|
||||||
#
|
#
|
||||||
@@ -207,6 +234,7 @@ LOCAL_SHARED_LIBRARIES := \
|
|||||||
android.hardware.drm@1.0 \
|
android.hardware.drm@1.0 \
|
||||||
android.hardware.drm@1.1 \
|
android.hardware.drm@1.1 \
|
||||||
android.hardware.drm@1.2 \
|
android.hardware.drm@1.2 \
|
||||||
|
android.hardware.drm@1.3 \
|
||||||
android.hidl.memory@1.0 \
|
android.hidl.memory@1.0 \
|
||||||
libbase \
|
libbase \
|
||||||
libcrypto \
|
libcrypto \
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ LOCAL_SHARED_LIBRARIES := \
|
|||||||
android.hardware.drm@1.0 \
|
android.hardware.drm@1.0 \
|
||||||
android.hardware.drm@1.1 \
|
android.hardware.drm@1.1 \
|
||||||
android.hardware.drm@1.2 \
|
android.hardware.drm@1.2 \
|
||||||
|
android.hardware.drm@1.3 \
|
||||||
libbase \
|
libbase \
|
||||||
libhidlbase \
|
libhidlbase \
|
||||||
liblog \
|
liblog \
|
||||||
|
|||||||
@@ -7,12 +7,16 @@
|
|||||||
#ifndef WV_UUID_H_
|
#ifndef WV_UUID_H_
|
||||||
#define WV_UUID_H_
|
#define WV_UUID_H_
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <array>
|
||||||
|
#include <cstdint>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace wvdrm {
|
namespace wvdrm {
|
||||||
|
|
||||||
bool isWidevineUUID(const uint8_t uuid[16]);
|
bool isWidevineUUID(const uint8_t uuid[16]);
|
||||||
|
|
||||||
|
std::vector<std::array<uint8_t, 16>> getSupportedCryptoSchemes();
|
||||||
|
|
||||||
} // namespace wvdrm
|
} // namespace wvdrm
|
||||||
|
|
||||||
#endif // WV_UUID_H_
|
#endif // WV_UUID_H_
|
||||||
|
|||||||
@@ -8,12 +8,12 @@
|
|||||||
#define HIDL_TYPES_H_
|
#define HIDL_TYPES_H_
|
||||||
|
|
||||||
#include <android/hardware/drm/1.1/types.h>
|
#include <android/hardware/drm/1.1/types.h>
|
||||||
#include <android/hardware/drm/1.2/ICryptoFactory.h>
|
|
||||||
#include <android/hardware/drm/1.2/ICryptoPlugin.h>
|
#include <android/hardware/drm/1.2/ICryptoPlugin.h>
|
||||||
#include <android/hardware/drm/1.2/types.h>
|
#include <android/hardware/drm/1.2/types.h>
|
||||||
#include <android/hardware/drm/1.2/IDrmFactory.h>
|
|
||||||
#include <android/hardware/drm/1.2/IDrmPlugin.h>
|
#include <android/hardware/drm/1.2/IDrmPlugin.h>
|
||||||
#include <android/hardware/drm/1.2/IDrmPluginListener.h>
|
#include <android/hardware/drm/1.2/IDrmPluginListener.h>
|
||||||
|
#include <android/hardware/drm/1.3/ICryptoFactory.h>
|
||||||
|
#include <android/hardware/drm/1.3/IDrmFactory.h>
|
||||||
#include <hidl/HidlTransportSupport.h>
|
#include <hidl/HidlTransportSupport.h>
|
||||||
|
|
||||||
using ::android::hardware::configureRpcThreadpool;
|
using ::android::hardware::configureRpcThreadpool;
|
||||||
@@ -48,12 +48,12 @@ using drm::V1_1::DrmMetricGroup;
|
|||||||
using drm::V1_1::HdcpLevel;
|
using drm::V1_1::HdcpLevel;
|
||||||
using drm::V1_1::SecureStopRelease;
|
using drm::V1_1::SecureStopRelease;
|
||||||
using drm::V1_1::SecurityLevel;
|
using drm::V1_1::SecurityLevel;
|
||||||
using drm::V1_2::ICryptoFactory;
|
|
||||||
using drm::V1_2::ICryptoPlugin;
|
using drm::V1_2::ICryptoPlugin;
|
||||||
using drm::V1_2::IDrmFactory;
|
|
||||||
using drm::V1_2::IDrmPlugin;
|
using drm::V1_2::IDrmPlugin;
|
||||||
using drm::V1_2::KeySetId;
|
using drm::V1_2::KeySetId;
|
||||||
using drm::V1_2::OfflineLicenseState;
|
using drm::V1_2::OfflineLicenseState;
|
||||||
|
using drm::V1_3::ICryptoFactory;
|
||||||
|
using drm::V1_3::IDrmFactory;
|
||||||
|
|
||||||
typedef drm::V1_1::KeyRequestType KeyRequestType_V1_1;
|
typedef drm::V1_1::KeyRequestType KeyRequestType_V1_1;
|
||||||
typedef drm::V1_2::KeyStatus KeyStatus_V1_2;
|
typedef drm::V1_2::KeyStatus KeyStatus_V1_2;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
namespace wvdrm {
|
namespace wvdrm {
|
||||||
namespace hardware {
|
namespace hardware {
|
||||||
namespace drm {
|
namespace drm {
|
||||||
namespace V1_2 {
|
namespace V1_3 {
|
||||||
namespace widevine {
|
namespace widevine {
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@@ -21,7 +21,7 @@ extern "C" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} // namespace widevine
|
} // namespace widevine
|
||||||
} // namespace V1_2
|
} // namespace V1_3
|
||||||
} // namespace drm
|
} // namespace drm
|
||||||
} // namespace hardware
|
} // namespace hardware
|
||||||
} // namespace wvdrm
|
} // namespace wvdrm
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
namespace wvdrm {
|
namespace wvdrm {
|
||||||
namespace hardware {
|
namespace hardware {
|
||||||
namespace drm {
|
namespace drm {
|
||||||
namespace V1_2 {
|
namespace V1_3 {
|
||||||
namespace widevine {
|
namespace widevine {
|
||||||
|
|
||||||
struct WVCryptoFactory : public ICryptoFactory {
|
struct WVCryptoFactory : public ICryptoFactory {
|
||||||
@@ -34,7 +34,7 @@ struct WVCryptoFactory : public ICryptoFactory {
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace widevine
|
} // namespace widevine
|
||||||
} // namespace V1_2
|
} // namespace V1_3
|
||||||
} // namespace drm
|
} // namespace drm
|
||||||
} // namespace hardware
|
} // namespace hardware
|
||||||
} // namespace wvdrm
|
} // namespace wvdrm
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
namespace wvdrm {
|
namespace wvdrm {
|
||||||
namespace hardware {
|
namespace hardware {
|
||||||
namespace drm {
|
namespace drm {
|
||||||
namespace V1_2 {
|
namespace V1_3 {
|
||||||
namespace widevine {
|
namespace widevine {
|
||||||
|
|
||||||
struct WVDrmFactory : public IDrmFactory {
|
struct WVDrmFactory : public IDrmFactory {
|
||||||
@@ -37,6 +37,9 @@ struct WVDrmFactory : public IDrmFactory {
|
|||||||
const hidl_string& appPackageName,
|
const hidl_string& appPackageName,
|
||||||
createPlugin_cb _hidl_cb) override;
|
createPlugin_cb _hidl_cb) override;
|
||||||
|
|
||||||
|
Return<void> getSupportedCryptoSchemes(
|
||||||
|
getSupportedCryptoSchemes_cb _hidl_cb) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
WVDRM_DISALLOW_COPY_AND_ASSIGN(WVDrmFactory);
|
WVDRM_DISALLOW_COPY_AND_ASSIGN(WVDrmFactory);
|
||||||
|
|
||||||
@@ -52,7 +55,7 @@ struct WVDrmFactory : public IDrmFactory {
|
|||||||
extern "C" IDrmFactory* HIDL_FETCH_IDrmFactory(const char* name);
|
extern "C" IDrmFactory* HIDL_FETCH_IDrmFactory(const char* name);
|
||||||
|
|
||||||
} // namespace widevine
|
} // namespace widevine
|
||||||
} // namespace V1_2
|
} // namespace V1_3
|
||||||
} // namespace drm
|
} // namespace drm
|
||||||
} // namespace hardware
|
} // namespace hardware
|
||||||
} // namespace wvdrm
|
} // namespace wvdrm
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Copyright (C) 2019 The Android Open Source Project
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
<manifest version="1.0" type="device">
|
||||||
|
<hal format="hidl">
|
||||||
|
<name>android.hardware.drm</name>
|
||||||
|
<transport>hwbinder</transport>
|
||||||
|
<fqname>@1.3::ICryptoFactory/widevine</fqname>
|
||||||
|
<fqname>@1.3::IDrmFactory/widevine</fqname>
|
||||||
|
</hal>
|
||||||
|
</manifest>
|
||||||
@@ -67,6 +67,7 @@ LOCAL_SHARED_LIBRARIES := \
|
|||||||
android.hardware.drm@1.0 \
|
android.hardware.drm@1.0 \
|
||||||
android.hardware.drm@1.1 \
|
android.hardware.drm@1.1 \
|
||||||
android.hardware.drm@1.2 \
|
android.hardware.drm@1.2 \
|
||||||
|
android.hardware.drm@1.3 \
|
||||||
android.hidl.memory@1.0 \
|
android.hidl.memory@1.0 \
|
||||||
libcrypto \
|
libcrypto \
|
||||||
libhidlmemory \
|
libhidlmemory \
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ LOCAL_SHARED_LIBRARIES := \
|
|||||||
android.hardware.drm@1.0 \
|
android.hardware.drm@1.0 \
|
||||||
android.hardware.drm@1.1 \
|
android.hardware.drm@1.1 \
|
||||||
android.hardware.drm@1.2 \
|
android.hardware.drm@1.2 \
|
||||||
|
android.hardware.drm@1.3 \
|
||||||
android.hidl.memory@1.0 \
|
android.hidl.memory@1.0 \
|
||||||
libbase \
|
libbase \
|
||||||
libbinder \
|
libbinder \
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ LOCAL_SHARED_LIBRARIES := \
|
|||||||
android.hardware.drm@1.0 \
|
android.hardware.drm@1.0 \
|
||||||
android.hardware.drm@1.1 \
|
android.hardware.drm@1.1 \
|
||||||
android.hardware.drm@1.2 \
|
android.hardware.drm@1.2 \
|
||||||
|
android.hardware.drm@1.3 \
|
||||||
android.hidl.memory@1.0 \
|
android.hidl.memory@1.0 \
|
||||||
libcrypto \
|
libcrypto \
|
||||||
liblog
|
liblog
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ LOCAL_SHARED_LIBRARIES := \
|
|||||||
android.hardware.drm@1.0 \
|
android.hardware.drm@1.0 \
|
||||||
android.hardware.drm@1.1 \
|
android.hardware.drm@1.1 \
|
||||||
android.hardware.drm@1.2 \
|
android.hardware.drm@1.2 \
|
||||||
|
android.hardware.drm@1.3 \
|
||||||
android.hidl.memory@1.0 \
|
android.hidl.memory@1.0 \
|
||||||
libbinder \
|
libbinder \
|
||||||
libbase \
|
libbase \
|
||||||
|
|||||||
@@ -6,23 +6,32 @@
|
|||||||
|
|
||||||
#include "WVUUID.h"
|
#include "WVUUID.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <array>
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
namespace wvdrm {
|
namespace wvdrm {
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
const std::array<uint8_t, 16> kWidevineUUID = {
|
||||||
|
0xED,0xEF,0x8B,0xA9,0x79,0xD6,0x4A,0xCE,
|
||||||
|
0xA3,0xC8,0x27,0xDC,0xD5,0x1D,0x21,0xED
|
||||||
|
};
|
||||||
|
|
||||||
|
const std::array<uint8_t, 16> kOldNetflixWidevineUUID = {
|
||||||
|
0x29,0x70,0x1F,0xE4,0x3C,0xC7,0x4A,0x34,
|
||||||
|
0x8C,0x5B,0xAE,0x90,0xC7,0x43,0x9A,0x47
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
bool isWidevineUUID(const uint8_t uuid[16]) {
|
bool isWidevineUUID(const uint8_t uuid[16]) {
|
||||||
static const uint8_t kWidevineUUID[16] = {
|
return !memcmp(uuid, kWidevineUUID.data(), 16) ||
|
||||||
0xED,0xEF,0x8B,0xA9,0x79,0xD6,0x4A,0xCE,
|
!memcmp(uuid, kOldNetflixWidevineUUID.data(), 16);
|
||||||
0xA3,0xC8,0x27,0xDC,0xD5,0x1D,0x21,0xED
|
}
|
||||||
};
|
|
||||||
|
|
||||||
static const uint8_t kOldNetflixWidevineUUID[16] = {
|
std::vector<std::array<uint8_t, 16>> getSupportedCryptoSchemes() {
|
||||||
0x29,0x70,0x1F,0xE4,0x3C,0xC7,0x4A,0x34,
|
return {kWidevineUUID, kOldNetflixWidevineUUID};
|
||||||
0x8C,0x5B,0xAE,0x90,0xC7,0x43,0x9A,0x47
|
|
||||||
};
|
|
||||||
|
|
||||||
return !memcmp(uuid, kWidevineUUID, 16) ||
|
|
||||||
!memcmp(uuid, kOldNetflixWidevineUUID, 16);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace wvdrm
|
} // namespace wvdrm
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
namespace wvdrm {
|
namespace wvdrm {
|
||||||
namespace hardware {
|
namespace hardware {
|
||||||
namespace drm {
|
namespace drm {
|
||||||
namespace V1_2 {
|
namespace V1_3 {
|
||||||
namespace widevine {
|
namespace widevine {
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@@ -27,7 +27,7 @@ ICryptoFactory* createCryptoFactory() {
|
|||||||
|
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
} // namespace widevine
|
} // namespace widevine
|
||||||
} // namespace V1_2
|
} // namespace V1_3
|
||||||
} // namespace drm
|
} // namespace drm
|
||||||
} // namespace hardware
|
} // namespace hardware
|
||||||
} // namespace wvdrm
|
} // namespace wvdrm
|
||||||
|
|||||||
@@ -19,9 +19,11 @@
|
|||||||
namespace wvdrm {
|
namespace wvdrm {
|
||||||
namespace hardware {
|
namespace hardware {
|
||||||
namespace drm {
|
namespace drm {
|
||||||
namespace V1_2 {
|
namespace V1_3 {
|
||||||
namespace widevine {
|
namespace widevine {
|
||||||
|
|
||||||
|
using wvdrm::hardware::drm::V1_2::widevine::WVCryptoPlugin;
|
||||||
|
|
||||||
Return<bool> WVCryptoFactory::isCryptoSchemeSupported(
|
Return<bool> WVCryptoFactory::isCryptoSchemeSupported(
|
||||||
const hidl_array<uint8_t, 16>& uuid) {
|
const hidl_array<uint8_t, 16>& uuid) {
|
||||||
return isWidevineUUID(uuid.data());
|
return isWidevineUUID(uuid.data());
|
||||||
@@ -52,7 +54,7 @@ Return<void> WVCryptoFactory::createPlugin(
|
|||||||
}
|
}
|
||||||
|
|
||||||
} // namespace widevine
|
} // namespace widevine
|
||||||
} // namespace V1_2
|
} // namespace V1_3
|
||||||
} // namespace drm
|
} // namespace drm
|
||||||
} // namespace hardware
|
} // namespace hardware
|
||||||
} // namespace wvdrm
|
} // namespace wvdrm
|
||||||
|
|||||||
@@ -22,9 +22,11 @@
|
|||||||
namespace wvdrm {
|
namespace wvdrm {
|
||||||
namespace hardware {
|
namespace hardware {
|
||||||
namespace drm {
|
namespace drm {
|
||||||
namespace V1_2 {
|
namespace V1_3 {
|
||||||
namespace widevine {
|
namespace widevine {
|
||||||
|
|
||||||
|
using wvdrm::hardware::drm::V1_2::widevine::WVDrmPlugin;
|
||||||
|
|
||||||
WVGenericCryptoInterface WVDrmFactory::sOemCryptoInterface;
|
WVGenericCryptoInterface WVDrmFactory::sOemCryptoInterface;
|
||||||
|
|
||||||
Return<bool> WVDrmFactory::isCryptoSchemeSupported(
|
Return<bool> WVDrmFactory::isCryptoSchemeSupported(
|
||||||
@@ -67,7 +69,7 @@ Return<void> WVDrmFactory::createPlugin(
|
|||||||
const auto& self = android::hardware::IPCThreadState::self();
|
const auto& self = android::hardware::IPCThreadState::self();
|
||||||
const char* sid = self->getCallingSid();
|
const char* sid = self->getCallingSid();
|
||||||
sid = sid ? (strstr(sid, "mediadrmserver") ? sid : "app") : "nullptr";
|
sid = sid ? (strstr(sid, "mediadrmserver") ? sid : "app") : "nullptr";
|
||||||
ALOGI("[%s] calling %s", sid, __PRETTY_FUNCTION__);
|
ALOGI("[%s][%s] calling %s", sid, appPackageName.c_str(), __PRETTY_FUNCTION__);
|
||||||
|
|
||||||
sp<IDrmPlugin> plugin;
|
sp<IDrmPlugin> plugin;
|
||||||
if (!isCryptoSchemeSupported(uuid.data())) {
|
if (!isCryptoSchemeSupported(uuid.data())) {
|
||||||
@@ -112,9 +114,17 @@ int32_t WVDrmFactory::firstApiLevel() {
|
|||||||
return firstApiLevel;
|
return firstApiLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Return<void> WVDrmFactory::getSupportedCryptoSchemes(getSupportedCryptoSchemes_cb _hidl_cb) {
|
||||||
|
std::vector<hidl_array<uint8_t, 16>> schemes;
|
||||||
|
for (const auto &scheme : wvdrm::getSupportedCryptoSchemes()) {
|
||||||
|
schemes.push_back(scheme);
|
||||||
|
}
|
||||||
|
_hidl_cb(schemes);
|
||||||
|
return Void();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace widevine
|
} // namespace widevine
|
||||||
} // namespace V1_2
|
} // namespace V1_3
|
||||||
} // namespace drm
|
} // namespace drm
|
||||||
} // namespace hardware
|
} // namespace hardware
|
||||||
} // namespace wvdrm
|
} // namespace wvdrm
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ service vendor.drm-widevine-hal-1-2 /vendor/bin/hw/android.hardware.drm@1.2-serv
|
|||||||
interface android.hardware.drm@1.2::ICryptoFactory widevine
|
interface android.hardware.drm@1.2::ICryptoFactory widevine
|
||||||
interface android.hardware.drm@1.2::IDrmFactory widevine
|
interface android.hardware.drm@1.2::IDrmFactory widevine
|
||||||
interface android.hidl.base@1.0::IBase widevine
|
interface android.hidl.base@1.0::IBase widevine
|
||||||
|
disabled
|
||||||
class hal
|
class hal
|
||||||
user media
|
user media
|
||||||
group media mediadrm drmrpc system
|
group media mediadrm drmrpc system
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
on property:init.svc.mediadrm=running
|
||||||
|
mkdir /data/vendor/mediadrm 0770 media mediadrm
|
||||||
|
start vendor.move_data_sh
|
||||||
|
|
||||||
|
service vendor.move_data_sh /system/bin/move_widevine_data.sh
|
||||||
|
class late_start
|
||||||
|
user media
|
||||||
|
group media mediadrm system
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service vendor.drm-widevine-hal-1-3 /vendor/bin/hw/android.hardware.drm@1.3-service-lazy.widevine
|
||||||
|
interface android.hardware.drm@1.0::ICryptoFactory widevine
|
||||||
|
interface android.hardware.drm@1.0::IDrmFactory widevine
|
||||||
|
interface android.hardware.drm@1.1::ICryptoFactory widevine
|
||||||
|
interface android.hardware.drm@1.1::IDrmFactory widevine
|
||||||
|
interface android.hardware.drm@1.2::ICryptoFactory widevine
|
||||||
|
interface android.hardware.drm@1.2::IDrmFactory widevine
|
||||||
|
interface android.hardware.drm@1.3::ICryptoFactory widevine
|
||||||
|
interface android.hardware.drm@1.3::IDrmFactory widevine
|
||||||
|
interface android.hidl.base@1.0::IBase widevine
|
||||||
|
oneshot
|
||||||
|
disabled
|
||||||
|
class hal
|
||||||
|
user media
|
||||||
|
group media mediadrm drmrpc system
|
||||||
|
ioprio rt 4
|
||||||
|
writepid /dev/cpuset/foreground/tasks
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
on property:init.svc.mediadrm=running
|
||||||
|
mkdir /data/vendor/mediadrm 0770 media mediadrm
|
||||||
|
start vendor.move_data_sh
|
||||||
|
|
||||||
|
service vendor.move_data_sh /system/bin/move_widevine_data.sh
|
||||||
|
class late_start
|
||||||
|
user media
|
||||||
|
group media mediadrm system
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
|
||||||
|
service vendor.drm-widevine-hal-1-3 /vendor/bin/hw/android.hardware.drm@1.3-service.widevine
|
||||||
|
interface android.hardware.drm@1.0::ICryptoFactory widevine
|
||||||
|
interface android.hardware.drm@1.0::IDrmFactory widevine
|
||||||
|
interface android.hardware.drm@1.1::ICryptoFactory widevine
|
||||||
|
interface android.hardware.drm@1.1::IDrmFactory widevine
|
||||||
|
interface android.hardware.drm@1.2::ICryptoFactory widevine
|
||||||
|
interface android.hardware.drm@1.2::IDrmFactory widevine
|
||||||
|
interface android.hardware.drm@1.3::ICryptoFactory widevine
|
||||||
|
interface android.hardware.drm@1.3::IDrmFactory widevine
|
||||||
|
interface android.hidl.base@1.0::IBase widevine
|
||||||
|
class hal
|
||||||
|
user media
|
||||||
|
group media mediadrm drmrpc system
|
||||||
|
ioprio rt 4
|
||||||
|
writepid /dev/cpuset/foreground/tasks
|
||||||
@@ -22,8 +22,8 @@
|
|||||||
#include "WVCryptoFactory.h"
|
#include "WVCryptoFactory.h"
|
||||||
#include "WVDrmFactory.h"
|
#include "WVDrmFactory.h"
|
||||||
|
|
||||||
using wvdrm::hardware::drm::V1_2::widevine::WVCryptoFactory;
|
using wvdrm::hardware::drm::V1_3::widevine::WVCryptoFactory;
|
||||||
using wvdrm::hardware::drm::V1_2::widevine::WVDrmFactory;
|
using wvdrm::hardware::drm::V1_3::widevine::WVDrmFactory;
|
||||||
|
|
||||||
int main(int /* argc */, char** /* argv */) {
|
int main(int /* argc */, char** /* argv */) {
|
||||||
sp<IDrmFactory> drmFactory = new WVDrmFactory;
|
sp<IDrmFactory> drmFactory = new WVDrmFactory;
|
||||||
|
|||||||
@@ -23,8 +23,8 @@
|
|||||||
#include "WVCryptoFactory.h"
|
#include "WVCryptoFactory.h"
|
||||||
#include "WVDrmFactory.h"
|
#include "WVDrmFactory.h"
|
||||||
|
|
||||||
using wvdrm::hardware::drm::V1_2::widevine::WVCryptoFactory;
|
using wvdrm::hardware::drm::V1_3::widevine::WVCryptoFactory;
|
||||||
using wvdrm::hardware::drm::V1_2::widevine::WVDrmFactory;
|
using wvdrm::hardware::drm::V1_3::widevine::WVDrmFactory;
|
||||||
using android::hardware::LazyServiceRegistrar;
|
using android::hardware::LazyServiceRegistrar;
|
||||||
|
|
||||||
int main(int /* argc */, char** /* argv */) {
|
int main(int /* argc */, char** /* argv */) {
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ LOCAL_SHARED_LIBRARIES := \
|
|||||||
android.hardware.drm@1.0 \
|
android.hardware.drm@1.0 \
|
||||||
android.hardware.drm@1.1 \
|
android.hardware.drm@1.1 \
|
||||||
android.hardware.drm@1.2 \
|
android.hardware.drm@1.2 \
|
||||||
|
android.hardware.drm@1.3 \
|
||||||
libbase \
|
libbase \
|
||||||
libdl \
|
libdl \
|
||||||
libhidlbase \
|
libhidlbase \
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
namespace wvdrm {
|
namespace wvdrm {
|
||||||
namespace hardware {
|
namespace hardware {
|
||||||
namespace drm {
|
namespace drm {
|
||||||
namespace V1_2 {
|
namespace V1_3 {
|
||||||
namespace widevine {
|
namespace widevine {
|
||||||
|
|
||||||
using ::android::sp;
|
using ::android::sp;
|
||||||
@@ -32,7 +32,7 @@ TEST(CreatePluginFactoriesTest, CreatesCryptoFactory) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} // namespace widevine
|
} // namespace widevine
|
||||||
} // namespace V1_2
|
} // namespace V1_3
|
||||||
} // namespace drm
|
} // namespace drm
|
||||||
} // namespace hardware
|
} // namespace hardware
|
||||||
} // namespace wvdrm
|
} // namespace wvdrm
|
||||||
|
|||||||
@@ -10,10 +10,9 @@
|
|||||||
namespace wvdrm {
|
namespace wvdrm {
|
||||||
namespace hardware {
|
namespace hardware {
|
||||||
namespace drm {
|
namespace drm {
|
||||||
namespace V1_2 {
|
namespace V1_3 {
|
||||||
namespace widevine {
|
namespace widevine {
|
||||||
|
|
||||||
using wvdrm::hardware::drm::V1_2::widevine::WVCryptoFactory;
|
|
||||||
using ::android::sp;
|
using ::android::sp;
|
||||||
|
|
||||||
const uint8_t kWidevineUUID[16] = {
|
const uint8_t kWidevineUUID[16] = {
|
||||||
@@ -49,7 +48,7 @@ TEST(WVCryptoFactoryTest, DoesNotSupportUnsupportedCryptoSchemes) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} // namespace widevine
|
} // namespace widevine
|
||||||
} // namespace V1_2
|
} // namespace V1_3
|
||||||
} // namespace drm
|
} // namespace drm
|
||||||
} // namespace hardware
|
} // namespace hardware
|
||||||
} // namespace wvdrm
|
} // namespace wvdrm
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
namespace wvdrm {
|
namespace wvdrm {
|
||||||
namespace hardware {
|
namespace hardware {
|
||||||
namespace drm {
|
namespace drm {
|
||||||
namespace V1_2 {
|
namespace V1_3 {
|
||||||
namespace widevine {
|
namespace widevine {
|
||||||
|
|
||||||
using namespace android;
|
using namespace android;
|
||||||
@@ -144,7 +144,7 @@ TEST(WVDrmFactoryTest, CalculatesBlankAppPackageNamePermissibilityCorrectly) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} // namespace widevine
|
} // namespace widevine
|
||||||
} // namespace V1_2
|
} // namespace V1_3
|
||||||
} // namespace drm
|
} // namespace drm
|
||||||
} // namespace hardware
|
} // namespace hardware
|
||||||
} // namespace wvdrm
|
} // namespace wvdrm
|
||||||
|
|||||||
Reference in New Issue
Block a user