Jump to content


Photo

[APP] TPT Helper

* * * * * 5 votes

  • Please log in to reply
157 replies to this topic

#1
Amphoras

Amphoras

    Addict

  • Members
  • PipPipPipPipPip
  • 766 posts
TPT Helper is designed to help you to easily repartition the phone and convert it to Gen 2 to let you run the latest custom ROMs. You should only use the TPT files included on European ZTE Blades.


Features:

*Download TPT files giving different partition layouts
*Download TPT files which will convert and install a ROM in one go
*Build your own TPT choosing partition size, recovery and splash image (in the given range)
*Start the TPT from inside the app on some roms, no need to use the hardware buttons manually
*Check the file is intact
*Unzip the TPT files to the correct location
*Verify that all the files you're about to flash are intact
*Clean up afterwards to avoid accidental flashes


https://market.andro...horas.tpthelper

The Gen 1 to Gen 2 TPT files linked to in the app were created by wbaw.

Thank you to Alex131089 for the French translations, FelixL for the German translations, top4ek for the Russian translations, wuxipaopao for the Chinese translations, Sokobeg for the Serbian translations and dejf for the Czech translations.

If you'd like to help with translations, you can add/update them here:

http://www.getlocali...com/TPT_Helper/

If you've added some, let me know so I can credit you with it.

TPT Helper Copyright © 2011 David Phillips
TPT Helper is free software: you can redistribute it and/or modifyit under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

TPT Helper is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with TPT Helper. If not, see <http://www.gnu.org/licenses/>.

You can see a copy of the full license by picking the "License" option from the menu.
You can get a copy of the source code for this version from https://github.com/A...-Helper/tree/V2

Attached File  screenshot-1314482010092.png   38.36KB   102 downloads Attached File  screenshot-1314481999356.png   92.24KB   123 downloads Attached File  screenshot-1314482221441.png   50.11KB   78 downloads Attached File  screenshot-1314482251984.png   34.47KB   46 downloads

Edited by Amphoras, 28 January 2012 - 10:57 PM.

  • 22

TPT Helper lets you easily repartition your ZTE phone, install a new ROM and for the Blade, convert to/from Gen 2. Available for Orange San Francisco/ZTE Blade, Orange Monte Carlo/ZTE Skate and Orange San Francisco II/T-Mobile Vivacity. https://market.andro...horas.tpthelper

TPTs and other apps


#2
t0mm13b

t0mm13b

    Hardcore

  • MoDaCo Silver
  • PipPipPipPipPipPip
  • 1,784 posts
  • Gender:Male
  • Location:Ireland
  • Devices:GT-S8500,Zte Blade,SE ST15i
  • Twitter:@t0mm13b
That's an excellent project you've put together!

Well done on your completion of the project!

This thread should be stickied and thereby help newcomers :)

+1 from me :)

  • 0
try{ not_laugh; }catch{ FAIL; }finally{ laugh; }

#3
funiewski

funiewski

    Newbie

  • MoDaCo Silver
  • Pip
  • 14 posts
Very nice and usefull. Thx

  • 0

#4
The Soup Thief

The Soup Thief

    Hardcore

  • MoDaCo Silver
  • PipPipPipPipPipPip
  • 1,046 posts
  • Gender:Male
  • Location:Dublin
  • Devices:Nexus 5 (N4 etc retired)
  • Twitter:@TheSoupThief
Great idea! I agree this should be stickied, or else added to one of the stickied introductory posts. Why not add it to the blade wiki?

  • 0

#5
FelixL

FelixL

    Enthusiast

  • Members
  • PipPipPip
  • 196 posts
  • Location:Germany
  • Devices:San Francisco, Moto Defy
Great app :)

Two suggestions (don't know if possible):
- include rooting-tool, (maybe ask the creator of the one-click-recovery for help, or even merge the two apps)
- try to reboot in fastboot mode. Maybe this is enough to trigger the TPT, and the hardware-keys are not needed.

  • 1

#6
Amphoras

Amphoras

    Addict

  • Members
  • PipPipPipPipPip
  • 766 posts
Thanks everyone :).

Great app :)

Two suggestions (don't know if possible):
- include rooting-tool, (maybe ask the creator of the one-click-recovery for help, or even merge the two apps)
- try to reboot in fastboot mode. Maybe this is enough to trigger the TPT, and the hardware-keys are not needed.


Dunno about the rooting idea, maybe.

I tried rebooting into different modes, but I didn't find anything that would start the TPT except holding the buttons while powering on.

Edited by Amphoras, 30 August 2011 - 12:52 PM.

  • 0

TPT Helper lets you easily repartition your ZTE phone, install a new ROM and for the Blade, convert to/from Gen 2. Available for Orange San Francisco/ZTE Blade, Orange Monte Carlo/ZTE Skate and Orange San Francisco II/T-Mobile Vivacity. https://market.andro...horas.tpthelper

TPTs and other apps


#7
laserburn

laserburn

    Newbie

  • Members
  • Pip
  • 26 posts
  • Devices:ZTE Blade
This looks like a great tool. Installed it, but waiting for someone else to try it first. ;)

Now a few clarifications for us not too familiar with TPT. If I use this to convert to Gen2 will I still be able to use my SSrls5 ROM which supports both generations? How do we recover in case of problems with TPT, if something goes wrong can we get to the Clockwork mode? Do you plan to keep updating this app with new ROMs as they become available?

  • 0

#8
Amphoras

Amphoras

    Addict

  • Members
  • PipPipPipPipPip
  • 766 posts

This looks like a great tool. Installed it, but waiting for someone else to try it first. ;)

Now a few clarifications for us not too familiar with TPT. If I use this to convert to Gen2 will I still be able to use my SSrls5 ROM which supports both generations? How do we recover in case of problems with TPT, if something goes wrong can we get to the Clockwork mode? Do you plan to keep updating this app with new ROMs as they become available?


You can still use Swedish Spring once you've converted. It installs Clockwork as well, so you can still access that by holding volume- as you turn on. You can flash new roms etc. through Clockwork just like you can now as well. Yes, I'm going to keep it updated with any new TPTs.

  • 1

TPT Helper lets you easily repartition your ZTE phone, install a new ROM and for the Blade, convert to/from Gen 2. Available for Orange San Francisco/ZTE Blade, Orange Monte Carlo/ZTE Skate and Orange San Francisco II/T-Mobile Vivacity. https://market.andro...horas.tpthelper

TPTs and other apps


#9
wbaw

wbaw

    account closed

  • Banned
  • PipPipPipPipPipPip
  • 1,885 posts
  • Gender:Not Telling

Great app :)

Two suggestions (don't know if possible):
- include rooting-tool, (maybe ask the creator of the one-click-recovery for help, or even merge the two apps)
- try to reboot in fastboot mode. Maybe this is enough to trigger the TPT, and the hardware-keys are not needed.


It wouldn't be allowed in the android market if it contained a root exploit. There aren't any public root exploits for the latest version of Android. Rooting isn't required to TPT & it'll be overwritten when you TPT. So that's a bad idea.

Reboot in fastboot mode doesn't make it TPT, it just reboots into fastboot mode. However, there is a way to get it to perform a TPT, it's possible using the settings menu on ZTE roms, could possibly decompile settings.apk to find out how it's done.

  • 1

#10
FelixL

FelixL

    Enthusiast

  • Members
  • PipPipPip
  • 196 posts
  • Location:Germany
  • Devices:San Francisco, Moto Defy

Reboot in fastboot mode doesn't make it TPT, it just reboots into fastboot mode. However, there is a way to get it to perform a TPT, it's possible using the settings menu on ZTE roms, could possibly decompile settings.apk to find out how it's done.


Thanks for all the information!

And I have another suggestion: do an auto-mode.
Let the user choose a partition layout and a ROM, download the tpt files, unzip, include the ROM as a system.img into the unziped folder, check the md5sums of all files, check if the battery is above say...80%, and trigger the TPT through the way wbaw mentioned.

  • 0

#11
Phoenix Silver

Phoenix Silver

    Hardcore

  • MoDaCo Silver
  • PipPipPipPipPipPip
  • 1,839 posts
  • Gender:Female
  • Location:Strasbourg.
  • Devices:ZTE Blade Orange France
  • Twitter:@phoenixbjp
Excellent idea
Great work :)

  • 0
Si le corps est mortel, l’âme elle est éternelle.

#12
Amphoras

Amphoras

    Addict

  • Members
  • PipPipPipPipPip
  • 766 posts

It wouldn't be allowed in the android market if it contained a root exploit. There aren't any public root exploits for the latest version of Android. Rooting isn't required to TPT & it'll be overwritten when you TPT. So that's a bad idea.

Reboot in fastboot mode doesn't make it TPT, it just reboots into fastboot mode. However, there is a way to get it to perform a TPT, it's possible using the settings menu on ZTE roms, could possibly decompile settings.apk to find out how it's done.



Will try and work out how its done on the ZTE roms, see if I can add it. Do you know if the TPT has to be in a different form for it to work from the settings menu? I unzipped a few TPTs to the image folder earlier today and tried using that option on GSF and some Bulgarian stock rom, but it just said it couldn't find the package.

Thanks for all the information!

And I have another suggestion: do an auto-mode.
Let the user choose a partition layout and a ROM, download the tpt files, unzip, include the ROM as a system.img into the unziped folder, check the md5sums of all files, check if the battery is above say...80%, and trigger the TPT through the way wbaw mentioned.


Good idea, will try and add that in a future version. Thanks for the reminder about the battery level, meant to add a check for that before.

  • 0

TPT Helper lets you easily repartition your ZTE phone, install a new ROM and for the Blade, convert to/from Gen 2. Available for Orange San Francisco/ZTE Blade, Orange Monte Carlo/ZTE Skate and Orange San Francisco II/T-Mobile Vivacity. https://market.andro...horas.tpthelper

TPTs and other apps


#13
wbaw

wbaw

    account closed

  • Banned
  • PipPipPipPipPipPip
  • 1,885 posts
  • Gender:Not Telling

Will try and work out how its done on the ZTE roms, see if I can add it. Do you know if the TPT has to be in a different form for it to work from the settings menu? I unzipped a few TPTs to the image folder earlier today and tried using that option on GSF and some Bulgarian stock rom, but it just said it couldn't find the package.


Yes, they need to be in proper Gen2 image.bin format for it to run from the settings menu in gen2/froyo/gingerbread roms. It wont find Gen1 style TPTs. You also need a proper gen2 phone for it to work, one that's running all gen2 firmware & uses image.bin files for tpt (stock gen2). Settings -> About Phone -> System Updates. Apart from the image.bin file format difference it's very similar to gen1 style tpts, so if you can find out what code triggers the tpt & use that without the check for image/image.bin hopefully it'll work.

If you decompile settings.apk from a zte rom, like gsf, then it looks like the code for it is here: smali/com/android/settings/deviceinfo I can't make any sense of it myself, .smali isn't the most readable language, maybe it's useful to somebody.

image.bin tpts for proper gen2 phones are another thing that could be added, along with customised partition sizes & a backup mode too ... if you're looking for some other things to add to your app. I can help you with some of those things. ztepack in /system/bin in ginger stir fry will create image.bin files, cpg posted the c source for it on the forum. mkyaffs2image will dump yaffs partitions to .img files dump_image will get boot, recovery & splash partitions.

Edited by wbaw, 31 August 2011 - 11:40 PM.

  • 1

#14
hedgepigdaniel

hedgepigdaniel

    Addict

  • Members
  • PipPipPipPipPip
  • 850 posts
  • Gender:Male
  • Location:Sydney, Australia
  • Devices:Galaxy Nexus, ZTE Blade (OLED)

Yes, they need to be in proper Gen2 image.bin format for it to run from the settings menu in gen2/froyo/gingerbread roms. It wont find Gen1 style TPTs. You also need a proper gen2 phone for it to work, one that's running all gen2 firmware & uses image.bin files (stock gen2). Settings -> About Phone -> System Updates. Apart from the image.bin file format difference it's very similar to gen1 style tpts, so if you can find out what code triggers the tpt & use that without the check for image/image.bin hopefully it'll work.

If you decompile settings.apk from a zte rom, like gsf, then it looks like the code for it is here: smali/com/android/settings/deviceinfo I can't make any sense of it myself, .smali isn't the most readable language, maybe it's useful to somebody.

image.bin tpts for proper gen2 phones are another thing that could be added, along with customised partition sizes & a backup mode too ... if you're looking for some other things to add to your app.


I hope you get this working, looks good.

Another idea: we could make a convention to encode information about firmware in user readable parts of it, e.g. in the splash.img or oem partition somehow. That way if we included info like whether it can use Gen1 or Gen2 TPTs the app could determine the correct TPTs to use, at least for people who had used a TPT from here before.

  • 0

#15
wbaw

wbaw

    account closed

  • Banned
  • PipPipPipPipPipPip
  • 1,885 posts
  • Gender:Not Telling

I hope you get this working, looks good.

Another idea: we could make a convention to encode information about firmware in user readable parts of it, e.g. in the splash.img or oem partition somehow. That way if we included info like whether it can use Gen1 or Gen2 TPTs the app could determine the correct TPTs to use, at least for people who had used a TPT from here before.


To do that properly, instead we'd need to check the sizes of the non user readable partitions, they get logged in dmesg or kmesg, one of those, at boot - i think if it's a while since the boot then it gets wiped from the log. It'd probably work in clockworkmod. Maybe there's another way to check them too.

You don't actually need to check though, you can just use both versions, image.bin & the separate files, with image.bin in gen2 format & the separate files in gen1 format, then the phone will load the right version when it does the TPT anyway.

If you're going to make it gen2 compatible then you also need to check for chinese v880 phones, they need their own appsboot.mbn & amss.mbn - flashing european versions to chinese phones will brick them (but a working tpt will recover them). There is a difference in /proc/iomem on chinese phones, but i'm not sure what exactly, i don't have a chinese phone. That's why I finally gave up on making my tpt backup script gen2 compatible, it'd brick chinese phones without that check. Anybody with a v880 want to post the output of /proc/iomem please?

You'll need to use full gen2 files in an image.bin tpt too, converting the gen1-to-gen2 tpt wont work because of it's mix of gen1 & gen2 bootloaders & gen1 radio partition layout.

TPTs for the blade have the potential to brick other devices, you should put a warning about that in the market description, rather than 'mainly for the ZTE Blade'. If you can restrict it to only install on zte blades too.

Edited by wbaw, 01 September 2011 - 12:07 AM.

  • 1

#16
Amphoras

Amphoras

    Addict

  • Members
  • PipPipPipPipPip
  • 766 posts

Yes, they need to be in proper Gen2 image.bin format for it to run from the settings menu in gen2/froyo/gingerbread roms. It wont find Gen1 style TPTs. You also need a proper gen2 phone for it to work, one that's running all gen2 firmware & uses image.bin files for tpt (stock gen2). Settings -> About Phone -> System Updates. Apart from the image.bin file format difference it's very similar to gen1 style tpts, so if you can find out what code triggers the tpt & use that without the check for image/image.bin hopefully it'll work.

If you decompile settings.apk from a zte rom, like gsf, then it looks like the code for it is here: smali/com/android/settings/deviceinfo I can't make any sense of it myself, .smali isn't the most readable language, maybe it's useful to somebody.

image.bin tpts for proper gen2 phones are another thing that could be added, along with customised partition sizes & a backup mode too ... if you're looking for some other things to add to your app. I can help you with some of those things. ztepack in /system/bin in ginger stir fry will create image.bin files, cpg posted the c source for it on the forum. mkyaffs2image will dump yaffs partitions to .img files dump_image will get boot, recovery & splash partitions.



Thanks, that explains it. I found the files with the code that I think triggers the TPT, just need to work out what its on about. Might try decompiling my app to get a better idea how the decompiled stuff compares to the actual code. Once that's worked out, proper Gen 2 TPTs would be a good idea for something extra to add.

If you're going to make it gen2 compatible then you also need to check for chinese v880 phones, they need their own appsboot.mbn & amss.mbn - flashing european versions to chinese phones will brick them (but a working tpt will recover them). There is a difference in /proc/iomem on chinese phones, but i'm not sure what exactly, i don't have a chinese phone. That's why I finally gave up on making my tpt backup script gen2 compatible, it'd brick chinese phones without that check. Anybody with a v880 want to post the output of /proc/iomem please?

You'll need to use full gen2 files in an image.bin tpt too, converting the gen1-to-gen2 tpt wont work because of it's mix of gen1 & gen2 bootloaders & gen1 radio partition layout.

TPTs for the blade have the potential to brick other devices, you should put a warning about that in the market description, rather than 'mainly for the ZTE Blade'. If you can restrict it to only install on zte blades too.


Yeah I saw that the Chinese ones are different again. If I add Gen 2 TPTs then that will be something else to think about.

I'd left it open to all devices as the unzipping and md5sum checking should work on any device, but there are easier apps to use if thats all you want to do, so I've tried restricting it now.

  • 0

TPT Helper lets you easily repartition your ZTE phone, install a new ROM and for the Blade, convert to/from Gen 2. Available for Orange San Francisco/ZTE Blade, Orange Monte Carlo/ZTE Skate and Orange San Francisco II/T-Mobile Vivacity. https://market.andro...horas.tpthelper

TPTs and other apps


#17
FelixL

FelixL

    Enthusiast

  • Members
  • PipPipPip
  • 196 posts
  • Location:Germany
  • Devices:San Francisco, Moto Defy

Thanks, that explains it. I found the files with the code that I think triggers the TPT, just need to work out what its on about. Might try decompiling my app to get a better idea how the decompiled stuff compares to the actual code. Once that's worked out, proper Gen 2 TPTs would be a good idea for something extra to add.



Try dex2jar and jd-gui to get much cleaner code than .smali. But it only works with .dex, not with .odex!

  • 2

#18
wbaw

wbaw

    account closed

  • Banned
  • PipPipPipPipPipPip
  • 1,885 posts
  • Gender:Not Telling

Thanks, that explains it. I found the files with the code that I think triggers the TPT, just need to work out what its on about. Might try decompiling my app to get a better idea how the decompiled stuff compares to the actual code. Once that's worked out, proper Gen 2 TPTs would be a good idea for something extra to add.



Yeah I saw that the Chinese ones are different again. If I add Gen 2 TPTs then that will be something else to think about.

I'd left it open to all devices as the unzipping and md5sum checking should work on any device, but there are easier apps to use if thats all you want to do, so I've tried restricting it now.


Proper Gen2 TPTs add a bit of extra complexity & there are a couple of gotchas, like bricking v880s if you don't detect v880s & produce TPTs specifically for them (or at least refuse to run). The main problem is it's pretty time consuming to test all the different combos & especially difficult if you don't have a both a v880 & a blade. If you don't make it proper gen2 compatible then it's not going to work on any stock zte gen2/froyo phones.

It should also be possible to produce a stock gen2 to gen1 image.bin tpt, in a similar way to the gen1 to gen2 tpt (but in reverse) - so the phone would be able to run gen1 roms & still use image.bin tpts. It'd be less useful than the gen1 to gen2 tpt, harder to produce & I wouldn't be able to test it, but I've got a good idea of how to do it. That's only going to work on european phones though, all v880s are gen2.

I think that the reboot into tpt mode code, if you can find it should also work on gen1 style tpts if you modify it not to check for /image/image.bin first. It's only a guess, but it seems likely.

TPTs wont do anything on non-zte phones, but flashing a tpt for the wrong zte phone on another zte phone or tablet is likely to brick it.

  • 1

#19
wbaw

wbaw

    account closed

  • Banned
  • PipPipPipPipPipPip
  • 1,885 posts
  • Gender:Not Telling
If you don't mind open sourcing it, then I could maybe help you add some of those features if I get a bit of free time. Maybe a few other people could help too.

  • 0

#20
Amphoras

Amphoras

    Addict

  • Members
  • PipPipPipPipPip
  • 766 posts

Try dex2jar and jd-gui to get much cleaner code than .smali. But it only works with .dex, not with .odex!



Thanks, its so much easier to read now.

Proper Gen2 TPTs add a bit of extra complexity & there are a couple of gotchas, like bricking v880s if you don't detect v880s & produce TPTs specifically for them (or at least refuse to run). The main problem is it's pretty time consuming to test all the different combos & especially difficult if you don't have a both a v880 & a blade. If you don't make it proper gen2 compatible then it's not going to work on any stock zte gen2/froyo phones.

It should also be possible to produce a stock gen2 to gen1 image.bin tpt, in a similar way to the gen1 to gen2 tpt (but in reverse) - so the phone would be able to run gen1 roms & still use image.bin tpts. It'd be less useful than the gen1 to gen2 tpt, harder to produce & I wouldn't be able to test it, but I've got a good idea of how to do it. That's only going to work on european phones though, all v880s are gen2.

I think that the reboot into tpt mode code, if you can find it should also work on gen1 style tpts if you modify it not to check for /image/image.bin first. It's only a guess, but it seems likely.

TPTs wont do anything on non-zte phones, but flashing a tpt for the wrong zte phone on another zte phone or tablet is likely to brick it.


http://pastebin.com/pyd9jUV8 and http://pastebin.com/bC4Djt3v seems to be the code that does the update. It calls "/system/bin/Tgetmem 0x00201018 0x2E6F73C9 6". According to the usage when you type that command into the terminal emulator, the first two numbers are the address beginning and end, and the 6 is a code telling it to write. The Tgetmem file itself is in binary form and I don't know how to decompile it to see inside. If it is this file that runs the TPT, then it gets slightly more difficult as its not in every rom, so would have to do something to put it into /system/bin.


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


I've uploaded v1.3 to the market. Changes:



*Added option to check md5, unzip and verify image folder all in one step
*Added adverts
*Added more info about each downloadable TPT on long click
*Power off button should work more reliably now
*Added cancel option when picking the file to unzip/check md5sum
*Added more feedback after unzipping/checking md5sum
*GSF TPT should unzip properly now
*Added battery level check before powering off to start TPT

According to the market stats, there are a decent percentage of people using the app in French and other languages. If anyone wants wants to use it in a different language than English, if you send me the translations for the different strings then I can add them.

  • 1

TPT Helper lets you easily repartition your ZTE phone, install a new ROM and for the Blade, convert to/from Gen 2. Available for Orange San Francisco/ZTE Blade, Orange Monte Carlo/ZTE Skate and Orange San Francisco II/T-Mobile Vivacity. https://market.andro...horas.tpthelper

TPTs and other apps





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users