S8: Onleihe App Audiobooks do not work

The german public library app “onleihe” does not work correctly with e on my S8:

Audiobooks do not play. It works without problems on all other lineageos devices I own.

Any ideas?

guess for the ones protected by Adobe DRM the device needs to pass Safetynet Attestation? can you give an example? I gave it 3 tries, but couldn’t find eAudio/eMusic that didn’t play/work.

It is not connected to Adobe DRM. Onleihe and at least our local library uses an internal DRM mechanism for all media.
But it is indeed a problem of drm decryption/codec especially on /e/ on a S8

@ tcecyk Did you test it with an S8 on 0.17-20210530 ?

Here are the logcat traces:

08-30 20:07:26.810 27640 27874 I DRMTodayCallback: License info: eyJ0aSI6ImYxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
08-30 20:07:26.810 27640 27874 I DRMTodayCallback: Found license support for KID: d37450b5-1120-4c4b-90a4-dcd107cc226a [HD]
08-30 20:07:26.811 27640 27866 D DrmSessionManager: Received Key-Response for session 7369643134
08-30 20:07:26.811  3951 21609 I WVCdm   : [cdm_engine.cpp(312):AddKey] CdmEngine::AddKey
08-30 20:07:26.923  3951 21609 I WVCdm   : [cdm_engine.cpp(674):QueryKeyStatus] CdmEngine::QueryKeyStatus
08-30 20:07:26.924 27640 27866 I DrmSessionManager: License Key Status: PersistAllowed -> True
08-30 20:07:26.924 27640 27866 I DrmSessionManager: License Key Status: PlayAllowed -> True
08-30 20:07:26.924 27640 27866 I DrmSessionManager: License Key Status: PlaybackDurationRemaining -> 9223372036854775807
08-30 20:07:26.924 27640 27866 I DrmSessionManager: License Key Status: LicenseDurationRemaining -> 9223372036854775807
08-30 20:07:26.924 27640 27866 I DrmSessionManager: License Key Status: RenewalServerUrl -> 
08-30 20:07:26.924 27640 27866 I DrmSessionManager: License Key Status: RenewAllowed -> False
08-30 20:07:26.924 27640 27866 I DrmSessionManager: License Key Status: LicenseType -> Streaming
08-30 20:07:26.924 27640 27640 I MediaDrm: Drm key status changed
08-30 20:07:26.926  3951 21609 E wv_dash : Trustlet did not send a valid return code: 0x6000
08-30 20:07:26.926  3951 21609 E wv_dash : tee_send_msg_general_cmd is failed.
08-30 20:07:26.926  3951 21609 E wv_dash : process drm decrypt CENC failed
08-30 20:07:26.926  3951 21609 E WVCdm   : Decrypt error result in session sid14 during encrypted block: 178
08-30 20:07:26.928 27640 27866 E ExoPlayerImplInternal: Renderer error: index=1, type=audio, format=Format(mvp9783833739408.mp3.mp4, null, null, audio/mp4a-latm, mp4a.40.2, 191800, und, [-1, -1, -1.0], [2, 44100]), rendererSupport=YES
08-30 20:07:26.928 27640 27866 E ExoPlayerImplInternal:   d.b.a.b.x: android.media.MediaCodec$CryptoException: Operation not supported in this configuration
08-30 20:07:26.928 27640 27866 E ExoPlayerImplInternal:       at d.b.a.b.t.B(BaseRenderer.java:5)
08-30 20:07:26.928 27640 27866 E ExoPlayerImplInternal:       at d.b.a.b.c1.f.k0(MediaCodecRenderer.java:86)
08-30 20:07:26.928 27640 27866 E ExoPlayerImplInternal:       at d.b.a.b.c1.f.o(MediaCodecRenderer.java:14)
08-30 20:07:26.928 27640 27866 E ExoPlayerImplInternal:       at d.b.a.b.b0$f$a.handleMessage(ExoPlayerImplInternal.java:1)
08-30 20:07:26.928 27640 27866 E ExoPlayerImplInternal:       at android.os.Handler.dispatchMessage(Handler.java:102)
08-30 20:07:26.928 27640 27866 E ExoPlayerImplInternal:       at android.os.Looper.loop(Looper.java:193)
08-30 20:07:26.928 27640 27866 E ExoPlayerImplInternal:       at android.os.HandlerThread.run(HandlerThread.java:65)
08-30 20:07:26.928 27640 27866 E ExoPlayerImplInternal:   Caused by: android.media.MediaCodec$CryptoException: Operation not supported in this configuration
08-30 20:07:26.928 27640 27866 E ExoPlayerImplInternal:       at android.media.MediaCodec.native_queueSecureInputBuffer(Native Method)
08-30 20:07:26.928 27640 27866 E ExoPlayerImplInternal:       at android.media.MediaCodec.queueSecureInputBuffer(MediaCodec.java:2608)
08-30 20:07:26.928 27640 27866 E ExoPlayerImplInternal:       at d.b.a.b.c1.f.k0(MediaCodecRenderer.java:75)
08-30 20:07:26.928 27640 27866 E ExoPlayerImplInternal:       ... 5 more
08-30 20:07:26.942  3853  3853 W hwservicemanager: getTransport: Cannot find entry android.hidl.memory@1.0::IMapper/ in either framework or device manifest.
08-30 20:07:26.944  3951 21609 E libhidlmemory: Could not fetch mapper for  shared memory
08-30 20:07:26.944  3951 21609 E WVCdm   : mapMemory returns nullptr
08-30 20:07:26.946 27640 27866 D DrmSessionManager: Release session, open count is 0
08-30 20:07:26.946 27640 27866 D DrmSessionManager: Set session to pending release
08-30 20:07:26.947 27640 27866 I DrmSessionManager: Releasing session 7369643134 with reference count 0. Ignoring.
08-30 20:07:26.948 27640 27873 D CustomHttpDataSource: Trying to drain connection on interrupted thread!
08-30 20:07:26.951 27640 27873 D CustomHttpDataSource: Successfully drained the open connection in 2ms
08-30 20:07:26.951 27640 27640 I PlayerController: Releasing player
08-30 20:07:26.953  4211  4312 I MediaFocusControl: abandonAudioFocus() from uid/pid 10127/27640 clientId=android.media.AudioManager@f0323b2d.b.a.b.q$a@6e29f03
08-30 20:07:26.955 27640 27640 I ExoPlayerImpl: Release 4391a68 [ExoPlayerLib/2.11.7] [dreamlte, SM-G950F, samsung, 28] [goog.exo.core, goog.exo.dash]
08-30 20:07:26.958 27640 27640 D DrmSessionManager: Close DRM session manager
08-30 20:07:26.959 27640 27640 D DrmSessionManager: Closing Primary session 7369643134
08-30 20:07:26.960 27640 27640 D DrmSessionManager: Closing (Async) DRM session 7369643134 Open sessions: 0
08-30 20:07:26.960  3951 21609 I WVCdm   : [cdm_engine.cpp(190):CloseSession] CdmEngine::CloseSession: sid14
08-30 20:07:26.961 27640 27640 D PlayerController: Playback state changed. Last: Buffering New: Idle
08-30 20:07:26.969 27640 27640 E CastlabsPlayerException: [ERROR] [VIDEO_DECRYPTION] Error decrypting video data: Operation not supported in this configuration 6 Bundle[{code=6, severity=ERROR}]
08-30 20:07:26.969 27640 27640 E CastlabsPlayerException: android.media.MediaCodec$CryptoException: Operation not supported in this configuration
08-30 20:07:26.969 27640 27640 E CastlabsPlayerException:       at android.media.MediaCodec.native_queueSecureInputBuffer(Native Method)
08-30 20:07:26.969 27640 27640 E CastlabsPlayerException:       at android.media.MediaCodec.queueSecureInputBuffer(MediaCodec.java:2608)
08-30 20:07:26.969 27640 27640 E CastlabsPlayerException:       at d.b.a.b.c1.f.k0(MediaCodecRenderer.java:75)
08-30 20:07:26.969 27640 27640 E CastlabsPlayerException:       at d.b.a.b.c1.f.o(MediaCodecRenderer.java:14)
08-30 20:07:26.969 27640 27640 E CastlabsPlayerException:       at d.b.a.b.b0$f$a.handleMessage(ExoPlayerImplInternal.java:1)
08-30 20:07:26.969 27640 27640 E CastlabsPlayerException:       at android.os.Handler.dispatchMessage(Handler.java:102)
08-30 20:07:26.969 27640 27640 E CastlabsPlayerException:       at android.os.Looper.loop(Looper.java:193)
08-30 20:07:26.969 27640 27640 E CastlabsPlayerException:       at android.os.HandlerThread.run(HandlerThread.java:65)
08-30 20:07:26.970  3951 21609 I WVCdm   : [(0):] L3 Terminate.
08-30 20:07:26.974  3951 21609 I TeeSysClient: driver closed [hardware/samsung_slsi/exynos8895/mobicore/ClientLib/src/driver.cpp:120]

I think I just didn’t hit a drm song yet. Billie Holiday apparently seemed drm free, can you give an example of song? I tested on a Moto G4 Play in 0.18… you’ll find many entries in GitHub - google/ExoPlayer: An extensible media player for Android for…

Trustlet did not send a valid return code: 0x6000
...
CryptoException: Operation not supported in this configuration

I think the device is signaling a custom kernel, thus widevine drm fails.

Edit: but yes, somebody with an S8 or other samsung to test would be interesting. In the ExoPlayer issues you find filers had a samsung often… or other devices just emit different error messages.

I tried it with audiobooks.
New tentative “Jazz!” from “ZYX Music” 3h41min from 2009: Same negative result.

there was a reference… and a workaround in the later linked issue ticket - DRM issue on samsung galaxy S8 (#1766) · Issues · e / Backlog · GitLab

Jazz! (2009) played (still playing). Looked like it was falling back to L3 widevine (software drm) on my moto harpia (older than your S8).

I WVCdm  L3 Initialized. Trying L1.
W WVCdm  Could not load liboemcrypto.so. Falling back to L3.

As I see your trustlet fail from the qcom in your logs, maybe it tried to go the L1 route (hardware backed drm)? but I still see L3 references at the end of your log. So I guess you need to hide liboemcrypto.so too as @ AlexandreRoux writes in Netflix unusable since 0.13 Q on S9+ (#2536) · Issues · e / Backlog · GitLab

Can you enable adb and adb+root in the dev-options… I think only dev builds offer this (not sure if stable too)? then you’ll get a shell to do so without Magisk.

Thank you.

You’re right. The stable build (e does not offer a dev build for the S8 or I could not find it) does not allow root via adb shell.

you could give the custom kernel in DRM issue on samsung galaxy S8 (#1766) · Issues · e / Backlog · GitLab a try.

Instead of installing the kernel, just booting it alike to a netboot via fastboot boot boot.img - not sure if this is possible on a locked device, probably not, but would give confirmation.

Then asking Alexandre if he can document what is special about the kernel build and then go upstream to include the mod if there are no disadvantages

Hi again and thank you very much for your support @tcecyk !
I’ve found 15 minutes to think about it and to read all informations in your linked gitlab issues.
I was able to solve it by renaming the library file
/system/vendor/lib/liboemcrypto.so
without root or magisk or a custom kernel.

How-To to solve the DRM issue with the Onleihe App and audiobooks
You don’t need root access/Magisk on your Samsung smartphone

  1. Boot TRWP (shall be installed on your Samsung /e/ device
  2. Go to Mount and activate the “system” checkbox
  3. Go to Advanced
  4. Select the File Manager
  5. Browse to /system/vendor/lib and select the file liboemcrypto.so. If you do not find the folder vendor below the system folder, go again to Mount and check that the System checkbox is still checked
  6. Select rename and append ".inactive (or something else)
  7. Reboot
  8. Enjoy your audiobooks
4 Likes