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

korom42

Senior Member
Dec 28, 2012
715
1,448
123
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.
**
Requirements
If you haven't unlocked bootloader yet check this guide
Good News ! For advanced users 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 : Here
- Latest TWRP from here[/B]
And obviously :
- ADB and FASTBOOT : https://forum.xda-developers.com/showthread.php?t=2317790
- Xperia X PERFORMANCE drivers : https://developer.sonymobile.com/downloads/drivers/xperia-x-performance-driver/
- FlashTool : http://www.flashtool.net/downloads.php


What are DRM Keys ?
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 .. !

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-dora.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 Ptach to clean system and remove all bloat apps
07- Reboot and enjoy
TWRP asking for decryption code / Internal Storage showing 32GB only for DUAL Model
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 do clean installation in Flashtool wiping everything and exclude nothing then follow then instructions above .. I also noticed that flashing the correct XZ DUAL boot.img the first time before first boot fix this

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
 
Last edited:

ramirrat

Senior Member
Oct 25, 2009
71
6
0
Doesn't work. When I did all, phone get infinite bootloading. And why TWRP shows F8131? My phone is F8132

---------- Post added at 08:23 AM ---------- Previous post was at 07:39 AM ----------

OP, before publishing, check it! Tried 2 method, still stuck on boot.
 

GAndrel

Member
May 24, 2010
18
3
0
Hi,
I also managed to apply the procedure.

Links in requirement are not pointing to newsest TWRP and Magisk. They are pointign to TWRP 3.0.0 and Magisk 14.3. Now available are TWRP 3.1.1 and Magisk 14.5.

Generallt method one worked with full total wipe while flashing Oreo with flashtool.
 

gshumway

Member
Jan 4, 2009
32
1
28
YES ... the Problem was TWRP and MAGIKS. Thank You. I used Method 1 - ok
but "SHAME ON SONY" - still no RAW Format for Camera with Oreo. I will go back to Oreo AOSP - so i can use Google Camera with RAW.

thnx
gordon
 
Last edited:

Mastiff

Senior Member
Jan 17, 2005
930
18
0
Is it possible to root with SuperSU instead of Magisk? I had a lot of camera problems when I used Magisk. It's up to 2.82 now, I think that' a general Oreo compatible thing.
 

Wesley_NL

Senior Member
Nov 10, 2010
1,873
254
0
Rotterdam
ok i got it all to work,

steps i performed, on my laptop windows 7 ult x64

downloaded and installed the following

ADB and FASTBOOT extracted it on my c:/adb
Xperia X Performance drivers extracted it on c:/
FlashTool installed it and it's drivers located in the install folder of flashboot

downloaded the folowing files

Oreo Kernel Image copy to c:/adb
https://mega.nz/#!OA5BBJDY!lQ9Xojv5DN45QPbUQt-iQGhI409B7l7WoWvo0GTqYlY]DRM fix patch copy to to phone memory
TWRP 3.1.1.0 have not tried latest yet but 3.1.1.0 works fine, copy to c:/adb
Magisks 14.5 Beta copy to phone memory

folowed the guide methode 1 with slightly changes
01- Flash Oreo FTF via Flashtool ([color=redFull wipe in TWRP since i don't quite know how to use flashtool[/color], exclude FOTAKERNEL !! )
02- When done flashing unplug device .. (Do not boot yet !!)
03- Enter fastboot mode and flash the given kernel image (hold vol up + plug usb)
Code: fastboot flash boot boot_oreo.img
04- Flash TWRP 3.1.1.0 have not tried latest yet but 3.1.1.0 works fine
Code: fastboot flash recovery twrp.img
05- Unplug and enter TWRP (Hold vol down + power button) and did full wipe except system and micro sd
06- Flash drmfix.zip
07- Flash Magisks 14.5 Beta
08- Reboot and enjoy

everything works fine
 

Attachments

Last edited:
  • Like
Reactions: serajr

25agosto

Senior Member
Oct 6, 2012
53
3
38
Varese
HI, i'm just doing this guide. i've download the firmware from xperifirm, and i got 3 files withount extension. I've googled and i read a guide to converto these 3 files into a ftf via flashtool. At certain point, i have to select all files except all the .ta files, and create the zip. I'm right?
The files are:
auto-boot.ta
cust-reset-ta
fota-reset.ta
master-reset.ta
osv-restriction.ta
reset-kernel-cmd-debug.ta
reset-non-secure-adb.ta
reset-wipe-reason.ta
simlock.ta
 

Mastiff

Senior Member
Jan 17, 2005
930
18
0
Up and running with method 1. Unfortunately I had to use Magisk, but so far it seems to behave. SuperSu does NOT work. It will install, but the device does not show root.
 

25agosto

Senior Member
Oct 6, 2012
53
3
38
Varese
Installed and running with method 1 but got a lot of issue using Windows 10. So i do all the work on a Windows 7 laptop without any problem.
Just 1 thing not working: magisk.
I followed the guide step by step with success, but magisk says me to update, and when i hit yes, nothing happen.
See attachment.
And another thing. I've wiped all except fotakernel, so why when I've boot up the Phone, i find all my apps, my settings and wallpaper Like how i leave them?
Sorry for my English.....

Edit: can't use netflix anymore
Edit2: magisk problem solved. I've download The apk from The site, then installed and when i hit yes to install magisk, it download a flashable via twrp zip, flashed it and magisk work, but now I've Lost safetynet for no reason.....
But i can use netflix now.
Safetynet is a important thing?
 

Attachments

Last edited:

Mastiff

Senior Member
Jan 17, 2005
930
18
0
I forgot to say that I used Windows 10, as always. Regular command prompt (writing cmd in the start menu will give that, nothing else). But problems with that is usually because of wrong drivers for the phone, nothing else.
 

25agosto

Senior Member
Oct 6, 2012
53
3
38
Varese
After 2 days of usage, i noticed a lot of lag, so i've done a factory reset from the android menu, not twrp, and is all working fine withount any kind of lag (except at powe off, the circle stop running, then after 20 seconds, power off, but it's not important, maybe a sony bug).
Now can i reflash from twrp in order drmfix.zip, SafetyNet Cleaning Tools.zip then Magisk v14.5.zip, or i will do any mistake?
I've noticed sone remote play, netflix, sony news and sony lounge are not working, i think cause DRM
 

sprinkle雨

New member
Dec 15, 2017
1
0
0
there is some problem with that kernel, my phone will reboot unexpectly.I'm sure i flash it the right way

---------- Post added at 12:17 PM ---------- Previous post was at 12:11 PM ----------

Flashed 41.3.A.2.24 with wipes
Flashed oreo.img
Flashed twrp.img
Get bootloop
Time to update kernel
try twrp 3.2 or 3.0