• Announcements

    • Reminder - MoDaCo position on illegal content   07/30/15

      ILLEGAL CONTENT I'd like to just reaffirm MoDaCo's position regarding piracy and illegal content in the light of some recent questions / postings. Posts will be censored by myself or my moderation team if the contain or link to: Illegal / pirated / cracked software or sites that host such softwareNintendo emulators / ROMs or sites hosting them (in light of Nintendo's legal stance)CUSTOM ROMS You may discuss and post links to custom device ROMs on MoDaCo, provided the following rules are adhered to: ROMs must not contain any illegal 3rd party software (this includes trial versions included without permission)ROMs must give full credit to the original authorISSUES If you have any issues with this policy, please contact PaulOBrien directly via PM.
    • Reminder: Selling items on the forum directly is not allowed   07/30/15

      Please note that selling items on the forum directly is not allowed by the forum rules. There is a forum for eBay auctions whereby you can list the items on eBay and link to them there. This is the ONLY forum for this type of activity. You may also advertise links to the eBay forum in your signature. Please note that selling directly in contravention of these rules will result in a warning / suspension / ban.

[APP] TPT Helper

158 posts in this topic

Posted (edited) · Report post

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.getlocalization.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

post-855110-0-77984200-1314610416_thumb. post-855110-0-78438800-1314610412_thumb. post-855110-0-30954600-1314610421_thumb. post-855110-0-95025100-1314610424_thumb.

Edited by Amphoras
23

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

Very nice and usefull. Thx

0

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

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
1

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

Excellent idea

Great work :)

0

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

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
1

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

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
1

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

Update on the auto-tpting. The SDRise class in the GSF Settings.apk is the part that triggers does the stuff to call the TPT. I've not yet managed to convert the code to a working form inside the app, possibly due to different restrictions in the things that system and user apps can do (eg. SDRise uses "android.intent.action.REBOOT" to reboot the phone, which is only available to system apps, so I need to use superuser to reboot, but I don't know if it will have the same effect. Haven't managed to get it to the stage it would reboot yet though, so will need to wait and see).

On the positive side, wbaw was correct that once the code is triggered, it should use the correct Gen1/Gen2 TPT files from the image folder. I made an image.bin with cpg's ztepack and put it in the image folder then used ZTE's Storage Card Updates option in GSF. The phone rebooted and applied the TPT properly (as far as I can tell, not had any problems yet). I was also able to start the TPT directly from the app without the need for the image.bin file by calling SDRise directly. Only tested this on GSF so far, but it should work on other ZTE stock roms (the Bulgarian stock rom I downloaded for testing a few weeks back has the same code for SDRise as GSF). I looked at the code for SDRise on the CAE and Crevitus roms, and its totally different from GSF. It may turn out to work anyway, but I'll try when I get home.

Other roms are going to be more difficult. All the ones mentioned above have some kind of option for it built into the settings menu already, and they have the Tgetmem file in /system/bin. To get it working in this form on other roms will probably at least need to put Tgetmem in place if I can convert the code to work from the app. If not, it may also mean modifying the settings.apk (if thats even possible from the phone). I think I know how to get Tgetmem into place, but again it still needs testing.

I have a few more ideas I'm going to try, so I'll update with progress/failure later on.

1

Share this post


Link to post
Share on other sites

Posted · Report post

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.

You should post a string list to translate; I could do French if I have some time.

2

Share this post


Link to post
Share on other sites

Posted · Report post

You should post a string list to translate; I could do French if I have some time.

+1,

German!

1

Share this post


Link to post
Share on other sites

Posted · Report post

You should post a string list to translate; I could do French if I have some time.

+1,

German!

That would be really good. Here's the list of strings so far, I'll add more as more are added to the app.

Download a TPT

Check the md5sum of a file

Unzip a zip file

Check the image directory

Power off to start the TPT

Delete the image directory

All In One

Start TPT

Tests

Disclaimer

Use this app at your own risk. I take no responsibilty for any damage done to your phone.

Accept

Power Off

Once the phone has turned off, hold volume+ (or volume+ and menu) and press the power button to start the TPT.

Delete Image

Are you sure you want to delete the image folder and all its contents?

Deleting. Please wait...

Image folder deleted.

Low Battery

Your battery is below 25%, do you still want to start the TPT.

Standard TPTs:

Converts, but doesn\'t include a rom

All in one TPTs:

Converts and flashes rom in one go

Chose the file to check

Calculating. Please wait...

MD5sum

Checking md5sum of:

MD5sum is:

Matches expected value.

File not found

Did not find

.Would you like to download it?

Chose the zip to unzip

Unzipping. Please wait...

Unzip completed

Unzip failed

Unzip

Trying to unzip

Please enter the file name then click enter (file must be on root of sdcard)

Enter

Cannot find \'

\'. Please check and try again.

Number of files checked:

Number of md5sums matching:

Number of files not found:

Files searched for:

Files verified

Number of matches:

files not found.

file not found.

Cannot find nandroid.md5 file in image folder, please check it exists and try again.

Verifying. Please wait...

MD5 Result:

Unzip result:

MD5sum Mismatch

The md5sum does not match the expected value. Do you want to try downloading again?

Unzip failed, stopping activity.

Cannot find nandroid.md5 file in image folder, stopping activity.

Working. Please wait...

1. Download a TPT

2. Check the md5sum of the zip matches

3. Unzip the TPT

4. Check the contents of the image folder match the values in the nandroid.md5 file

5. Turn off your phone

6. Hold the volume+ (menu and volume+ on some devices) button and press the power button

If using a standard TPT:

7. Green text should appear on the screen then the phone should reboot into recovery

8. Flash your chosen rom from recovery, and reboot

If using an all-in-one TPT:

7. Green text should appear on the screen then the phone should reboot into your rom

TPT Helper

Ok

Cancel

Yes

No

Error

Other

Changelog

How to use

Download a TPT

If you get time to translate any, let me know what name you want me to use to credit you with the translations in the app.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2015. MoDaCo uses IntelliTxt technology.