Root and keep DRM - Sony Xperia X Questions & Answers

Hi,
I'm planing to buy new phone (currently an owner of a broken Z3 compact).
My question (I can't find any sticky thread on this topic thus asking) for this phone is:
- is it possible to root and keep DRM?
- does unlocking bootloader lose DRM keys?
- does the DRM affect camera quality (for z3 compact it did)?
I also saw some thread of DRM fix (https://forum.xda-developers.com/xperia-x/development/kernel-drm-fix-nougat-t3530849). Does this mean that after aplying such a fix the DRM is back?
The thing is that I like to have custom ROM (removed all the unnecessary things thus lighter version of original firmware) while keeping all the qualities of Sony phones.; like everyone
Thanks in advance!

mrepovz said:
Hi,
I'm planing to buy new phone (currently an owner of a broken Z3 compact).
My question (I can't find any sticky thread on this topic thus asking) for this phone is:
- is it possible to root and keep DRM?
- does unlocking bootloader lose DRM keys?
- does the DRM affect camera quality (for z3 compact it did)?
I also saw some thread of DRM fix (https://forum.xda-developers.com/xperia-x/development/kernel-drm-fix-nougat-t3530849). Does this mean that after aplying such a fix the DRM is back?
The thing is that I like to have custom ROM (removed all the unnecessary things thus lighter version of original firmware) while keeping all the qualities of Sony phones.; like everyone
Thanks in advance!
Click to expand...
Click to collapse
you could root and keep DRM, but you have to backup DRM first (before unlocking bootloader) while on marshmallow through Dirtycow exploit: https://forum.xda-developers.com/crossdevice-dev/sony/universal-dirtycow-based-ta-backup-t3514236
as you said, unlocking bootloader does wipe the TA partition (where DRM keys are stored) and worsen camera quality (irc, at the point you cannot use stock camera).
this way, before unlocking you'll have a TA partition dump you can restore anytime.
then you unlock BL, flash a custom kernel + super user with a custom recovery (likely twrp), restore TA partition and you should be done.
as for DRM Fix, i believe it's about ignoring some errors which are showed when using stock roms and an unlocked device (i.e. you cannot use stock camera and some other features).

carlo93 said:
you could root and keep DRM, but you have to backup DRM first (before unlocking bootloader) while on marshmallow through Dirtycow exploit: https://forum.xda-developers.com/crossdevice-dev/sony/universal-dirtycow-based-ta-backup-t3514236
as you said, unlocking bootloader does wipe the TA partition (where DRM keys are stored) and worsen camera quality (irc, at the point you cannot use stock camera).
this way, before unlocking you'll have a TA partition dump you can restore anytime.
then you unlock BL, flash a custom kernel + super user with a custom recovery (likely twrp), restore TA partition and you should be done.
as for DRM Fix, i believe it's about ignoring some errors which are showed when using stock roms and an unlocked device (i.e. you cannot use stock camera and some other features).
Click to expand...
Click to collapse
Thanks.
So basically after the installation of any custom romantic I just restore TA partition (I need to do a backup prior to doing anything else).
Does this als work with custom kernel?

mrepovz said:
Thanks.
So basically after the installation of any custom romantic I just restore TA partition (I need to do a backup prior to doing anything else).
Does this als work with custom kernel?
Click to expand...
Click to collapse
restoring TA partition should work no matter what the kernel is.
in fact, you could just unlock BL and restore TA partition, but it would be pointless then (i mean unlocking BL and not rooting).
a "custom" kernel is required in order to get root access

carlo93 said:
restoring TA partition should work no matter what the kernel is.
in fact, you could just unlock BL and restore TA partition, but it would be pointless then (i mean unlocking BL and not rooting).
a "custom" kernel is required in order to get root access
Click to expand...
Click to collapse
Great. Thank you.
I get he phone in 2days so until then I have to find everything.

I restored TA partition after rooting but now the phone will not boot. It displays an error about failing verification and will not boot properly. How to get around this?

Related

[Q] Installing CM-10.2 Android-4.3

Hey guys, I've rooted, installed CWM Recovery, Unlocked Bootloader, and installed CyanogenMod on another phone before.
The thing is, I've had this phone for about 6 months and wanted to do the same. However, after browsing through the forums, man are there a lot of scary sh*t going down. I would like the request the procedure to install CyanogenMod safely, without losing any Keys/IMEI/XReality/DRMkeys/Etcetera.
I dont know if the method given by FXP is supposed to be this straight forward, but I too like others, do not want to risk losing important stuff if it can be avoided (Keys/IMEI/XReality/DRMkeys/Etcetera).
HOWTO
Install instructions:
first time
- power off the phone:
- hold vol+ and plug usb to boot into fastboot (blu led)
- fastboot flash boot boot.img (from cm10 zip)
- fastboot reboot
- enter recovery, on boot led will be violet for 3'', during this period press vol+
- flash rom zip
- flash gapps zip
- wipe
- reboot
for update just flash rom zip from recovery
Google Apps are not included in this ROM. You'll need to find those yourself if you want them.
Click to expand...
Click to collapse
Frankly speaking, the forums is pretty much jumbled up, and the existing [Guide] Threads are either incomplete (Lacking important steps), or Unclear (Non-Specific steps).
Perhaps someone could do me a favour by using the template that I have below to help me, and possibly others, to install CM 10.2 on our beast of a phone.
Template:
1. Backup TA and DRMkeys and stuff: http://forum-xda-developers-com/backup
2. Root: http://forum-xda-developers-com/root
3. Recovery : http://forum-xda-developers-com/recovery
4: Unlock Bootloader: http://forum-xda-developers-com/ulbl
5: Install FXP's CM 10.2 :http://forum.xda-developers.com/showthread.php?t=2461286
Something like that would suffice I think, as long as no important steps are missing that would cause me to lose stuff unique to my phone, that cannot be recovered if I didn't back it up.
P.S. My version is 14.1.B.2.257
P.P.S. Thank you in advance.
1. Root
2. Backup TA (VERY IMPORTANT)
3. Install Recovery and unlock the bootloader, or the other way around. Both ways work.
4. Install ROM by following the "guide" that you quoted above.
Sent from my C6833 using Tapatalk
I'm on 14.1.B.2.257, I believe reverting to the previous version causes data to be lost unless you back it up right. *Sighs* How troublesome.
Xenogenics said:
I'm on 14.1.B.2.257, I believe reverting to the previous version causes data to be lost unless you back it up right. *Sighs* How troublesome.
Click to expand...
Click to collapse
you will have to back up the data anyways. I think unlocking the bootloader does a factory reset, as well one is needed going from stock to CM if i unforget correctly
I am also wondering about this. I'm currently running firmware .257.
I understand that I need to back up the TA partition first (though I'm not exactly sure on what I will loose if I don't). I also understand that to do this I need to root the stock rom. I understand that in order to root, I'll need to first downgrade to an earlier firmware using flashtool. However, after that I'm not so sure what I need to do. As far as I can see, the only method of gaining root currently is to use vRoot, which is currently under investigation for IMEI mining.
How else can I root the device? I was thinking of maybe using the recovery for locked bootloaders here: http://forum.xda-developers.com/showthread.php?t=2426739
Following by flashing SuperSU from recovery as per usual.
Will this work, keeping the TA partition intact so that I can back it up before flashing CM? Assuming so, would I even need to downgrade from the .257 firmware at all?
Thanks,
i have CWM now so can flash custom roms like i did on other phones right?
what does unlocking the bootloader give me? unless i'm wrong and i have to unlock to flash?
all i've done so far is do a backup is all. (did a TA backup a while back though)
stiggy2012 said:
I am also wondering about this. I'm currently running firmware .257.
I understand that I need to back up the TA partition first (though I'm not exactly sure on what I will loose if I don't). I also understand that to do this I need to root the stock rom. I understand that in order to root, I'll need to first downgrade to an earlier firmware using flashtool. However, after that I'm not so sure what I need to do. As far as I can see, the only method of gaining root currently is to use vRoot, which is currently under investigation for IMEI mining.
How else can I root the device? I was thinking of maybe using the recovery for locked bootloaders here: http://forum.xda-developers.com/showthread.php?t=2426739
Following by flashing SuperSU from recovery as per usual.
Will this work, keeping the TA partition intact so that I can back it up before flashing CM? Assuming so, would I even need to downgrade from the .257 firmware at all?
Thanks,
Click to expand...
Click to collapse
OK, so looking into this further, you already need to have root to be able to flash the "CWM for locked bootloader" rocovery. So as far as I can see, the only way to get root in order to back up the TA partition is to give your IMEI to the Chinese via vRoot?
Thank god the stock rom is so good.
tommo123 said:
i have CWM now so can flash custom roms like i did on other phones right?
what does unlocking the bootloader give me? unless i'm wrong and i have to unlock to flash?
all i've done so far is do a backup is all. (did a TA backup a while back though)
Click to expand...
Click to collapse
You have to unlock the bootloader to flash custom ROMs. You can flash stock ROMs without unlocking it, but you have to unlock it if you want CM, PAC, PA etc.
Sent from my C6833 using Tapatalk
really, so what would happen if i tried to flash an aosp rom now? would the system partition essentially be read only?
sorry for the Qs but haven't had a locked bootloader since the htc desire (although the s-off for that one was to remap the partitions to allow more room for data) and the reasons for unlocking don't seem to be the same.
tommo123 said:
really, so what would happen if i tried to flash an aosp rom now? would the system partition essentially be read only?
sorry for the Qs but haven't had a locked bootloader since the htc desire (although the s-off for that one was to remap the partitions to allow more room for data) and the reasons for unlocking don't seem to be the same.
Click to expand...
Click to collapse
Nothing will happen if you try it now. You can easily unlock the bootloader by going to Sony's Dev site, request your key and use Flashtool to unlock it. It takes a couple of minutes once you have Flashtool and the drivers installed. It's also perfectly safe to unlock it and you will lose your warranty. BUT you can easily relock it again if something happens to your ZU and the warrenty will be back.
Remember to backup your TA before you unlock your bootloader. It contains a lot if device info and your unique DRM keys. Unlocking the bootloader will wipe the system partition, but you will still have root, photos, music etc. (But do a backup of those just in case).
Sent from my C6833 using Tapatalk
i think that's where i got confused with drivers - unlocking.
i have already done a backup of my TA part so that side of it is ok. i'll leave unlocking until there's a rom i want to try. possibly a complete 4.4 or something.
cheers LM
tommo123 said:
i think that's where i got confused with drivers - unlocking.
i have already done a backup of my TA part so that side of it is ok. i'll leave unlocking until there's a rom i want to try. possibly a complete 4.4 or something.
cheers LM
Click to expand...
Click to collapse
If you've already backed up your TA, it means that you have the drivers installed, so job done All you have to do is to install Flashtool and get your key from Sony (which you will get on your email straight away). Either way, just ask here if/when you want to unlock it so we can guide you through it (it's very easy though).
ran flashtool but gave me driver errors - missing. unable to install the drivers included (i guess due to windows 8 driver signing)

[Q] TA partition, DRM keys, what's the full story?

Hi everyone,
I'm hoping to use this thread to get the full story on the whole DRM keys issue that comes with unlocking your bootloader. For myself to get a clear picture, but also for others who are interested.
So far I've only been able to find bits and pieces about what exactly the DRM keys do, and how to handle them, I'll start off by writing what I (think I) know, please correct me if I'm wrong:
What do the DRM keys do?
So far I found out they're needed to run the Walkman app, which is understandable as it involves music purchases which are DRM protected.
Personally, I couldn't care less about this app not working anymore, your opinion might differ.
I also heard they're needed for the 'Bravia engine', now this is something that concerns me more, so far I haven't been able to find out what exactly is this 'bravia engine', I would go on a limb and say it's the screen rendering engine, and removing the DRM keys could completely mess up the colors or something, but this is a pure guess, and could be completely wrong. This is the first point which needs clarification.
Can the DRM keys be backed up?
Until recently, no, since the DRM keys reside in the 'TA partition', backing them up was something which required root access, and then again root access was something that could only be obtained by unlocking the bootloader, which in turn wipes the 'TA partition' before you could back it up.
However, since recently, there's a way:
Thanks to our famous friend geohot, we have recently got the ability to root our tablet using his 'towelroot' app. It works by breaking into a kernel vulnerability present on the stock ROM, and inserting root access that way, thus not touching the bootloader (which effectively remains locked). Since we now have root access I was able create a backup of my TA partition, which I've safely backed up to google drive, just in case.
Here are the threads I used to get me this far:
Root my device
Backup TA partition
Install XZDualRecovery
So now I have a rooted stock ROM, XZDualRecovery (which includes TWRP recovery which I prefer), and backed up TA partition.
Can the DRM keys be restored?
According to Install XZDualRecovery"]the thread of the 'TA Backup tool'[/URL] , yes. I haven't tried this out myself, so no personal experience here.
It also says that restoring the keys effectively re-locks your bootloader, which brings you back to zero off course...
Note: The thread explicitly says that trying to restore a 'TA backup' which was created on another device, will effectively hard-brick your device!
For this boils down to 2 options:
Either you can live with a locked bootloader, and have the DRM keys in place
Or you unlock it, and use the device without DRM keys
Off course to make this choice, we have to fully understand what exactly stops working when DRM keys are removed.
Hi, i tried alrdy to restore DRM after i flashed castor CM11 on my Tablet, but i softbricked them. I was in hope that this way will give me a chance to use Sony aps etc.
I restored with Flashtool , now is all ok and Running without DRM. I mean the TA Partition mess up with Bootloader so your Device will not Boot after u try to restore them.
Except on Stock ROM..
ive also came to the same conclusion but heres the thing...ive got an Ultra Z which i had the bootloader unlocked without backing up the TA Partition. Ive installed TWRP, wiped it clean and flashed PA Rom. Then decided to go back to Stock and now everything works as it should. Bravia engine is enabled, walkman app works and the OTA is working as it should. So what am i missing here?

DRM restore etc

Hi all,
So ive been holding off modding my phone as the thought of DRM key emulation etc makes me uneasy... Is there a safe repeatable way for me to backup my DRM keys, so that I may restore them at a later date if I sell my phone or return it for repair?
After many months of lurking, I have still yet to find any concrete answer to this
Kind regards
Gomezie said:
Hi all,
So ive been holding off modding my phone as the thought of DRM key emulation etc makes me uneasy... Is there a safe repeatable way for me to backup my DRM keys, so that I may restore them at a later date if I sell my phone or return it for repair?
After many months of lurking, I have still yet to find any concrete answer to this
Kind regards
Click to expand...
Click to collapse
There is no restoring them, only backing them up. I've been using the DRM fix for going on 7 months or so and no issues.
Thanks, thats a shame I would like to resell this device with confidence.
Kind regards
I think there's some misunderstanding.
If you had never unlocked your bootloader, then your DRM credentials are (obviously) intact and you can backup and restore them using this tool. As long as you've made a backup of the TA partition (where the DRM stuff resides), you can fully restore your phone to its original stock and warranty-covered state. See the linked post for details and links to tutorials.
If you did not backup your TA partition BEFORE you unlock your bootloader, then it is as civicsr2cool says, there's no restoring them, it's gone forever. The good news is that you can employ a workaround ("DRM fix") which emulates DRM that allows certain DRM-reliant functions to work (e.g. low light algorithm etc.), but your warranty remains voided, and it does not restore your original DRM.
Since you said that you've held off modding your phone, I believe your situation falls into the former category, in which case the answer to your question is, YES, there is a SAFE and REPEATABLE method to backup your DRM and restore it.
So you are saying it is also possible to re-lock the bootloader and restore the formerly backed up TA partition and that gives you back a phone that is indistinguishable from an untouched stock phone? So, if done right, all steps are reversible? Is there a full tutorial (especially for the restore) you can point us to?
Cheers
Lemming0815 said:
So you are saying it is also possible to re-lock the bootloader and restore the formerly backed up TA partition and that gives you back a phone that is indistinguishable from an untouched stock phone? So, if done right, all steps are reversible? Is there a full tutorial (especially for the restore) you can point us to?
Cheers
Click to expand...
Click to collapse
yes , this is the thread , http://forum.xda-developers.com/z5-compact/general/summary-tutorial-root-sony-xperia-z5-t3360515 check it out. you can backup ta partition and then root and later roll back to .200 fw at which you backed up TA partition and restore your drm keys. you can even restore them while you are rooted and having those lost functions back , check it foe that. http://forum.xda-developers.com/xperia-z5/development/root-automatic-repack-stock-kernel-dm-t3301605
http://twigstechtips.blogspot.gr/2016/04/sony-z5-compact-root-without-losing-ta.html
Good guide using tools you ll find here.
for mm .253 i used rootkernel v3 rc4. It seems to work fine, root, xposed, etc, but can't comment yet on battery or other issues that show up in longterm.

Will rooting ruin the camera?

Hi, is it possible to root and Xperia Z5 Compact with Nougat without ruining the excellent camera?
chesterrimmer said:
Hi, is it possible to root and Xperia Z5 Compact with Nougat without ruining the excellent camera?
Click to expand...
Click to collapse
YES, just backup your TA and flash kernel with DRM Fix
that's the only way
ryandxter said:
YES, just backup your TA and flash kernel with DRM Fix
that's the only way
Click to expand...
Click to collapse
Thank you. I'm new to this - what do you mean by TA? Can you recommend a tutorial?
Thanks!
chesterrimmer said:
Thank you. I'm new to this - what do you mean by TA? Can you recommend a tutorial?
Thanks!
Click to expand...
Click to collapse
TA partition is 'something' that indeed needed by our Xperia devices which take a role keeping DRM keys, bionz image processing and others.... In short we are luckily and blessed by many devs that create method to backup TA because once we unlock bootlader it will gone forever and you can't take it back with any way including relocking bootloader
just read more from here or use SEARCH instead GOOGLE :highfive: and if you already understand what it is and/or how really important it is then I recommend this tool to backup your TA
if you don't back up the ta, you lose the sony exclusive camera functions
long story short you need flash reflash android 5.1.1 backup TA with scrpit , open Bootloader,>reinstall lastest ROM, flash boot.img >push superuser 2.7 (you can do it all with flash tool or adb terminal you need all sony drivers
i didnt do it yet with my z5c, just what i remmber from my older sony phone (i've still got warranty)
Hello
Thanks for the explanations about TA backup and one way destruction :-/ If i lost my TA partition and my DRM because I unlocked bootloader and rooted too fast in the past, the only way to get a new TA partition is to send the device back to Sony care I suppose ? (meaning phone reset + fee I suppose...)
So far the main loss with DRM is the camera feature. Can we get similar lost feature using 3rd party camera applications ?
uh... you might be able to fake a TA backup, by DRM fixing 5.1.1... check the picture guide, it's about 3 steps in
I will try it

TA Backup with oreo (no downgrade)

Hello forum,
is it possible to gain temp root access and backup TA manually while using oreo? I mean there are several oreo privilige escalation exploits out there.
I found something similiar for a Sony XZ phone: https://forum.xda-developers.com/xp...devonly-exploits-temp-root-to-backup-t3795510
I guess we could use this exploit aswell.
shoey63 said:
If you are referring to TA backup, there are already tools to do that from z to xz series.
If you are referring to a blu-hide kernel, you won't be able to flash it as restoring the TA partition on the older devices physically rel-ocks the bootloader, making it impossible to flash anything other than an untouched stock sony kernel.
Click to expand...
Click to collapse
@Persori, why would you need to do TA backup from oreo (i.e. without downgrade) if there are tools available for older firmwares?
With unlock, your phone would be factory reset anyway, so all data erased, the same effect when you do a downgrade, so what's the point?
It is not trivial to port the exploit to other kernel - finding the offsets involve reverse engineering work. But porting the exploit to other CPU/platform - that is even more difficult - tuning the timing and concurrent processes right to get usable success rate is very very hard.
Put simply - the effort is not worth it, particularly if there are other ways already existing...

Categories

Resources