yashsingh1/xdaforums huggingface dataset:
[Sony Xperia XZ Premium Guides, News, & Discussion] pyroraptor:
Kudos to the dev, his work is very much appreciated for bringing about a solution for the loss of the DRM keys.

However, I'm still curious as to whether it'd be possible to actually backup the DRM keys and have the ability to restore them to the device to return the device to a stock or stock-like condition.
[Sony Xperia XZ Premium Guides, News, & Discussion] ex3meex:
Yeah right!! storm, did you know how to do this? Now i think you know exactly where is the drm key, how to backup from original devices never rooted/unlocked?
[Sony Xperia XZ Premium Guides, News, & Discussion] mirhl:
Rooted is not the same than unlocked, and yes you need it to backup drm.

Everybody already knew this and it's not a mystery.

And a patch not to require keys has nothing to do with this.
[Sony Xperia XZ Premium Guides, News, & Discussion] korom42:
[MENTION=8363210]sToRm//[/MENTION]

Could you please help creating rootable kernel for xperia xz oreo (41.3.A.0.401) ?

I extracted kernel.elf file if you need anything else .. just tell me

http://www.mediafire.com/file/lar9dhthbhj2jrd

[MENTION=357342]tobias.waldvogel[/MENTION] rootkernel is not working currently

edit : [MENTION=2233641]AdrianDC[/MENTION] , [MENTION=7589165]zlRampageSlz[/MENTION] You might wanna take a look at this ?
[Sony Xperia XZ Premium Guides, News, & Discussion] sToRm//:
I can do it, but it will take some time. Have a lot of things to do.
[Sony Xperia XZ Premium Guides, News, & Discussion] korom42:
We XZ users would appreciate any help .. you can take your time and like I already said if you need something just tell me ..

and you can create new thread in XZ forums if you want ;)
[Sony Xperia XZ Premium Guides, News, & Discussion] sToRm//:
If you want to, I can send you the files to test it as soon as I'm back on my desk. If it works, I can include it in XperiFIX. :)
[Sony Xperia XZ Premium Guides, News, & Discussion] korom42:
Sure I'm ready to test your work anytime .. It would be great if you support xz with your tool :D
[Sony Xperia XZ Premium Guides, News, & Discussion] sToRm//:
Is there a working recovery for XZ on Oreo? Just to know that before I'm starting.
[Sony Xperia XZ Premium Guides, News, & Discussion] korom42:
well not sure there are a couple of TWRP builds by [MENTION=5169444]AndroPlus[/MENTION] that can be found here

I used to have TWRP-3.0.2-4-kagura.img working well on nougat, now on oreo I tried flashing it via adb .. seems to work at first and enter TWRP but when I choose Install. it's all empty no files showing .. so not sure if this is a kernel or twrp issue :confused:

EDIT : the other version v3.1.1 seem to have some troubles (showing duplicate partitions)
[Sony Xperia XZ Premium Guides, News, & Discussion] sToRm//:
Okay, I will check this too.
[Sony Xperia XZ Premium Guides, News, & Discussion] Klaus N.:
[MENTION=8363210]sToRm//[/MENTION]

I recommend the TWRP provided by [MENTION=2233641]AdrianDC[/MENTION] here in this thread: https://xdaforums.com/xperia-xz/development/mod-sony-stock-patcher-xperia-xz-t3576493
[Sony Xperia XZ Premium Guides, News, & Discussion] YasuHamed:
Dear sir [MENTION=8363210]sToRm//[/MENTION]

i have XZ F8522 and oreo kernel is not supported by tobias fix

is there any other thing i can do to have that sort of result for oreo kernel

---------- Post added at 07:44 AM ---------- Previous post was at 07:17 AM ----------

there has been a modfied script based on sir Tobias by [MENTION=3989065]serajr[/MENTION]

https://xdaforums.com/showpost.php?p=71175804&postcount=2236

with [MENTION=4120742]munjeni[/MENTION] TOC (if you have TA.img)

this script has support for XZ , and X and working PERFECT for android 6 and 7

now the only issue is that if this script has support for OREO kernel it can do the magic

when XZP was on 7.1.1, i made its sin kernel to img file (using unsinv1.6) and accpt the DRM thing, this script did patch the kernel for everything else.

I have X and XZ and OREO is out but i am not updating because I cant have root access :(

i wish this script has update by [MENTION=3989065]serajr[/MENTION] and sir [MENTION=357342]tobias.waldvogel[/MENTION] adding support for OREO kernels
[Sony Xperia XZ Premium Guides, News, & Discussion] sToRm//:
Take a look in the XperiFIX thread. I am actually working on XZ and others. ;)
[Sony Xperia XZ Premium Guides, News, & Discussion] YasuHamed:
:D thank you sir :D :D :D

i wish one day i could atleast get grip on android and modifying kernels
[Sony Xperia XZ Premium Guides, News, & Discussion] Mario119:
I'm followed the guide, and everything went smoothly. However, when I unplugged the phone and went into the camera, the photos taken are still green. I tried both factory reseting and reflashing the the latest firmware from XperiFirm, and then immediately using XperiFirm, yet the same outcome happens every time. On the older firmware before this (forgot the name, it was the first Oreo build for this device) it worked perfectly. I reflashed to the latest firmware and installed XperiFix, and this has been happening. I tried downgrading, but it resulted in a bootloop, so I just flashed the current firmware again. Help would be appreciated.
[Sony Xperia XZ Premium Guides, News, & Discussion] Mackay53:
Flash it all manually.
[Sony Xperia XZ Premium Guides, News, & Discussion] Mario119:
I thought you could only do that with the Nougat build, no? I'll look into it tomorrow, it's super late over here on the east coast haha (insomnia sucks).
[Sony Xperia XZ Premium Guides, News, & Discussion] GuardianRaven:
First, let me say thank you, storm!!! This is a great contribution to the community.

Unfortunately, this is nothing for me. I know a lot of people wanted to have the root so badly, that a DRM fix was needed.

But also, there are those silent observers, like me, who wait for a way to backup the TA.

My device is untouched and the firmware is relatively old. I never did any updates because i thought maybe one day the community will find an exploit on older firmware...

Since you already seem to have some insight into this device now, i kindly want to ask, not only for me, but also for all the other people who are desperately waiting for a way to backup their TA, if you could maybe take a look if there is a way to get around the loss of the DRM keys to secure them in the first place to have them if you need them (e.g. to restore them for selling, guarantee etc.).

I think what you did is great, but its only fighting symptoms, not causes.

If there is anything i can do to help, please tell me!

If the community has so much power together, and its motivating you so much that you really make stuff like the drm fix happen, then maybe, there is also hope to find an exploit, too!

What do you think?
[Sony Xperia XZ Premium Guides, News, & Discussion] ishemes:
Just wanted to drop a message to let you know (in case you didn't) that you can always flash an older firmware on your phone if you need it. Sony is not blocking the installation of older firmware. But you will have to have the older firmware available somewhere.

So in theory you can enjoy Oreo on your phone and if an exploit was found that needs Nougat, you can just flash the nougat firmware, do the exploit and backup your keys before going back to Oreo again.
[Sony Xperia XZ Premium Guides, News, & Discussion] GuardianRaven:
Thats interesting. So i can upgrade, i just have to find the firmware that i am actually using and keep it in case an exploit comes up?

But, while flashing and older firmware which is maybe not from sony but from somebody who has made a backup from the phone, it really will leave the TA partition untouched?

Anyway, since somebody already opened a thread on this, maybe storm (or somebody else) will get an idea or tell us users with untouched and locked phones, what we should try to help.

By the way, if you are reading this, storm:

Wenn wir was hinbekommen dann fährst du mal nach Hamburg, ich kenne hier genug Läden auf dem Kiez, und ich lade dich mal ein ;)
[Sony Xperia XZ Premium Guides, News, & Discussion] Tookoor:
DRM fix/ XZ1c

Hi guys !

Simple question, many answers everywhere but not sure about sources : does DRM hack fixes also Bionz, X-R, low light pictures and all other broken stuff ? I'm about to root a XZ1 Compact, but not sure all functions will be back ? :confused:

Whatever, thanks for the good job !
[Sony Xperia XZ Premium Guides, News, & Discussion] RoyFAR:
I just notice only for X-Reality Engine and lowlight picture are restored, I don't know other features because for me those two things are most important. Btw backup your TA partition will be a wise step before unlocking boot loader ;)

Note: I think some one has said not all features can be restored.
[Sony Xperia XZ Premium Guides, News, & Discussion] moofesr:
Hi all. Over on the XZ1c boards, [MENTION=4418980]j4nn[/MENTION] is doing some research on whether it's feasible to use the BlueBorne exploit to get temporary root to extract the DRM keys.

For anyone interested or for anyone who might have any insightful contributions on the matter, you might want to check out his thread. Of course, nothing is guaranteed at the moment, it's very early days but the more eyeballs we can get on this matter, the better!
[Sony Xperia XZ Premium Guides, News, & Discussion] j4nn:
Please note, using blueborne could be one of possible ways. Currently the most promising vulnerability seems to be the CVE-2017-7533: race between inotify_handle_event() and vfs_rename().
[Sony Xperia XZ Premium Guides, News, & Discussion] karrouma:
[MENTION=8363210]sToRm//[/MENTION]

Any news for a fix for pie

More than two monthes and nothing

I can test anything for xzp pie

---------- Post added at 09:14 AM ---------- Previous post was at 09:14 AM ----------

[/COLOR [MENTION=8363210]sToRm//[/MENTION]

Any news for a fix for pie

More than two monthes and nothing

I can test anything for xzp pie
[Sony Xperia XZ Premium Guides, News, & Discussion] laes443:
I didn't realise any DRM stuff was needed for Pie? I'm using it w/ unlocked bootloader (TA completely gone), even the audio stuff like ClearAudio works fine for me, what doesn't work on Pie without a DRM fix?
[Sony Xperia XZ Premium Guides, News, & Discussion] raven213:
video image enhancement
[Sony Xperia XZ Premium Guides, News, & Discussion] karrouma:
Media

Album very very laggy especially when deleted more than one pic

Turn on smart backlight control and your system keep restarting

Many many others problems
[Sony Xperia XZ Premium Guides, News, & Discussion] Omega200:
I have no problem with smart Backlight control.
[Sony Xperia XZ Premium Guides, News, & Discussion] qadrisafdar:
Hello dear
[Sony Xperia XZ Premium Guides, News, & Discussion] sToRm//:
Okay, now I think I am a little bit closer to the functionality. I checked the credmgr.db and there are 200+ credentials, too. So... What you explained is the DRM restore from jimRnor with mounted cache partition, where the hardcoded credentials are cached inside? The system will not check for the unique device key and will use the credentials out of the cache (or write the db from the cached credentials)?

If my theory is right, then the credentials are not encrypted with the unique device key. They are encrypted with a global standard key which is stored on every phone. The unique device key (masterkey) is the key to unlock the decrypt functionality. Maybe the device security checks the masterkey against the IMEI and if the result is "legit" the credentials will be decrypted with the global key inside the hidden vodoo area (TrustZone). Because.... If the credentials are the same on every XZP, but encrypted with the masterkey (unique device key), then there would be absolutely no chance for a key simulation like Tobias Waldvogel did. If I understand his DRM fix right, then the fix simulates "masterkey is there and legit", takes all the credentials and write them hard into the credmgr.db file. If the credentials are encrypted with a key that is not there, a fix like this would never work.

So.... If I am right...

There must be a possible hack, because the credentials are there and the key is somewhere inside the device. And if we could reproduce how the masterkey is generated (hash from IMEI or something like this, I don't know...), then there maybe is also a way to "keygen" the devices. We should remember that a vendor has to produce his devices as fast as they can. And I don't think they use extreme hard/complex systems to generate a key for every single device. But... In the main... there should be a possible way to get a working fix.
[Sony Xperia XZ Premium Guides, News, & Discussion] nh1402:
how about the key to unlock the bootloader?, hashing imei sounds too trivial.
[Sony Xperia XZ Premium Guides, News, & Discussion] zxz0O0:
The device key is used for various init function in the TrustZone (e.g. SUNTROL_INIT_INTEGRATION). Without it, the credentials can not be decrypted / retrieved.

tobias.waldvogel extracted the decrypted credentials on a locked device by hooking some function, then hardcoded them into his fix.
[Sony Xperia XZ Premium Guides, News, & Discussion] the_brad:
I have an idea: As german laws forbid to cut warranty claims for unlocking bl, the following should be possible.

I have a hardware-error (volume buttons way too loose after 2 month), I already got a replacement unit by the seller. Now, I have around 20 days to return the defective unit.

And here comes the trick: As I didn't unlock the bootloader yet, I would do it for science. If you have anything, you might want to compare before/after, I want to help!

So, does that make sense? Or isn't there anything valuable, we could pull from this?
[Sony Xperia XZ Premium Guides, News, & Discussion] schickel:
You can go to this thread and ask [MENTION=4120742]munjeni[/MENTION] to be his tester...
[Sony Xperia XZ Premium Guides, News, & Discussion] ishemes:
Great idea dude. I hope we can get some information out of it! Thank you for the time you are willing to invest in this for all of us!
[Sony Xperia XZ Premium Guides, News, & Discussion] sToRm//:
Hey Sony :cool:

[IMG="nomnomnom..."]https://img1.picload.org/image/rwpcrppw/xzp-whooop.jpg[/IMG]

...one step closer. :victory:
[Sony Xperia XZ Premium Guides, News, & Discussion] arjun.arora:
Awesome work buddy..
[Sony Xperia XZ Premium Guides, News, & Discussion] sToRm//:
I got it to "Key ok" and "active", too. But the hack doesn't work really good. There must be a hidden check. But I will find it. I am sure ?
[Sony Xperia XZ Premium Guides, News, & Discussion] supermaus100:
that would be the hammer.
[Sony Xperia XZ Premium Guides, News, & Discussion] Lirannl:
Will this DRM fix suffice for warranty claims? While Israeli law protects the warranty, distributors don't care, and if I want to sue them... I'd need to sue them, which would cost more than the actual phone. Usually, what Israelis do is go on the consumer TV shows to pressure the companies, terrifying their PR teams, but the public isn't gonna care about bootloader unlocking...

Basically, if I unlock my bootloader, will a DRM fix make it fully reversible, or at least appear fully reversed? (I haven't unlocked my bootloader yet)
[Sony Xperia XZ Premium Guides, News, & Discussion] mirhl:
What you are looking for is bootloader relock, if any (if it's an hardware issue, it might not even matter either)

This has nothing to do with that.
[Sony Xperia XZ Premium Guides, News, & Discussion] Lirannl:
They're always looking for ways to get out of providing warranty here. Wouldn't they detect that my DRM keys are gone (they're not, but let's pretend I did unlock my bootloader)? Or does a DRM fix hide that? They won't specifically be looking for the DRM keys, but I would relock my bootloader before giving it to be fixed.
[Sony Xperia XZ Premium Guides, News, & Discussion] sToRm//:
Okay... That's fine so far...

But...

The credentials aren't there, because Sony changed a few things in libsuntory and other libs. Maybe I can find a way to get them like the old fix did on older devices. Also there are checks for BL unlocked and rooted status. I have to fix them, too.

Tons of hours... I hate you Sony! I will never buy a crappy bull**** like this again. I feel like a teenager and mommy said I'm not allowed to unlock my phone. God dammit!
[Sony Xperia XZ Premium Guides, News, & Discussion] FartyParty:
Does that mean you've given up :(?
[Sony Xperia XZ Premium Guides, News, & Discussion] zxz0O0:
Why are you patching libraries? Have you tried hooking credmgrd as I said previously?

For example, TEE_CommandUtil_ExecuteCommand. Some of the commands (second param is cmd id):

#define VERIFY_SIN_SIG_HASH 0 //verify sin signature hash
#define GET_SECURE_MODE 1
#define GET_ROOTING_STATUS 2
#define SEC_MGR_INIT 3
#define SEC_MGR_SET_HW_CFG 4
#define SEC_MGR_SET_ROOTING_STATUS_DATA 6
#define VERIFY_SIN_HDR 11 //verify sin header
#define SEC_MGR_SET_EXTENDED_BOOT_LOCK 13

Make sure GET_SECURE_MODE returns 0 and GET_ROOTING_STATUS returns 1.

No need to modify any original file.
[Sony Xperia XZ Premium Guides, News, & Discussion] 3MPULSE:
DRM KEY FIX Tester

Hey, guys!

Today I started to say f*ck it. F*ck Sony and I started not caring about a "right camera functionality" so please guys if somebody needs a tester for his fix then I am in.
[Sony Xperia XZ Premium Guides, News, & Discussion] sToRm//:
No way ;)

I don't give up. It's just the beginning :cowboy:
[Sony Xperia XZ Premium Guides, News, & Discussion] sToRm//:
Hooking isn't that easy as before, because Sony did a few things to make it harder. But I do it with tricks.

The credmgrd doesn't exist on newer versions. Secure mode, rooting status (...) are in device-security lib. The suntory lib has big changes, too.

I need a little break now. My brain is #-";#+1-€(@+& ;)
[Sony Xperia XZ Premium Guides, News, & Discussion] serajr:
Thank you mate for all your always precious help.

What a great job! :good:

(and for the records, secd replaced credmgrd on newer xperias)
[Sony Xperia XZ Premium Guides, News, & Discussion] zxz0O0:
You should be able to hook secd with my tool https://github.com/dosomder/android-servicehook/

Rooting status is likely to be queried in QSEECom_send_cmd. So it would be interesting to log the calls to that function.
[Sony Xperia XZ Premium Guides, News, & Discussion] sToRm//:
That looks nice! Thank you. I will take a look at this for sure. :) I use Frida to trace and get a better understanding of the flow, try things,... I love it, because it's fast and flexible. The fix itself is compiled in a preloaded lib (like tobias did it). The only problem is, that the credmgr.db keeps empty (4KB empty sqlite table). This is my next goal... But like I said, my head is f*** up for today.
[Sony Xperia XZ Premium Guides, News, & Discussion] sToRm//:
Someone gave me a pizza on donations. Big thanks! :angel: :D
[Sony Xperia XZ Premium Guides, News, & Discussion] FartyParty:
This reminded me I had $4 on a paypal account that I don't use so I sent them to you :).
[Sony Xperia XZ Premium Guides, News, & Discussion] Dakyz3:
How can I donate. I have unlocked xz p and I am willing to test all kinds of fixes. ? great work so far Storm ? keep it up.
[Sony Xperia XZ Premium Guides, News, & Discussion] FartyParty:
Just press his donation button under his username. Unless you meant donation as in willing to help test things
[Sony Xperia XZ Premium Guides, News, & Discussion] sToRm//:
Yummie! I will invest it in donuts :D Thank you!

Be sure... If I have a working fix, I make it suitable for other users and I share it here. ;)
[Sony Xperia XZ Premium Guides, News, & Discussion] arjun.arora:
Hey buddy, I recently purchased an XA1 Ultra and unlocked its bootloader. The thing is the camera is working just fine. There is no drop in picture quality. All other drm linked functions like screen mirroring and image enhancement have stopped working though.
[Sony Xperia XZ Premium Guides, News, & Discussion] Alaa | Google Android:
Also ps4 remote play

Any other fetures?
[Sony Xperia XZ Premium Guides, News, & Discussion] arjun.arora:
No idea abt the ps4 remote play.. Screen casting is working yhough..

I just wished sony had freed the camera of the XZ premium from drm protection..
[Sony Xperia XZ Premium Guides, News, & Discussion] Lirannl:
Yeah, like, I don't, and won't own a PS4. I like Sony, but I don't like consoles.
[Sony Xperia XZ Premium Guides, News, & Discussion] Alaa | Google Android:
Ok, Can you try if you have ps4?

thank you.
[Sony Xperia XZ Premium Guides, News, & Discussion] Dakyz3:
I'w donated to keep you motivated ;)
[Sony Xperia XZ Premium Guides, News, & Discussion] sToRm//:
Thank you! :) I will invest a few hours this night. I think it's the liibsuntory, that causes the problems. But I have no idea, which way I should go.
[Sony Xperia XZ Premium Guides, News, & Discussion] ex3meex:
I love you storm :p

You tried to look out on the other xperia devices, similar to xzp, that other devs found out a solution of DRM? Just only for take some leads and ideas for have a solid point to start
[Sony Xperia XZ Premium Guides, News, & Discussion] FartyParty:
The whole reason why there's so much trouble is that they changed stuff with XZP, the DRM fix works perfectly on previous models but not XZP.
[Sony Xperia XZ Premium Guides, News, & Discussion] GeramanX:
Do you think there'll be a way to Fix/Patch DRM in the future?

I'm planning on buying a XZP but I'm afraid I can't get root and/or the fix.

All I want it for is to get rid of advertising!!! XD

Also, I'll be willing to donate and also collect the money you guys donate for the cause.

You can also choose someone to collect the donations as well.

You know how it works:

Someone to get temporary root, get DRM keys from device for the future or DRM workaround etc, you know...

My PayPal is:

gerardojlopez@outlook.com

We all know money is what will get this device just the way we want, rooted and working just fine, it's always been and will be the one and only way.

I remember this has happened since Xperia Z1 to my latest Z5, but I'm waiting until this thing gets going to get it.

So, come on guys!

Let's make it happen!
[Sony Xperia XZ Premium Guides, News, & Discussion] sToRm//:
If you are female, you can marry me. I'm single. But I have little time, because I constantly have to get any DRMfix running. Hahahahaha... :laugh:

Yepp, I did comparison to a few other devices, but the changes are a big deal. I don't own IDA Pro 6.9+ with related decompilers, so I can read disassembly only (without pseudocode) to get a bit of understanding the functions. It's really difficult, because I had to start from scratch with Sony (it's my first Sony device) and their DRM/Keys/Credentials/TrollingCustomers. I just have to understand the whole system without a clue of such things like DRM on Android. There also are no sources for the fix by tobias which I could use to build a new fix. I can only understand his vodoo by disassembly, too. That's why my brain stops working sometimes. :cyclops:
[Sony Xperia XZ Premium Guides, News, & Discussion] mirhl:
As I suggested in Newflasher's thread, you can try radare2 and/or snowman as free ARM decompilers.
[Sony Xperia XZ Premium Guides, News, & Discussion] FartyParty:
LOL! Nice try.

We can donate directly to storm.
[Sony Xperia XZ Premium Guides, News, & Discussion] ex3meex:
[MENTION=8363210]sToRm//[/MENTION]

If we wait the Android Oreo 8.0 release for XZP maybe the situation will change? maybe the entire firmware Oreo will be more lighter than the nougat so i think it will be more easyer to decompile or do some stuffs on it. Am i wrong on this idea?

Another question, how can we help you on this work? when i was a child i created a very few hacks for games (only 3 for iphone xD) but it was a long time ago, now i remember very little small things on these stuffs. i dont know nothing about android system and how it works :( i sux hard on this scope
[Sony Xperia XZ Premium Guides, News, & Discussion] GeramanX:
I'm not a scammer or something like that.

I'm just trying to motivate people here to donate and collect the money, this way maybe if we reach a generous amount some skilled developer(s) would give it a shot.