yashsingh1/xdaforums huggingface dataset:
[Xperia Z1 Compact General] zxz0O0:
It does not matter how you flash it, as long as you have root. You can get root by flashing a pre-rooted zip, by using Easy Root Tool or any other or by custom kernel.

You can read here about cust# ( http://xdaforums.com/showthread.php?p=52011642 ) but as I said I don't think it's that important.
[Xperia Z1 Compact General] EpicLPer:
I tried to flash the "EURO-LTE_14.2.A.1.114" version (the one I used for making the TA Backup) but all I got was this error in the Flashtool:

20/048/2014 22:48:53 - INFO - Device connected in flash mode
20/048/2014 22:48:54 - INFO - Opening device for R/W
20/048/2014 22:48:54 - INFO - Start Flashing
20/048/2014 22:48:54 - INFO - Processing loader.sin
20/048/2014 22:48:54 - INFO - Checking header
20/048/2014 22:48:54 - ERROR - Processing of loader.sin finished with errors.
20/048/2014 22:48:54 - INFO - Ending flash session
20/048/2014 22:48:54 - ERROR -
20/048/2014 22:48:54 - ERROR - Error flashing. Aborted
20/048/2014 22:48:55 - INFO - Device connected in flash mode
[Xperia Z1 Compact General] EpicLPer:
Heya!

PS.:

I managed to flash the stock ROM now, was just a weird Flashtool error...

Tried to use your Easy Root tool as you told me but it failed, it says:

==============================================
= =
= Easy Root Tool v11 =
= Supports various Xperia devices =
= created by zxz0O0 =
= =
= http://xdaforums.com/ =
= showthread.php?p=53448680 =
= =
= Many thanks to: =
= - [NUT] =
= - geohot =
= - MohammadAG =
= - cubeundcube =
= - nhnt11 =
= - xsacha =
= =
==============================================

* daemon not running. starting it now on port 5037 *
* daemon started successfully *
=============================================
Waiting for Device, connect USB cable now...
Make sure you have only one Android device connected
BlueStacks emulator can also cause problems
=============================================
Device found

=============================================
Getting device variables
=============================================
Device model is D5503
Firmware is 14.2.A.1.114

=============================================
Sending files
=============================================
119 KB/s (1585 bytes in 0.013s)
2489 KB/s (657704 bytes in 0.258s)
276 KB/s (1133 bytes in 0.004s)
1324 KB/s (9496 bytes in 0.007s)
1907 KB/s (13672 bytes in 0.007s)

Copying kernel module...
2244 KB/s (34473 bytes in 0.015s)
124 KB/s (767 bytes in 0.006s)
1474 KB/s (13592 bytes in 0.009s)
Kernel version is 3.4.0-perf-ga439037-01014-gdd051d5
Version does not match 3.4.0-perf-ge4322cd, needs patching...
1+0 records in
0+1 records out
34 bytes transferred in 0.001 secs (34000 bytes/sec)
Kernel module patched.

modulecrcpatch (by zxz0O0)

module_layout: patched to 0xD87FCB74
__aeabi_unwind_cpp_pr1: match
kallsyms_lookup_name: not found
printk: not found
mem_text_write_kernel_word: not found
__aeabi_unwind_cpp_pr0: match
successfully patched

=============================================
Loading towelzxperia
=============================================
1659 KB/s (13592 bytes in 0.008s)
2535 KB/s (197320 bytes in 0.076s)
=============================================

Waiting for towelzxperia to exploit...

towelzxperia by zxz0O0 (EasyRootTool Version)
libexploit by geohot

libzxploit.so created
doing the magic
creating vm (loljavasucks)
insmod: init_module '/data/local/tmp/wp_mod.ko' failed (Exec format error)
mount: Operation not permitted
/system/bin/chcon: Could not label /system/xbin/su with u:object_r:system_file:
s0: No such file or directory
chcon: Could not label /system/xbin/su with u:object_r:system_file:s0: No such
file or directory
sh: /system/xbin/su: not found
cleaning up
done

Checking if device is rooted...
Error: device not rooted
[Xperia Z1 Compact General] asterixmic:
Hello

A few months ago I relocked the bootloader, but I did not check the lock code if it was correct.

Right now I can not unlock it again and I also don't have the previous files of flashtool.

I have searched and tried everything that I found and still can not unlock it.

Is there any way that the unlock code might be different now?

First time I try it says command failed.

After that it says device already rooted.

I am running official firmware, not rooted.

Thanks
[Xperia Z1 Compact General] zxz0O0:
Did you relock the bootloader with flashtool or by restoring the TA backup? It's not possible for the unlock code to be changed. Have you tried unlocking the bootloader through flashtool?
[Xperia Z1 Compact General] asterixmic:
I have locked it using flashtool.

Now I tried relocking it using both flashtool and fastboot command.

In both cases at first run I get failed, no reason. At second run I get "device already rooted" .

The bootloader is confirmed to be unlockable.

I also tried the trick with the folder and file but still no luck. The tutorials I found pointed to a folder structer that is different in the current build of flashtool, though.
[Xperia Z1 Compact General] zxz0O0:
Have you made a TA backup with locked bootloader? Try restoring that.

If not, create a TA backup now and send it to me for analysis.
[Xperia Z1 Compact General] asterixmic:
Thanks for trying to help me and replying to the PM.

I figured it out eventually:

- the ulcode.txt needs to reside in C:\Users\[your_username]\.flashTool\registeredDevices\[phone's_serial_number]

I always thought that this could be the issue because the previous tutorials I found were referencing an older path of an older flashtool version.

But when I did a TA backup directly from flashtool and saw that the folder for a specific device is the one from above, I tried creating the ulcode.txt over there.

And it did work :)
[Xperia Z1 Compact General] freeman94:
Hi.

I have question and please answer me if I'm understanding this correct.

Let say I'm on Custom Rom, with bootloader unlock then I have missing this Sony's technnology X-reallty and others, cuz of bootlaoder drm keys missing.

But if I Relock the bootloader, and restore the copy of the drm key, and then flash the official sony firmware, then I'm like on STOCK with all this functionalty of Sony's working?

Will I get back the sony image processing etc stuff?

Please Answer.
[Xperia Z1 Compact General] Frunzdoedel:
Yes but be aware that you need at first be on stock and then restore your TA partition.
[Xperia Z1 Compact General] freeman94:
Thank, you for answer.

One more thing, let say that for now I will stay with stock lollipop 5.0.2 firmware and only root my device to tweak some thing by myself.

In my old device with was the LG L90 after rooting on stock rom, I could not anymore update the software over OTA or the LG Suite as it was giving me the message that the device have super user privilages, and the update can't be done, It's was some kind of LG safty procasions, don't know why they bother. To fix that I had to unroot=>update and then root again, so going back to my question.

Does Sony makes such practices to advanced users to make life difficult for them?

---------- Post added at 10:20 PM ---------- Previous post was at 10:18 PM ----------

EDIT: Only Bootloder Unlocking delete drm keys, rooting doesn't right?
[Xperia Z1 Compact General] freeman94:
@up
[Xperia Z1 Compact General] templeka:
Rooting doesn't mess with drm keys.
[Xperia Z1 Compact General] codified:
I'm on KitKat 4.4.2 with locked bootloader and root. What is the best way to update to Lollipop without losing root?
[Xperia Z1 Compact General] Premananda_laishram:
I unlocked my bootloader without backing up TA. However, I did not flash any custom ROM. In the meantime, I tested whether my TA could be backup and it indeed was successful. At this point what I want to know is whether the backup-ed TA is indeed what everybody is concerned about i.e., DRM keys??? Or am I just fooling around??
[Xperia Z1 Compact General] K.s_Tuan:
Video toturial to backup DRM keys

https://www.youtube.com/watch?v=pWMYnXUBERo
[Xperia Z1 Compact General] Poomr95:
Hi Guys I want to ask you. If I unlocked bootloader unlocked already and relocked again so it means I can't get my DRM keys ? If there there is any possibilty to get in my sutiation, please help. :)
[Xperia Z1 Compact General] Frunzdoedel:
When you unlock your phones bootloader without a ta backup your phones drm keys are gone forever, in short no.
[Xperia Z1 Compact General] rash191:
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?
[Xperia Z1 Compact General] draks69:
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....
[Xperia Z1 Compact General] Frunzdoedel:
Nope, without your original TA partition they can refuse the warranty, depends on your country.

They can see that the bootloader was unlocked. ?
[Xperia Z1 Compact General] draks69:
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. :/
[Xperia Z1 Compact General] endemania:
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?
[Xperia Z1 Compact General] Frunzdoedel:
If you unlock your bootloader without backup of your phones ta partition then it is Impossible.
[Xperia Z1 Compact General] EHSAN™:
whats this errors:
[Xperia Z1 Compact General] pou_gh2:
when i lock my device no drm keys will come back,plz help bro
[Xperia Z1 Compact General] happiest1:
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​

​
[Xperia Z1 Compact General] ivanmemento:
same problem

hello, i got the same problem, have you solved it? thnks
[Xperia Z1 Compact General] ivanmemento:
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!
[Xperia Z1 Compact General] Andres4788:
How to retore DRM and relock BootLoader.

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?
[Xperia Z1 Compact General] zxz0O0:
Glad it worked now and sorry for your frustration. Is your sd card formatted in exFat or Fat32? What's the capacity?
[Xperia Z1 Compact General] cyrilp:
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
[Xperia Z1 Compact General] zxz0O0:
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.
[Xperia Z1 Compact General] leddra2k:
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
[Xperia Z1 Compact General] nemphis:
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! :)
[Xperia Z1 Compact General] wyt18:
Thanks for the tip below ... could anyone help by being more specific as to which steps it replaces on the guide on page 1?
[Xperia Z1 Compact General] moesus:
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 :)
[Xperia Z1 Compact General] zxz0O0:
Did you follow the steps from the first post of this thread to lock your bootloader? Which kernel / rom are you using?

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.

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.
[Xperia Z1 Compact General] F308:
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.
[Xperia Z1 Compact General] zxz0O0:
It should be possible. Check out this thread, user euronaut asked the same question: http://xdaforums.com/showthread.php?t=2658186 ;)

Report back if everything worked.
[Xperia Z1 Compact General] marcolorenzo:
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!
[Xperia Z1 Compact General] euronaut:
as mentioned in

;)
[Xperia Z1 Compact General] FlintStoned-:
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?
[Xperia Z1 Compact General] marcolorenzo:
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 ----------

Look at my post #51.
[Xperia Z1 Compact General] FlintStoned-:
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?
[Xperia Z1 Compact General] nemphis:
Thanx!! It works now, rooted and unlocked with backup :)
[Xperia Z1 Compact General] zxz0O0:
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]) ?
[Xperia Z1 Compact General] LaizyJumper:
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...
[Xperia Z1 Compact General] FlintStoned-:
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..)
[Xperia Z1 Compact General] cyrilp:
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)
[Xperia Z1 Compact General] zxz0O0:
Are you sure you formatted /system and did a factory reset?
[Xperia Z1 Compact General] cyrilp:
i will try again. When i install lockeddualrecovery at step 13, when i get the message

"Waiting for your device to reconnect.

After entering CWM for the first time, reboot to system to complete this installer if you want it to clean up after itself."

i have to manually force off the phone and turn it on again, otherwise the installation doesn't continue. Is it normal ? Should the reboot be automatic ?
[Xperia Z1 Compact General] FlintStoned-:
Quick question before I start again. Is it really necessary to have an SD card? I've added the things I needed to put on the SD card, in intern storage, I don't own a SD card. Could maybe this be the problem or should it work?
[Xperia Z1 Compact General] zxz0O0:
No it's not normal, you just plug in your phone and install.bat should to everything automatically. At the end you get a confirmation that you are rooted and Installation finished.

It might work on internal storage but I think you'll have put the files to internal storage after step 9 then. Please report back if you tried.
[Xperia Z1 Compact General] avec_style:
I too had to manually restart the phone. It didn't reboot. It just turned off. The end result however was the same --> My phone was succesfullly rooted.
[Xperia Z1 Compact General] FlintStoned-:
Well, I tried again, and again without success. I think the problem might be with having no SD card. I've tried opening the internal storage when phone is connected and there is nothing to see. Maybe that's normal, and maybe it's possible it won't work that way.

Since I don't want to give up, I'm going to the store now and see if I can buy a SD card. I'll try again.

Edit:

Well, I've got my SD card, and that's the only win for me. As I thought that I needed a SD card for step 13, (I thought maybe the install.bat would need some files from the SD card, but I guess I was wrong.) So, still no response after: Waiting for Device, connect USB cable now...

As I did notice that, when Flashtool is still running and install.bat is open, when I close Flashtool the install.bat starts, but it says: error: device not found.

I give up. I keep my fingers crossed for an easy root or other method.
[Xperia Z1 Compact General] zxz0O0:
I'm sorry for you. Have you tried on another computer?
[Xperia Z1 Compact General] FlintStoned-:
Well, that's okay. And yes, I did try it on other computer (other then win 8.1)
[Xperia Z1 Compact General] Didgesteve:
Thanks

I followed the instructions on page one and succesfully rooted my phone, thank you very much for making the steps plain and easy to follow.

The only issue I had was where it said place files on SD card, I placed them on my Ext. SD card, so when it came time to flash them, of course I couldn't read them, doh. Having learned my mistake I started again and it all went smoothly.

Good work...
[Xperia Z1 Compact General] marcolorenzo:
I think you were SUPPOSED to put it on your external SD card (the microSD) but for some reason this CWM didn't recognise mine (possibly because it was exFAT). I also had to start again and then after Step 10, put the files in my internal storage.
[Xperia Z1 Compact General] F308:
I have a question related to this whole thread.

Did anyone perform succesful rooting/unlocking action under linux ?

Flashotool has linux version, obvious.

What I am afraid of is that I finish action in missing coma or colon somewhere in script.

---
[Xperia Z1 Compact General] LaizyJumper:
I was not able to run Flashtool under Ubuntu 10.04. Did not spent too much time with that, eventually it should work, I think. Just some missing dependencies...

But rooting script worked just fine.

Sent from my D5503
[Xperia Z1 Compact General] Riyal:
Hi guys... Just wanna report an issue here. I tried the guide posted on this thread and all went successful. Got my phone rooted, installed recovery & manage to backup my DRM Keys. However the next day I decided to do a factory reset on the recovery then after recovery I selected reboot to system. Upon doing so I was alerted if I want to root my device because su can't be found. What happened here? I thought the superuser app is installed in the system? I just wiped the userdata, cache and tmp files.

Anyways so I decided to select yes instead. After doing so my device rebooted and got stuck at the sony logo. I can't even boot to recovery because the green light doesn't show up anymore. I tried doing a factory reset again using flashtool to no avail hence I decided to flash the full stock ftf and manage to fix the issue.

So I haven't checked the scripts yet but should we really avoid doing a factory reset in the recovery? I think the factory reset broke everything.
[Xperia Z1 Compact General] zxz0O0:
I don't really think that's a problem, however I also got this message in recovery a few times and selected No every time.
[Xperia Z1 Compact General] Riyal:
Yeah checked the script and all are in system partition... But what caused this issue then? Hmmm Could the installation of the su binary from recovery cause it? But what's weird is even with a full factory reset didn't manage to fix the issue.
[Xperia Z1 Compact General] zxz0O0:
My theory is that something got screwed up in the system parition. Factory reset does not touch the system partition and therefore didn't manage to fix the issue.
[Xperia Z1 Compact General] wind0zer:
Could we download the necessary files and start from Step 10, if we install Developer Options - Android Apps on Google Play and enable USB debugging?
[Xperia Z1 Compact General] zxz0O0:
No, step 9 is mandatory.
[Xperia Z1 Compact General] wind0zer:
Also I suppose I'll lose everything I have on the phone including the internal sdcard?Okay it says so in the OP : )
[Xperia Z1 Compact General] Riyal:
Anyways just to be on the safe side... Has anybody already tried unlocking their bootloader and restore the TA backup with success on the Xperia Z1 Compact?
[Xperia Z1 Compact General] wind0zer:
How can I backup the whole phone before proceeding through the steps?
[Xperia Z1 Compact General] RobHands:
Guys i'm stuck at step 13, still says waiting for device. I tried the 3rd time now. Also when I adb devices there is no device id shown, however it shows before I flash step 13. Tried all the troubleshooting advice posted here...
[Xperia Z1 Compact General] wind0zer:
In step 13, after the .bat file did it's job and said it's waiting, I waited for about a couple of minutes. Then I proceeded to the step 14, which is disconnecting & switching it off.

Step 14 is better explained as.....

I messed up step 19, and I redid the whole thing from step 9!
[Xperia Z1 Compact General] Riyal:
The cause why this happens is only either

1. You didn't enable USB debugging as advised on step # 10.

or

2. You wiped the userdata partition in flashtool as opposed to step # 11. Wipe [

Un

check ALL]