PLEASE CHECK THE RIGHT VERSION OF YOUR FIRMWARE!!!

1. Unlock your bootloader

2. Use XperiFIX to get what you want

MOD edit, links removed.

Okay, let's go...First we need some good music: HERE 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.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...Before you start:Settings -> About the phone -> Model & Build numberDon't flash anything that doesn't match your build!+++++++++ UPDATE +++++++++++++++++++++++++++I created a tool "XperiFIX" which can do the magic for you.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/sho...&postcount=285 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!1. Download, install and start "XperiFIX" (as administrator!)2. Hold down thekey only and plug the USB cable to PC and mobile phone until the LED is blue.3. Read the warning and check the checkbox4. Click "Fix my device!" button in XperiFIX5. Now the tool will do it's magic! Please be patient, it can take a few minutes!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...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: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!Yes, but only with Xperifix 2.0 and above. It will patch the ramdisk of the kernel automaticly.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!Please check if you have the correct driver for your device, installed on your PC.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!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+.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.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!Hatee-hatee-hatee-ho! ^^XperiFIX_InstallerOfficial 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.49Sony Xperia XZ1 (experimental)- Firmware @47.1.A.12.75- Firmware @47.1.A.12.34- Firmware @47.1.A.8.49Sony Xperia XZ1 Compact (experimental)- Firmware @47.1.A.12.75- Firmware @47.1.A.12.34- Firmware @47.1.A.8.49Old 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).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!... and all other users of the "brainstorm thread" for their infos and ideas!Included in XperiFIX:Old DRM restore by @ tobias.waldvogel Magisk by @ topjohnwu TWRP by @ Myself5 AndroidLib by @ regaw_leinad