Android Lollipop Lands for the Sony Xperia Z Ultra

The undisputed king of the beasts–at least in Sony’s current stable,is the … more

Android 5.0 Lollipop in 3D–EVO 3D, That Is!

It is that time of the year once again. Flowers bloom (or snow falls, depending on which … more

Gaming Console with Lollipop? Ouya Gets an Android TV Port

Android is a very flexible platform, and it can be used on a large variety of … more

Android App Review: Manage Your Connections Automagically – XDA TV

Material Design is all the buzz in the Android world right now. … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[UTIL][UPG] TGTool 1.3

OP cedesmith

21st March 2010, 06:25 PM   |  #1  
cedesmith's Avatar
OP Retired Recognized Developer
Thanks Meter: 464
 
270 posts
Join Date:Joined: Feb 2010
I'm proud to present a new version of tgtool with repack support.
I want to tank cotulla (DES) and viperbjk (PSAS), without their work this would not be possible.


WARNING: THIS TOOL IS UNTESTED. NOBODY KNOWS WHAT WILL HAPPEN
WARNING: FLASHING A ROM CREATED WITH THIS TOOL CAN BRICK YOUR PHONE
WARNING: FLASHING A ROM CREATED WITH THIS TOOL MAY VOID WARRANTY
WARNING: YOU ARE ASSUMING FULL RESPONSIBILITY FROM USING THIS TOOL
WARNING: WARNING WARNING WARNING


if you use this tool you use it on your own risk, i am not responsible if anything bad happens but strongly hope YOU ARE responsible and know what you are doing

Da Mafia has flashed a rebuild but unmodified rom and phone works.
Da Mafia has did it again and again, because of him we know we are now close of having a custom ROM so a big THANK YOU for risking your phone for us.
Novembre5 has flashed a 6.5.5 ROM that didn't booted, he has successfully recovered the phone using pin method.

Changes:
1.3.20
- added -tg01
- added -t01a
1.3.19
- fixed bad unk0 in WMB3
- extra checks for -chk (partition signatures, length of rom, lenght of payload)
- repack/merge now automatically checks resulting rom
- added -dci to display catalog informations
1.3.18
- added repack support

Example to check a rom file:
Code:
tgtool -chk TG01WP_5005000176.tsw
Example decrypt a rom file:
Code:
tgtool -dec TG01WP_5005000176.tsw tg01.bin
Example to extract payload from rom file:
Code:
tgtool -sp tg01.bin tg01.os.payload
Example to insert a payload in a rom file:
Code:
tgtool -mp tg01.os.payload tg01.bin tg01-new.bin
OR
Code:
tgtool -mp tg01.os.payload tg01.bin tg01-new.tsw
Copy note:
It is required for whomever uses this software and releases a ROM created with it to distribute a copy of the software and this copy note with released rom so rom integrity can be checked.
It is required for whomever uses this software and releases a ROM created with it to state that this software is a key part in building that ROM and that the ROM could not have been created without it.
It is required for whomever uses this software and releases a ROM created with it to test the ROM and make sure it is working.
It is required to inform potential users that ROM created with this software can permanently and irremediably damage the phone.
This software is provided as it is without any warranty of any kind, express or implied, not even that it does anything useful.

best wishes
cedesmith
Attached Files
File Type: zip TGTool1.3.20.zip - [Click for QR Code] (17.1 KB, 3531 views)
Last edited by cedesmith; 28th March 2010 at 12:03 PM. Reason: v1.3.20 changes
The Following User Says Thank You to cedesmith For This Useful Post: [ View ]
21st March 2010, 06:26 PM   |  #2  
cedesmith's Avatar
OP Retired Recognized Developer
Thanks Meter: 464
 
270 posts
Join Date:Joined: Feb 2010
FLASHING AND RECOVERY

Don't use sddl+, use short pin method, as stepw(autor of sddl+) stated here "Now that entering SD download mode via shorting pins became public, SDDL+ is obsolete.". shorting pins is toshiba intended and tested mode to enter downloader mode and seams a little safer then sddl+.
There is info that short pin method accepts .bin files.
To skip language check (SD Downloading failed. varient is invalid!!) rename .tsw to .enc
To enter downloader mode bridge pin 1 and 3 and press reset. release reset and keep bridge for few seconds. DO NOT PRESS RESET AGAIN. check screen and see what happens.

Secure your battery with duct tape it can drop very easy. If you use short pin method it can drop while you turn phone with screen up. Since you will turn phone just after you reset it will be flashing bootloader and and phone will be bricked for ever.

read more and make sure you know what are you doing

picture is from 1st thread i found about short pin unfortunately i can remember where that is. if you can point me to it i would link it here.
Attached Thumbnails
Click image for larger version

Name:	img0023lp.jpg
Views:	1007
Size:	92.9 KB
ID:	299278  
Last edited by cedesmith; 26th March 2010 at 08:56 AM.
21st March 2010, 06:26 PM   |  #3  
cedesmith's Avatar
OP Retired Recognized Developer
Thanks Meter: 464
 
270 posts
Join Date:Joined: Feb 2010
during split of payload you will nice
Code:
Part 00 OS 00000273-0000078E (050F4000-0F98FFFF)
 NOOPBlock 0017CA90-0018C210
 NOOPBlock 004CD610-0056A210
 NOOPBlock 0928E8D0-0A584210
 NOOPBlock 0A6A5650-0A6AD000
this is because these blocks are filled with 0xFF, they have all data 0xFF, ecc 0xFF, sector number 0xFF and partition flag 0xFF.
i think that these blocks are to be ignored by download tool. the fact that SIM_SECURE catalog entry is all filled with 0xFF strengthens that belief.

if you follow my examples and you compare tg01.bin with tg01-new.bin you will notice that the files are almost identical.
they are not perfect equal because once dumped extra data like sector number and partition flag is lost and is no way to know if block is full of 0xFF or not to be flashed (NOOP).
i think that NOOP blocks are there because partitions start at flash block boundaries limit so there is some extra space in partition that is not used and does not mater what is in it so is not overwritten by flash process.
THIS IS ALL SUPPOSITION.

on merge content of original rom is preserved till WMB1 EXCEPT file header witch i assume is not flashed. in this header only catalog table entries for WMB1 WMB2 and WMB3 are modified.
i think that if rom will not boot short pin method may be able to flash original rom as part till OS is preserved.

-dec on new .tsw file and file compare with original to make sure they match till OS start 0x050F4000 in the example above

don't take chances unless you know what are you doing and you triple checked. this is untested stuff and may contain bugs
Last edited by cedesmith; 26th March 2010 at 08:14 AM.
21st March 2010, 06:27 PM   |  #4  
cedesmith's Avatar
OP Retired Recognized Developer
Thanks Meter: 464
 
270 posts
Join Date:Joined: Feb 2010
***reserved***
Last edited by cedesmith; 26th March 2010 at 08:14 AM.
21st March 2010, 06:39 PM   |  #5  
Senior Member
Thanks Meter: 4
 
509 posts
Join Date:Joined: Jul 2009
Donate to Me
More
congratulations cedemish, we are very pround of you. I hope we all can start to develop ROM's properly. Thank you for all your effort!

Just one question, is there any way for testing the rom package like you tried to do in your first release?
Last edited by arag0n85; 21st March 2010 at 06:43 PM.
21st March 2010, 06:57 PM   |  #6  
Senior Member
Thanks Meter: 4
 
204 posts
Join Date:Joined: Jul 2008
yeaaahhhhhhhhhhh!!!.........
Do you think we can flash now costum roms??????

did someone try it??
21st March 2010, 07:07 PM   |  #7  
cedesmith's Avatar
OP Retired Recognized Developer
Thanks Meter: 464
 
270 posts
Join Date:Joined: Feb 2010
Quote:
Originally Posted by arag0n85

Just one question, is there any way for testing the rom package like you tried to do in your first release?

sure
Code:
tgtool -chk  tg01-new.bin
TGTool v1.3.18 copyright(c) 2010 cedesmith

Checking tg01-new.bin has completed without warnings
but keep in mind that it checks only for things i know and i observed in official roms.
is no guarantee that will not brick the phone but if it fails it raises big question marks

Quote:
Originally Posted by Hamido123

yeaaahhhhhhhhhhh!!!.........
Do you think we can flash now costum roms??????

did someone try it??

i hope we will have custom roms. i didn't have the guts to try it. i hope you don't either.
have patience and don't do something stupid
21st March 2010, 07:33 PM   |  #8  
Senior Member
Thanks Meter: 0
 
130 posts
Join Date:Joined: Jan 2008
More
WOW, good work!

Yihaaa, soon we'll have cooked room, thanks to you!
21st March 2010, 07:52 PM   |  #9  
Senior Member
Thanks Meter: 0
 
166 posts
Join Date:Joined: Jun 2005
suberb work done, hopefully donations will follow
21st March 2010, 09:31 PM   |  #10  
DunkDream's Avatar
Senior Member
Thanks Meter: 3
 
423 posts
Join Date:Joined: Apr 2008
Thanks cedesmith!

This is a milestone in the Rom development for our TG01.

We're now able to create custom Roms. And I'm sure, that someone will try this very soon and will tell us, that he flashed a WM6.5.3 without problems

I'll wait until hdubli creates a Rom. I trust him and he said, that he is sure, that he's able to boot WM6.5.3.

Hope you get more donations. I donated directly on the first day you placed the link in your signature. (ID: 7M1172384A419273S)

Best regards,

Manuel
Last edited by DunkDream; 21st March 2010 at 09:35 PM.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes