FORUMS
Remove All Ads from XDA

[App] Netflix HD for Widevine DRM L1 devices

53 posts
Thanks Meter: 21
 
By Rhala, Member on 3rd February 2016, 10:27 AM
Post Reply Email Thread
15th December 2017, 09:55 AM |#11  
Junior Member
Thanks Meter: 13
 
More
Quote:
Originally Posted by vleesevlons

Also, you've changed the keystore value in the script code but not in the signature code.
Also, it didn't work with 5.11.2. Getting an error 5.2. Not sure if it's because it genuinely doesn't work anymore or because I didn't do it correctly on account of the error. Might I add that I'm using a virtual machine, if it makes a difference.
Also, why is there an L before com/?

Thank you, I edited the script to correct keystore path.

The error you were getting was normal, I was trying to patch file for old versions and new versions of netflix apk, I changed the script to prevent the file error message.

I don't know why you've got error 5.2, I had it for some times then it worked again, after uninstalling official apk and reinstalling patched one, maybe something in the cache of the tablet. I tried many version of apktool too, but it doesn't seem related.

For the virtual machine, it shouldn't affect the patching process.

And for the L before com, I don't know, it is smali language, probably to indicate a string value.
The Following User Says Thank You to GuillaumeBarberousse For This Useful Post: [ View ] Gift GuillaumeBarberousse Ad-Free
15th December 2017, 09:46 PM |#12  
Member
Thanks Meter: 2
 
More
Quote:
Originally Posted by GuillaumeBarberousse

Thank you, I edited the script to correct keystore path.

The error you were getting was normal, I was trying to patch file for old versions and new versions of netflix apk, I changed the script to prevent the file error message.

I don't know why you've got error 5.2, I had it for some times then it worked again, after uninstalling official apk and reinstalling patched one, maybe something in the cache of the tablet. I tried many version of apktool too, but it doesn't seem related.

For the virtual machine, it shouldn't affect the patching process.

And for the L before com, I don't know, it is smali language, probably to indicate a string value.

I have a Nexus 5 (2013).
I've installed DRMinfo to confirm that I have WV L1 and it says it does.
I've been experimenting with liboemcrypto.so, i.e. deleting it or renaming it, and that does get rid of the error 5.2.
However, it appears that if the .so file differs from how a liboemcrypto.so should be, then Netflix will not do the DRM check and it will just give you SD quality.
So, I'm at a loss there...

What build worked for you? I've tried 5.11.2 build 25441 and 5.11.1 build 25432
15th December 2017, 09:54 PM |#13  
Junior Member
Thanks Meter: 13
 
More
Quote:
Originally Posted by vleesevlons

I have a Nexus 5 (2013).
I've installed DRMinfo to confirm that I have WV L1 and it says it does.
I've been experimenting with liboemcrypto.so, i.e. deleting it or renaming it, and that does get rid of the error 5.2.
However, it appears that if the .so file differs from how a liboemcrypto.so should be, then Netflix will not do the DRM check and it will just give you SD quality.
So, I'm at a loss there...

What build worked for you? I've tried 5.11.2 build 25441 and 5.11.1 build 25432

In my understanding, but I'm not sure, if you remove liboemcrypto.so, you lose Widevine level 1, so Netflix won't even try to play HD, so no error 5.2. I tried and got HD by patching 5.11.2_build_25441 and 5.11.1_build_25432.
31st January 2018, 07:55 PM |#14  
Senior Member
Flag Poznań
Thanks Meter: 40
 
Donate to Me
More
Thanks for this guide. For me this missed a few instructions, like how to run a script on a file
So this are the steps nessesary to compleat this process:
1. Do everything from OP till it says to run a script on a file
2. For ease name your script netflixpatch and file com.netflix.mediaclient_4.16.1.apk
3. Open terminal in a place where you saved netflix app and this script
4. In terminal type: chmod u+x netflixpatch
5. Then run this script on apk by typing in terminal: ./netflixpatch com.netflix.mediaclient_4.16.1.apk (with ./ in front)
6. If all went you will see new file in your directory, thats the modified app

Now. For me, and I had apk v .12.2 build 25768 this trick seems to not work. I still have video looking like 720
Im on OnePlus 5T (capable of widevine lv.1) and stock rom.
Do I have nessesary libery I don't really know yet.
Need to investigate more but at least I have modified apk now so thanks for that

EDIT: Thers no liboemcrypto.so in /system/vendor/lib/ so that's probably the issue here ...
5th February 2018, 05:34 AM |#15  
Junior Member
Thanks Meter: 0
 
More
anybody knows that this code founds with Android TV netflix apk ?
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; }
FILEOLD="${TMPOUT}/smali/com/netflix/mediaclient/service/webclient/model/leafs/DeviceConfigData.smali"
FILENEW="${TMPOUT}/smali/com/netflix/mediaclient/service/configuration/DeviceConfiguration.smali"

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

if [ -f "${FILEOLD}" ];then
	echo "Patching old version"
	sed -i 's/iget-boolean v0, p0, Lcom\/netflix\/mediaclient\/service\/webclient\/model\/leafs\/DeviceConfigData;->enableWidevineL1:Z/const\/4 v0, 0x1/g' "${FILEOLD}"
elif [ -f "${FILENEW}" ];then
	echo "Patching new version"
	sed -i '/isWidevineL1Enabled/c\    const\/4 v0, 0x1\n    return v0' "${FILENEW}"
else
	echo "File to patch not found !"
	rm -rf "${TMPOUT}"
	exit 1
fi

# /usr/local/bin/apktool b "${TMPOUT}"
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.


------------------------------------------
anyone try to apply this patch and upload to mega to try if this patch found in Mi box Tv:confuse d:
5th February 2018, 08:28 AM |#16  
Junior Member
Thanks Meter: 0
 
More
Problems with the script Helpme
[email protected]:/mnt/c/Users/crist/Downloads/netflix# ./net.sh com.netflix.ninja_5.0.4_build_1965.apk
./net.sh: line 2: $'\r': command not found
./net.sh: line 14: syntax error near unexpected token `elif'
'/net.sh: line 14: `elif [ -f "${FILENEW}" ];then


anybody could helme ... I copy this script :
-------------------------------------------------------------
#!/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; }
FILEOLD="${TMPOUT}/smali/com/netflix/mediaclient/service/webclient/model/leafs/DeviceConfigData.smali"
FILENEW="${TMPOUT}/smali/com/netflix/mediaclient/service/configuration/DeviceConfiguration.smali"

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

if [ -f "${FILEOLD}" ];then
echo "Patching old version"
sed -i 's/iget-boolean v0, p0, Lcom\/netflix\/mediaclient\/service\/webclient\/model\/leafs\/DeviceConfigData;->enableWidevineL1:Z/const\/4 v0, 0x1/g' "${FILEOLD}"
elif [ -f "${FILENEW}" ];then
echo "Patching new version"
sed -i '/isWidevineL1Enabled/c\ const\/4 v0, 0x1\n return v0' "${FILENEW}"
else
echo "File to patch not found !"
rm -rf "${TMPOUT}"
exit 1
fi

# /usr/local/bin/apktool b "${TMPOUT}"
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}"

-----------------------------------
7th February 2018, 09:10 PM |#17  
Senior Member
Flag Poznań
Thanks Meter: 40
 
Donate to Me
More
Don't copy and paste the script into terminal. Create a new file and past this to it then set permission on file and run the script
7th February 2018, 09:30 PM |#18  
Junior Member
Thanks Meter: 0
 
More
yes I did that
Friend I Did that. I was copy the script and paste in a white document and save has .sh when I try to execute make me that error . Please help me
9th February 2018, 03:26 AM |#19  
Junior Member
Thanks Meter: 0
 
More
Tried the script. First had to get Ubuntu. So I did:

enable Hyper-V, load Ubuntu 16.4.3-server-x64 (so no GUI) on Generation 1
ran the apt-get install commands provided by OP

Code:
[email protected]:~$ ./netflixpatch com.netflix.mediaclient_5.13.0_build_25824.apk
 03:21:52 up 17 min,  2 users,  load average: 0.05, 0.07, 0.07
USER     TTY      FROM             [email protected]   IDLE   JCPU   PCPU WHAT
sebas    tty1                      03:04   13:17   0.05s  0.05s -bash
sebas    pts/0    192.168.178.72   03:09    0.00s  0.07s  0.00s w
I: Using Apktool 2.0.2-dirty on com.netflix.mediaclient_5.13.0_build_25824.apk
I: Copying raw resources...
I: Baksmaling classes.dex...
I: Baksmaling classes2.dex...
I: Baksmaling classes3.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
Patching old version
Script is running BUT I do not see the output created. Old file has an unmodified timestamp. Any thoughts on how to troubleshoot this?
9th February 2018, 11:37 AM |#20  
Jens1969's Avatar
Senior Member
Thanks Meter: 275
 
More
Recent versions of the Netflix app (starting with 5.13.0) are permanently crashing after being processed. At least on my devices. So you can stop working on the current version or take a 5.12.x release.
See: https://forum.xda-developers.com/sho...&postcount=136
9th February 2018, 03:34 PM |#21  
Senior Member
Flag Poznań
Thanks Meter: 40
 
Donate to Me
More
I'm not good with Linux, but i did mine with Ubuntu on virtual box.
Did as OP says and then make a small adjustments that are stated in my posts and everything went well.
So cant really help you here I'm afraid.

EDIT: if you get "unexpected token" error rename your netflix apk file to simpler form without any special characters ex: netflix.apk and run the script on it
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