Jump to content

[mod] [2011-03-22] TPT NAND Backup & Partition Tool - alpha3 [Gen1]


Guest wbaw

Recommended Posts

If only i had read first post correctly :D

sorry for wasting your time

I added that part after your post :(

I'm glad it seems to be working ok for everyone anyway, you had me a bit worried i'd messed it up earlier.

Link to comment
Share on other sites

Guest Rotmann

Works perfect on CM7, thanks WBAW. What would happen if someone is on stock partitions, I suppose the TPT will work as supposed and shrink the partitions to a minimum?

Link to comment
Share on other sites

can anyone explain the point of this? dont really understand sorry :D

The point is you get more memory for apps on internal memory,and personally i think apps

on internal memory work much better.

For example,when booting up your device with apps on SD CARD,apps sometimes take long time

to be ready for use.Apps on internal memory,no such problems

Link to comment
Share on other sites

Guest burstlam
yes, it adds 2mb to the size of the system.img that it generates to create the partition sizes, so it should give you about 3mb free space on /system.

wbaw,

it works flawlessly on Froyo system, like FLB R9B /R10

but I would like to know whether u may provide another package set that generates an addition of 5mb, instead of 2mb to the system partition ? for instance ,if there is any additional and update in /lib. or /system. 3mb space would be a little bit tightened up.

indeed, it seems that for the recent shipment of blade, partition layout has change that we could flash custom rom only by downgrading the machine with the hungarian fix TPT image first. Will it bring any different installation pocedures to this mod for the recent stock?

Edited by burstlam
Link to comment
Share on other sites

wbaw,

it works flawlessly on Froyo system, like FLB R9B /R10

but I would like to know whether u may provide another package set that generates an addition of 5mb, instead of 2mb to the system partition ? for instance ,if there is any additional and update in /lib. or /system. 3mb space would be a little bit tightened up.

Open the zip file & edit /image/backup-script.sh

On line 15 there should be this line ...

SYSTEMPAD=16

That's the amount of free space added to the system partition, in eighths of a megabyte. So if you wanted 5mb free space instead of 2, then you'd change that line to

SYSTEMPAD=80

CACHESIZE= works in a similar way, to set the size of the cache partition, but don't change that to less than 16 or more than 255, or it will break everything (you would need to add or remove a 0 from the right place in line 44).

Edited by wbaw
Link to comment
Share on other sites

Guest burstlam
Open the zip file & edit /image/backup-script.sh

On line 21 there should be this line ...

That's the amount of free space added to the system partition, in eighths of a megabyte. So if you wanted 5mb free space instead of 2, then you'd change that line to

CACHESIZE= works in a similar way, to set the size of the cache partition, but don't change that to less than 16 or more than 255, or it will break everything (you would need to add or remove a 0 from the right place in line 44).

TOTALLY UNDERSTAND~

THX! PAL

Link to comment
Share on other sites

i am sorry how to flash this? First flash rom and then flash this mode?

If you already have a rom installed & it's a 2.2 version, first flash cache2tmpfs, then flash blade-backup, using clockwork 3, just the same as you'd install a rom. You can do it with no reboot in between, just flash the 2 zip files in that order. It'll create a backup of your current rom with better partition sizes, when that is done power on the phone with vol + held & it'll install it. So you'll have the same rom as you're using now, but more room on /data for your apps.

If you're using CM7 then don't flash cache2tmpfs, you don't need it, just flash blade-backup.

If you're using 2.1, then install a 2.2 rom or cm7 before using this.

You don't need to flash a new rom to use this, but if you're going to flash one anyway, then flash that first, set everything up, install any addons to that rom that you want & then after it's set up as you want it do what I said above.

Edited by wbaw
Link to comment
Share on other sites

tnx i do it now, I flash all how you said but now i stuck on android screen

something went wrong then. first try it again by powering on with vol + held, if it still doesnt work then...

if you can get into clockwork, try flashing a backup from there, or get the JJ9 image install & use that, it should fix it.

if you dont have any other backups & you want to try to save your data, then you could try moving the image folder on your sdcard to the clockworkmod/backup folder & rename userdata.img to data.img then you should be able to install it with clockwork.

Edited by wbaw
Link to comment
Share on other sites

it should work fine with flb froyo. if your battery was low, then that might have caused it. charge your battery with your phone turned off, until the light turns green & then try vol + & power on again. if everything else fails then a jj9 image install should fix it, but that should only be used as a last resort.

Edited by wbaw
Link to comment
Share on other sites

Guest KelticDaz

Big thanks for this, has given me an extra 110mb of ram!

Like one of the posters above, I got stuck on the green android screen after the recovery screen, after waiting

20 mins and deciding nothing was happening, took out the battery, restarting with the volume + pressed, and the flash kicked in. Phew! On CM7 Nightly 22 btw.

Edited by KelticDaz
Link to comment
Share on other sites

It is best to leave it a while, on some phones it might not show the green text to say it's flashing, but it is & you don't want to interrupt it, so leave it at least 10 or 15 mins before deciding that it's crashed. If there's still nothing after 20 minutes, it's definitely crashed, so pull the battery then try again with vol + & power on.

Also, don't do it while plugged into usb or the charger, because sometimes that causes problems with booting, but do make sure that you have a full battery charge before starting the process.

Edited by wbaw
Link to comment
Share on other sites

Guest samjam
Open the zip file & edit /image/backup-script.sh

On line 21 there should be this line ...

That's the amount of free space added to the system partition, in eighths of a megabyte. So if you wanted 5mb free space instead of 2, then you'd change that line to

CACHESIZE= works in a similar way, to set the size of the cache partition, but don't change that to less than 16 or more than 255, or it will break everything (you would need to add or remove a 0 from the right place in line 44).

...

You could use zero-padded string-based printf, it might help some of your formatting -

e.g. printf "%06s" 23

would print 000023

it might simplify the printf $(echo ... stuff

it looks like you are only using printf to avoid the newlines, but it may help for the padding.

Link to comment
Share on other sites

...

You could use zero-padded string-based printf, it might help some of your formatting -

e.g. printf "%06s" 23

would print 000023

it might simplify the printf $(echo ... stuff

it looks like you are only using printf to avoid the newlines, but it may help for the padding.

is that going to work for hex numbers, in a shell script on android, with variable padding? it's only an issue for the cache partition anyway, it just means the maximum size for the cache partition is 255 blocks, a bit under 32mb & the minimum size is 16 blocks, or 2mb. all the other numbers are going to be 3 hex digits, because they're all over 32mb.

000000 is actually faster to type than %06s ... especially when i've already done it, tested it & it works.

i might do a little update in the morning, if i get round to it. i could do with adding some sanity checking & stuff like that to it too, it is just a quick & dirty test version. i should comment the script too, i did have it echoing what it was doing to the screen, but that doesn't work in clockworkmod. the updater-script needs fixing for the progress bar to work properly.

i could've done the patch much easier with dd, wouldnt need any of that printf, echo & sed nonsense, but the conv option is disabled on android, so i had to find a convoluted way around it. printf is being used to output the binary data to a temporary file, sed is used to swap the endianess & add the control codes for printf to turn a hex number into binary data, the actual files to be patched are split into 4 & the whole thing is cat'ed together. it's all crazy, i could've done all that with a simple dd command, if that conv option worked. it's the kind of line i really don't want to touch again if i can avoid it, unless theres some big improvement to be made. it's all a dirty horrible hack, i'm surprised i got it to work at all & i don't want to breathe too close to it in case it all breaks. be careful if you try editing those lines, they're vital to the whole thing, it's a possible bricked phone if you get it wrong & flash the result.

maybe the dc commands could be tidied up too, i had to learn hungarian reverse notation or some weird stuff, because bc isn't available, first time i've used dc.

really, i'm hoping somebody else wants to improve on it, write a frontend for it or something to change partition sizes, but make sure they all add up. could do with adding support for sd-ext & .android_secure too, turn it into a proper backup script. also have the option to just reflash system & userdata, thats the minimum to change partition sizes. could also have a version with a blank userdata.img for rom devs to create a tpt version of their rom.

Edited by wbaw
Link to comment
Share on other sites

cool, i tried that 0 padding thing you suggested, samjam, couldn't get it to work with hex, it just printed that number of 0's.

i'm going to release another update in a few days, with a few more options & some error checking.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.