Jump to content

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


Guest wbaw

Recommended Posts

Guest socialworker

Regarding my problem with symlinking /cache to /data/cache with FLB7 I found a solution yesterday:

As flibblesan pointed out, his ROM uses runparts and therefore init scripts must be placed in /etc/init.d.

However, putting the userinit script as provided for JJ there didn't help, I think it just didn't get executed for some reason.

So what I did is put the cache mounting part from userinit into the 02cachedalvikcache script.

That's certainly a bit dirty, but it works, bigger apps download fine now.

Link to comment
Share on other sites

Regarding my problem with symlinking /cache to /data/cache with FLB7 I found a solution yesterday:

As flibblesan pointed out, his ROM uses runparts and therefore init scripts must be placed in /etc/init.d.

However, putting the userinit script as provided for JJ there didn't help, I think it just didn't get executed for some reason.

So what I did is put the cache mounting part from userinit into the 02cachedalvikcache script.

That's certainly a bit dirty, but it works, bigger apps download fine now.

Thanks for the update, I think userinit.sh is used by a2sd, so it might only work on Japanese Jellyfish. I can't see an /etc/init.d in JJ or any other roms. There are some scripts in /etc that start with 'init.' maybe one of those could be used for a more universal version.

Where is the 02cachedalvikcache script you edited?

Edited by wbaw
Link to comment
Share on other sites

Guest shadowninty

anyone tried this for CM6?

edit: not working, any solution(s)

I can wait till tomorrow ;)

j/k ;) but please

Edited by shadowninty
Link to comment
Share on other sites

anyone tried this for CM6?

edit: not working, any solution(s)

I can wait till tomorrow ;)

j/k ;) but please

Either repartition (a straight jj9 image install without this mod will give you /cache back), or add the lines added to /system/bin/userinit.sh to unmount cache & symlink it to /data/cache to another init script that gets run on every boot, I'm not sure which one yet. Maybe editing one of the init. files in /system/etc would work but it's untested.

Looks like the current version does only work with Japanese Jellyfish

Edited by wbaw
Link to comment
Share on other sites

Looks like the current version does only work with Japanese Jellyfish
This guide is more universal, it generally works with all ROMs:

http://android.modaco.com/content/zte-blad...-for-your-apps/

[GUIDE] How to get more FREE SPACE for your apps, 2011-02-04; / change partitition sizes (all ROMs)

There are included partition files for 128 M system and 4.5 M cache. So for not that big apps it works without redirecting the cache.

Link to comment
Share on other sites

i was able to update Angry Birds with my Cache still mounted at /Cache in CM6

seems all files are going to /SDCard/Download ;)

It'll work then ;) CM or maybe Tom G must have customised it.

With most blade roms it puts downloads in /cache by default & I'm not sure that the userinit.sh hack to redirect them works on any rom except Jap Jelly.

Link to comment
Share on other sites

  • 2 weeks later...

Would anybody be interested in a new version of this that'll work on flb-froyo (slim) & should work for other slim roms too? It'll also make app installs from the market a little faster too by loading /cache as a ramdisk & it'll save a bit of room on /data too.

I'm thinking of packing a tpt image that is just the re-partitioning bit & recovery image, it boots straight into a recovery manager so that you can then flash your new rom's zip file or restore your backup or whatever. Which one should I use? Clockwork 3 (latest & greatest, but incompatible with older update zips) or amon ra-recovery (my fav)? It could either leave your chosen recovery partition alone & just flash the recovery manager to /boot or it could update /recovery too.

I can also produce multiple different sizes for the /system partition to fit different roms. What sizes do we need?

I've not updated the first post yet, but if anybody wants the new /cache ramdisk thing, just add the 3 lines below to the end of /system/etc/init.qcom.post_boot.sh - I think that's a standard startup script that should be on all roms based on a stock rom. It'll probably have to be added to a different script in the CM roms.


#### START - mount /cache as tmpfs ####
umount /cache
mount -t tmpfs -o size=42M,nr_inodes=42k,mode=0770 tmpfs /cache
chown system.cache /cache
#### END - mount /cache as tmpfs ####
[/codebox]

Edited by wbaw
Link to comment
Share on other sites

That would be nice for CM7 and FLB Froyo.

It'll certainly work on FLB Froyo, I've just switched to that. It should work on any other rom based on a ZTE rom too, by editing /system/etc/init.qcom.post_boot.sh - that is also the file which sets the minimum speed of the cpu to 245mhz, as an added bonus I'll change it to set the minimum to 122mhz to save some battery, it wont affect any overclocking settings you've done with setcpu (or other apps) or userinit.sh, /etc/init.d or wherever, it gets loaded before all those.

I'm not sure about the CM roms, I've not tried those yet. I've no doubt it can be done, but it probably uses different startup scripts, so you'll have to find one & edit it yourself. I think they may be bigger than 122mb too, so that could cause problems.

I'll also produce undo files, in case you can't get it working, to make it easier to revert back to a 42mb cache, 128mb system & 286mb data (JJ image style) or the stock partition layout.

The process will be much simpler - Just do a nandroid backup first, then extract the image folder from the new zip that I'll produce later to the phone, volume up & power on, it'll boot straight into recovery after a quick flash where you can restore your nandroid backup, then flash the update zip to create a ramdisk for cache, reboot & you have more space in /data, all done. no need to wipe your user data or anything.

Expect it later tonight or tomorrow, I need to do a bit of testing first, especially for the CM roms (but I might just release the other roms version first).

Edited by wbaw
Link to comment
Share on other sites

Guest Rotmann

Thanks a lot for this. Check out the latest CM7 posted by Flibblesan here in the first post, it seems pretty damn good, it is based on Tom G's latest stuff, most of the problems have been ironed out, looks very good.

Edited by Rotmann
Link to comment
Share on other sites

I'll also add md5sum & sha1sum checksum files, so you can check your tpt re-partitioning install & make it a little less risky.

Does anybody have any idea how we could easily (noob friendly) check an md5sum file for all the files in the /sdcard/image directory on the phone? I can check individual files on the phone with friendly apps, I can generate md5sum files with multiple files listed & test those in the terminal on the phone, i just need an app that can check the full directory with 1 tap. there must be one surely?

Edit - found one, free in the market, AFV, just call the md5sum file nandroid.md5 & it works. So my next update should be safer too, you'll be able to check file integrity on your phone before you flash.

Also how do I sign my update.zip? That's less likely to kill anything if it's corrupt, but it'd still be nicer for it to be signed. I should get it working with clockwork3 too.

Another gotcha is that the system partition is a couple of mb bigger on the phone than the system dir in a rom update.zip. if you try to flash a system partition which is too big for the new system partition size on the phone, you'll get no errors, no warnings, but the last few files wont be there, so that causes problems. It's best to leave a few mb spare in /system for safety. the nandroid .img files are a couple of mb bigger still, so if you stick with that size & above for /system, it's ok.

Edited by wbaw
Link to comment
Share on other sites

i was able to update Angry Birds with my Cache still mounted at /Cache in CM6

seems all files are going to /SDCard/Download :D

If this is true, then shrinking /cache will work fine without the extra update.zip on CM6 is it the same on CM7 too?

Download a few apps from the market & use rootexplorer to see if anything is put in /cache (before you repartition). If CM uses the sdcard as a cache for installing apps then there's no problem.

How much space is used by /system on the CM roms?

Link to comment
Share on other sites

Guest Ilkin Jamalli

Just installed as per the instructions and Titanium backup reports that a2sd free space is only 3Mb. Is it possible to increase A2SD partition or i should not bother?

Link to comment
Share on other sites

Just installed as per the instructions and Titanium backup reports that a2sd free space is only 3Mb. Is it possible to increase A2SD partition or i should not bother?

This mod repartitions your phone's internal memory. If you have an ext partition on your sd card for a2sd, this mod wont benefit you at all. You'll need to repartition your sd on your computer or using clockwork or something.

I'm going to remove it for now. A much safer version is on it's way & will be posted later.

I've discovered that we only need 4 .mbn files to do the 'tpt' repartition/install we don't need to touch the hidden part of the nand (much). We just need appsboot.mbn appsboothd.mbn partition.mbn and partition_zte.mbn along with a few .img files

Edited by wbaw
Link to comment
Share on other sites

Guest Ilkin Jamalli
This mod repartitions your phone's internal memory. If you have an ext partition on your sd card for a2sd, this mod wont benefit you at all. You'll need to repartition your sd on your computer or using clockwork or something.

I'm going to remove it for now. A much safer version is on it's way & will be posted later.

I've discovered that we only need 4 .mbn files to do the 'tpt' repartition/install we don't need to touch the hidden part of the nand (much). We just need appsboot.mbn appsboothd.mbn partition.mbn and partition_zte.mbn along with a few .img files

Thanks, awaiting proper steps then.

P.S. I never had a2sd partition on my SD and never formatted my SD before this ROM. It just appeared in Titanium Backup after installing this ROM.

Link to comment
Share on other sites

Thanks, awaiting proper steps then.

P.S. I never had a2sd partition on my SD and never formatted my SD before this ROM. It just appeared in Titanium Backup after installing this ROM.

Ah, just ignore it then, it doesn't mean anything, it's likely just a small bug with titanium/japanese jellyfish. Japanese Jellyfish includes a2sd support, but it's a mess about to use it & probably not advisable, especially after this mod.

This mod doesn't have anything to do with a2sd, it gives you more room to install apps on your phone's internal memory.

If you followed all the steps in the original post & it all went ok, you should be fine, if you're on Japanese Jellyfish 9, there should be nothing to worry about. I'm just going to release a better version either tonight or tomorrow that should work with more different roms & it'll be a bit safer to install.

Just check you can download apps from the market, try to find a few bigger ones to test it, if that works, then you're all ok.

Edited by wbaw
Link to comment
Share on other sites

Guest Ilkin Jamalli
Ah, just ignore it then, it doesn't mean anything, it's likely just a small bug with titanium/japanese jellyfish. Japanese Jellyfish includes a2sd support, but it's a mess about to use it & probably not advisable, especially after this mod.

This mod doesn't have anything to do with a2sd, it gives you more room to install apps on your phone's internal memory.

If you followed all the steps in the original post & it all went ok, you should be fine, if you're on Japanese Jellyfish 9, there should be nothing to worry about. I'm just going to release a better version either tonight or tomorrow that should work with more different roms & it'll be a bit safer to install.

Just check you can download apps from the market, try to find a few bigger ones to test it, if that works, then you're all ok.

Yeah market is working fine.

Link to comment
Share on other sites

on mine titanium says 217mb (93 mb free) for a2sd, i think it's just random, it doesn't mean anything, i think it's just a titanium bug with 2.2 roms, it doesn't match with anything else.

The internal memory should show 333mb after this mod.

Link to comment
Share on other sites

I've discovered that we only need 4 .mbn files to do the 'tpt' repartition/install we don't need to touch the hidden part of the nand (much). We just need appsboot.mbn appsboothd.mbn partition.mbn and partition_zte.mbn along with a few .img files
Right, that's what I discovered and posted the first of february:

[GUIDE] How to get more FREE SPACE for your apps

:-)

Thanks for your recent comment on how to move /cache in more roms, by the way.

Link to comment
Share on other sites

Just installed as per the instructions and Titanium backup reports that a2sd free space is only 3Mb. Is it possible to increase A2SD partition or i should not bother?
By the way, if someone wants to increase the size of the A2SD partition, follow these steps:

1. Backup your A2SD partition using Titanium Backup and/or copying the files with a Rootexplorer or terminal (root needed). The location is: /system/sd.

Also backup the content of your sd card fat32 partition with your PC.

2. Boot into Clockworkmod Recovery, choose the option to partition the sd card. Choose ext2, no swap partition and a bigger ext2 partition than before (I recommend 512 MB - 1024 MB).

3. Recover the files from your backups. Done.

Edited by ztedd
Link to comment
Share on other sites

he didn't, it's just a titanium bug, but anyway.

i will post a much improved version of this later, faster, safer, less drastic modification to your phones internals, easier to install & it should work on all roms. i remembered what you'd posted about the mbn files ztedd from another comment, but i couldnt find the post. i tested it anyway, it definitely wont work without any of those 4 mbn files. it's faster & safer without all the other mbn files. The ramdisk for /cache seems to help apps install faster & frees up a little more space on /data too, i've also found a startup file which seems to be in all the zte based 2.2 roms - http://android.modaco.com/index.php?s=&amp...t&p=1602528

i'll probably start a new thread for it. just need to do some final testing & write up the guide.

Edited by wbaw
Link to comment
Share on other sites

Guest Ilkin Jamalli
on mine titanium says 217mb (93 mb free) for a2sd, i think it's just random, it doesn't mean anything, i think it's just a titanium bug with 2.2 roms, it doesn't match with anything else.

The internal memory should show 333mb after this mod.

Anyone getting "The application Email(process com.android.email) has stopped unexpectedly. Please try again. Force close." on each reboot?

I have not configured corporate email at all.

Link to comment
Share on other sites

he didn't, it's just a titanium bug, but anyway.

i will post a much improved version of this later, faster, safer, less drastic modification to your phones internals, easier to install & it should work on all roms. i remembered what you'd posted about the mbn files ztedd from another comment, but i couldnt find the post. i tested it anyway, it definitely wont work without any of those 4 mbn files. it's faster & safer without all the other mbn files. The ramdisk for /cache seems to help apps install faster & frees up a little more space on /data too - http://android.modaco.com/index.php?s=&amp...t&p=1602528

i'll probably start a new thread for it. just need to do some final testing & write up the guide.

That's great! Looking forward for your improved partition mod.
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.