yashsingh1/xdaforums huggingface dataset:
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] Sramana:
This is what i did:

XZ1 stock untouched until android 9 update.

After a bad pie xperiance:

-Bootloader unlocked (lost DRM keys)

-Flashed latest sony oreo firmware (47.1.A.16.20) with newflasher https://xdaforums.com/crossdevice-dev/sony/progress-newflasher-xperia-command-line-t3619426 thanks [MENTION=4120742]munjeni[/MENTION]

-Flashed TWRP https://xdaforums.com/xperia-xz1/development/recovery-twrp-3-2-1-t3727602 thanks [MENTION=4297219]modpunk[/MENTION]

-Downloaded patch according with firmware version from post 566 https://xdaforums.com/showpost.php?p=77626633&postcount=566 thanks [MENTION=490110]janjan[/MENTION]

The patch works on sony stock kernel too, so flashing kernel/boot.img is optional and not needed to fix lost functionalities. I didn't.

In 2-Patching.zip there is a system dir with su.d inside it. There is no need for it. I think it could break Magisk systemless-ly job, so I deleted system from 2-Patching.zip.

-Flashed modified 2-Patching.zip with TWRP

-Downloaded Magisk v18.1 and Magisk Manager v7.0.0 https://xdaforums.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445 thanks [MENTION=4470081]topjohnwu[/MENTION]

-Flashed Magisk-v18.1.zip with TWRP

-Magisk Manager didn't get installed so I had to manually install MagiskManager-v7.0.0.apk

-The patch only works if selinux is set permissive at boot time. After boot it can be restored to enforced.

For this reason is needed 4-kernel_permissive.zip; this file is the same as magisk-permissive-script_v1.2.zip from https://xdaforums.com/apps/magisk/module-magisk-selinux-permissive-script-t3577549 thanks [MENTION=5956519]Jman420[/MENTION]

-Flashed permissive.zip with TWRP and check it is in Magisk Manager modules tab.

-Done. DRM fixed and rooted.

-Now the phone must always boot in permissive mode to let the patch work as expected. But once the phone has booted selinux can be set again to enforced. Decide by yourself after reading this https://xdaforums.com/general/general/discussion-root-selinux-risks-t3607295 thanks again [MENTION=5956519]Jman420[/MENTION]

-To set selinux to enforced mode after boot:

in a terminal app or adb shell

$ su
# setenforce 1

-To check selinux status

$ su
# getenforce
enforcing

-Alright. CKB OK, WIDEVINE OK, camera working, x-reality working.

(Magisk v19 and onwards will no longer support old format modules)
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] evildog1:
I noticed that my phone drain faster than Oreo because the minimum freq of Big core were set to 806 Mhz and Small core to 518 Mhz. I had to change it manually to 300 Mhz with Kernel Adiutor

Does this kernel do this or it came from factory or it just me?

I'm currently using 47.2.A.6.30. Will update if it makes any improvements.
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] Sramana:
The only way to stop google play services autoupdates is disabling google play store.

Google play store has embbeded a brunch of services responsible of updating 1 the play store itself, 2 play instant and 3 play services. These 3 features are updated like it or not whenever you have an internet connection, mobile data or wifi. Google don't give a chance to pospone or select only wifi download.

You can disable all google play store background services related to updating, but if you open the app it will check if there are updates for the 3 mentioned components and perform the aviable updates. So the best option is disabling play store to avoid opening it accidentally if you want to retain google play services version.
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] LisekDH:
I don't understand this guide.. when I unlock bootloader I will lose drm keys? Right? But when I flash this kernel, everything will be good, like camera? But what happened when I flash stock rom with stock kernel in the future? For example for selling device, the camera will be dead I'm right? Ty.
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] lilbrat:
Basically yes, your drm keys will be gone.. Pie doesn't require them for the camera to work but picture quality is questionable.. And there is no DRM "patch" for pie as of yet the one posted here is for oreo.

Now go read over here.. https://xdaforums.com/xperia-xz1-compact/development/devonly-exploits-temp-root-to-backup-t3795510, you can backup your ta partition (drm keys) and once that is done you can reinstall them after you unlock your bootloader, but do it on a day when you have some time as it is a bit long and requires a bit of patience.

Then you can come back to this kernel or try out j4nn ones.. But read over everything first..
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] LisekDH:
So basically, I need back to Oreo to do TA backup.
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] lilbrat:
Ya' but use the firmware provided in the link for the XZ1.. It does work, the instructions are a hard to follow at first for the ta partion so read them carefully and there is a decent pdf guide done by one of the members..

I have done my XZ1 dual.. And I have tried janjan's kernel listed here, and just installed j4nn pre release kernel for the latest. 28 firmware and it works well, using his alternate version.. ( another story) as I am rooted and using twrp but everything is working fine.. Root hidden, camera, video and music all good..
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] GaM3RAndroidIOS:
I followed every instruction but no luck. I flashed fresh pie march 2019 firmware then I boot up and enable dev option for usb debug then I turn my phone to bootloader and use those command in instruction (I already got boot.img in cmd folder.) after its done I fastboot reboot then stuck on sony logo... Any suggestion or help pls?
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] Schritti:
Download the version for your phone here https://mega.nz/#F!plw2kCaJ!GAX167ZVKSnZm9zbHsJ-jw (It's the URL from the first post)

You need to have 47.2.A.8.24 firmware installed before flashing, else it won't boot.

After that it should boot up.
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] lilbrat:
And don't flash the drm fix as it's for oreo..
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] Freedomzas:
Hi, I flash your kernel and the device boot correctly, but it can't pass saftynet, after I installed MagiskHidePropsConf , it stuck in a bootloop and I can't even uninstall magisk in twrp, What should I do if I want to fix the safetynet issue? Thank you
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] lilbrat:
First you may want to provide us a bit more info, like what firmware version are you on and which kernel did you flash... Your safety net issue is more of a Magisk issue and should be address in their forums.. But your main issue at the moment is did you correct your bootloop issues?
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] YasuHamed:
sir 47.2.A.10.45 is out,

please fix
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] YasuHamed:
i am trying this process on 47.1.a.2.324 but seems like it only works on 47.1.A.2.281_CE1

now i will have to reflash it by newflasher!

wana extract drm keys!!!

reinstating drmkeys once after unlock bootloader! will make pie rom work fine? how about J4nn kernels which HIDES the unlocked bootloader ?
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] lilbrat:
You need to use the firmware in j4nn drm backup thread... For the xz1
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] YasuHamed:
[MENTION=490110]janjan[/MENTION] , sir

can you please add [MENTION=357342]tobias.waldvogel[/MENTION] in opening credits because I believe he was the very first who started the DRM FIX with Z5 which ultimately covered the whole tree of z5 z4 z3 x xz xzs device family

reference https://xdaforums.com/xperia-z5/development/root-automatic-repack-stock-kernel-dm-t3301605

thank you
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] lilbrat:
Hmm.. Two minutes of being a pita.. Z3 thru Z5 are android 7.0 based no drm fix required and at that time the root method used was probaly mostly done by chainfires su and kernels packed by numerous folks.. the xz and xzs use various drm fixes and repacked kernels are you going to go back through a few thousand threads and ask them to give credit to the proper folks or verify that credit was given accordingly if so are you going to go through the other million post to check that proper credit was given... You kind of opened a can of worms...
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] YasuHamed:
before giving your humble opionion please check the histroy with that script, and who said drm fix was not required in z5 ? the Method was alot easier then, it was Tobais script which propably made sony to change the DRM method because his script was so universal you can patch virtually any kernel on Android 5/6 & 7 covering devices from Z3 to Z5 and X/Xz family (until android7)

the tobais script later maintained by [MENTION=3989065]serajr[/MENTION] would like his opinion too

it not about going back few thousands posts or going back decades! , credit is credit!

as a sony user, you can always follow the trail back

for example why this post was closed! etc

https://xdaforums.com/xz-premium/development/hack-mod-sony-xperia-xz-premium-twrp-t3695171
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] lilbrat:
Not to get in a pissing contest and your point is taken in consideration.. Are you going to go back and try to get all those other post corrected with just due credit.. Your reference post from what I can see has be tagged with a "temp closed".. And as far as this post goes it's been running for about what 15 months and your now just worried about just due credit.. ( hell cry about his source code not being posted.. lol ) Read the opening page carefully look at my screen shot, credit was given from what I can see...
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] YasuHamed:
it hasn't dawn at me just today! and with little bit of homework you will find out why and who were involved in 15months older post and why was it closed!

xda is private community having sets of rules where 12.1 is something I tried mentioning here!

https://xdaforums.com/announcement.php?a=81

about reading the opening page CAREFULLY ? how about I highlight something here? (see attached)

I never tried making any point here! specially to you and nor ever raised my concerns to you!

thank you [MENTION=490110]janjan[/MENTION] for updating the OT #RESPECTS :)
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] lilbrat:
At the end of the of the the day credit was/is there as shown by my screenshot .. And your attachement is missing... I was just questioning your comment of "due credit" ask to be given ( “can you please add [MENTION=357342]tobias.waldvogel[/MENTION] in opening credit“) my screenshot shows that it was.. now if janjan wants to step in here and says he just added it today as per your request , I will be more than happy to apologize...
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] YasuHamed:
no opologies needed,

the issue was never addressed to u

have a great day!
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] Matzeee:
Could someone provide me "Customized DE 47.2.A..8.24"? I can offer cloudstorage.

Or what is the difference between the Central Europe CE1 version?

I would like to upgrade without factory reset.

Or will the kernel for 47.2.A.10.45 be available soon?
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] YasuHamed:
its just markets sony projects

the important thing is the BUILD NUMBER
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] fabius12:
hi guys, before I start to unlock the bootloader of my XZ1, can you confirm that by reloading an FTF image of an original rom, I also restore the DRM functions?

It worked like this on my old Z3, on xz1 I still have a lot of confusion about this operation.

Excuse the question, I really struggle to understand how DMRs work on this XZ1

Thanks
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] lilbrat:
Read, this first.. [XZ1c/XZ1/XZp] temp root exploit to backup drm keys implemented. ( https://xdaforums.com/xperia-xz1-compact/development/devonly-exploits-temp-root-to-backup-t3795510 )
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] tombbb:
Thank you for nice guide!
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] rogat92:
[MENTION=490110]janjan[/MENTION], could you add DT2W feature to your kernel? Thanks before
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] YasuHamed:
Good day [MENTION=490110]janjan[/MENTION]

please make kernel for latest build 47.2.A.10.62

thank you
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] harrymax:
anyone has 47.1.A.12.75 kernel patch?

thanks in advance
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] jlespiritu:
waiting

waiting for latest build
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] jlespiritu:
NO PROBLEM TO DRM? i never back up my DRM and TA!

is there any problem to DRM? how about the camera quality as compare to locked bootloader
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] Matzeee:
The only problem occurring to me is that some apps like Google Pay and banking apps are complaining about an unsafe device. This should be solved by the kernel.

The camera was only affected in previous versions.

For me, a very nice thing to have is the kernel-based wireguard…

Therefore, I also hope that [MENTION=490110]janjan[/MENTION] will have the time to compile a new kernel ;)
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] rophelsaid:
Please release a new update for the new firmware:)
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] dcrin3:
Just so you know, this kernel is no longer necessary unless you're still in Oreo or a very old firmware. See for yourself, go back many pages.
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] Matzeee:
Not necessary for a working camera, but all my banking apps, GPay, Payback Pay etc are not working without it.

Btw I am still on 47.2.A.4.45 but this will probably not change in future versions?

And also, kernel-based Wireguard was pretty cool…
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] dcrin3:
Banking apps have been working fine here way before .45 release. If you're flashing via newsflasher, the only thing I'd avoid is userdata.sin, if you want to save your data.

If your bootloader is unlocked, you might as well flash the latest firmware.

Which region are these apps been used in by the way?
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] Matzeee:
I can only say that I am in Germany and Google Pay, Payback Pay, two bankingapps and one TAN-app for banking are not working because the detect an unsafe / unlocked / rooted device. Magisk Hide does not help.

I did the last upgrade via newflasher without userdata.sin

Now I am hesitating, because the kernel by janjan, as it was released, was not the latest available and I dont want to downgrade afterwards.
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] evildog1:
anyone have the firmware 47.2.A.8.24? doesn't matter which country.
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] Rumzie:
I don't have one downloaded, but the Hong Kong version is still on 47.2.A.8.24. You could download it from XperiCheck or XperiFirm
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] jlespiritu:
support the google camera?
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] snake218:
No.
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] kojak1989:
Is there any patch or fix for DRM lost keys ? With video improvement working again
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] hubort:
Hello everyone,

I'm currently trying to root & flash my Xperia XZ 1 using this Tutorial (Xperia-xz1/how-to/guide-how-to-persistant-root-xperia-xz1-t3718375). I successfully unlocked the bootloader, and flashed the Janjan's Boot Image, but now the screen is stuck on the S O N Y-emblem, and asked me prior to that, to lock the bootloader again.

Anybody has a clue what's going on?

Thank you very much!
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] lilbrat:
Were you on Oreo or pie when you attempted this, I'll take for granted that you didn't read j4nn's thread on backing up your TA partion .. also which kernel did you flash and with what firmware as janjan hasn't updated his work in quite some time..

Also take a minute and search on how to use Newsflasher as you will need it...
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] hubort:
Hey lilbrat,

thanks for your quick answer.

I was on Pie, and sadly I just discovered j4nn's thread.

I flashed the .img provided in Janjan's original post, on G8341 47.2.A.10.80. I'll dig into Newsflasher right away.
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] lilbrat:
there is why you bootloop.. look in j4nn thread he has a kerenel for the .80 firmware that you can flash in twrp ..it an .img so in twrp select the img then an option window will pop up select boot, then apply magisk..
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] hubort:
Thanks again.

{How do I run TWRP on the phone?}

Edit:

How do I run TWRP on the phone in its current status?
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] lilbrat:
hmm, have you installed it? if not go read the over here.. https://xdaforums.com/xperia-xz1/themes/twrp-3-3-0-aroma-compatible-ultra-low-t3922527
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] Parabellum23:
Can you please provide 47.1.A. 2.281
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] kwlkwl:
Why it keep saying my device is not support?

I'm using dual sim version xz1 and flash the .zip on 3.3.1 twrp
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] lilbrat:
Are you actually on Oreo firmware....
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] Triasadi:
Hi,

I'm a complete Xperia noob, so when I unlocked the bootloader, I didn't know that I'll lose some Sony features, so I kinda f*cked up. I flashed the kernel and it worked great, I feel battery life is improved by a lot. However, when I tried to switch on/off on video enhancement in the display settings and I see no difference.

My device is the G8341, these were the steps I did:

1. Got the 47.2.A.8.24 (February 2019) firmware from here

2. Flashed it with flashtool

3. Flashed boot.img from here

fastboot flash boot boot.img

4. Flashed the latest TWRP that I got from this thread

fastboot flash recovery recovery.img

5. Opened TWRP and flashed the latest Magisk zip

6. Booted the phone and finished the Android first time setup

So my question is:

Does the DRM Fix still work?

Did I do the steps correctly or am I missing something?
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] lilbrat:
There is no drm fix for Android 9, so if you didn't back your drm keys first then you lost a few few things,..
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] Victorcala:
no working.. please help me
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] danielpapidog:
Es compatible con kernel 47.2.A11.218 de septiembre 2019 no hay problema si flasheo t

It is compatible with kernel (47.2.A11.218 of September 2019) there is no brick problem if I flash your kernel I stay tuned to your answer thank you very much

---------- Post added at 09:25 PM ---------- Previous post was at 09:21 PM ----------

It is compatible with kernel (47.2.A11.218 of September 2019) there is no brick problem if I flash your kernel I stay tuned to your answer thank you very much
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] N1ghtr08d:
[MENTION=490110]janjan[/MENTION] is there anything we can do to help you debug?
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] janjan:
Since I am posting in this thread..it means it is build for XZ1. Technically there shouldn't be any difference between xz1 compact and xz1. When we are talking about camera function..and the way they are build.

Since I haven't the device..I can't do anything else. Sorry.. It is difficult to work without having the device in my hands. It also means.. it is useless to post anything in this thread anymore. I am taking pause for building kernel etc for XZ1 for now.
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] N1ghtr08d:
WTF?
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] janjan:
I am not sure I can do anything more without having the device. I already received a dozen of debug..
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] N1ghtr08d:
The hardware is slightly different in the two devices. They have screens manufactured by 2 different companies for example.
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] janjan:
Yes..but the camera, sensors and software are quite similar.
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] N1ghtr08d:
I know but there's obviously differences between them since they have different firmware and the fix doesn't work with both devices.
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] N1ghtr08d:
Why not try reaching out to storm or modpunk and discuss the difference between the 2 devices? You might get some insight into the problem that you haven't thought of before.
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] janjan:
I already found the issue. Need to update the zips before uploading. It seems the flashable zip (kernel/boot image) doesn't flash. (And no one report me back regarding this issue)..Why not flash the new zips and report back to provide me some info :)
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] N1ghtr08d:
Then can you provide us with the images that we can flash using fastboot instead of TWRP? Pretty please

---------- Post added at 04:20 PM ---------- Previous post was at 04:19 PM ----------

As far as nobody reporting back, I'm not sure anyone was aware. At least I know I wasn't, that's for sure. I'm determined to get everything were used to do I'll test and report back on anything I find it hello in any way I can to further the development on this device.
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] boonhim:
Hi, janjan, I tried to flash your kernel by extracting boot.img from zip and flash via fastboot mode. Eventually, my xz1 screen after rebooting was shrunk to smaller size. I think the boot image in your zip file may not be compatible with xz1 but it is for xz1 compact or not. Please recheck. Thank you for your work.
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] janjan:
I will check tonight. I am sure it is for xz1.
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] xFirefly93:
Try flash the kernel straight through TWRP instead.

I had the same issue first when flashing through Fastboot, but flashing the ZIP did fix it.
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] _Matthew:
The mega link's dead for me
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] lovetezza:
Please try using the continuous shooting function of the camera.

The photo was saved at 47.1.A.12.75.
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] N1ghtr08d:
This MEGA link is dead and the kernel located in the op doesn't do anything to rectify the problem.

I did a full unroot via SuperSU, rebooted and backed up my boot image then flashed your kernel from the op and then Magisk and the only thing that happens when taking a picture is the old story of it focusing to take a picture but never actually taking it.

Please [MENTION=490110]janjan[/MENTION] we need your help since nobody else is developing for the XZ1.
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] janjan:
I am uploading something tonight. Hopefully solve camera + magisk issue.
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] snake218:
Thanks for your effort.
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] N1ghtr08d:
Excellent! I'll be looking forward to it
[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] Araa01:
I give u all my money! But pls! Add custom stock rom deoblate etc! [emoji7]