[Q] TA partition, DRM keys, what's the full story? - Xperia Z2 Tablet Q&A, Help & Troubleshooting

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?

Related

[Q] can someone please break down the current root situation?

i'm thinking about getting this phone instead of the note 3 (coming from note 2) and wondering what the deal is with root, unlocking the bootloader etc?
ta
congratz to 1000 post... the deal? What u wanna know?
Root, well to root on locked bootloader is to make an TA Backup where all your drm keys are stored. These are removed when unlocking the bootloader. The benefit of doing this backup is that you then can restore these keys if needed in the future. And also you can run apps and access features that requires the device to be rooted.
I noticed you are in some level of familiar with custom roms and root as I checked your previous post here at XDA running some sammy roms.
But the benefits of unlocking the bootloader? You can flash roms with ease along the features of being rooted as above.
ah sorry. i didnt meant it in that sense. i had to unlock the bootloader on my old htc desire (samsung since then and no lock). i wondered what the deal was in getting it done?
on the samsungs i've just flashed a custom recovery and that's it. easy as pie but way back when i had to use a goldcard to get the desire unlocked and more steps in getting s-off
is it easy or tricky with the sony? if i get this phone i'd be needing to root straigt away to put my TB backups back on so wouldnt have any drm keys to backup yet
tommo123 said:
ah sorry. i didnt meant it in that sense. i had to unlock the bootloader on my old htc desire (samsung since then and no lock). i wondered what the deal was in getting it done?
on the samsungs i've just flashed a custom recovery and that's it. easy as pie but way back when i had to use a goldcard to get the desire unlocked and more steps in getting s-off
is it easy or tricky with the sony? if i get this phone i'd be needing to root straigt away to put my TB backups back on so wouldnt have any drm keys to backup yet
Click to expand...
Click to collapse
The TA backup does make a backup of alla the DRM keys, as the Bravia engine...and bla bla bla what other features there are.
It is easy to unlock the bootloader IF you not running Windows 8. On W8 it is a bit tricky because you have to reboot the OS in test mode disabling the driver verification in order to be able to install fastboot driver and S1 driver. Other than that, it should be done in about 30 sec if there's no issue :good:
and typically i'm on win 8 (though wish i wasn't at times).
cheers for the info. wonder if it would work with win7 via VM
well, i ordered it, and put my old note 2 for sale on mazuma
As a fellow Galaxy Note user here, Rooting the ZU is easy...
Unlocking the bootloader is another.. It is pretty much straightforward from the tutorials on this forum but you have to watch out of your TA partition..
I have gone as far as backing up my TA but I haven't unlocked my Bootloader yet.. I don't feel the need for a custom ROM yet.
Stock, Rooted .532 ROM with Xposed Framework serves most of my needs.. Plus seamless connection of the Dualshock controller which is a definite plus for me!
cool. i've read the guide and i get that the TA partition holds DRM info but isn't thatonly for purchases etc? if it's lost what's the worst case scenario? brick or you lose access to paid for content?
tommo123 said:
and typically i'm on win 8 (though wish i wasn't at times).
cheers for the info. wonder if it would work with win7 via VM
Click to expand...
Click to collapse
I have no idea how stable it gonna be to make an operation like this? ..because you have to manually unmount and mount the choosen device in to VMware. Now I don't have VMWare Workstation installed as I recently moved to Windows 8 Enterprise. ..big mistake when doing this kind of operations. It took me about an hour to figure out how to properly disarm all this stupid verification of drivers and certificates and bla bla bla microsoft features. In these moments I love my linux mint.
The TA backup benefits from that first of all you do make a backup of your DRM keys if you would like to restore them in the future if going back to stock rom and for example sending it for service covered warranty. You don't necessarily lose your warranty but there might be times when the service center denies your request as they see that the device has been tempered with. I think I read that it does also relock your bootloader but I might need to confirm that..not entirely sure.
If you lost the DRM keys or the backup? Ehm.. yeah no more bravia engine, Track ID and the other apps provided by sony wont work. Other than that, It's not that big of a deal but It's good to have a backup just in case!
ah, good to know then. cheers.
i suppose i could throw a wubi ubuntu install on or something i guess.
Yes, the TA partition has your UNIQUE DRM info needed for Sony's proprietary software to work. (aka bravia engine and xreality) take note of the word UNIQUE.. you cannot use a TA backup from another phone.. So you really have to back it up.. A few minutes of effort to back it up is worth spending rather than losing your keys forever..
As I've read from one of the posts on other threads, restoring the TA partition would not relock your bootloader.. They are two separate steps.. You have to manually relock it after restoring.. Which as far as i understand is fairly easy although I haven't done it myself..
Sent from my C6833 using XDA Premium 4 mobile app

Best practices for out of box 4.4.4 tablet root/backup/bootloader etc

I just bought a Z3CT(SGP612) and am a bit confused.
The first big question is about DRM key thing. Why do I care about them if I don't have any other Sony devices (Playstation etc.) and probably won't ever. I read in one thread that these keys may be non-recoverable, but in another thread it was said they could be saved and restored. What are the best practices for doing this?
Second, and I'm stuck here until this thread works, or further research surfaces the answer. I just bought this unit, it's brand new out of box. I'm probably the last man on earth to buy one, but....The device is nagging me to update, but I think that may end in tears. I'm afraid Sony official updates may render the device unrootable, or permanently lock the bootloader forcing me to beg Sony to do whatever I want to my own device. I think on 4.4.4 there is a way to unlock the bootloader without begging Sony to do it. The device is presently 4.4.4, build 23.0.1.A.0.167. The nagging update will take me to 23.0.1.A.3.12. I'm assuming there may be further updates beyond that to get to 23.4.xxxx. Should I accept this, and do any other updates, or proceed directly to one of the pre-rooted stock ftf files (sorry, what is ftf and acronym for?). I'd like to get to the latest 5.11 and have the ability to run adaway, make backups, have proper working SD card and USB OTG, and maybe run a few Xposed apps all of which mean I need root. As it's a virgin device I don't care about if I have to wipe the device in the process.
http://forum.xda-developers.com/crossdevice-dev/sony/noob-guide-to-sony-ericsson-xperia-t3209012
http://xperiafirmware.com/8-firmware/77-sony-xperia-z3-tablet-compact
as i´m in the same situation as you i will share my experience / research so far:
1. Rooting works on different firmware with different methods, kingroot being one rather easy but with the drawback of sending personal phone data to uncertain chinese servers. Rooting 4.4 seems easier than 5.x.
2. Research showed that the DRM keys / TA partition is something to be backed up, just in case. But for backing up you need root but no unlocked bootloader (unlocking erases the keys).
3. Recoveries can be installed without unlocking the bootloader but need root(?).
This is where im right now with my progress - rooted, TA/DRM keys backed up and on a custom recovery but bootloader still locked and TA intact .. getting root demanded some patience and several tries though.
4. next step will be installing a prerooted 5.1 firmware i guess and everything has to be running fine

Root and DRM keys on Marshmallow?

Dear community,
I've recently got a Z5 compact (updated it to MM already) and after reading around here and around the Z5 forums I came to a cruel conclusion (didn't do my homework before getting the phone, but that's my problem):
You cannot root without unlocking the bootloader and you cannot backup the DRM keys without having root access.
Is this correct? If so, how did people writing the tutorials about DRM keys backup achieve root access in the first place?
I'm a little bit confused here...
Sent from my Nexus 5 using Tapatalk
daniel_loft said:
Dear community,
I've recently got a Z5 compact (updated it to MM already) and after reading around here and around the Z5 forums I came to a cruel conclusion (didn't do my homework before getting the phone, but that's my problem):
You cannot root without unlocking the bootloader and you cannot backup the DRM keys without having root access.
Is this correct? If so, how did people writing the tutorials about DRM keys backup achieve root access in the first place?
I'm a little bit confused here...
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
currently,for the z5 family,there is no way to root without unlocking bootloader.Period.
the tutorials you see on the z5 pages are ways to restore sony credentials after unlocking bootloader but does not restore TA partition (where the DRM keys are) which is lost once you unlock bootloader. i.e you trick the phone into believing the bootloader is unlocked and can still enjoy the sony goodies with the patch (very simplified explanation here).
older models are able to achieve root (like the Z3+) only recently due to exploit found on MM and also using older firmwares.
you might want to hold back on unlocking bootloader for now.the z5 has impressive hardware rivaling samdung.the sad part is backing up TA partition while bootloader is locked,which has not been found.
that or you can hold out till the new nexus arrives.
Frostmore is correct in that you cannot backup DRM currently. But I disagree that you should hold off on doing so, the z5c lacks in most all places and root helps fix some stuff.
Does the loss of DRM keys affect camera performance?
DrYnternet said:
Does the loss of DRM keys affect camera performance?
Click to expand...
Click to collapse
yes it does, Mobile Bravia Engine is gone, Track ID in music player is gone and camera performance is also gone.
but now you can backup and restore your own TA if you have not unlocked bootloader yet
I thought that It is possible to backup TA partition with iovyroot here. It is working on Lollipop. So if you upgraded to Mashmallow, you need to downgrade with flashtool here which does not unlock the bootloader. After downgrade It is possible to backup DRM keys I think isn't it?
Yes downgrade then unlock boot loader then root then relock with DRM keys.
Sent from my E6633 using XDA-Developers mobile app
---------- Post added at 12:27 PM ---------- Previous post was at 12:27 PM ----------
It will say boot loader status relocked in service menu
Sent from my E6633 using XDA-Developers mobile app
I am completely baffled. I managed to restore ALL my original DRM keys!
I lost them while unlocking the bootloader, and then rooted my device. I also didnt do my homework and didn't realise I would lose all the DRM keys. When I factory resetted my device, using companion, I got my phone working on android 7.0 again, but ofcourse the drm keys were gone. Filming was almost impossible and fingerprint was not working etc.
And for whatever reason, guess I was bored, I unlocked the bootloader again, since it wouldn't matter anyway. So I unlocked the bootloader with oem unlock and the sony developer site, and then the device started rebooting. It looked like a bootloop, it took about 5 minutes, everything on my phone was gone (damnit). But when I tried fingerpringt, camera, everything worked like before! I have no idea how this happened but maybe this'll work for anyone here. aswell! From now on I'm not gonna touch ANYTHING anymore, since I just don't have enough developer knowledge.
btw: I made an account on this site especially to share this information with you :highfive:
Weslietje said:
I am completely baffled. I managed to restore ALL my original DRM keys!
I lost them while unlocking the bootloader, and then rooted my device. I also didnt do my homework and didn't realise I would lose all the DRM keys. When I factory resetted my device, using companion, I got my phone working on android 7.0 again, but ofcourse the drm keys were gone. Filming was almost impossible and fingerprint was not working etc.
And for whatever reason, guess I was bored, I unlocked the bootloader again, since it wouldn't matter anyway. So I unlocked the bootloader with oem unlock and the sony developer site, and then the device started rebooting. It looked like a bootloop, it took about 5 minutes, everything on my phone was gone (damnit). But when I tried fingerpringt, camera, everything worked like before! I have no idea how this happened but maybe this'll work for anyone here. aswell! From now on I'm not gonna touch ANYTHING anymore, since I just don't have enough developer knowledge.
btw: I made an account on this site especially to share this information with you :highfive:
Click to expand...
Click to collapse
Welcome to XDA, and thanks for going through the trouble of creating an account to share information.
However, some of the information you shared is either wrong or misinformed.
Also, this thread is quite old, digging up old threads is generally frowned upon.
First of all, if you never made a backup of your DRM keys before unlocking your bootloader, then those keys are gone. Forever. There's absolutely no possible way of restoring them.
Second, missing DRM keys do not cause the camera or fingerprint scanner to stop working. Only certain "enhancement features" are disabled, such as X-Reality that makes images appear sharper and more vivid when viewing photos/videos, or advanced low light noise reduction when taking pictures.
Many of those DRM-reliant features can be re-enabled by applying a DRM fix patch that can be found on the XDA forums.
The fingerprint scanner is disabled for certain region's firmware by Sony via software means, but it is not dependent on DRM.
You probably messed up somewhere flashing or rooting your firmware, causing functions like the camera and fingerprint scanner to not work. Do a factory reset or clean flash in case this happens.
And finally, it is clearly worded on the web page where you go to unlock the bootloader that your phone will automatically perform a factory reset upon unlocking the bootloader, so you shouldn't be surprised that all your data was erased. It's expected behavior.
You should always backup your data before fiddling with your phone, it's good practice and common sense.
So in conclusion, no, there's no way of restoring the DRM keys without a prior backup. You didn't manage to restore it.
Here's how to verify if your DRM keys are present:
In the dialer, input *#*#7378423#*#* to enter the service menu
Service tests > Security
If your keys are intact, the first three lines should all say [Key OK][Active], and at the bottom FIDO_KEYS : Provisioned
You probably fixed your camera and fingerprint issues by performing a factory reset unknowingly, which is done automatically when you unlock the bootloader as mentioned.
mhaha said:
***
Click to expand...
Click to collapse
Wow, I guess I'll just stick to reading this forum and finding solutions for my problems instead of trying to give advice. That'll look like a homeless guy, giving financial advise. Thanks for the large explanation anyway!:good:

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.

Root and keep DRM

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?

Categories

Resources