ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

[Widevine][CDM][Device Specific] L1 content plays on L3 device (only on Redmi Note-4)

Open GouravSna opened this issue 6 years ago • 5 comments

Hi There,

Followed this: https://support.google.com/widevine/answer/6072714?hl=en

I have a question. We have a stream which has only L1 DRM license; is not playing on any L3 device except Redmi Note-4. Means on Redmi Note-4, stream works which should not.

I am sharing the device info for the help to understand underlying DRM.

Question : I tried on Exoplayer demo with redmi note-4, it works on L1 license. Have you faced such weired issue ? Because DRM framework is saying that it is L3 device. I tested only this device, there could be a lot of other device like this. So I am worried. OR if you can suggest to get more info from framework to figure out such devices.

on Redmi Note-4 cdm engine adds the key and it starts the playback.

2020-06-26 13:07:45.719 734-734/? I/WVCdm: CdmEngine::OpenSession
2020-06-26 13:07:45.719 734-734/? I/WVCdm: Level3 Library 4445 Mar 30 2016 13:23:54
2020-06-26 13:07:45.723 734-734/? W/WVCdm: Could not load liboemcrypto.so. Falling back to L3.  dlopen failed: library "liboemcrypto.so" not found
2020-06-26 13:07:45.727 734-734/? I/WVCdm: CdmEngine::QueryKeyControlInfo
2020-06-26 13:07:45.727 734-734/? I/WVCdm: CdmEngine::GenerateKeyRequest
2020-06-26 13:07:45.728 734-734/? D/WVCdm: PrepareKeyRequest: nonce=2447012926
2020-06-26 13:07:45.831 734-9089/? I/WVCdm: CdmEngine::QuerySessionStatus
2020-06-26 13:07:46.215 734-9089/? I/WVCdm: CdmEngine::AddKey
2020-06-26 13:07:49.993 734-9089/? I/WVCdm: CdmEngine::CloseSession

On the other hand on another L3 devices, it failes which is expected.

2020-06-26 13:35:26.277 572-22464/? I/WVCdm: [cdm_engine.cpp(111):OpenSession] CdmEngine::OpenSession
2020-06-26 13:35:26.278 572-24226/? I/WVCdm: [(0):] Level3 Library 7283 Apr 20 2019 10:13:27
2020-06-26 13:35:26.287 572-22464/? I/WVCdm: [oemcrypto_adapter_dynamic.cpp(573):Initialize] L3 Initialized. Trying L1.
2020-06-26 13:35:26.288 572-22464/? W/WVCdm: [oemcrypto_adapter_dynamic.cpp(584):Initialize] Could not load liboemcrypto.so. Falling back to L3.  dlopen failed: library "liboemcrypto.so" not found
2020-06-26 13:35:26.288 572-22464/? D/WVCdm: [crypto_session.cpp(646):Open] CryptoSession::Open: Lock: requested_security_level: Default
2020-06-26 13:35:26.292 572-22464/? I/WVCdm: [device_files.cpp(166):ExtractDeviceInfo] ExtractDeviceInfo Entry
2020-06-26 13:35:26.297 572-22464/? I/WVCdm: [cdm_engine.cpp(148):OpenSession] CdmEngine::OpenSession: sid25
2020-06-26 13:35:26.297 572-22464/? I/WVCdm: [cdm_engine.cpp(743):QueryOemCryptoSessionId] CdmEngine::QueryOemCryptoSessionId
2020-06-26 13:35:26.298 572-22464/? I/WVCdm: [cdm_engine.cpp(234):GenerateKeyRequest] CdmEngine::GenerateKeyRequest
2020-06-26 13:35:26.299 572-22464/? D/WVCdm: [license.cpp(355):PrepareKeyRequest] PrepareKeyRequest: nonce=3708103767
2020-06-26 13:35:26.395 570-22463/? D/WVCdm: Instantiating CDM.
2020-06-26 13:35:26.456 570-22463/? D/WVCdm: Instantiating CDM.
2020-06-26 13:35:26.458 572-22450/? I/WVCdm: [cdm_engine.cpp(641):QuerySessionStatus] CdmEngine::QuerySessionStatus
2020-06-26 13:35:26.881 572-22450/? I/WVCdm: [cdm_engine.cpp(313):AddKey] CdmEngine::AddKey
2020-06-26 13:35:30.184 572-22450/? E/WVCdm: Decrypt error result in session sid25 during encrypted block: 255
2020-06-26 13:35:30.230 572-22450/? E/WVCdm: mapMemory returns nullptr
2020-06-26 13:35:30.251 572-22464/? E/WVCdm: mapMemory returns nullptr
2020-06-26 13:35:30.254 572-22450/? I/WVCdm: [cdm_engine.cpp(191):CloseSession] CdmEngine::CloseSession: sid25
2020-06-26 13:35:30.266 572-22450/? I/WVCdm: [(0):] L3 Terminate.

Device Info JSON

    {
    "meta": {
        "versionName": "1.4.1",
        "versionCode": 18,
        "timestamp": "2020-06-25T13:36:08Z"
    },
    "system": {
        "RELEASE": "7.0",
        "SDK_INT": 24,
        "BRAND": "xiaomi",
        "MODEL": "Redmi Note 4",
        "MANUFACTURER": "Xiaomi",
        "DEVICE": "mido",
        "BOARD": "msm8953",
        "TAGS": "release-keys",
        "FINGERPRINT": "xiaomi/mido/mido:7.0/NRD90M/V11.0.2.0.NCFMIXM:user/release-keys",
        "ARCH": {
            "os.arch": "aarch64",
            "SUPPORTED_ABIS": [
                "arm64-v8a",
                "armeabi-v7a",
                "armeabi"
            ],
            "SUPPORTED_32_BIT_ABIS": [
                "armeabi-v7a",
                "armeabi"
            ],
            "SUPPORTED_64_BIT_ABIS": [
                "arm64-v8a"
            ]
        }
    },
    "drm": {
        "modular": {
            "widevine": {
                "properties": {
                    "vendor": "Google",
                    "version": "1.0",
                    "description": "Widevine CDM",
                    "algorithms": "AES/CBC/NoPadding,HmacSHA256",
                    "securityLevel": "L3",
                    "systemId": "4445",
                    "privacyMode": "disable",
                    "sessionSharing": "disable",
                    "usageReportingSupport": "True",
                    "appId": "",
                    "origin": "",
                    "hdcpLevel": "Unprotected",
                    "maxHdcpLevel": "Unprotected",
                    "maxNumberOfSessions": "16",
                    "numberOfOpenSessions": "0",
                    "deviceUniqueId": "SHBOaUNRemFOY2xOWUtmUkJ6aHlyZGhIS3dicmNSZQA=",
                    "provisioningUniqueId": "hyDYsJZUlLT3hYZavWoVFQ==",
                    "serviceCertificate": ""
                },
                "events": []
            }
        },
        "classic": {
            "engines": [
                "OMA V1 Forward Lock"
            ]
        }
    },
    "display": {
        "metrics": "DisplayMetrics{density=3.0, width=1080, height=1920, scaledDensity=3.0, xdpi=397.565, ydpi=399.737}"
    },
    "media": {
        "decoders": {
            "OMX.google.mp3.decoder": {
                "supportedTypes": [
                    "audio/mpeg"
                ]
            },
            "OMX.google.amrnb.decoder": {
                "supportedTypes": [
                    "audio/3gpp"
                ]
            },
            "OMX.google.amrwb.decoder": {
                "supportedTypes": [
                    "audio/amr-wb"
                ]
            },
            "OMX.google.aac.decoder": {
                "supportedTypes": [
                    "audio/mp4a-latm"
                ]
            },
            "OMX.google.g711.alaw.decoder": {
                "supportedTypes": [
                    "audio/g711-alaw"
                ]
            },
            "OMX.google.g711.mlaw.decoder": {
                "supportedTypes": [
                    "audio/g711-mlaw"
                ]
            },
            "OMX.google.vorbis.decoder": {
                "supportedTypes": [
                    "audio/vorbis"
                ]
            },
            "OMX.google.opus.decoder": {
                "supportedTypes": [
                    "audio/opus"
                ]
            },
            "OMX.google.raw.decoder": {
                "supportedTypes": [
                    "audio/raw"
                ]
            },
            "OMX.google.gsm.decoder": {
                "supportedTypes": [
                    "audio/gsm"
                ]
            },
            "OMX.qti.audio.decoder.flac": {
                "supportedTypes": [
                    "audio/flac"
                ]
            },
            "OMX.qcom.video.decoder.avc": {
                "supportedTypes": [
                    "video/avc"
                ]
            },
            "OMX.qcom.video.decoder.avc.secure": {
                "supportedTypes": [
                    "video/avc"
                ]
            },
            "OMX.qcom.video.decoder.mpeg2": {
                "supportedTypes": [
                    "video/mpeg2"
                ]
            },
            "OMX.qcom.video.decoder.mpeg2.secure": {
                "supportedTypes": [
                    "video/mpeg2"
                ]
            },
            "OMX.qcom.video.decoder.mpeg4": {
                "supportedTypes": [
                    "video/mp4v-es"
                ]
            },
            "OMX.qcom.video.decoder.h263": {
                "supportedTypes": [
                    "video/3gpp"
                ]
            },
            "OMX.qcom.video.decoder.vp8": {
                "supportedTypes": [
                    "video/x-vnd.on2.vp8"
                ]
            },
            "OMX.qcom.video.decoder.vp9": {
                "supportedTypes": [
                    "video/x-vnd.on2.vp9"
                ]
            },
            "OMX.qcom.video.decoder.hevc": {
                "supportedTypes": [
                    "video/hevc"
                ]
            },
            "OMX.qcom.video.decoder.hevc.secure": {
                "supportedTypes": [
                    "video/hevc"
                ]
            },
            "OMX.google.mpeg4.decoder": {
                "supportedTypes": [
                    "video/mp4v-es",
                    "video/mp4v-esdp"
                ]
            },
            "OMX.google.h263.decoder": {
                "supportedTypes": [
                    "video/3gpp"
                ]
            },
            "OMX.google.h264.decoder": {
                "supportedTypes": [
                    "video/avc"
                ]
            },
            "OMX.google.hevc.decoder": {
                "supportedTypes": [
                    "video/hevc"
                ]
            },
            "OMX.google.vp8.decoder": {
                "supportedTypes": [
                    "video/x-vnd.on2.vp8"
                ]
            },
            "OMX.google.vp9.decoder": {
                "supportedTypes": [
                    "video/x-vnd.on2.vp9"
                ]
            }
        }
    },
    "root": {
        "existingFiles": []
    }
}

GouravSna avatar Jun 26 '20 08:06 GouravSna

@jt64 - Please take a look.

ojw28 avatar Jun 26 '20 10:06 ojw28

Hi @jt64 , Please let me know if any more details required of this device.

GouravSna avatar Jul 01 '20 05:07 GouravSna

Hi GouravSna,

2020-06-26 13:07:46.215 734-9089/? I/WVCdm: CdmEngine::AddKey 2020-06-26 13:07:49.993 734-9089/? I/WVCdm: CdmEngine::CloseSession

The session is closed soon after the license has been processed. Are you sure that frames with encrypted data have been passed to MediaCodec. Can you make sure you play long enough to decrypt content.

Can you also share the license request and response (passed to MediaDrm.getKeyRequest, MediaDrm.providerKeyResponse) with [email protected] with subject "Issue #7546"?

rrfrias avatar Jul 28 '20 22:07 rrfrias

Hi @rrfrias , Thank you very much for responsding. 👍 We found that this issue is related to DRM BE . If in case, we will find any such issue further. We will reopen it.

GouravSna avatar Jul 30 '20 05:07 GouravSna

yo how did u get L1 CDM? can u send it to me via message and ill help u

Mavrick102 avatar Aug 11 '20 15:08 Mavrick102