FORUMS
Remove All Ads from XDA

[App] Netflix HD for Widevine DRM L1 devices

52 posts
Thanks Meter: 19
 
By Rhala, Member on 3rd February 2016, 10:27 AM
Post Reply Email Thread
Hey people,

today i wanted to share a post from chenxiaolong, who did some awesome work back at the Galaxy Tab S2 forum. The main problem, was that Netflix didn't want to play HD content on the Galay Tab S2, which was why I researched the requirements of Netflix. They need Widevine L1 implemented on the SoC to allow HD playback. While this is the necessary requirement, Netflix also needs to enable this device in their device list and tell the app it supports Widevine DRM L1. In many cases they don't do that although the device itself would be very capable of displaying HD content. Tried it out on my Galaxy Tab S2 and on the Nexus 5, which both support Widevine DRM L1 and aren't/weren't marked as WV L1 capable. To check DRM capability of your device you can use for example this app https://play.google.com/store/apps/d....drminfo&hl=en
This will not make a non WV L1 capable device run Netflix HD, it will only make the device use the most secure DRM technology!
The whole process doesn't need root, just some tools like apktool, apk-signer and such. Feel free to link the post into your device forum you achieved to get Netflix HD on.

Big Thanks goes out to @chenxiaolong
Link to thread post: http://forum.xda-developers.com/show...5&postcount=12
The Following 2 Users Say Thank You to Rhala For This Useful Post: [ View ] Gift Rhala Ad-Free
 
 
5th May 2017, 10:29 PM |#2  
Junior Member
Thanks Meter: 4
 
More
Based on this, I made a script on Ubuntu to patch last version of netflix APK.

First, you need to install some packages

Code:
sudo apt-get install apktool zipalign default-jdk
Then, you have to build you own signature (to do only once)

Code:
keytool -genkeypair -alias androiddebugkey -keypass android -keystore "${HOME}/.netflix.keystore" -storepass android -keyalg RSA -sigalg SHA1withRSA -dname "CN=Android Debug,O=Android,C=US" -validity 9999
Then, download last netflix APK, for instance from apkmirror, and execute this script on downloaded file (for instance "netflixpatch com.netflix.mediaclient_4.16.1.apk" if your script is named "netflixpatch")

Code:
#!/bin/bash

NAME=$(basename "${1}" .apk)
KEYSTORE="${HOME}/dev/netflix/debug.keystore"
TMPOUT=$(mktemp -d /tmp/tmpdir.netflixpatch.XXXXXXXXXX) || { echo "Failed to create temp file"; exit 1; }

apktool d -r -f "${1}" -o "${TMPOUT}"

sed -i 's/iget-boolean v0, p0, Lcom\/netflix\/mediaclient\/service\/webclient\/model\/leafs\/DeviceConfigData;->enableWidevineL1:Z/const\/4 v0, 0x1/g' "${TMPOUT}/smali/com/netflix/mediaclient/service/webclient/model/leafs/DeviceConfigData.smali"

apktool b "${TMPOUT}"

jarsigner -keystore "${KEYSTORE}" -storepass android -keypass android -sigalg MD5withRSA -digestalg SHA1 -sigfile CERT -signedjar "${TMPOUT}/dist/${NAME}-patched-signed.apk" "${TMPOUT}/dist/${NAME}.apk" androiddebugkey

zipalign -f 4 "${TMPOUT}/dist/${NAME}-patched-signed.apk" "${NAME}-patched-signed-zipaligned.apk"

rm -rf "${TMPOUT}"
You'll get a "com.netflix.mediaclient_4.16.1-patched-signed-zipaligned.apk" file, which will play HD content if your device has Widevine DRM L1 libraries, even if not whitelisted by Netflix.
The Following 4 Users Say Thank You to GuillaumeBarberousse For This Useful Post: [ View ] Gift GuillaumeBarberousse Ad-Free
5th July 2017, 07:10 PM |#3  
Junior Member
Thanks Meter: 1
 
More
Perfect! It works for me on Medion Tablet. It also enables download offline mode. Tanks.
The Following User Says Thank You to 1dhel1 For This Useful Post: [ View ] Gift 1dhel1 Ad-Free
26th August 2017, 02:02 AM |#4  
Member
Thanks Meter: 4
 
More
It doesn´t work for me...I get an error when tryng to reproduce movies
10th October 2017, 05:43 PM |#5  
Member
Flag Dusseldorf
Thanks Meter: 4
 
More
Hi!

Is it possible that this trick doesn't work anymore or doesn't work on all devices? I patched the current Netflix APK (and verified that the changes were made using apktool) but I only get 720p at best. There was also an error message along the lines of "content not allowed in prolog"?

I'm using one of those generic AmLogic S912 boxes ("X92 Smart Box" with the white clock display thing in the front) which supports L3 but neither Netflix nor Prime Video stream 1080p.
31st October 2017, 08:26 PM |#6  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by GuillaumeBarberousse

Based on this, I made a script on Ubuntu to patch last version of netflix APK.

First, you need to install some packages

Code:
sudo apt-get install apktool zipalign default-jdk
Then, you have to build you own signature (to do only once)

Code:
keytool -genkeypair -alias androiddebugkey -keypass android -keystore "${HOME}/.netflix.keystore" -storepass android -keyalg RSA -sigalg SHA1withRSA -dname "CN=Android Debug,O=Android,C=US" -validity 9999
Then, download last netflix APK, for instance from apkmirror, and execute this script on downloaded file (for instance "netflixpatch com.netflix.mediaclient_4.16.1.apk" if your script is named "netflixpatch")

Code:
#!/bin/bash

NAME=$(basename "${1}" .apk)
KEYSTORE="${HOME}/.netflix.keystore"
TMPOUT=$(mktemp -d /tmp/tmpdir.netflixpatch.XXXXXXXXXX) || { echo "Failed to create temp file"; exit 1; }

apktool d -r -f "${1}" -o "${TMPOUT}"

sed -i 's/iget-boolean v0, p0, Lcom\/netflix\/mediaclient\/service\/webclient\/model\/leafs\/DeviceConfigData;->enableWidevineL1:Z/const\/4 v0, 0x1/g' ${TMPOUT}/smali/com/netflix/mediaclient/service/webclient/model/leafs/DeviceConfigData.smali

apktool b ${TMPOUT}

jarsigner -keystore "${KEYSTORE}" -storepass android -keypass android -sigalg MD5withRSA -digestalg SHA1 -sigfile CERT -signedjar "${TMPOUT}/dist/${NAME}-patched-signed.apk" "${TMPOUT}/dist/${NAME}.apk" androiddebugkey

zipalign -f 4 "${TMPOUT}/dist/${NAME}-patched-signed.apk" "${NAME}-patched-signed-zipaligned.apk"

rm -rf $TMPOUT
You'll get a "com.netflix.mediaclient_4.16.1-patched-signed-zipaligned.apk" file, which will play HD content if your device has Widevine DRM L1 libraries, even if not whitelisted by Netflix.

Im sorry but with these informations I don't know exactly if and how it will work out for my galaxy s5. Can I use a app on my mobile to sign the backuped Netflix app? Or do I need to sign the apk on my PC?
4th November 2017, 12:13 PM |#7  
Member
Thanks Meter: 16
 
More
Quote:
Originally Posted by T0mfield

Im sorry but with these informations I don't know exactly if and how it will work out for my galaxy s5. Can I use a app on my mobile to sign the backuped Netflix app? Or do I need to sign the apk on my PC?

These are instructions for Linux. What I have done:
1. download Ubuntu from Windows 10 Store
2. open powershell as admin and type:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
3. reboot when prompted
4. open command line and type:
ubuntu
5. create user/password as prompted
6. type:
sudo apt-get upgrade

Then follow the instructions from post #1. I've got my netflix apk from apkmirror: https://www.apkmirror.com/?post_type...=apk&s=netflix
You can access the windows filesystem by /mnt/c/

The script worked fine for me with Netflix 5.9.0 build 24858 and my Nexus 10.
The Following User Says Thank You to zeebee For This Useful Post: [ View ] Gift zeebee Ad-Free
4th November 2017, 03:21 PM |#8  
Junior Member
Thanks Meter: 4
 
More
The modification was not working anymore on my tablet (Samsung Galaxy Tab A6 SM-T580) giving me an error 0013 and it is now working again, I don't know why (I upgraded firmware to last version T580XXU2BQI9 / T580XEF2BQI9, or maybe Netflix changed something on their servers).

It is tested and working on Netflix apk 5.8.0_build_24642 and 5.9.0_build_24858 with apktool 2.2.1-dirty (Ubuntu 17.04 version), 2.2.3 and 2.3.0
Post Reply Subscribe to Thread

Tags
drm, netflix, streaming, widevine

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes