[GUIDE] Back up DRM Keys & unlock/relock Bootloader (Noob proof)

rash191

Member
Jan 14, 2016
13
4
0
should i relock bootloader first or restore drm keys?

I have installed stock rom and rooted it. Now should i relock the bootloader first with flashtool or restore drm keys with backupTA?

I have noticed that when i relock bootloader with flashtool i get locked bootloader in service menu but then when i restore drm keys, it says bootloader unlocked : Yes in service menu.

What are the correct inorder steps to get the phone to factory state?
 

draks69

Member
Apr 15, 2016
6
0
0
no backup of keys

i have a question, i have to take my phone z3 to the service, my phone is boot loader unlocked and rooted, if i install the factory rom and lock the boot loader will this be ok?
i did not backup the key....
 

Frunzdoedel

Senior Member
Sep 19, 2010
191
75
48
Offenbach
i have a question, i have to take my phone z3 to the service, my phone is boot loader unlocked and rooted, if i install the factory rom and lock the boot loader will this be ok?
i did not backup the key....
Nope, without your original TA partition they can refuse the warranty, depends on your country.
They can see that the bootloader was unlocked. ?

Sent from my D5503 using xda premium
 

draks69

Member
Apr 15, 2016
6
0
0
Nope, without your original TA partition they can refuse the warranty, depends on your country.
They can see that the bootloader was unlocked.

Sent from my D5503 using xda premium
thanks for the quick reply, i installed the factory rom, locked the bootloader, installed updates normally from the phone update....
will tack my chances with the warranty. :/
 

endemania

Senior Member
Apr 9, 2011
103
20
0
My phone status : rooted, unlock BL, custom kernel, TWRP recovery (Xperia Z3+ dual E6533). I don't have TA backup image. I have plan to sell my phone, so I must flash ftf file and then re-lock bootloader. my question : how can I restore drm key with lock BL?
 

Frunzdoedel

Senior Member
Sep 19, 2010
191
75
48
Offenbach
My phone status : rooted, unlock BL, custom kernel, TWRP recovery (Xperia Z3+ dual E6533). I don't have TA backup image. I have plan to sell my phone, so I must flash ftf file and then re-lock bootloader. my question : how can I restore drm key with lock BL?
If you unlock your bootloader without backup of your phones ta partition then it is Impossible.

Sent from my D5503 using xda premium
 

happiest1

Member
Apr 17, 2012
20
1
0
i can't restore

i have backup file befor unlock boot loader but i can't restore my backup drm keys
look at pic attachment

my device is z3 dual sim d6633​
 
Last edited:

ivanmemento

Senior Member
May 28, 2010
68
2
0
I can't restore, error find.exe

Hello, when i try to restore, my backup (in folder with backup 9.1.1) did not reach the phone, i am running android 4.4 i don0t remember in wich version i take the backup but please can somebody help me, i need to sell it :) but camera is so bad without drm. thanks a lot in advance!
 

Andres4788

New member
Aug 22, 2012
2
0
0
Cartago
How to retore DRM and relock BootLoader.

This is a step by step tutorial on how to back up your DRM keys (TA Partition, to revert to factory state in case of warranty issue) and unlock the bootloader. After unlocking the bootloader you will lose your DRM keys so it's good to make a backup of it (it's optional though). Basically no DRM keys means no warranty and unlocked bootloader means no warranty. Read also here for additional info: http://forum.xda-developers.com/showthread.php?t=2292598

Make sure to read the 'Questions' (bottom of the post) if you encounter any problems!

Rooting
First of all you need to have root access to backup your DRM keys.

Follow this thread to get root: http://forum.xda-developers.com/showthread.php?t=2784900


Old method:
Follow these steps, after that you will have an unbranded UK KitKat (4.4) firmware with root access (if you rather want JellyBean 4.3, check out 'Questions' down below). Thanks to Darkimmortal for the steps (I added some steps and made it easier to follow).

Take a backup of your phone because it will be wiped!

Video:
Video by @shem2409


  1. Contribute to this thread: http://forum.xda-developers.com/showthread.php?p=52011642
  2. Install Z1 Compact USB drivers ( http://developer.sonymobile.com/downloads/drivers/ )
    It's possible that Z1 Compact drivers are already installed, if you have installed Sony PC Companion.
  3. Install Flashtool ( http://www.flashtool.net/index.php )
  4. Install fastboot & flashmode drivers from Flashtool (go to the installation directory and open the folder drivers/) (note: if you have Windows 8.1 64bit you need to disable Driver Signature check: Link)
  5. Download SuperSU and put on your SD card (do not unzip) ( http://download.chainfire.eu/supersu )
    Note: There might be problems with large SD cards (32GB and bigger). You can also put the files on your internal storage: Follow steps 5-7 after step 11.
  6. Download latest Z1C-lockeddualrecovery(...)flashable.zip and put on your SD card (do not unzip) ( http://nut.xperia-files.com/ )
  7. Download z1c-44-uk.system.flashable.zip and put on your SD card (do not unzip) ( https://drive.google.com/file/d/0B8nLbtP1HtINcENMbjdSdnJteDA/edit?usp=sharing | mega mirror )
  8. Download SO-02F_14.1.H.1.281_docomo.ftf and put it in the installation directory of flashtool in the folder firmwares/ ( http://dl.weeaboo.com/Z1Compact/SO-02F_14.1.H.1.281_docomo.ftf | share-online mirror | mega mirror )
  9. Open flashtool, select Flash => Flashmode and flash SO-02F_14.1.H.1.281_docomo.ftf (select Wipe [Check ALL] and Exclude [Check TA, BASEBAND, FOTA])
  10. Wait atleast 30 seconds then power off your phone, hold volume down and plug in your USB cable (your phone will boot in flashmode)
  11. After flashtool flashed the firmware successfully, remove the cable and power on the phone (will take some time) and go to Settings => 'About phone' and press 7 times on 'Android Build'. This will unlock the Developer options in Settings. Enable USB debugging under Developer options and check 'Unknown sources' under Security.
  12. Now flash C6903_14.1.G.534_ianford10_UK Unbranded_modified.ftf in flashmode (boot phone in flashmode again) (select Exclude [Uncheck ALL] and Wipe should be empty) ( https://drive.google.com/file/d/0B8nLbtP1HtINbkdUX0hwQk9BN3M/edit?usp=sharing | mediafire mirror | share-online mirror )
  13. Start your phone normally and plug in your USB cable (screen will be black, this is normal and it will stay like that until you finish step 16)
  14. Download and extract Z1C-lockeddualrecovery(...)installer.zip. Then run install.bat and select option 3 [Installation on unrooted ROM] ( http://nut.xperia-files.com/ )
    Note: This is actually a different file as the one you downloaded on step 6. You're supposed to run this one here on your computer.
  15. After the process is finished and you get a confirmation that your device is rooted, hold Volume Up and hold the power button. After the phone vibrated 3 times it will shut down. (This is force power off)
  16. Flash D5503_14.3.A.0.681_Generic_UK-nosystem.ftf in flashmode (boot phone in flashmode again) (select Wipe [Uncheck ALL] and Exclude [Uncheck ALL]) ( http://www.mediafire.com/download/g1mahcm5y8cax2q/D5503_14.3.A.0.681_Generic_UK-nosystem.ftf | mega mirror )
  17. Go to the Recovery Menu. To do that, power off your phone. Then power it on again. After the vibrate and the green LED turns on, hold Volume Up (LED will turn violet). PhilZ Touch recovery will open.
  18. Try to flash SuperSU zip. If it doesn't work, switch to TWRP recovery (Volume Down) and try there.
  19. Now format /system (located under Mounts & Storage) (Important: Do NOT reboot until advised so or you will have to start again)
  20. Do a factory reset in the Recovery Menu
  21. Install the following files in this order (Important) (see steps 5 - 7)
    1. z1c-44-uk.system.flashable.zip
    2. Z1C-lockeddualrecovery(...)flashable.zip
    3. UPDATE-SuperSU-v1.(...).zip
  22. Optional: Update to the latest firmware with this guide: http://forum.xda-developers.com/showthread.php?t=2688933
  23. Reboot your phone
  24. Congratulations, your phone is now rooted (bootloader still locked)
DRM keys Backup
Now since your phone is rooted you can proceed with backing up your DRM keys (TA partition). Follow these steps:
  1. Enable USB debugging on your phone (go to Settings => 'About phone' and press 7 times on 'Android Build'. This will unlock the Developer options in Settings. Enable USB debugging under Developer options and check 'Unknown sources' under Security.)
  2. Download Backup TA and start Backup-TA.bat ( http://forum.xda-developers.com/showthread.php?t=2292598 )
  3. Select Option 1 (Backup) to backup your TA partition
  4. After the process succeded your backup will be in the folder backup/ (Make a backup of the backup!)
  5. Congratulations, you have now a backup of your DRM keys. You can also use Backup TA to restore your TA partition. It is recommend to have the same firmware when restoring as you had when you backed it up (see here: http://forum.xda-developers.com/showpost.php?p=52745293&postcount=299 )

Unlocking bootloader
Now if you have a backup of your DRM keys you are ready to unlock the bootloader. You need to have an unlocked bootloader to install Custom Roms, test builds, etc.

Make a backup because your SD card will be formatted!

Follow this guide to unlock the bootloader: http://forum.xda-developers.com/showthread.php?t=2440597
Yes, it also works for Z1 Compact, all the steps are the same. You can skip installing the drivers since you should already have them from the steps above.


Relock bootloader only
If you want to relock your bootloader (e.g. for downloading official sony updates in Sony Update Service) you can do so with flashtool. This only works if you already unlocked the bootloader with the official method.
Note: This does not restore the DRM keys. If you have a warranty issue you should restore your TA parition (which will relock your bootloader and restore DRM keys) with Backup TA.
  1. Open flashtool
  2. Click on the BLU icon
  3. Connect your phone in flashmode (hold volume down and plug in your USB cable)
  4. Flashtool will ask you about the device model, choose Sony XPERIA Z1 (if Z1 compact is not in the list)
  5. Flashtool will read your IMEI and your unlock code. Check if those are correct (compare unlock code with the one you received by email from Sony when you unlocked the bootloader)
  6. Flashtool will save the unlock code in its program folder under custom/mydevices.
  7. Click "Lock bootloader" (-> If you want to unlock it again, repeat the steps (it will automatically detect that your bootloader is locked))


Questions
  • How do I power off my phone if the screen is blank or the phone is not responding? (Force power off)
  • My Antivirus detects flashtool as malware?
  • How can I verify if my bootloader is locked/unlocked?
  • I am currently on firmware x, can I still follow this guide?
  • How to remove recovery and root?

Questions from old guide:
  • Is my language still available after flashing this English firmware?
  • After flashing docomo firmware, my phone is not recognized anymore?
  • I don't like KitKat (4.4), what can I do to get on JellyBean (4.3) rooted?
  • My browser saved the ftf files as *.zip. Is it ok to just rename them to .ftf?
  • I finished the guide but I still have some leftovers of DoComo (apps, sheep sound)?
  • I don't want to flash the UK firmware, are there any other firmwares?
  • I can't access the flashable files in recovery, there are error messages in recovery "can't mount"?
  • Flashtool does not recognize the firmwares, even though I put it into the correct folder?
  • Why is the rooting procedure so damn complicated?
  • How do I install the Z1 Compact USB drivers? There is no exe file?
  • I can't install the Z1 Compact drivers because my phone doesn't boot?
  • I can not install dualrecovery, Windows says it's unable to install MTP drivers?
  • I can not install dualrecovery, it says "Waiting for device to connect"?

Many thanks to:
  • Darkimmortal
  • RyokoN
  • [NUT]
  • DooMLoRD
  • All the great devs that made these tools
  • raph84
Hi everyone, I have the DRM backup my Xperia Z2, but I want back to stock rom, restoring my DRM Keys and relock BootLoader.

can help me, please?
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone