yashsingh1/xdaforums huggingface dataset:
[Hero CDMA Android Development] billodell:
Took me awhile but i finally got it. Had to flash to RA instead of clock work. Ended up with 266mb free, about double what I did have. Awesome work thanks!
[Hero CDMA Android Development] gqukyo:
Which RA version did you use? I had Darch's 1.7 I think but that never played nice when I tried to use this for Sense roms. I always bumped into the insufficient memory error when downloading from Market. I'm using the clockwork recovery and using that I can use the CM6 roms.
[Hero CDMA Android Development] billodell:
1.6.2 I couldn't get adb to reboot clockwork. That's the only trouble I've ever had out of clockworkmod. I've always used clockworkmod untilled now. I just redid the whole thing and ended up with 333mb free.
[Hero CDMA Android Development] igtheactt1:
You don't have to use adb to reboot recovery.. just use reboot recovery inside of clockworkmod recovery menu...
[Hero CDMA Android Development] billodell:
I tried, it kept hanging at the splash screen.
[Hero CDMA Android Development] igtheactt1:
Oh mine did to... so I took the battery out then booted into recovery... I mean mine says 184 free after installing a bunch of apps and not using a2sd on nfx .7
[Hero CDMA Android Development] stayclean:
Darch's 1.7 recovery worked fine for me when I set this up.
[Hero CDMA Android Development] igtheactt1:
Well didn't need to... have 220 left after a2sd plenty of space
[Hero CDMA Android Development] PotVsKtl:
Can this not be done from Clockwork? There doesn't appear to be an option to reboot in shell when using Clockwork. The reason I'm trying to use Clockwork is I need its advanced nand restore options.
[Hero CDMA Android Development] Tiffany84:
So I am trying to do this with cm6 stable along with the new gapps. So should I use 102 2 or something higher? Also my current setup is those 2 things along with a theme and battery tweak. So could I nand backup what I have and use that or will this not work with themes or tweaks? Any help would be greatly appreciated. I'm still learning but really wanna try this. Thanks again for anyone willing to help.
[Hero CDMA Android Development] Vandelay007:
I use clockwork and after I do the second set of wipes I choose reboot to recovery from there and it works fine

Sent from my froyo using the xda app
[Hero CDMA Android Development] Vandelay007:
It will work with any theme or tweak you use...and I would start higher for your first time, like 110 3. After you boot up you can go to terminal emulator and type:

su

df -h

It will show you what your system is using vs what is available....and then you can adjust if you would like, but for most people 110 3 is plenty good enough

Sent from my froyo using the xda app
[Hero CDMA Android Development] PotVsKtl:
Thanks for the info. Guess I should have just gone ahead and tried. For now I'll probably just flash the boot.img RA makes from fastboot.
[Hero CDMA Android Development] Tiffany84:


So its ok to use my backup with this? And I can use clockwork instead of adb to reboot recovery?
[Hero CDMA Android Development] Tiffany84:
Tried to flash the recovery and it aborted, said signature verification failed. Any ideas?
[Hero CDMA Android Development] PotVsKtl:
Disregard.
[Hero CDMA Android Development] Tiffany84:
So everything is ok? Just go ahead and restore my backup and then flash the boot?
[Hero CDMA Android Development] hexskrew:
No matter what I set cache at, when restoring my nandroid, it stated that cache was full, so after I stopped @ 16mb for cache, I just went ahead and let nandroid finish, flashed the boot and rebooted.

I am SOOOOOO happy now!~! 226mb FTW!
[Hero CDMA Android Development] Vandelay007:
No, the cache partition size isn't wrong, that means something went wrong while doing it....I would set it back to 3 and wipe all and try it again

Sent from my froyo using the xda app
[Hero CDMA Android Development] Vandelay007:
Yup...wipe all, flash recovery, wipe all, reboot to recovery, restore a nandroid, flash the boot.zip and you should be all set. Let me know if you need any more help

Sent from my froyo using the xda app
[Hero CDMA Android Development] Tiffany84:
I got error in cache:recovery/log (no space left on device). What now?
[Hero CDMA Android Development] igtheactt1:
Says no such directory
[Hero CDMA Android Development] danaff37:
you always get that error. It's ok, I just ignore it. Only side effect, when using rom manager to try and install something, it reboots to recovery but doesn't do anything on its own. No biggie, I can flash things on my own. lol

that is not an error that should appear with either of those commands... If you have an old busybox, df -h doesn't work, you just have to use df and realize that sizes given are in bytes. (-h is for human readable, converts to kilo and meg and gigs for you)
[Hero CDMA Android Development] customhdrider:
For those getting the error no such file,,in terminal,type su busybox df-h..that will give you the partition menu with your amounts..
[Hero CDMA Android Development] Firerat:
wipe cache

there is no real reason why cache should be anything other than 2mb

recovery uses it for logs, just wipe cache, nandbackup, resize, erase system data and cache, reboot to recovery and nand restore

currently its failing because your cache backup has crap in it

you could also just unyaffs system and data manually, the nand backup and restore features of custom recoverys are actually doing very basic things

mount /system

mkyaffs2image /system /sdcard/<somedirectory>/system.img

md5sum /sdcard/<somedirectory>/system.img >> /sdcard/<somedirectory>/md5sums

^^ does the same for data, cache, sd-ext, .andriod-secure

then to restore, it checks all the md5sums still match , formats the partition ,mounts it and unyaffs the .img into the directory
[Hero CDMA Android Development] Tiffany84:
So I finally got everything working but I need to add sprint vvm to cm6. So can I flash that in recovery without having to do everything all over again? And do I need to wipe cache before flashing it?
[Hero CDMA Android Development] hotaru:
unless the dalvik cache is on the cache partition...
[Hero CDMA Android Development] Firerat:
which is why a script redirects it to /data/
[Hero CDMA Android Development] laie1472:
A firerat thanks for the awesome mod I read way back in this thread that u use the automatic script or at least I thought it was u if I'm wrong my bad but my question is/ is there any advantage over the script vs the two files forgive my misunderstanding thanks in advance

Root-Hack-Mod-Always™
[Hero CDMA Android Development] hexskrew:
hmm.. could be. lemme check. Well here is what I have noticed:

There appears to be nothing in /cache, except for a recovery folder, however like I said I went ahead and made the jump even though it gave the no free space avail. error.

I did wipe cache everytime.. I wonder if this is an issue with just the nandroid I have (rom has older a2sd, and at one time I believe when it copied over the cache2sd, maybe it left some old stuff there?) I don't understand the 1.1mb used.

Lemme check my a2sd setup..

But it makes me wonder if it's got something to do with my recovery... For a while when I selected to clear cache, it just went back to the recovery menu (using clockworkmod 2.5.0.1 btw)

Bout to flash a new rom, I am setting cache back to 2mb so I will keep you informed.

One other thing of note: After I flash the recovery zip, and then use adb to reboot to recovery, the phone reboots, then reboots again. Then (strangely even though I selected to wipe all in recovery) it starts loading the rom?! So then I use adb to reboot into recovery again and then it works.. (and yes I selected to wipe everything again in recovery before flashing the new rom). You think there is an issue with my recovery that prevents it from actually wiping the system? I mean it all still does what the label says on the box for your repartitioning system so I don't quite understand it.

*update* just flashed the Zen-Froyo-Sense based rom and no error from the cache partition. It still gave quirks like I spoke of directly above, but everything is still going fine, except now after I flash the boot zip from your partitioning system and rebooted, again it reboots twice. Is it just supposed to do this and I didn't see it in the instructions?

I think what the issue is here, is that I was using an older version of a2sd in my nandroid backup, and it kept a lot on the cache partition even though it copied it to the sdcard. Once the cache was wiped again, the rom rebuilt the cache where it's supposed to be now.

Now just curious about that double reboot/no actual wipe when I told it to issue..
[Hero CDMA Android Development] Tiffany84:
Every time I tried this with a nan backup I got that same cache error but if I start fresh it goes through without a hitch.
[Hero CDMA Android Development] Firerat:
your rom is not running the boot scripts,

a cm based rom runs scripts in /system/etc/init.d

guess I should fix broken ramdisks in recovery

cm6's current ramdisk has this in it

# Run sysinit
exec /system/bin/sysinit

class_start default

/system/bin/sysinit

#!/system/bin/sh

export PATH=/sbin:/system/sbin:/system/bin:/system/xbin
/system/bin/logwrapper /system/xbin/run-parts /system/etc/init.d

you may not have logwrapper on your broken roms, so

/system/xbin/run-parts /system/etc/init.d will do
[Hero CDMA Android Development] Firerat:
AutoMTD just pre-patches so you don't need to flash the boot patcher

the script is in my PATH, so I just

PatchUpdateScript.sh ~/Downloads/therom.zip ;Push2sd.sh *therom*.zip

where Push2sd.sh is ( again in my PATH )

#!/bin/bash
adb shell 'if [ "`grep -q sdcard /proc/mounts;echo $?`" != "0" ]; then mount /sdcard;fi'
for i in $@;do
adb push $i /sdcard/ &
SIZE=`ls -l $i|busybox awk '{print $5}'`
while [ "$size" != "$SIZE" ];do
size=$(adb shell ls -l /sdcard/`basename $i`|awk '{print $5}')
echo "/sdcard/`basename $i`"|awk '{printf "\r"'$size'"/"'$SIZE'" ""%.1f %s %s",('$size'/'$SIZE')*100,"% ",$0}'
sleep 1
done
done
echo -e "\n"
exit
[Hero CDMA Android Development] laie1472:
If you don't mind me asking are u adb'n this?? Also what does this give for internal mem?? I downloaded the flash zip a while back wen I first ran across this mod on here but I really don't know the process of how to use it from a point of wen I'm about to flash a rom or kernel the two files are pretty simple once u get your mod up and running but the script and what I just read is a bit puzzling to me so if you don't mind and you have the time more input in a detailed form from ground up would b greatly appreciated I have no knowledge of this but I would like to learn as much as possible thanks in advance for the time and great mod

Root-Hack-Mod-Always™
[Hero CDMA Android Development] hexskrew:
Well.. I am not using cm6, I am using stock 2.1, and a 2.2/w sense. Strangely enough, (I don't hold you to this, its probably something to do with how the 2.2 rom is working) I get bootloops now when I try to flash the zen 2.2/w sense...

I wanted to know, what are the settings to get the phone back to it's original state? I definitely want to check this out some more, but I have a lot of stuff to flash test.
[Hero CDMA Android Development] laie1472:
I think you just reflash you current recovery and don't flash any of the mod I think correct me if I'm wrong in case I need it for future reference thanks in advance

Root-Hack-Mod-Always™
[Hero CDMA Android Development] Vandelay007:
Are you increasing the numbers in the notepad file to compensate for the possible increased size that comes along with the 2.2 sense rom? If not, that is most likely the cause of your boot loops

Sent from my froyo using the xda app
[Hero CDMA Android Development] hexskrew:
Actually yes, I took it up to 100mb for cache so it's balanced out, but I also went ahead and -reflashed recovery to ensure it was taken out, but I don't think it is? hmm.. Definitely odd but oh well, it's ok for now. Dunno what else may be the issue and I am at work atm so don't have my adb to go back on. I'll get with you again with this later.
[Hero CDMA Android Development] Vandelay007:
You don't need to set your cache like that, you want to increase the system partition....you still want to increase cache but not that high....

Sent from my froyo using the xda app
[Hero CDMA Android Development] hexskrew:
Yes you are correct as I have just noticed...

So judging by this output and being my nandroid that I have been using from a rom for a while (with a fair amount installed to boot) I changed the system to 180mb and cache 30mb.

Now that I am back home with my lovely laptop with adb, I will reflash the 2.2w/sense rom and tell you what happens.

BTW, I doubt the rom boot looping had anything to do with this. If it does it's from my own stupidity of not recording the original partition sizes. Also it's a very alpha type rom I am flashing so something messed up can be immenent. Bout to find out if this helps my issues.

***Update***

I have noticed that just the generic wipe all in clockwork mod is not working but if you go to the partitions menu and format system, data, and cache from there, it does in fact wipe those parts. Tested with df.

***Update2***

Got the experimental rom to boot. W00t. now I realize exactly what file does what (i.e. the recovery zip actually resizes the partitions from the given file on the sdcard, and the boot zip just makes sure the kernel knows about it). Working out pretty well btw.

I'll post size specs on the rom as soon as it boots all the way up.

*Zen 2.2 size after boot*
sh-3.2# busybox df -h
busybox df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 95.3M 12.0K 95.3M 0% /dev
tmpfs 95.3M 0 95.3M 0% /mnt/asec
/dev/block/mtdblock3 180.0M 160.8M 19.2M 89% /system
/dev/block/mtdblock5 250.1M 84.2M 165.9M 34% /data
/dev/block/mtdblock4 30.0M 1.1M 28.9M 4% /cache
[Hero CDMA Android Development] eltheself:
I liked Clockwork, but I just couldn't make it work.... as for the advanced partition stuff.... hey, MY Amon Ra recovery does the same thing.... :D
[Hero CDMA Android Development] Vandelay007:
Based on what I see there, you could safely set your mtd file as 170 3, but you don't need to, its only if you want those extra 40ish M

Sent from my froyo using the xda app
[Hero CDMA Android Development] flipfone:
After flashing the first file i wipe then i try to reboot into recovery

jim@jim-desktop ~/android-sdk-linux_x86/tools $ ./adb shell

~ # reboot recovery

/sbin/sh: reboot: not found

any ideas?

also i now have no cache?

Before:

df -h

Filesystem Size Used Available Use% Mounted on

tmpfs 95.6M 12.0K 95.5M 0% /dev

tmpfs 95.6M 0 95.6M 0% /mnt/asec

/dev/block/mtdblock3 170.0M 103.2M 66.8M 61% /system

/dev/block/mtdblock5 159.5M 143.2M 16.3M 90% /data

/dev/block/mtdblock4 130.0M 46.9M 83.1M 36% /cache

/dev/block/mmcblk0p2 915.1M 16.1M 850.2M 2% /sd-ext

/dev/block/vold/179:1

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

After:

# df -h

Filesystem Size Used Available Use% Mounted on

tmpfs 95.6M 12.0K 95.5M 0% /dev

tmpfs 95.6M 0 95.6M 0% /mnt/asec

/dev/block/mtdblock3 110.0M 103.2M 6.8M 94% /system

/dev/block/mtdblock5 347.1M 124.0M 223.1M 36% /data

/dev/block/mmcblk0p2 915.1M 38.6M 827.7M 4% /sd-ext

/dev/block/mmcblk0p2 915.1M 38.6M 827.7M 4% /cache

/dev/block/mtdblock4 3.0M 3.0M 0 100% /dev/cache

#

i used MTD 110 3
[Hero CDMA Android Development] Firerat:
I'm going to have to do something to patch your boot.img up with runparts

most of you are not having the helper script run on boot

/system/etc/init.d/06BindCache

#!/system/bin/sh
# 2010-08-05 Firerat, bind mount cache to sd ext partition, and mount mtdblock4 for Clockwork recovery's use
busybox umount /cache
# Bind mount /sd-ext/cache ( or /system/sd/cache ) to /cache
if [ "`egrep -q "sd-ext|/system/sd" /proc/mounts;echo $?`" = "0" ];
then
sdmount=`egrep "sd-ext|/system/sd" /proc/mounts|awk '{ print $2 }'`
CacheDir=${sdmount}/cache
else
CacheDir=/data/cache
fi

if [ ! -d $CacheDir ];
then
busybox install -m 771 -o 1000 -g 2001 -d $CacheDir
fi
busybox mount -o bind $CacheDir /cache
if [ ! -d $CacheDir/dalvik-cache ];
then
busybox install -m 771 -o 1000 -g 1000 -d $CacheDir/dalvik-cache
fi

if [ ! -d /dev/cache ];
then
busybox install -d /dev/cache
fi

if [ "`grep -q "/dev/cache /proc/mounts;echo $?`" != "0" ];
then
busybox mount -t yaffs2 -o nosuid,nodev /dev/block/mtdblock4 /dev/cache
fi
if [ ! -d /dev/cache/recovery ];
then
busybox install -m 770 -o 1000 -g 2001 -d /dev/cache/recovery
fi
if [ ! -L $CacheDir/recovery ];
then
ln -s /dev/cache/recovery $CacheDir/recovery
fi
[Hero CDMA Android Development] Firerat:
just reboot via the recovery menu

its clear that your recovery doesn't have the reboot cmd you are typing

/sbin/sh: reboot: not found

is a BIG clue
[Hero CDMA Android Development] flipfone:
i saw that and thats what i did. i thought i did something wrong tho i didnt know it was due to Clockwork not having the reboot command there. Thank you i now have 200+ megs FREE! Awesome bro!
[Hero CDMA Android Development] cordell12:
Just wanted to give Thanks to the Dev for this Mod. Been running it for a little over a week now and all is well :)

Thanks!
[Hero CDMA Android Development] Big-O-Devil:
WOW...:eek: man i thought i bricked my phone...:eek: but no.. this mod took out my recovery so i had nowhere to go... but thank god for the original RUU... because of that i was able to go back... wow.. after i changed my underwear smoked a cigarette and adb a new recovery i am back in action...

PS.. if you don't know what you are doing don't do it.... :cool: lol lol
[Hero CDMA Android Development] hunterd13:
the first couple of times i did it i didnt get it right- didnt mess up the recovery but i did have to reflash the boot-patch zip i used when i rooted it.
[Hero CDMA Android Development] arcejefferson:
lol that same thing happend to me...

what i really would like to know is which of the file do i download to us on my Hero. i say this because theres like 8 files to download.

also for the people that have it working how did you flash your steps you used... thanks for the help....
[Hero CDMA Android Development] danaff37:
okay, I'll try to simplify the instructions for some of you. First, download the two files

FR-recovery-v1.5.3-CustomMTD_S.zip
FR-boot-v1.5.3-CustomMTD_S.zip

then, create a file mtdpartmap.txt on the root of your sdcard, and only write the following

mtd 100 2

please note that the 100 and the 2 can be set to suit your needs, where the 100 is /system size and the 2 is /cache size (cache can remain small because this mod also symlinks the cache folder to /data if you do not have an ext partition on your sdcard, or symlinks it to the ext partition if you do)

then, reboot into recovery, nandroid backup, wipe data, cache, dalvik, and ext, then flash the first file, FR-recovery-v1.5.3-CustomMTD_S.zip, just like you do any rom or update.zip. Then either nadroid restore or flash your new rom/gapps/kernel etc., then the last thing you flash is the second file, FR-boot-v1.5.3-CustomMTD_S.zip, then reboot and enjoy.

Ok, I think that covers it, hope that is a little simpler for some of you. Not totally sure, but I almost think people losing their recovery is because they tried to flash the first file as a recovery in adb instead of just an update zip. Hope this helps others. I love my new set-up!
[Hero CDMA Android Development] hunterd13:
actually the op did a really good job of explaining the steps for our phones, except for the mtdpartmap.txt part, which he posted the link for the rest of the info. he said rebooting back into recovery required using adb shell, i tried it both ways, and for me he was right. until i used adb and the mtdpartmap.txt i always got the htc white screen. as always ymmv.
[Hero CDMA Android Development] Big-O-Devil:
ok..so how big can we go.:cool:
[Hero CDMA Android Development] hunterd13:
the idea is not how big can you go, its how small can you make your system and cache settings and still boot into and run your phone. the smaller the system and cache, the bigger internal storage.
[Hero CDMA Android Development] Rivas123:
Im so trying this tomorrow morning. Wish me luck :D
[Hero CDMA Android Development] urushiol:
CM6 RC1+newest Gapps takes up 99.7mb on the system partition, I had to increase system partition size from 100 to 102 to avoid boot loops!
[Hero CDMA Android Development] Big-O-Devil:
so instead of putting 100 2... we should put 102 2.. on the tex.file....
[Hero CDMA Android Development] Big-O-Devil:
OK so after a few reboot and a couple of attempts and some good reading i got it working... i am using Cm6-Rc1 and i went from 100m of internal to 307m of internal storage....this rocks... i only wonder if it works on zen or fresh rom...maybe i will try it... but hey thank-you guys for all your help...again this rocks

:D:D:D:D
[Hero CDMA Android Development] Rivas123:
doing this as I type this, Hopefully problem free =)

I can't reboot through adb.

nvm it worked! 157 all the way up to 309. mtd 102 3 cm6 Rc1
[Hero CDMA Android Development] danaff37:
For those wondering, mtd of 100 2 worked for me because there are apps and such I remove from gapps and the rom, so most will probably have to change it. If you flash anything besides froyo or you flash a new nightly and you notice the zip size is bigger, you will need to change it. To change it, change the me mtdpartmap.txt first, then do the WHOLE process again to reset partition sizes. Anything besides froyo will probably require a much larger system size.
[Hero CDMA Android Development] Tibedabeeto:
Steps I took:

nandroid backup

flash recovery file

wipe

power off

hold power and home to boot back into recovery saw the cache prompt at bottom

nandroid restore

flash boot file

reboot - First time rebooting took a little while.

worked like a charm and didn't have to set my phone up all over again.

Internal Memory is 356

Running Froyo RC1

used mtd 102 2 settings

Thanks OP :D
[Hero CDMA Android Development] Foo_Blyat:
i am going to try it on fresh rom today or tomorrow.
[Hero CDMA Android Development] Big-O-Devil:
Sweet Dude... let me Know if it works...
[Hero CDMA Android Development] laie1472:
Need help want to know if some one can provide detail instructions on how to resize the data and cache to get this to boot with cm6 rc1 I know how to use adb a little but I don't know the cmds to resize the partions like a few people are saying all I get are boot loops and its strange I can install this on the test cm6 and it works fine but cm6 rc1 just stays on the HTC screen I would really like some help thanks
[Hero CDMA Android Development] overthinkingme:
Will I have to flash just the boot file every time I wipe+restore a rom?

would undoing this mod to my recovery require me reflashing the original recovery?
[Hero CDMA Android Development] schmooo:
how does this boost performance.... if i already have 135mb free what does it matter if i have 300 free is it using this extra memory to boost performance somehow
[Hero CDMA Android Development] laie1472:
Figured it out now running real real nice
[Hero CDMA Android Development] pwrmedia:
Unsure if anyone else has tried/reported this yet but....

No need for a system wipe running this mod! I just ran it on Liquid's latest Sense Rom (using mtd 210 25 in the text file), and did the following:

-reboot into recovery

-wipe dalvik, wipe cache

-flashed FR-recovery

-wipe dalvik, wipe cache

-pulled battery, rebooted into recovery (vol down, home button)

-flashed FR-boot

-rebooted system

System shows avail internal storage of 157mb (previously was 90 something prior to flash), and I'll check in a few to see the true availability. But other than that, was just pleased to know that this does work w/o having to completely wipe the system. Awesome!

**EDIT - #'s below**

-/dev: 97488k total; 97488k avail (block size 4096)

-/system: 215040k total; 153220k used; 61820k avail

-/data: 230528k total; 70696k used; 159832k avail

-/cache: 116146k total; 36544k used; 79602k avail

-/dev/cache: 25600k total; 1164k used; 24436k avail