• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

[HACK+MOD] Sony Xperia XZ Premium TWRP + KERNEL + ROOT + DRM fix/restore

Status
Not open for further replies.
Search This thread

sToRm//

Senior Member
Jun 24, 2017
524
2,032
Munich
xperifix-teaser.jpg


A MESSAGE TO SONY:
Dear Sony,
It was never my intention to publish a hack for your devices. But... It also was never my intention to buy a device for which I have no control. I find it impertinent to forbid the customer to root a purchased smartphone. I would not have made the effort, if at least the standard functions of the camera could have used. I paid ~750 euros and got a non-functioning camera because I want to have full control of my device. If at least the Camera2 API would have been opened, in order to be able to use other camera apps with full resolution, a hack would not have been necessary. But even with that you are fooling your customers. The only reason I have spent so much time and nerves is that I wanted to have a functioning debloated device with root.



Okay, let's go...
First we need some good music: HERE

##### WARNING: ########

Please note that the modification can result in a loss of warranty. I accept no responsibility for any damage that may occur and do not guarantee the functionality of the modifications. I have created this modification for myself and I just want to make it available to other users. If you have no idea of these things, please keep your fingers away. This hack may - in case of incorrect application - destroy your phone. Please keep to the instructions and report errors right here in the thread.

##### INFO: ###########

I' m providing a complete guide here, explaining how to unlock and root the Sony Xperia XZ Premium. In addition, I offer my hack for the DRM problem. You can root your device and still use the full functionality of the camera. Please note: DON'T flash the fix of other devices/versions to your phone! There are patched system files in my fix, which are only for the related phone/version! I will create different patches for other devices and firmware versions in the future!

Sony has worked on the newer devices on the security functions and made it more difficult to crack the DRM protection. Hidden checks were implemented to make cracking more difficult. The old DRMfix by Tobias Waldvogel no longer works with newer devices. I therefore spent a lot of time (a few weeks) and cracked the protection. Since this was my first time with Sony and I had previously no experience with it, it was a very hard job for me. But okay... finally I did it. And here are my 5 cents...


##### INSTRUCTIONS: #####

Before you start: PLEASE CHECK THE RIGHT VERSION OF YOUR FIRMWARE!!!
Settings -> About the phone -> Model & Build number
Don't flash anything that doesn't match your build!


+++++++++ UPDATE +++++++++++++++++++++++++++
I created a tool "XperiFIX" which can do the magic for you. :cowboy:



See it in action...



If you nevertheless want to do it manually on Nougat, the old instructions and downloads are here: https://forum.xda-developers.com/showpost.php?p=74426201&postcount=285

1. Unlock your bootloader

Visit: https://developer.sonymobile.com/unlockbootloader/ Choose "Xperia XZ" from the list of the devices (only if your device isn't listed) and follow the instructions to unlock your bootloader. Please note, that as soon as you unlock your device, your unique device keys are lost (forever!) and there is NO way back anymore!

2. Use XperiFIX to get what you want

1. Download, install and start "XperiFIX" (as administrator!)
2. Hold down the VolumeUP(+) key only and plug the USB cable to PC and mobile phone until the LED is blue.
3. Read the warning and check the checkbox
4. Click "Fix my device!" button in XperiFIX
5. Now the tool will do it's magic! Please be patient, it can take a few minutes!

Note: If TWRP ask you if the system partition should be mounted read-only, then swipe to the right to allow modifications!

6. If all is done, the device should restart.
7. Check your security status, configuration and camera.
8. Donate me a pizza or some toys for my little son, hehe...

Congratulations!
You now have an unlocked, rooted XZ Premium with my DRMpatch and can use your camera and other functions again without ugly green pictures! Wohoooo... Easy going, huh?

Let's be quiet for a moment and imagine the faces of the developers, who wanted to prevent a DRMfix with the new firmware versions and complex encapsulated security functions:




Cheers!
//sToRm (Heiko Frenzel)



##### FAQ: ################

Can this patch bring back the device key?
No! It simulates the key and a locked device without root. If you unlock and root your device, the unique device key is gone forever! There is not turning back!

Can I use another kernel with this patch?
Yes, but only with Xperifix 2.0 and above. It will patch the ramdisk of the kernel automaticly.

Can I use the patch for other devices or versions?
No! Please don't try this! In my patch I had to fix a system file which is different between the devices and versions. If you flash the wrong version, it could brick your phone! I will create other versions of my patch for other devices, too. So be patient!

TWRP freezes and nothing happens, what should I do?
Please check if you have the correct driver for your device, installed on your PC.

I already rooted my device. Can I use XperiFIX, too?
Yes. If you used Magisk before, you can use XperiFIX without problems. Because XperiFIX will flash a new kernel which isn't pre-rooted. After that XperiFIX will flash Magisk, which will recognize your last Magisk installation. It will patch the new kernel ramdisk and all is fine. Your Magisk old settings will be there, too. If you want to use SuperSU, you can't use XperiFIX, because it's not implemented yet and I personally won't install and test it cause Magisk is running perfect on Nougat and Oreo, too!

I used XperiFIX but it gives me an error and now my device is in a bootloop!
That's not good dude. Please report what exactly you did, with all informations about your device. I will check it. To get a working device again, you can flash the firmware with Newflasher 10+.

My device doesn't respond, nothing works, it stucks in a bootloop, I can't power off?!
Just hold the VolumeUP(+) key together with the Power key. Wait until the device vibrates 3 times (!). Now it's completely off. Then you can try to go in Fastboot mode again to flash or use XperiFIX.

I have a problem, what can I do?
If your question can't be answered here in the FAQ, please post your report. Be sure to give all needed informations. Which device, which firmware version, what you exactly did, ... Without details, nobody can help you!

What does the fox say?
Hatee-hatee-hatee-ho! ^^



##### DOWNLOADS: ##########

XperiFIX_Installer MOD edit, links removed.
Official website: https://www.xperifix.com

Supported devices:
Sony Xperia XZ Premium (Single/Dual)
- Firmware @47.1.A.12.75
- Firmware @47.1.A.12.34
- Firmware @47.1.A.8.49

Sony Xperia XZ1 (experimental)
- Firmware @47.1.A.12.75
- Firmware @47.1.A.12.34
- Firmware @47.1.A.8.49

Sony Xperia XZ1 Compact (experimental)
- Firmware @47.1.A.12.75
- Firmware @47.1.A.12.34
- Firmware @47.1.A.8.49

Old version:
If you are using older firmware versions on your XZ Premium, you can download the last old version (v1.4) from the website (look at the history on the download site).

##### SUPPORT / DONATION: #####
If I could help you with my work, I would be glad if you give me a small thank you. You can DONATE HERE. This would also support further development for newer versions and other devices. Big thanks!


THANKS:
@munjeni
@zxz0O0
@the_brad
@serajr
... and all other users of the "brainstorm thread" for their infos and ideas!

CREDITS:
Included in XperiFIX:
Old DRM restore by @tobias.waldvogel
Magisk by @topjohnwu
TWRP by @Myself5
AndroidLib by @regaw_leinad
 
Last edited by a moderator:

karrouma

Senior Member
Jun 27, 2013
1,986
650
@sToRm//

Waiting a kernel and patch for my sony xperia xz1 dual
I will donate when patch is done
Thank you STORM for your time and work

Pls include my country lebanon in the donation country
 
Last edited:
  • Like
Reactions: BO1968

sToRm//

Senior Member
Jun 24, 2017
524
2,032
Munich
@sToRm//

Waiting a kernel and patch for my sony xperia xz1 dual
I will donate when patch is done
Thank you STORM for your time and work

Pls include my country lebanon in the donation country

I need the right version of your kernel. Then I can download the FW and check it.

Lebanon? How can I do that? I have no idea... hahaha...
 
  • Like
Reactions: schickel

stalkopat

New member
Oct 26, 2017
3
0
Hello, just wanted to ask if ist just the stock firmware but with root or an acctual Rom, also: does this version have the Camera2Api and support its super-slow mo? Sorry if i missed something. Great Job by the way
 

sToRm//

Senior Member
Jun 24, 2017
524
2,032
Munich
Hello, just wanted to ask if ist just the stock firmware but with root or an acctual Rom, also: does this version have the Camera2Api and support its super-slow mo? Sorry if i missed something. Great Job by the way

It's just a modified kernel and a patch for a system file. The ROM is stock, the kernel is 99,9% stock. It has no effect to Camera2Api.
 

benengyj

Senior Member
Jun 14, 2009
118
26
Hopefully modders like you will convince Sony and other OEMs to get their heads out of their arses and stop wasting time and money (both ours and theirs) with stupid $hit like these.

latest
 
  • Like
Reactions: pikeylfc
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 199
    xperifix-teaser.jpg


    A MESSAGE TO SONY:
    Dear Sony,
    It was never my intention to publish a hack for your devices. But... It also was never my intention to buy a device for which I have no control. I find it impertinent to forbid the customer to root a purchased smartphone. I would not have made the effort, if at least the standard functions of the camera could have used. I paid ~750 euros and got a non-functioning camera because I want to have full control of my device. If at least the Camera2 API would have been opened, in order to be able to use other camera apps with full resolution, a hack would not have been necessary. But even with that you are fooling your customers. The only reason I have spent so much time and nerves is that I wanted to have a functioning debloated device with root.



    Okay, let's go...
    First we need some good music: HERE

    ##### WARNING: ########

    Please note that the modification can result in a loss of warranty. I accept no responsibility for any damage that may occur and do not guarantee the functionality of the modifications. I have created this modification for myself and I just want to make it available to other users. If you have no idea of these things, please keep your fingers away. This hack may - in case of incorrect application - destroy your phone. Please keep to the instructions and report errors right here in the thread.

    ##### INFO: ###########

    I' m providing a complete guide here, explaining how to unlock and root the Sony Xperia XZ Premium. In addition, I offer my hack for the DRM problem. You can root your device and still use the full functionality of the camera. Please note: DON'T flash the fix of other devices/versions to your phone! There are patched system files in my fix, which are only for the related phone/version! I will create different patches for other devices and firmware versions in the future!

    Sony has worked on the newer devices on the security functions and made it more difficult to crack the DRM protection. Hidden checks were implemented to make cracking more difficult. The old DRMfix by Tobias Waldvogel no longer works with newer devices. I therefore spent a lot of time (a few weeks) and cracked the protection. Since this was my first time with Sony and I had previously no experience with it, it was a very hard job for me. But okay... finally I did it. And here are my 5 cents...


    ##### INSTRUCTIONS: #####

    Before you start: PLEASE CHECK THE RIGHT VERSION OF YOUR FIRMWARE!!!
    Settings -> About the phone -> Model & Build number
    Don't flash anything that doesn't match your build!


    +++++++++ UPDATE +++++++++++++++++++++++++++
    I created a tool "XperiFIX" which can do the magic for you. :cowboy:



    See it in action...



    If you nevertheless want to do it manually on Nougat, the old instructions and downloads are here: https://forum.xda-developers.com/showpost.php?p=74426201&postcount=285

    1. Unlock your bootloader

    Visit: https://developer.sonymobile.com/unlockbootloader/ Choose "Xperia XZ" from the list of the devices (only if your device isn't listed) and follow the instructions to unlock your bootloader. Please note, that as soon as you unlock your device, your unique device keys are lost (forever!) and there is NO way back anymore!

    2. Use XperiFIX to get what you want

    1. Download, install and start "XperiFIX" (as administrator!)
    2. Hold down the VolumeUP(+) key only and plug the USB cable to PC and mobile phone until the LED is blue.
    3. Read the warning and check the checkbox
    4. Click "Fix my device!" button in XperiFIX
    5. Now the tool will do it's magic! Please be patient, it can take a few minutes!

    Note: If TWRP ask you if the system partition should be mounted read-only, then swipe to the right to allow modifications!

    6. If all is done, the device should restart.
    7. Check your security status, configuration and camera.
    8. Donate me a pizza or some toys for my little son, hehe...

    Congratulations!
    You now have an unlocked, rooted XZ Premium with my DRMpatch and can use your camera and other functions again without ugly green pictures! Wohoooo... Easy going, huh?

    Let's be quiet for a moment and imagine the faces of the developers, who wanted to prevent a DRMfix with the new firmware versions and complex encapsulated security functions:




    Cheers!
    //sToRm (Heiko Frenzel)



    ##### FAQ: ################

    Can this patch bring back the device key?
    No! It simulates the key and a locked device without root. If you unlock and root your device, the unique device key is gone forever! There is not turning back!

    Can I use another kernel with this patch?
    Yes, but only with Xperifix 2.0 and above. It will patch the ramdisk of the kernel automaticly.

    Can I use the patch for other devices or versions?
    No! Please don't try this! In my patch I had to fix a system file which is different between the devices and versions. If you flash the wrong version, it could brick your phone! I will create other versions of my patch for other devices, too. So be patient!

    TWRP freezes and nothing happens, what should I do?
    Please check if you have the correct driver for your device, installed on your PC.

    I already rooted my device. Can I use XperiFIX, too?
    Yes. If you used Magisk before, you can use XperiFIX without problems. Because XperiFIX will flash a new kernel which isn't pre-rooted. After that XperiFIX will flash Magisk, which will recognize your last Magisk installation. It will patch the new kernel ramdisk and all is fine. Your Magisk old settings will be there, too. If you want to use SuperSU, you can't use XperiFIX, because it's not implemented yet and I personally won't install and test it cause Magisk is running perfect on Nougat and Oreo, too!

    I used XperiFIX but it gives me an error and now my device is in a bootloop!
    That's not good dude. Please report what exactly you did, with all informations about your device. I will check it. To get a working device again, you can flash the firmware with Newflasher 10+.

    My device doesn't respond, nothing works, it stucks in a bootloop, I can't power off?!
    Just hold the VolumeUP(+) key together with the Power key. Wait until the device vibrates 3 times (!). Now it's completely off. Then you can try to go in Fastboot mode again to flash or use XperiFIX.

    I have a problem, what can I do?
    If your question can't be answered here in the FAQ, please post your report. Be sure to give all needed informations. Which device, which firmware version, what you exactly did, ... Without details, nobody can help you!

    What does the fox say?
    Hatee-hatee-hatee-ho! ^^



    ##### DOWNLOADS: ##########

    XperiFIX_Installer MOD edit, links removed.
    Official website: https://www.xperifix.com

    Supported devices:
    Sony Xperia XZ Premium (Single/Dual)
    - Firmware @47.1.A.12.75
    - Firmware @47.1.A.12.34
    - Firmware @47.1.A.8.49

    Sony Xperia XZ1 (experimental)
    - Firmware @47.1.A.12.75
    - Firmware @47.1.A.12.34
    - Firmware @47.1.A.8.49

    Sony Xperia XZ1 Compact (experimental)
    - Firmware @47.1.A.12.75
    - Firmware @47.1.A.12.34
    - Firmware @47.1.A.8.49

    Old version:
    If you are using older firmware versions on your XZ Premium, you can download the last old version (v1.4) from the website (look at the history on the download site).

    ##### SUPPORT / DONATION: #####
    If I could help you with my work, I would be glad if you give me a small thank you. You can DONATE HERE. This would also support further development for newer versions and other devices. Big thanks!


    THANKS:
    @munjeni
    @zxz0O0
    @the_brad
    @serajr
    ... and all other users of the "brainstorm thread" for their infos and ideas!

    CREDITS:
    Included in XperiFIX:
    Old DRM restore by @tobias.waldvogel
    Magisk by @topjohnwu
    TWRP by @Myself5
    AndroidLib by @regaw_leinad
    45
    Whoooop! Good news!

    - I found a new way to patch our devices and also other devices like the XZ1/XZ1c.
    - They all should work with current Magisk versions 15+ then.
    - The new method also fixes a bug in current firmware versions (service menu -> device info bugs)
    - I actually work on a fully automatic version of XperiFIX (the big dream haha)

    If I have a little bit more free time, I will make a little project page with needed files for Linux users, too. It's easier to update all relevant files on one single place.

    Have a nice weekend my friends!
    37
    Well... I think this will be a little bit easier... Haha...
    Works like a charme with my XZP @ Oreo.

    8IyMMYZ.png


    My goal is to include fixes for different devices, too. And to make it as simple as possible...

    - Connect your device in Fastboot mode
    - Choose your device and firmware version
    - Hit Crack that b***
    - Wait a little bit
    = Wohoo... TWRP + ROOT + DRMpatch

    Easy, huh? :cowboy:

    I will test it and release it asap.
    Please be patient.
    30
    Hi my friends :)
    I'm back on my desk. I will try to get some free time this evening when I'm done with my work. Then I will share an updated XperiFIX version with the current fw versions. There will also be a fix for other devices, which will be tested these days. As soon as they work perfectly, they will be included in the coming XperiFIX 2.0 with automatic mode and optional manual mode (for already rooted/modded devices).

    The 2.0 will be a universal solution and I think it should work also with coming updates, because the tool will get the needed infos and files right out of the device. That's what I call "intelligent hacking". Hahaha... Because of the fact that the 2.0 uses another method for newer devices, I will make the mentioned official website for XperiFIX and there will be the current version and the 2.0+ seperately. That makes it easier for users of older firmware versions that don't want to upgrade. There will also be some tipps related to drivers and things like that. Maybe I will find a way to include them or do some system checks to get these bugs fixed for users that have problems with their machines.

    Later then, I will try to create a fully universal XperiFIX for most devices (old and new). But that will take some time and a lot of testing. On the XperiFIX site, there will be a opportunity for users of other devices to apply for testings. I'm also planning to include third party mods for the related devices. That would be (I think so) really useful. So... I think you guys noticed already, that I'm really keen on getting a really nice software for Sony's devices.

    P.S.: The Linux solution is coming soon, too.

    Have a nice week! I will post asap when it's done. Hehe... You know that.
    Cheers!
    28
    Just to make things clear. My kernels/repacks are done in accordance with instructions provided by sToRm// in this thread (plus a bit of tweaking to make magisk 15+ work).
    The drm fix is, and always will be the work of @sToRm//
    I am also willing to pay for new patches when the old ones become redundant.

    Yes, and you did a great job for the community. Thank you! We had a move in my family before Christmas and during the holidays. I did not have time to worry about the fix, but I kept reading on XDA. Then I saw that you shared the kernels, sat sweating on the couch with moving boxes in front of me, and smiled. Hehe...

    It's not the problem that somebody shares his own repacks or a fix with my files included. I saw there are kernels with pre-included fixes. They are absolutely welcome. It's nice to see that other people can use it. I'm the last person on this earth who would be angry about that, because I think that things are more easy and effective if some devs work together and share their knowledge. That's the reason why I shared my knowledge and things i noticed, on the thread about the long way to the fix. Also I shared instructions to include it in other kernels.

    What really sucks is that I invested tons of hours for a new fix for other devices... I worked together with testers and made a lot of tests over weeks and f*** my brain with that. I sat on my desktop for nights to get a fix for other devices, which I don't own... Only to make other users happy. I gave my test fixes to testers and explicitly said "Please, don't share the files." because they were only for testing. And then there comes up a fix for the XZ1/XZ1c which was out of my test files. The included "update-binary" contains the hint that it was an unofficial pack. The files are identical and the included "secd" is 1:1 patched (my hack). So... What really pisses me off is the fact, that they shared my invested time without my knowledge and another user comes up with that. It would be absolutely enough to ask me if another user can have the files.

    In the fix is a library from tobias.waldvogel (old drmfix) which I included. I personally tried to contact him over different ways, to get his "okay". He is not active and I didn't got an answer for a long time, so I decided to include it and mention him and his work. But the difference is, it was a public file, not a unofficial fix sent via pm. You know what I mean?

    And... Because there was somebody who said I do it for the money... Haha...
    Dude... That's bullshit. I'm shareholder and director of 3 companies. I'm not rich, but I'm also not greedy. There were some users that said to me "I would share the fix only for payment." but that's not my intention. I got donations, yes and that's really nice. Because I use it not only for pizza. For example: I got donations for the manual instructions and files and then I took the money and bought a license for the framework that I used to develop XperiFIX. A software that is free to all and for sure I would not need. If I would do it for the money, I would create a runtime fix with closed source and serials.

    And...
    I didn't say "There will be no update for the rest of my life". But right now I'm just pissed off. That's why I'm now mainly concerned with private and business. I make updates when I have time or I get bored.