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

Search This thread

zxz0O0

Senior Member
Apr 18, 2011
1,533
5,169
My next problem was that CWM, for some weird reason, did not have access to the internal or external storage. It kept saying "can't mount /sdcard" and there was no way around it. I eventually decided to try holding volume down when booting and using TWRP instead. From there, everything worked fine. I was able to format /system and flash the other files without problems.

Glad it worked now and sorry for your frustration. Is your sd card formatted in exFat or Fat32? What's the capacity?
 

cyrilp

Senior Member
Sep 5, 2006
772
449
hi thank you for your guide.

After step 20, when i try to turn the phone on it's stuck on "sony". Any idea ? everything went fine so far
 

zxz0O0

Senior Member
Apr 18, 2011
1,533
5,169
hi thank you for your guide.

After step 20, when i try to turn the phone on it's stuck on "sony". Any idea ? everything went fine so far

Can you still get into the recovery menu? If not I'm afraid you did something wrong and it's probably the best you start again.
 

nemphis

Senior Member
Nov 9, 2006
107
17
13 Run Z1C-lockeddualrecovery

13 Run Z1C-lockeddualrecovery(...)installer.zip's install.bat and select option 3 [Installation on unrooted ROM] ( http://nut.xperia-files.com/ )

how exeactly is this be done?
cant get it working.
adb devices, z1 is regognized, what commands should be given after that????

thanx in advance! :)
 

wyt18

Senior Member
Thanks for the tip below ... could anyone help by being more specific as to which steps it replaces on the guide on page 1?

There is a better solution to restore your stock rom. Steps is:

adb push busybox /data/local/tmp/
disconnect usb cable

open terminal emulator and do:
cd /data/local/tmp
chmod 755 busybox
./busybox tar pczvf /storage/removable/sdcard1/system.tar.gz /system

now you have full system backup in your external sdcard. Ater rooting, simple do:
cd /
busybox mount -o remount,rw /system
busybox tar xzvf /storage/removable/sdcard1/system.tar.gz
reboot

done :)

Another thing. Any one confirm - current rooting status is safe??? Are you 100% sure??? Did you checked bootloader version, version of the other things...etc, are you sure something is not broken by flashing xperia z1 firmware, for example did your phone got touchscreen firmware flashed from z1, any strange thing after all that...???
 

moesus

Senior Member
Nov 4, 2009
119
23
As far as I know you can do it OTA (not with an unlocked bootloader though) and yes I'm pretty sure it will unroot the device.

Sorry, not a pro about this... Is there a way to choose certain options in flashtool when flashing a ftf file, so that I can keep root? Thanks :)

Sent from my D5503 using XDA Premium 4 mobile app
 

zxz0O0

Senior Member
Apr 18, 2011
1,533
5,169
Hey dudes,

cant re-lock on my Z1c with a successful boot-up anyone else got the same issue? steps I've tried are in my other post

http://xdaforums.com/showthread.php?t=2657092

Any advice would be great :)

Cheers.

Antz
Did you follow the steps from the first post of this thread to lock your bootloader? Which kernel / rom are you using?

13 Run Z1C-lockeddualrecovery(...)installer.zip's install.bat and select option 3 [Installation on unrooted ROM] ( http://nut.xperia-files.com/ )

how exeactly is this be done?
cant get it working.
adb devices, z1 is regognized, what commands should be given after that????

thanx in advance! :)
You download the file from the url and unpack it. Inside is a install.bat file. Double click it to open it. Then you can select option 3.

Sorry, not a pro about this... Is there a way to choose certain options in flashtool when flashing a ftf file, so that I can keep root? Thanks :)

Sent from my D5503 using XDA Premium 4 mobile app

I don't think it's possible (because the new firmware will overwrite system and kernel) with flashtool, maybe if you flash it in CWM.
 

F308

Senior Member
Feb 25, 2013
437
66
EU
In point 15 - Flash D5503_14.2.A.1.114_Generic UK.ftf - question

may I flash D5503_14.2.A.1.114_CE.ftf ?
I live in Central Europe and formerly CE packages worked very well for me.
Would like to stick with them.
 

marcolorenzo

Senior Member
May 17, 2012
315
48
13 Run Z1C-lockeddualrecovery(...)installer.zip's install.bat and select option 3 [Installation on unrooted ROM] ( http://nut.xperia-files.com/ )

how exeactly is this be done?
cant get it working.
adb devices, z1 is regognized, what commands should be given after that????

thanx in advance! :)

Not sure if you had the same problem as me. I was also stuck on Step 13. I pressed 3 and then it just stopped at "Waiting for device to connect" even though Windows confirmed that me device was connected with a sound. So I went into device manager and lo and behold, there was a yellow triangle next to the device "6903" (this might not be the exact number as I can't remember but it was something like that). So I right clicked on it, chose update drivers and pointed it towards where my Z1 Compact drivers were located which I downloaded from the Sony website and voila, install.bat worked! So even if you've installed the drivers from Step 1, because the firmware for your phone is now different, I guess the computer doesn't recognise it any more so you will have to install the drivers again.

Maybe zxz0O0 can put this in the original post?

EDIT: My problem now is that I don't know how to turn the phone off. I tried holding the power button but nothing happens (no vibration, nothing displayed on the screen). So basically I completed Step 14 but I can't go on because I can't switch the phone off. I tried to boot in flashmode but I guess I need to switch the phone off first because when holding the volume down key and plugging in the USB cable, Flashtool shows that the device is not in flashmode. Please help!
 
Last edited:
  • Like
Reactions: zxz0O0

euronaut

Member
Feb 22, 2014
18
2
Not sure if you had the same problem as me. I was also stuck on Step 13. I pressed 3 and then it just stopped at "Waiting for device to connect" even though Windows confirmed that me device was connected with a sound. So I went into device manager and lo and behold, there was a yellow triangle next to the device "6903" (this might not be the exact number as I can't remember but it was something like that). So I right clicked on it, chose update drivers and pointed it towards where my Z1 Compact drivers were located which I downloaded from the Sony website and voila, install.bat worked! So even if you've installed the drivers from Step 1, because the firmware for your phone is now different, I guess the computer doesn't recognise it any more so you will have to install the drivers again.

Maybe zxz0O0 can put this in the original post?

EDIT: My problem now is that I don't know how to turn the phone off. I tried holding the power button but nothing happens (no vibration, nothing displayed on the screen). So basically I completed Step 14 but I can't go on because I can't switch the phone off. I tried to boot in flashmode but I guess I need to switch the phone off first because when holding the volume down key and plugging in the USB cable, Flashtool shows that the device is not in flashmode. Please help!

as mentioned in
Questions•How do I power off my phone if the screen is blank or the phone is not responding?•Hold Volume Up and then hold the power button. After the phone vibrated 3 times it will shut down.

;)
 
  • Like
Reactions: marcolorenzo

FlintStoned-

Senior Member
Apr 4, 2013
210
34
Belgium
www.hoolite.be
I think I messed up.. bad.. I'm stuk at step 12. I'm running the install.bat file and I can't get any further then: Waiting for Device, connect USB cable now...

My device is plugged in, since the green light is on. So.. nothing is happening. I also can boot up my phone. What now? Any suggestion?
 

marcolorenzo

Senior Member
May 17, 2012
315
48

Haha I was just trying different button combinations and stumbled on it. Then I came on the forum only to find your response. Thanks a lot though! I was sure I read the FAQ. Guess I need to be a bit more thorough!

---------- Post added at 11:38 PM ---------- Previous post was at 11:27 PM ----------

I think I messed up.. bad.. I'm stuk at step 12. I'm running the install.bat file and I can't get any further then: Waiting for Device, connect USB cable now...

My device is plugged in, since the green light is on. So.. nothing is happening. I also can boot up my phone. What now? Any suggestion?

Look at my post #51.
 

FlintStoned-

Senior Member
Apr 4, 2013
210
34
Belgium
www.hoolite.be
Look at my post #51.


I'm not having driver issues I think. There is no yellow triangle to see, so it must work 'perfectly'. I did notice that, when I run the install.bat while flashtool is running, nothing is happening. If I close it, the install.bat runs but tells me there is no device found. So I'm back to zero. Still can't boot up phone. Any more solutions?
 

zxz0O0

Senior Member
Apr 18, 2011
1,533
5,169
I'm not having driver issues I think. There is no yellow triangle to see, so it must work 'perfectly'. I did notice that, when I run the install.bat while flashtool is running, nothing is happening. If I close it, the install.bat runs but tells me there is no device found. So I'm back to zero. Still can't boot up phone. Any more solutions?

Try (force) power off your phone. Then power on normally (screen will be blank). After 10seconds plug in your usb cable to your computer (maybe try another USB port). Check in device manager if everything is ok. Then try again with install.bat

If it still doesn't work: Are you sure that you enabled usb debugging in step 10 and checked all the correct options in step 11 (select Wipe [Uncheck ALL] and Exclude [Check ALL except kernel and system]) ?
 

LaizyJumper

Senior Member
Jul 13, 2010
99
29
I think I messed up.. bad.. I'm stuk at step 12. I'm running the install.bat file and I can't get any further then: Waiting for Device, connect USB cable now...<br />
<br />
My device is plugged in, since the green light is on. So.. nothing is happening. I also can boot up my phone. What now? Any suggestion?
I had the same problem with Windows XP. Finally solved it by running the installer script on my Linux PC. But it actually may require z1 drivers at that step, not z1c drivers. Devices have different IDs...
 

FlintStoned-

Senior Member
Apr 4, 2013
210
34
Belgium
www.hoolite.be
Try (force) power off your phone. Then power on normally (screen will be blank). After 10seconds plug in your usb cable to your computer (maybe try another USB port). Check in device manager if everything is ok. Then try again with install.bat

If it still doesn't work: Are you sure that you enabled usb debugging in step 10 and checked all the correct options in step 11 (select Wipe [Uncheck ALL] and Exclude [Check ALL except kernel and system]) ?

I'm pretty sure I did. I flashed it back to normal ftf. I'll try again later today, I'll keep you posted. (Not that you're waiting for it..)
 

cyrilp

Senior Member
Sep 5, 2006
772
449
Can you still get into the recovery menu? If not I'm afraid you did something wrong and it's probably the best you start again.

No i can't. so i started over from step 8, but again at step 20 i get stuck with the sony logo when i try to power on and i can' t get into recovery either :(

I don't know if it's related be when i enter "recovery mode" i get a error message about "brightness" (it was yesterday so i don't remember the message exactly)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 105
    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://xdaforums.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://xdaforums.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://xdaforums.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://xdaforums.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://xdaforums.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://xdaforums.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://xdaforums.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)
      • Hold Volume Up and then hold the power button. After the phone vibrated 3 times it will shut down.
    • My Antivirus detects flashtool as malware?
      • That's a false positive. flashtool is not malware.
    • How can I verify if my bootloader is locked/unlocked?
      • Type in phone *#*#7378423#*#* and go to Service Info => Configuration. If bootloader is unlocked it will say: "Bootloader unlocked: Yes". If it says something else like "Bootloader unlock allowed: Yes", it means the bootloader is locked.
    • I am currently on firmware x, can I still follow this guide?
      • Yes, it does not matter which firmware you come from.
    • How to remove recovery and root?
      • Simply flash an official firmware ftf in flashtool. Wipe userdata is not required, but recommend.

    Questions from old guide:

    Many thanks to:
    • Darkimmortal
    • RyokoN
    • [NUT]
    • DooMLoRD
    • All the great devs that made these tools
    • raph84
    8
    Hi guys, thanks first up for ALL the help i've been getting in the Q&A section... like santaCruz guy above, I almost am ready to chuck this phone.

    Last week I followed this root procedure and it worked. After playing with ROMs today and wanting to restart/reset, I followed the same procedures from Step 1 ... but noticed THEY HAVE BEEN UPDATED RECENTLY WITH NEW FILES REQUIRED.

    I can confirm that (same as santaCruz above) that this procedure does NOT work using the D5503_14.3.A.0.757_Generic_UK-nosystem.ftf file.

    I downloaded the old "681" file and flash ... it gets me to PhilZ boot recovery ... i.e. I now get to step 17 and continue my journey.

    Can someone please look into this!
    5
    Hi guys! Maybe this little note would be a good caution to some...

    Caution:

    Restoring a TA Backup from JB on a KitKat ROM breaks X-Reality engine temporarily on your phone. A fix for this is to

    1. Reflash the whole KitKat FTF(exclude system & check reset customizations)
    2. Factory reset your phone.

    Without doing the steps above you won't be able to play Music/Video Unlimited & X-Reality on your phone even if you already restored your DRM keys and have a locked bootloader.
    4
    Hi zxz0O0,

    Thanks for writing this up, even though it's essentially a rewrite of Darkimmortals tutorial.

    Please be aware that this is not quite "Noob proof" yet!

    As someone who hasn't flashed an Android phone since 2011, I ran into a few issues / concerns:

    a) "Install fastboot & flashmode drivers from Flashtool"
    Depending on the operating System (for me: Windows 8.1 x64), Driver Signature check needs to be disabled in order to do that.

    b) Zips to SD-Card: It's worth pointing out that "put it on your SD Card" literarilly means "Copy the ZIP to the root of your SD Card". I wasn't sure (should I unzip it? What to do with it?)

    c) It would make sense to add the flashing instructions before the "flash..." statement.
    I was smart enough to read the full instructions, yet I can imagine some people to read "flash C6903 (...)"... okay. Click flash, continue reading: "select Wipe [Uncheck ALL]" oh no!

    d) "Run Z1C-lockeddualrecovery(...)installer.zip's install.bat"
    In order to do that, you need adb-tools (the bat would just throw "File not found" errors), possibly also extract the content of the ZIP to the ADB-Tools directory (that's what I did).

    e) "Now format /system"
    Afraid to do the wrong thing, I read this six times and checked Darkimmortals instructions "Factory reset and clear for rom installation" [this appeared a bit more clear]
    The actual steps are called
    1: "Wipe Data/Factory Reset"
    2: "Clean to Install a New ROM"


    Note that I stopped after "Congratulations, your phone is now rooted (bootloader still locked)"
    I just wanted Root for some tools and am quite happy with the factory Rom (want to keep my DRM Keys and Warranty).

    Thanks!
    raph
    3
    Go to Backup TA folder, open folder backup/ and extract your TA backup. Open TA.img in hex editor (or text editor probably also works) and search for "NEW_VERSION" (first occurence), shortly after that there should be "fs_version:" (e.g. mine is fs_version:EURO-LTE_14.2.A.1.114 => so I would use 14.2.A.1.114 to restore my TA backup)