[TOOL][HOWTO]Flashtool 0.9.14.0 XZU + Guide + restore soft bricked devices

avetny

Senior Member
Jul 16, 2010
5,570
1,760
0
Private Island.
sorry for silly questions but I think we always learn something and is not a shame to ask.

To use Flashtool your bootloader need to be "locked or unlocked" ?
-Answer is doesn't matter if your bootloader is locked or unlocked -correct?

-Some one post it "you can't use flashtool if you are root it" (stupid????)
Of cause you can, that's why is a Flashtool correct ?


-Why we need to backup TA partition? So after when you want to restore your X-Reality feature you need to "Lock bootloader" root it and restore it backup ? Correct?


I know the answers. But to learn something you need to make sure you learning the right thing.
Thanks for answering.
 
Last edited:

Bin4ry

Inactive Recognized Developer
Nov 14, 2008
2,006
5,903
0
Berlin
I wrote Flashtool on day of Xperia X10, afterwards Androxyde took over and developed it very much further!

The idea is to use the very same protocol and modes Sony uses in their own Firmware flash tools (PCC/SUS/EMMA).
It can handle 2 modes:
Flashmode -> GREEN led -> also called s1boot mode
Fastboot -> BLUE led -> sony's fastboot implementation, which is handled here too by s1boot, so its not a fully function fastboot, but i has most all standard features

The interesting part is Flashmode, you can restore a sony phone no matter what happend with this mode (a few excludes, like if you manually edited your TA, then we cannot help you anymore).
This mode is implemented in the s1boot (Sony's bootloader), it is there ANYTIME you cannot brick this mode (see above for a exception)!
Because of this reason Sony phones are so safe, what we do is we can restore a Sony Firmware to the device, the firmware has to be signed by Sony (*.sin file) with their signature for commercial devices.

Flashtool sends over a so called "loader.sin", this loader gets started on device when it's signature is verfied, after that is done there is opened a faster transfer channel to the pc from the phone(from the loader which runs now), and it will accept the other "partitions", like system.sin, kernel.sin fotakernel.sin etc. etc.
This SIN files ofc will be checked for their signature and if good they will be written onto the phones memory. (Don't worry about this signature, we tried to exploit it many many times and for some years now, dont be stupid, its time waste ;) )

This is what happens there, and this is the way you restore a sony device, The benefits of flashtool is that it totally ignores what kind of customization (like branding, country blabla) is your phone and lets you flash what you like. So you can easy debrand, easy switch to older firmwares and even flash only seperate partitions.

Now comes the tricky part ;) TrimArea!
This TrimArea holds like you may know the DRM-Keys, but it holds even more, the phone saves their signatures, customization info, current firmware info and some more interesting stuff into this Area, it is a partition like all others but it uses a "special" format AND it gets checked against its signature by s1boot. (BTW this is the problem from above, if you alter the partition (or better said some areas here) manually then s1boot checks it, it will detect that you altered it, AND THEN it will NOT START ANYMORE!!!!!!!!!!!)

Flashtool now can handle 2 types of TA backup:
RAW and S1-Mode.

RAW, this is nothing more or less than the BackupTA Script, Flashtool will use adb and dumop the TA partition with dd on a unix shell, you need to be root to get this done

S1Mode: Well this mode works anytime, but it has it's "problems".
In S1Mode we can read every "sector" of TA. But only to specific point, and thats the "problem" with backup of TA, the relevant secotor is not readable in S1Mode. (Remember: S1Mode is basically the feature we get from the phone by sending over the loader.sin, which is specially signed again to be used on this phone or a phone family).
But we can do the same things here sony does´(ofc only the things which dont need signature), like removing the "rootkey", this will lock your bootloader again :D And such stuff :) We CANNOT remove simlocks, even if theoretically we know how, we cannot do it since we cannot sign our changes with the signature key (you get the idea now right?)

Hope i could explain stuff a little now ;) Just ask if you need some more infos

Regards
 

unk_damnation

Senior Member
Apr 11, 2013
162
34
0
@Bin4ry That means making a TA backup using devshaft's tool and using flashtool's raw mode (as written in the OP) are actually the exact same thing? Or is there any tiny difference, and what are the pros and cons?

Sent from my C6802 using xda app-developers app
 

fastest83

Senior Member
Jul 13, 2012
568
88
0
could someone please tell me why everytime I try to open FlashTool (for Mac) I get a "FlashTool force closed during the use of the libusbx-1.0.0.dylib plugin" error??
I have a PC too, but if possible it would be better to have it all (backups and such) in one place...

Mac Os 10.6.8 here...
 
Last edited:
  • Like
Reactions: magnusaaa

Bin4ry

Inactive Recognized Developer
Nov 14, 2008
2,006
5,903
0
Berlin
could someone please tell me why everytime I try to open FlashTool (for Mac) I get a "FlashTool force closed during the use of the libusbx-1.0.0.dylib plugin" error??
I have a PC too, but if possible it would be better to have it all (backups and such) in one place...

Mac Os 10.6.8 here...
Ask Androxyde, i dont own a MAC and i will go to hell first before supporting such systems from my side ;)

Regards
 

fastest83

Senior Member
Jul 13, 2012
568
88
0
Ask Androxyde, i dont own a MAC and i will go to hell first before supporting such systems from my side ;)

Regards
You're baaaad...:crying:
Anyway, I fired up my stupid Dell Mini 10 (Dual Boot WinXP/OsX) and went with DevShaft Backup TA, just because I didn't want to turn off the phone... :fingers-crossed:
I simply granted SU access to ADB via usb, and it did everything in just 30 seconds or so, resulting in a zip backup of just 88kb.
I checked the content, and the .img is about 2Mb, while the other files are 33-34-55-85 or so kb. Is it supposed to be this little??:confused:
 

A.HUSSAIN

Member
Apr 18, 2008
19
0
0
could someone please tell me why everytime I try to open FlashTool (for Mac) I get a "FlashTool force closed during the use of the libusbx-1.0.0.dylib plugin" error??
I have a PC too, but if possible it would be better to have it all (backups and such) in one place...

Mac Os 10.6.8 here...
Hi,

You have to copy the tool to your application folder - or by dragging it to the launchpad - and start it from there not from the dmg file itself.

Regards.
 

fastest83

Senior Member
Jul 13, 2012
568
88
0
Hi,

You have to copy the tool to your application folder - or by dragging it to the launchpad - and start it from there not from the dmg file itself.

Regards.
Yeah, I'm not that noob... :)
I had it in another folder, but tried it in the application folder too, with the same result.

Sent from my C6833 using Tapatalk 2
 

baileyjr

Senior Member
Aug 21, 2012
1,368
283
0
Cardiff
Yeah, I'm not that noob... :)
I had it in another folder, but tried it in the application folder too, with the same result.

Sent from my C6833 using Tapatalk 2
I have a mac to mate and honestly for most tools like this things I just run win7 in WMWare. Its sometimes easier than trying to get the mac specific tools to work.
 

fastest83

Senior Member
Jul 13, 2012
568
88
0
I have a mac to mate and honestly for most tools like this things I just run win7 in WMWare. Its sometimes easier than trying to get the mac specific tools to work.
I have a little Dell Mini 10v with dual boot 10.6/WinXp, so I mostly use that when I (rarely) need Windows, but would be great to do everything on just the mac...

Sent from my C6833 using Tapatalk 2