FORUMS
Remove All Ads from XDA

[GUIDE][Oreo 8.0] Stock Kernel + ROOT + TWRP + DRM Fix | 41.3.A.2.157

671 posts
Thanks Meter: 1,209
 
Post Reply Email Thread
Stock Kernel + ROOT + TWRP + DRM Fix



Code:
** Your warranty is now void.
**
** I am not responsible for bricked devices, dead SD cards,
** thermonuclear war, or you getting fired because the alarm app failed. Please
** do some research if you have any concerns about features included in this MOD
** before flashing it! You are choosing to make these modifications, and if
** you point the finger at me for messing up your device, I will laugh at you.
**
Update July 31, 2018
This thread is marked as discontinued. This means that It won't be updated so don't bother asking and I will not publish any more posts here or contribute to the general discussion. However, I might add files from time to time if necessary.


Requirements
If you haven't unlocked bootloader yet check this guide
Good News ! If you have TA.img backup of your device I highly suggest using this tool to patch stock kernel using your own TA image to have drm working with latest Magisk 16.3. Follow TA_POC METHOD instructions below .

- Kernel (boot.img) + Magisk + DRM fix patch
https://drive.google.com/open?id=1wv...FPG13dATP90-E8
- Latest TWRP from here


And obviously :
- ADB and FASTBOOT : https://forum.xda-developers.com/sho....php?t=2317790
- Xperia XZ drivers : https://developer.sonymobile.com/dow...ers/xperia-xz/
- FlashTool : http://www.flashtool.net/downloads.php


What are DRM Keys ?
Quote:

If you unlocked the bootloader on a Sony Xperia device, you probably know that the potential loss of warranty is not the only disadvantage you have to accept. Another fairly hidden issue is related to various proprietary features such as the X-Reality color mangement, BIONZ image processor and the active noise cancelling techniques. Once you decide to unlock your bootloader, the process also removes a piece of data referred to as the DRM keys. These are tied to various services (such as streaming video and the like) offered by Sony but are also required for the features mentioned above to work properly. Put simply, once the keys are gone, you’ll face issues such as decreased low light camera image quality and the lack of the X-Reality mode.



Kernel features
this is pure stock kernel of the mentioned above firmware with
- RIC disabled
- added DRM patch support


Instructions
Before proceed backup all you important data like pictures, files to another device.. !
Make sure you follow all steps carefully with caution .. !

Quote:

01- Flash Oreo FTF via Flashtool (Full wipe is recommened exclude nothing except TA files if there's any)
02- When done flashing unplug device ..
03- Enter fastboot mode and flash TWRP (hold vol up + plug usb)

Code:
fastboot flash recovery twrp-3.2.1-0-kagura.img
then flash kernel
Code:
fastboot flash boot boot.img
04- Unplug and enter TWRP (Hold vol down + power button)
05- In TWRP Flash drmfix.zip + SafetyNet Cleaning Tools.zip then Magisk v16.3.zip
06- OPTIONAL Flash ROM Patch to clean system and remove all bloat apps
07- Reboot and enjoy



NEW! TA_POC METHOD
(Magisk 15.3+ ONLY / For those who have TA.img backup)
After downloading and extracting this tool and these files just copy them to the tool folder and put yout TA.img (case sensetive) there as well

Open command prompt in rootkernel tool folder
or
Open cmd --> cd "rootkernel tool dir" for ex for my case I extracted to the c: drive to make simple for you
Code:
cd C:\rootkernel_v5.23_Windows_Linux_UNOFFICIAL_2.5_OREO
Then run this code
Code:
rootkernel kernel.elf boot.img
Quote:

Say yes (Y) to everything except DRM fix - If you want munjeni's TA PoC option,ensure your TA.img (case sensitive) is located at rootkernel's root folder and say no (N) to DRM fix
Flash patched kernel:
1- Flash Oreo ftf (wiping everything, excluding nothing - except *.ta files - if any)
2- Unplug device and DO NOT turn it on
3- Fastboot newly created boot.img and TWRP recovery
4- Unplug device and DO NOT turn it on again
5- Enter TWRP recovery and flash Magisk 16.3 (16.4 is buggy)
6- OPTIONAL Flash ROM Patch to clean system and remove all bloat apps
7- You're done!



TWRP asking for decryption code / Internal Storage showing 32GB only for XZ DUAL
Turn off the phone (from TWRP if you can or hold vol up and power button till the phone vibrates 3 times)
Enter Fastboot and format user data partitions using this code
Code:
fastboot format userdata

If you are getting error try from TWRP recovery > WIPE > Swipe to format data
Now start your phone and set it up the issue should be resolved.
If still storage is not showing correctly
- Do steps 1-2-3 exactly as listed above
- Boot your phone and compelete the setup wizard, go to settigns and check if storage is not 64gb
- If yes turn off the device and enter TWRP and choose WIPE > Swipe to format data
- Boot your phone again and compelete the setup wizard, go to settings and check if storage it should be 64gb by now
- Now go back to TWRP and complete steps 4-5-6

To check drm keys type *#*#7378423#*#* on your phone and go to Service Test > Security
If you have all [Key OK] they are OK! like the pictures I attached below


Extras (Recommended)


Credits @serjar for unofficial rootkernel update
Old DRM restore by @tobias.waldvogel
Magisk by @topjohnwu
SafetyNet Cleaner by @sceryavuz
TWRP by TeamWin
Attached Thumbnails
Click image for larger version

Name:	c1GU6WuvQta71ESUhSfgAA.png
Views:	9226
Size:	43.0 KB
ID:	4392820   Click image for larger version

Name:	mRd_VgTgT1COLtOovHcAKA.png
Views:	9138
Size:	48.3 KB
ID:	4392821   Click image for larger version

Name:	XY6NIynLQvOXbfOE3ED-dg.png
Views:	9112
Size:	73.5 KB
ID:	4392822  
Attached Files
File Type: zip drmfix.zip - [Click for QR Code] (264.5 KB, 10000 views)
File Type: zip SafetyNet Cleaning Tools.zip - [Click for QR Code] (136.9 KB, 10192 views)
The Following 54 Users Say Thank You to korom42 For This Useful Post: [ View ] Gift korom42 Ad-Free
 
 
26th November 2017, 08:56 PM |#2  
Member
Thanks Meter: 12
 
More
I may sound foolish but what is drmfix ?
The Following User Says Thank You to ilininja For This Useful Post: [ View ] Gift ilininja Ad-Free
26th November 2017, 09:03 PM |#3  
josephnero's Avatar
Senior Member
Flag Sanford NC
Thanks Meter: 712
 
More
Thanks a lot mate.This works great. BTW those on rooted nougat with recovery can skip until step 5.

---------- Post added at 02:03 PM ---------- Previous post was at 02:01 PM ----------

Quote:
Originally Posted by ilininja

I may sound foolish but what is drmfix ?

it amends for any function lost when unlocking the bootloader.(like low light noise reduction and X-reality)
The Following User Says Thank You to josephnero For This Useful Post: [ View ] Gift josephnero Ad-Free
26th November 2017, 09:06 PM |#4  
OP Senior Member
Flag Algeirs
Thanks Meter: 1,209
 
Donate to Me
More
Quote:
Originally Posted by ilininja

I may sound foolish but what is drmfix ?

Well if you did a little research you would know..

Basically all Sony xperia phones have a lot of features like BionZ aka camera sharpening/ processing/noise reduction, X-Reality / Bravia engine for display ,Noise Cancelling and other audio enhancing features which is really awesome
But first when you unlock the bootloader , those keys called drm in short.. every sony device have them preinstalled will be gone .. ALL THESE GOODIES WILL STOP WORKING ..
Here came the importance of drm patches to emulate those lost keys and restore full features !
The Following 2 Users Say Thank You to korom42 For This Useful Post: [ View ] Gift korom42 Ad-Free
26th November 2017, 09:11 PM |#5  
Member
Thanks Meter: 12
 
More
Quote:
Originally Posted by korom42

Well if you did a little research you would know..

Basically all Sony xperia phones have a lot of features like BionZ aka camera sharpening/ procecing, noise reduction, X-Reality / Bravia engine for display ,Noise Cancelling and other audio enhancing features which is really awesome
But first when you unlock the bootloader , those keys called drm in short.. every sony device have them preinstalled will be gone .. ALL THESE GOODIES WILL STOP WORKING ..
Here came the importance of drm patches to emulate those lost keys and restore full features !

Thank you for the answer, I did some research but didn't quite get it
26th November 2017, 09:16 PM |#6  
Pandemic's Avatar
Senior Member
Flag Meppel
Thanks Meter: 23,128
 
Donate to Me
More
bro @korom42
works this also on xzs with already on oreo with unlocked bl?
cant downgrade in that case no ftf for XZs - __-

Verstuurd vanaf mijn G8231 met Tapatalk
26th November 2017, 10:01 PM |#7  
josephnero's Avatar
Senior Member
Flag Sanford NC
Thanks Meter: 712
 
More
@korom42
it is weird but My apps can't detect root.BTW have you experienced slowdown in performance?
26th November 2017, 10:12 PM |#8  
OP Senior Member
Flag Algeirs
Thanks Meter: 1,209
 
Donate to Me
More
Quote:
Originally Posted by josephnero

@korom42
it is weird but My apps can't detect root.BTW have you experienced slowdown in performance?

- Is magisk manager saying everything is fine ? Maybe try clear its data from settings
- No slowdowns here at all oreo seems to be super smooth (I did full wipe / clean installation )
because you upgraded while keeping data some apps may have problems asking for root .. try wiping those apps data ?
26th November 2017, 10:33 PM |#9  
josephnero's Avatar
Senior Member
Flag Sanford NC
Thanks Meter: 712
 
More
Quote:
Originally Posted by korom42

- Is magisk manager saying everything is fine ? Maybe try clear its data from settings
- No slowdowns here at all oreo seems to be super smooth (I did full wipe / clean installation )
because you upgraded while keeping data some apps may have problems asking for root .. try wiping those apps data ?

Magisk doesn't have magisk su..BTW can it be that my XZ is dual sim version?I'll try with full wipe and report back again
26th November 2017, 10:44 PM |#10  
OP Senior Member
Flag Algeirs
Thanks Meter: 1,209
 
Donate to Me
More
Quote:
Originally Posted by josephnero

Magisk doesn't have magisk su..BTW can it be that my XZ is dual sim version?

I have xz dual too no problem .. I noticed there's new version of magisk v14.5 check it here
Also make sure you followed the instructions carefully (you have to flash the oreo kernel boot image I gave like described )
26th November 2017, 10:55 PM |#11  
josephnero's Avatar
Senior Member
Flag Sanford NC
Thanks Meter: 712
 
More
I'll try again with full wipe and be very careful with steps.will report back soon
Post Reply Subscribe to Thread

Tags
drmfix, kernel, oreo, sony xz

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

Advanced Search
Display Modes