Jump to content

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


Guest wbaw

Recommended Posts

with the standard config, sometimes apps aren't removed from /cache after they install & that's what causes that problem. i've only seen one person on these forums run into that problem though. if that happens with it as tmpfs, you can just reboot & it'll be cleared. feel free to set it a bit bigger if you want, it should only use the memory that's in use by anything stored there at the time.

the biggest app i've installed was 35mb (nfs shift). any larger apps & games usually have quite a small apk file & download extra files to the sdcard. it doesn't always have a problem deleting old apk files from /cache either, i've installed a lot of apps in a single session & never had the problem, maybe it deletes the old files when it's running out of space (in which case a bigger cache would only hurt).

Link to comment
Share on other sites

Guest IronDoc
I know I've already asked this (not exactly here) but would it be possible to resize the recovery partition to, like, 8MB instead of 4?

Why? Is there a recovery that's too big to fit or what?

Link to comment
Share on other sites

Guest fonix232
Why? Is there a recovery that's too big to fit or what?

For Seb, it is a problem, he had to leave out some stuff from the kernel to fit partition size. Bit bigger is better I say!

Link to comment
Share on other sites

Guest Ashenfall

I don't know if it's related to the cache size (mine is standard sized I think, although I have 128mb system partition), but sometimes when I install a new ROM and then Market automatically tries to restore my apps, some installs fail. Just wondering if it could be because it's trying to download quite a number of apps at the same time, too many to fit in /cache.

Link to comment
Share on other sites

Guest leetron1
I don't know if it's related to the cache size (mine is standard sized I think, although I have 128mb system partition), but sometimes when I install a new ROM and then Market automatically tries to restore my apps, some installs fail. Just wondering if it could be because it's trying to download quite a number of apps at the same time, too many to fit in /cache.

Phew..glad someone else has same issue..just spent hour or so reverting back to standard partition...market would not install an app over couple of hundred kb...great idea but I think it needs some rejigging..

Running CM7

Link to comment
Share on other sites

Report a bug to CM7. There is a startup script included in CM7 intended to fix that problem, it clearly doesn't work. I'm busy today, but if they don't have a patch to fix it by Sunday or Monday then I'll fix it for them.

http://code.google.com/p/cyanogenmod/issue...amp;sort=-stars

You can use my stock partition size tpt image to reset your phone back to stock partition sizes, or the ramcache.zip should work on any of the zte froyo based roms (modaco, flb, decrossed, jap jelly, desoftened, etc)

If you want to fix it temporarily yourself, then edit /system/etc/init.d/06mountdl delete the contents of that file & replace it with ...

#### START - app install cache partition ramdisk ####

umount /cache

mount -t tmpfs -o size=42M,nr_inodes=42k,mode=0770 tmpfs /cache

chown system.cache /cache

#### END - app install cache partition ramdisk ####

You could also try this partition layout from Tom G - http://android.modaco.com/index.php?s=&amp...t&p=1540840

/dev/block/mtdblock4 41.3M 1.2M 40.1M 3% /cache

/dev/block/mtdblock6 272.1M 38.0M 234.1M 14% /data

/dev/block/mtdblock5 143.5M 92.8M 50.7M 65% /system

Just overwrite the files in my partition update tpt with the ones from tom g's zip.

I'd release a few other partition options, but I don't have time to update & test them at the moment, or write a proper guide. I want to get it all working with clockwork 3 too.

Edited by wbaw
Link to comment
Share on other sites

with the standard config, sometimes apps aren't removed from /cache after they install & that's what causes that problem. i've only seen one person on these forums run into that problem though. if that happens with it as tmpfs, you can just reboot & it'll be cleared. feel free to set it a bit bigger if you want, it should only use the memory that's in use by anything stored there at the time.

the biggest app i've installed was 35mb (nfs shift). any larger apps & games usually have quite a small apk file & download extra files to the sdcard. it doesn't always have a problem deleting old apk files from /cache either, i've installed a lot of apps in a single session & never had the problem, maybe it deletes the old files when it's running out of space (in which case a bigger cache would only hurt).

I have been watching the /cache directory on my own phone (with rom JJ9), and indeed sometimes an app install will not removed from /cache. Initially the file is called downloadfile.apk. Then sometimes, for reasons I cant be sure of, it will suddenly leave downloadfile.apk in the cache and then start calling the next download downloadfile-1.apk. In my /cache directory it is on downloadfile-2.apk. - All this new space the partition your mod gave me was just too tempting :D

So I decided to run some tests and filled the directory with random files. When installing an app from the market, all the added random files were automatically deleted, leaving downloadfile.apk, downloadfile-1.apk and downloadfile-2.apk.

I then tried giving the files downloadfile-3.apk, downloadfile-4.apk, downloadfile-5.apk, etc. However during an install again all files were removed except downloadfile.apk, downloadfile-1.apk and downloadfile-2.apk.

The android download/install routine must have a record of where it was to know that downloadfile.apk, downloadfile-1.apk and downloadfile-2.apk should be left alone. The first file downloadfile.apk was dated the 17th and as today if the 19th, it seems to me this must be a problem with the android install routine. If the install hasnt happened after about an hour I would have thought it pretty safe to delete the files!

Finially I manually deleted downloadfile.apk, downloadfile-1.apk and downloadfile-2.apk. Then the downloads returned to being called downloadfile.apk.

I think the problem would only happen if a large downloadfile.apk file was left in /cache, or the phone was not rebooted for a long time. A manual delete of the files or like you say a reboot if using your tmpfs will resolve the problem - an automated delete based on time would solve it in most cases.

I think the /cache directory should be RAM drive for all phones with a large enough RAM, as its a better solution than using the SDcard, I am not 100% sure from the earlier posts but I think CM7 uses SDcard if /cache is too small, maybe the blade port should use your tmpfs instead?

Link to comment
Share on other sites

Guest leetron1
You could also try this partition layout from Tom G - http://android.modaco.com/index.php?s=&amp...t&p=1540840

/dev/block/mtdblock4 41.3M 1.2M 40.1M 3% /cache

/dev/block/mtdblock6 272.1M 38.0M 234.1M 14% /data

/dev/block/mtdblock5 143.5M 92.8M 50.7M 65% /system

Just overwrite the files in my partition update tpt with the ones from tom g's zip.

I'd release a few other partition options, but I don't have time to update & test them at the moment, or write a proper guide. I want to get it all working with clockwork 3 too.

Thanks mate...I think Tom's layout suits me better...when you get the time though, I think a few layout options will go down v well with the crowd...thanks again for your work..much appreciated :D

Link to comment
Share on other sites

Guest maTTewCZ

Where is tutorial or FAQ? How can I flash it? I copied image folder to sd card and hold volum up key while booting, but my phone stuck showing green android..

Link to comment
Share on other sites

Guest leetron1
Where is tutorial or FAQ? How can I flash it? I copied image folder to sd card and hold volum up key while booting, but my phone stuck showing green android..

Sounds like you've entered bootloader mode, pull battery...need to hold power+MENU+volume UP, all together

Link to comment
Share on other sites

Guest maTTewCZ

No, nothing, I can boot into system or recovery (3.0.0.6), but no this. I tried MENU+VOLUME UP+POWER but i can see only green android logo, no text, no progress..where is the tutorial??

Edited by maTTewCZ
Link to comment
Share on other sites

Guest leetron1
No, nothing, I can boot into system or recovery (3.0.0.6), but no this. I tried MENU+VOLUME UP+POWER but i can see only green android logo, no text, no progress..where is the tutorial??

Have you read this?

Link to comment
Share on other sites

Thanks mate...I think Tom's layout suits me better...when you get the time though, I think a few layout options will go down v well with the crowd...thanks again for your work..much appreciated :huh:

I'll probably have a go next weekend. I'll find all the different partition layouts that have already been posted & I might add a couple more.

I think I'll just pack up the minimum tpt partitioning files & tell people to add their own choice of recovery program as boot.img. You can just replace boot.img with your favourite recovery now & it'll work, but the ramcache update zip wont work with clockwork 3. The only problem is that it adds another step & another download to the process for users.

I'll try to fix the update zip for cw 3 too.

Link to comment
Share on other sites

Just found out how to sign zip files, signapktic (android market) ...

So here is a signed version of the tmpfs /cache thing for froyo roms.

It should also work with clockworkmod 3, as well as older recovery programs.

It's exactly the same script as before, theres no reason to upgrade if you installed the older version. It's just signed & should work with all recovery programs now.

This is only for ZTE Froyo based roms, it wont do anything on Eclair or on CyanogenMod. It should work on flb-froyo, japanese jellyfish, modaco, decrossed, dechinaed, desoftened & most other froyo roms for the blade.

c89cb62c10e6ff622d1a4c1809596e91 cache2tmpfs_blade_froyo_signed.zip

cache2tmpfs_blade_froyo_signed.zip

Edited by wbaw
Link to comment
Share on other sites

I've written a very early draft of an idiots guide, going to post it in the next post. Once I've improved the grammar, made sure I didn't miss anything out, added the files & links, etc, I'll update the first post. Any help in improving it is appreciated.

I haven't got all the new files ready & tested yet, but for now it should work with the files posted here: http://android.modaco.com/content-page/330...nation/page/60/ I just want to make a few small adjustments & test everything properly before uploading them.

Link to comment
Share on other sites

This mod will repartition your phone's internal memory to give you more room to install apps on your phone's internal data partition. It wont touch your SD Card, it is nothing to do with apps2ext, a2sd or anything like that. There is no real reason to use it if you're already using apps2ext.

Safety precautions / disclaimer:

The reduced /cache size will only work on 2.2 (Froyo) or CM7 roms. Froyo roms need an extra patch, the ramcache zip, CM7 just works, there is no patch available for 2.1 (Eclair) roms.

Make sure you check the md5 of any downloaded files

Make sure that your phone is fully charged before flashing anything.

Check the used data size on your system partition before flashing, make sure it is less than the partition size that you will flash, if you're flashing a new rom, make sure it's at least 5mb bigger to allow for any filesystem overhead.

Don't blame me if it goes wrong, there's no warranty. It will invalidate any warranty on your phone, if you break your phone by doing this, I'm not buying you a new one, I'll laugh at you.

I recommend using Titanium Backup to try to save some of your data, but it's not perfect & it wont restore all your data, especially if changing rom.

Required Software

AFV - Android File Verifier - available free on the Android Market, search for AFV

An Android file manager, any will do, as long as it can copy & rename files

ClockworkMod or Amon-RA recovery (ClockworkMod 3 required for CM7), links below

A partition zip from this post

The ramcache update zip from this post (Froyo users only, CM7 doesn't need this)

Method 1 - Using your existing rom - This should preserve your phone's data (no guarantees).

Install AFV on your phone from Android Market

Download a ClockworkMod Recovery image file to your computer & check the md5, if you're installing CM7 then you need to use version 3, for older roms you need version 2.

Flash ClockworkMod to your phone (instructions in Clockwork Mod post)

Download a partitioning zip & unzip it to your phone's sd card, creating an /image folder

Check the integrity of the partition file, use AFV navigate to the image folder, then long press on the nandroid.md5 file, then verify nandroid backup

Reboot into recovery mode (clockworkmod) & perform a nandroid backup.

Reboot back into Android & open your file manager

Copy boot.img system.img & data.img from your nandroid backup to your image folder. This is also a good time to double check the size of your system.img

Delete the old blank userdata.img from your image folder & rename data.img to userdata.img.

Power off your phone & wait a few seconds

Press the volume + key on your phone & power on

You should see some green text on the screen while it is repartitioning & reflashing your data. You might just get a blank screen for a while, that's ok too.

Leave it for 10 minutes while it flashes & reboots.

If you're using CM7, or have a stock 42mb /cache partition, you're done at this step.

If you're using Froyo & a reduced size /cache then reboot into clockwork & flash ramcache.zip otherwise you wont be able to install anything.

If you're using a froyo rom with a theme applied, then you might end up with the boot animation looping & it not booting. Leave it at least 10 minutes to make sure it isn't just slow. You may be able to get round this by booting into clockworkmod, then flash your rom's original zip file, without the theme & wipe dalvik-cache, then reboot into android, let it fully boot before rebooting back into clockwork, then flash the theme & wipe dalvik-cache again. If it doesn't work on the next reboot then you might need to wipe userdata/factory reset & reinstall your rom.

Method 2 - Installing a new rom - This will wipe all the data on your phone

Install AFV on your phone from Android Market.

Download a ClockworkMod Recovery image file to your computer & check the md5, if you're installing CM7 then you need to use version 3, for older roms you need version 2.

Flash ClockworkMod to your phone (instructions in Clockwork Mod post)

Download a partitioning zip & unzip it to your phone's sd card, creating an /image folder

Copy the clockwork mod recovery.img file to the /image folder on your phone's sdcard & rename it to boot.img

Check the integrity of the partition file, use AFV navigate to the image folder, then long press on the nandroid.md5 file, then verify nandroid backup

Put any zip files you need to install your new rom on your sd card. If it's a froyo rom, don't forget ramache.zip if you're using a reduced /cache partition

Reboot into recovery mode (clockworkmod) & do a factory reset, wipe /cache /data /sd-ext (if you have one) & .android_secure

Power off your phone & wait a few seconds

Press the volume + key on your phone & power on

You should see some green text on the screen while it is repartitioning & wiping your data. You might just get a blank screen for a while, that's ok too.

It should reboot straight into clockworkmod after wiping all your data.

Flash your rom using clockworkmod.

If you're using a froyo rom & a reduced size /cache then flash ramcache.zip after flashing your rom, otherwise you wont be able to install anything.

Reboot.

Downloads

Coming soon ... unfinished.

Edited by wbaw
Link to comment
Share on other sites

I need somebody courageous with a new unmodified phone, where power + & boot wont start the phone in bootloader/fastboot mode to test this & report back their results. There's a chance the minimal tpt install might not work on the new phones. Hopefully it will work without a problem, but if it doesn't work then you should be able to use the JJ9 image install to fix it (if you have a micro sd card reader for your pc).

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.