yashsingh1/xdaforums huggingface dataset:
[Xperia Z Original Android Development] wayne56:
I'm considering starting to mess around with my phone, not all that experienced with it to be honest.

I know I'm missing something here.. But what is the point in this if it locks it again?

Is it a case of: Unlock BL > Flash custom content > Restore TA (Relocked) - And the custom content remains?

And then when it comes round to wanting to flash additional content simply repeat the above steps?

Thanks for clearing up my possible stupidity!
[Xperia Z Original Android Development] R4GE199:
Integrity check failed. Restore unsuccessful :(
[Xperia Z Original Android Development] DevShaft:
This error basically tells you the MD5 of the TA.img doesnt match the saved MD5 in TA.md5 (both TA.img and TA.md5 are in the ZIP). In short your backup maybe faulty.

Can you send me your backup ZIP by PM, so I can investigate?
[Xperia Z Original Android Development] R4GE199:
If the backup is faulty, is there any way to restore it?
[Xperia Z Original Android Development] DevShaft:
Yes, but it may hard-brick the device. Its a choice you have to make then. For now it can be anything, so can you PM me your backup so I can have a better look at it?

Edit: I see you already PMed me :).
[Xperia Z Original Android Development] R4GE199:
By mistake I PMed you twice :p
[Xperia Z Original Android Development] DevShaft:
Your backup is not faulty. Somehow the tool thinks it is and I will look at that tonight. I will use your backup (without actually writing the TA partition) in the same test cases I used to test the tool before I released it, see what comes up.

---------- Post added at 07:09 AM ---------- Previous post was at 07:01 AM ----------

Already found the problem. There was a problem in v7 which caused the MD5 in TA.md5 to have a trailing space. I fixed that bug in v8, but forgot to make it backwards compatible to older backups. I will do this tonight. For now you can do this:

1. Extract TA-backup.zip

2. Edit TA.md5 and remove the trailing space. Now save it.

3. Make new ZIP of TA.img and TA.md5 and name it TA-backup.zip.

4. Put this ZIP in the 'backup' folder.

5. Restore.
[Xperia Z Original Android Development] R4GE199:
I edited TA.md5 with notepad ++ and removed the space after code and saved it but still it is failing at the last step.

Please tell me what do you mean by trailing space, I am noob at such things
[Xperia Z Original Android Development] DevShaft:
What you did is exactly what I meant :).

Why it still says it fails (did it really? tried a reboot and checked be2?) I dont know at this moment. Got a workday ahead, so I will look into it tonight.
[Xperia Z Original Android Development] R4GE199:
I tried reboot but still the same problem. And my BE2 is not woking
[Xperia Z Original Android Development] Osyx:
It's for when you're tired of the other roms and want to go back to stock, or if you have to give it back to Sony for some reason then you can restore to totally stock so Sony wont see what you've been doing. The process will be Backup TA > Unlock bootloader > Flash custom content, then when tired of custom, Flash stock firmware > Restore TA
[Xperia Z Original Android Development] Osyx:
My backup showed the same when doing a dry-run but I then did what you told us, and tried dry-run again and it worked. So I then restored the TA and everything worked :D
[Xperia Z Original Android Development] DevShaft:
Good to hear! Also good you first used the dry-run, its exactly meant for risky situations like this :highfive:.
[Xperia Z Original Android Development] R4GE199:
I also used dry run but its not working. Can you please edit my TA zip and send me?

Do we have to restore in flashmode or just normally with usb debugging on?
[Xperia Z Original Android Development] Osyx:
Yes exactly it's a great option :thumbup:

I could maybe edit it during my lunchbreak, if you want :) normally with usb debugging.

Skickat från min C6603 via Tapatalk 2
[Xperia Z Original Android Development] R4GE199:
Yeah sure!! I sent you my TA zip :)
[Xperia Z Original Android Development] Osyx:
Will take a look at it in an hour or so ;)

Skickat från min C6603 via Tapatalk 2
[Xperia Z Original Android Development] R4GE199:
Thanks!! :)
[Xperia Z Original Android Development] Osyx:
I've edited it now, hope it works out for you :) Try a dry run first so you won't brick it, just in case ;)
[Xperia Z Original Android Development] caqo71:
I just have a question:

If every TA from phones are unique, what is the idea of making a new TA-backup to backup the same TA partition from the same phone?.

I'm still with a locked bootloader, but I backedup TA since 7.0, and now backed up from 8.0.

Wich is the difference?
[Xperia Z Original Android Development] Osyx:
No difference, the thing about the new versions of the tool is the restoring part, that it should be safer.

---------- Post added at 03:24 PM ---------- Previous post was at 03:22 PM ----------

[MENTION=5261329]DevShaft[/MENTION] I'm getting an error now when trying to restore TA when I'm on .253 instead:

Processing archive: backup\TA-backup.zip

Extracting TA.md5
Extracting TA.img

Everything is Ok

Files: 2
Size: 2097186
Compressed: 126432

=======================================
INTEGRITY CHECK
=======================================
OK

=======================================
COMPARE TA PARTITION WITH BACKUP
=======================================
OK

=======================================
BACKUP CURRENT TA PARTITION
=======================================
4096+0 records in
4096+0 records out
2097152 bytes transferred in 1.046 secs (2004925 bytes/sec)

=======================================
PUSH BACKUP TO SDCARD
=======================================
3640 KB/s (2097152 bytes in 0.562s)

=======================================
INTEGRITY CHECK
=======================================
FAILED

*** Restore unsuccesful. ***
Press any key to continue . . .

Why's that? It's the same I used previously :confused:

EDIT: When looking in tmpbak folder the files restore_currentPartitionMD5.txt and restore_pushedBackupMD5.txt show

sh: md5sum: not found

Might add that this is a dry-restore not an "normal"
[Xperia Z Original Android Development] DevShaft:
I see I forgot a prefix for busybox on some parts. Will fix this tonight :0.
[Xperia Z Original Android Development] Osyx:
Okey, great :highfive: Can I fix it by myself in the meantime somehow? :)
[Xperia Z Original Android Development] DevShaft:
I'm afraid not, but it will be fixed in around 3 hrs :).
[Xperia Z Original Android Development] Osyx:
Okej, I'll be here then when you're finished, to test :P :good:
[Xperia Z Original Android Development] DooMLoRD:
Simplest solution is to use:

busybox md5sum

Its an applet of busybox...

Why don't u integrate a fully functional busybox binary and always refer to it for all ur applet calls...
[Xperia Z Original Android Development] DevShaft:
Thats what I did already, just forgot to prefix busybox in front of some of the calls :silly:.
[Xperia Z Original Android Development] CrackaBoi:
Even though my restore failed, TrackID seems to work and I can check off for "Bravia engine" in display settings? Are my DRM keys still gone?`
[Xperia Z Original Android Development] lee480:
Use EMMA to check. Most reliable.

http://developer.sonymobile.com/services/flash-tool/how-to-download-and-install-the-flash-tool/

From EMMA, see the DRM section. You should see Marlin.
[Xperia Z Original Android Development] schaggo:
EMMA only works on unlocked devices. On a locked device, you won't get any of the information your screenshot shows.

You can also simply use Flashtool when you connect the device in flashtool mode. It will tell you in the log if the device is "rooted" or not, "rooted" in the sense of being bootloader unlocked, not of having a "rooted Android installation".
[Xperia Z Original Android Development] DevShaft:
TrackID keeps working after unlock.BE2 only works for YouTube after unlock, not for Album. You know your TA successfully restored when you turn on BE2, in Album you will see it switches from regular to vibrant view when watching colorful images. I dont know about the correctness of EMMA after an unlock and restore.
[Xperia Z Original Android Development] lee480:
You will. But greyed out, but visible.

Flashtool dont have the ability to detect whether DRM keys are intact.
[Xperia Z Original Android Development] Osyx:
[MENTION=4704767]lee480[/MENTION] The best way is to check it is in the service menu.

Skickat från min C6603 via Tapatalk 2
[Xperia Z Original Android Development] DevShaft:
Just uploaded Backup-TA v8.2 with the following changes:

Backup-TA v8.2 (2013-05-21)

==============================

Fixed Bugs

----------

- Added backwards compatibility for backups made with versions before v8.0.

- Fixed bug which caused the tool to not use busybox.
[Xperia Z Original Android Development] Osyx:
Going to test in 5 min :)

Edit: [MENTION=5261329]DevShaft[/MENTION] Everything works now, great :D I just restored my TA and the tool gave me no errors so now I'm sending this from that phone :thumbup: Yeah rooted .253 using this method ;P

Skickat från min C6603 via Tapatalk 2
[Xperia Z Original Android Development] DevShaft:
Just uploaded Backup-TA v8.3 with the following changes:

Backup-TA v8.3 (2013-05-21)

==============================

New Features, Improvements

--------------------------

- Backups are now saved with datetime suffix, so you can keep multiple backups.

- Added backup selector when restoring.

Fixed Bugs

----------

- Fixed bug in IMEI check.
[Xperia Z Original Android Development] schaggo:
Neither can/does EMMA. This screenshot is from my unlocked, never relocked and thus DRM key-less device.
[Xperia Z Original Android Development] lee480:
That's extremely unusual. My Xperia specifically said DRM none after unlocking.
[Xperia Z Original Android Development] wayne56:
Having problems backing up the TA files. Kind of an amateur at all this. Here is the info, any help is greatly appreciated.

First of all the bootloader has never been unlocked.

Downgraded to 10.1.A.1..434 using UK stock FTF from .234

Model C6603 - Locked Bootloader - Rooted with Superuser - CWM Recovery installed.

USB Debugging is ON.

Adbd Insecure IS installed and HAS Superuser access.

Must be missing something obvious. Thanks :)
[Xperia Z Original Android Development] DevShaft:
You are missing the latest version. Download v8.3 from my signature and try again.

---------- Post added at 05:54 AM ---------- Previous post was at 05:24 AM ----------

What does yours say in service menu?
[Xperia Z Original Android Development] Osyx:
Here's how it should look after TA restore:

Skickat från min C6603 via Tapatalk 2
[Xperia Z Original Android Development] DevShaft:
We only have to look at the fiirst screenshot, the other two will not be affected. When locked both wmla and marlin do say Key OK. When unlocked I believe they say Unknown Error.
[Xperia Z Original Android Development] schaggo:
Interestingly enough I don't see the first screen, I only get to #2 and #3 directly. I run unlocked with a custom kernel, so I really run unlocked.

Doesn't matter really, EMMA won't work on a locked device, SUS/SEUS and PC Companion won't work on an unlocked device.
[Xperia Z Original Android Development] shoey63:
First screen appears under service tests/security ;)
[Xperia Z Original Android Development] Osyx:
The first screen is under security, not verify certificates, exactly as shoey63 said :thumbup:

Skickat från min C6603 via Tapatalk 2

---------- Post added at 11:26 AM ---------- Previous post was at 11:24 AM ----------

Yes that's true, unknown error when unlocked ;) (kept the first one only :silly:

Skickat från min C6603 via Tapatalk 2
[Xperia Z Original Android Development] shoey63:
Ok, lets do it with version 8.3!

Screenshot of my never unlocked XZ (Taken from service menu/service tests/security)

Marlin and WMLA OK - ie. DRM keys intact.

Now after unlocking Bootloader

Marlin and WMLA show unknown error - ie. DRM keys gone!

Now after restoring TA with v8.3

Marlin and WMLA OK again - DRM keys are back :thumbup:

PS: If in doubt, Look at the times on the screenshots :victory:

Thank a million DevShaft :good:
[Xperia Z Original Android Development] mljjlm:
Mine just says 'None'

Edit: unlocked btw.
[Xperia Z Original Android Development] shoey63:
Pure stock ROM? Screenshot?
[Xperia Z Original Android Development] mljjlm:
Yes on .434
[Xperia Z Original Android Development] Osyx:
Skickat från min C6603 via Tapatalk 2
[Xperia Z Original Android Development] wayne56:
CMD window opens briefly and says this:
[Xperia Z Original Android Development] DevShaft:
You probably didnt extract the ZIP correctly. You maybe even only downloaded Backup-TA.bat without the rest. Follow my download link and download the complete ZIP by choosing file > download
[Xperia Z Original Android Development] wayne56:
Ah stupid mistake hah! Thanks, however a new problem now, managed to catch it before it closed. Really appreciate all your help :silly:
[Xperia Z Original Android Development] schaggo:
You run it from a network connected drive? Extract it to C:\ and run it from there.

Gesendet von meinem C6603
[Xperia Z Original Android Development] wayne56:
It is currently in C:\Backup-TA-v8.3

I'll try it directly from C:\ ---- Error "Choice is not...."
[Xperia Z Original Android Development] RHBH:
The v8.3 is working nice, backup sucess w/o erros on my Xperia S.
[Xperia Z Original Android Development] DevShaft:
It means it cant find the DOS command CHOICE, which is weird since that is part of DOS since ages ago. Either you are running this not from CMD/Command, dont have CHOICE anymore or have your PATH variable incorrect. I think its the later.

Can you type this in your DOS prompt and tell me what it says: echo %PATH%
[Xperia Z Original Android Development] DevShaft:
This explains it:

I will add choice as part of the tool for the next release :).
[Xperia Z Original Android Development] DevShaft:
Just uploaded Backup-TA v8.4 with the following changes:

Backup-TA v8.4 (2013-05-23)

==============================

Fixed Bugs

----------

- Fixed bug in IMEI input.

- Added choice.com as part of the tool instead of relying on Windows.
[Xperia Z Original Android Development] RHBH:
Just a "cosmetic" suggestion for next releases, change the window size :p
[Xperia Z Original Android Development] DevShaft:
I had it for a little moment, but I wasnt able to have a minimum size. People need to be able to scroll and resize to see all the output. Any ideas?
[Xperia Z Original Android Development] Osyx:
Can't we have just a horizontal minimum size since it's only really vertically we need to resize? :)

Skickat från min C6603 via Tapatalk 2
[Xperia Z Original Android Development] Androxyde:
FlashTool ? :P

more seriously : ncurses based screens (as some linux textmode installers or evern make menuconfig of any linux kernel) ncurses frameworks can be easily found.

Tcl/TK can be another option too
[Xperia Z Original Android Development] DevShaft:
From now on this thread continues here: http://xdaforums.com/showthread.php?t=2292598
[Xperia Z Original Android Development] caqo71:
This means that I have to do a new backup?

Command prompt windows has it's own properties based on Windows configuration, so it depends on windows, and not on the program itself.

The best solution is making a front-end for all those command lines.
[Xperia Z Original Android Development] mandarjoshiin:
Hello

I took backup twice on FW .434 Generic NL, rooted. And I can see different CRC32 values of .md5 files.. Why? :(:confused: Is it fine? Shall I go ahead unlock the BL?
[Xperia Z Original Android Development] Osyx:
Here.

Skickat från min C6603 via Tapatalk 2
[Xperia Z Original Android Development] RHBH:
This is working for Xperia S.

http://xdaforums.com/showpost.php?p=42006521&postcount=236
[Xperia Z Original Android Development] danytrial:
you need to have locked bootloader TA restore partition? or to restore the TA partition automatically locks the bootloader?
[Xperia Z Original Android Development] mirhl:
restoring the TA partition automatically relocks the bootloader
[Xperia Z Original Android Development] khamim:
can i use this method for xperia live with walkman?
[Xperia Z Original Android Development] arminalvand:
please help me

my bravia engine is break

no repair bravia

no backup bravia

please help

thanks
[Xperia Z Original Android Development] Osyx:
PEOPLE PLEASE LOOK HERE:

Skickat från min C6603 via Tapatalk 2
[Xperia Z Original Android Development] ishaan6698:
This WORKS! On Xperia S atleast!

anyone got a backup?
[Xperia Z Original Android Development] Thraxzzz:
Sorry to hear about your hard bricked device :(

*Here lies the device of gm007,R.I.P*
[Xperia Z Original Android Development] Benjoy Ericsson:
Ok so how to do this:

1. My Xperia Z on stock 434 rom (not unlock bootloader yet).

2. Backup TA Partition by using your tool, keep ta.img in safe place.

3. Unlock bootloader and tried whatever cook rom I like.

4. When getting bored, I flash back stock 434 rom by using flashtool.

5. Using your tool to restore TA.img.

6. Test whenever it works or not by going to Walkman and check out the Download Music Info? If it works, it works? TrackID & Bravia Engine 2 also work?

Do I need to relock bootloader? As I've already searched, atm there is no relocking bootloader file for XZ?

So, restoring ta.img mean that this step will automatically relock bootloader?

Correct me if I'm wrong. Can you give a detail instruction? Tks.
[Xperia Z Original Android Development] rickwyatt:
everyone that downloaded my tool only 5 of you please remove the ta.img from the backup folder and rebackup
[Xperia Z Original Android Development] mysterio619:
you bought a new one :eek:
[Xperia Z Original Android Development] Benjoy Ericsson:
I knew it and I've already deleted your ta.img :laugh:
[Xperia Z Original Android Development] Droidphilev:
Hi,

Thanks for your tool. What is the reason for this? Do we have to run backup twice everytime? Or do you mean that the tool is updated?

thanks!
[Xperia Z Original Android Development] Benjoy Ericsson:
No, he forgot removing his ta.img. This will make everyone confused. Or even they can brick their phone by restoring his ta.img. As he said, each phone has its own ta.img and we can't restore other ta.img to our phone. This causes hard brick --> buy new phone :eek:
[Xperia Z Original Android Development] Droidphilev:
please delete
[Xperia Z Original Android Development] Egan:
Why don't you try and see ;).

Good to hear you got a new phone. It must have cost you.
[Xperia Z Original Android Development] robogo1982:
Kudos for the effort. XDA really is a place where "it can't be done" doesn't exist :)
[Xperia Z Original Android Development] Benjoy Ericsson:
Where the impossible things become possible! :D
[Xperia Z Original Android Development] Egan:
I noticed my first TA backup doesn't match my TA partition when I compare MD5 checksum. Then I made two new backups, one with 'cat' one with 'dd'. They both have a matching MD5 checksum with the TA Partition.

My conclusion with this is that my first backup was corrupt and can hard brick your phone when restored, which maybe was the actual cause of gm007 his brick. So you better check the MD5 checksum after a backup to make sure it was successful before storing. Also check it again before restoring for the same reason.

@rickwyatt: Can you adjust your tool to do the checksum check and act upon the result? Also 'dd' is to my knowledge more low-level and maybe therefor more secure than 'cat'. I never had a mismatch with' dd' and now apparently have with 'cat'.
[Xperia Z Original Android Development] gm007:
Here is my new and bricked phone,

I have disassembled :D

Yeah it cost 600$
[Xperia Z Original Android Development] gm007:
You told me that your bootloader status=no and mine yes,you cannot unlock your bootloader,that's why my phone get bricked i think.
[Xperia Z Original Android Development] Egan:
My device is unlockable even tho it says it's not. It's a known issue :).

See here
[Xperia Z Original Android Development] gm007:
That is weird.

But if i remember correctly,this bug happen if you have the status=yes from the beginning and you unlocked it.

After flashing a firmware the status change to no.
[Xperia Z Original Android Development] Egan:
It happens when you have 'yes' from the beginning and rooted the device. That is my case and that's why I didnt told you the status right away, but that my bl is unlockable but still locked. To prevent exactly this confusion.

Believe me my device is unlockable but still locked and rooted. It's an international operator free C6603 :).
[Xperia Z Original Android Development] frantic912:
any idea how to read TA.img content...just want to check
[Xperia Z Original Android Development] gm007:
Ok now it is clear that it was yes from the beginning.;)
[Xperia Z Original Android Development] mysterio619:
mate 600$ loss :eek: .......dude u have got lot money to spend on same type device again and again :p and u r obsessed with z :D
[Xperia Z Original Android Development] gm007:
Nothing is better than Xperia Z at the moment ;)
[Xperia Z Original Android Development] Egan:
Great and for you I applied the patch that fixes this and it says 'yes' again ;).
[Xperia Z Original Android Development] xarive:
I jelly you all that doesn't unlock bootloader yet.. Is there a way to restore DRM keys or At least restore bravia engine ?
[Xperia Z Original Android Development] Android-Jeck:
Does this tool work for Xperia ZL, too?

Gesendet von meinem C6503 mit Tapatalk 2
[Xperia Z Original Android Development] rickwyatt:
dont no lol
[Xperia Z Original Android Development] babylonbwoy:
I was skeptical at first when I have read this thread.

How to be sure 100% that it works ?

If looking at the bug that say bootloader can't be unlocked, because of the root method, when in fact

it's unlockable make me think that maybe the service menu can return false result in certificate tab/page...

I can't believe something as important as this isn't more securized by Sony!
[Xperia Z Original Android Development] Egan:
It should work when partition mmcblk0p1 is your TA partition. The TA partition should be the only mmcblk partition which has is 2MB round. You can use the tool to create a backup and see if that image is that size. When it is, you can also check if your IMEI and serial nr is within the image. If that's the case you can be pretty sure it is the TA Partition and restore it when needed. However be sure your backup and TA partition have matching MD5 checksums.
[Xperia Z Original Android Development] ali3nfr3ak:
whats command to get md5 checksum of TA on phone :) , thanks
[Xperia Z Original Android Development] Egan:
You can look at the properties of the backup and partition through Root Explorer or run the MD5 command from adb or terminal 'md5 backup.img' and 'md5 /dev/block/mmcblk0p1'
[Xperia Z Original Android Development] rickwyatt:
I will add md5 to tool tomorrow
[Xperia Z Original Android Development] [NUT]:
You can use this on windows, and run it after doing a backup echoing out the result and doing the same on the phone using adb. Did that and the md5 check is rather reassuring: my first backup also failed o_O :eek:

Redid the backup and now the contents match, at least on md5 level :)
[Xperia Z Original Android Development] -Sumsy-:
When I use the tool it doesn't put img file in to backup folder ive installed the insecure app on phone selected the box to make it insecure and used the tool again but still no file
[Xperia Z Original Android Development] rickwyatt:
kill adb.exe with task manager and make sure is on c:\
[Xperia Z Original Android Development] [NUT]:
One thing popped up while i was playing around with this:

My phone will not boot anymore if i restore TA and have a custom kernel installed, I have not yet tried restoring it using a Sony stock kernel to be honest.

Even though my phone would not show a working screen while in that, it did vibrate after pressing power for a few seconds... and that's all you need to get it to fetch fastboot or flash modes, i was able to restore my phone to perfectly working order.

@gm007 if you press power for some seconds, does your (dead) phone vibrate shortly? if so, you have a way out!