yashsingh1/xdaforums huggingface dataset:
[Desire Android Development] daedelus82:
Hi, did you read the first post? Steps required to do this involve formatting system, data, and cache partitions, twice. So yes existing data will be erased.

It is possible to restore a nandroid backup onto the new partitions and essentially keep all your data, this is detailed in the OP.
[Desire Android Development] marinierb:
This is working great. I will integrate it into the scripts I use to massage the ROMs prior to installation.

daedelus82, how do I send you a beer?
[Desire Android Development] daedelus82:
Thanks.. I have added a dontate link to my signature.
[Desire Android Development] Moe5508:
Oops, I accidentally formatted BOOT and now I can't restore a nandroid backup, can't install AlphaRev HBOOT 1.5 and I can't flash a new ROM. I get an error "Failure at Line 18...can't Symlink busybox SYSTEM:xbin/[ ...Installation aborted..." when trying to flash a LeeDroid ROM.

Any help please?
[Desire Android Development] ckpv5:
How about re-flash the clockworkmod recovery image ?
[Desire Android Development] Moe5508:
Using unRevoked? Fails to install as well. I get this error Device "sbin/sh: getprop" not found" is not supported at this time...its been almost 12 hours now since I can't boot back into normal mode...starting to panic...
[Desire Android Development] Lefy:
Flashing a original htc ruu update and after that root again with unrevoked?
[Desire Android Development] Moe5508:
Original RUU flash gives me a below 30% battery level error and fails to proceed even though my phone is fully charged, I know, as I left i charging overnight...
[Desire Android Development] howdid:
i have the exactly same problem only non sense roms are runing-.- and i don´t know how to fix it ...
[Desire Android Development] roniez:
Nice work bro..

looking forword to dig in to this my self. :)
[Desire Android Development] mblaster:
Bind mounting /cache should do the trick (worked on g1).

mount -o bind /data/cache /cache

For more info see Firerats Custom MTD thread in the G1 Forums, especially this post:

http://xdaforums.com/showpost.php?p=7063037&postcount=14
[Desire Android Development] almz:
Thanks it work for me. Now I have 170+mb free with dt a2sd :)

I'm using cm6.0.2 btw

edit: my phone is acting weird, it just hangs after playing with it for a few hours. i'll be using dt's a2sd for the moment.
[Desire Android Development] Narfx:
Hmm, I like that idea. Having two partitions for cache and data seems stupid; you'll end up filling one and having wasted free space in the other one, and I don't see any benefit in having two separate partitions.

(edit) Works like a charm =). Now I have 170MB free for data AND cache. Thanks for the link.
[Desire Android Development] Moe5508:
Almost bricked HTC Desire on SenseHD recovered...finally

Pheeewww! Finally got my device booted up again after struggling and searching for answers everywhere!

Please download this CyanogenMod6 ROM with Custom MTD here: http://bit.ly/9gR5H0 from this thread: http://bit.ly/bRr8rw; boot into recovery and flash it and your device will reboot and then you can really be very very careful how you choose to go from there :D
[Desire Android Development] AndroHero:
it says in that thread we have to add a script to the init_d folder too
[Desire Android Development] :
Applied correctly on my Desire with OpenDesire 4.0.10

Also, moved the dalvik-cache to cache partition (deleting

the line that contains "dalvik.vm.dexopt-data-only=1" from

/system/build.prop)

Reformated my SD in order to remove the SDExt partition.

Now i don't need app2sd anymore!!!...

THX!!!
[Desire Android Development] Caelte:
Can't we make one big partition for everything? Or isn't it possible?
[Desire Android Development] RiotRick:
I've got this setup. Excellent solution for the space problems. No need for apps2sd for me anymore.

I have it set-up in the 145mb /system, 95mb /cache setup with the dalvik-cache moved to /cache partition.
[Desire Android Development] AndroHero:
no the device needs many partitons.... boot, system, cache. data, ect, these are know as mtdblock's!
[Desire Android Development] Moe5508:
Still didn't work for me. Is it because am using a SenseHD ROM?
[Desire Android Development] howdid:
omg thank you soooo much ! :cool:
[Desire Android Development] killawatts:
If we wanted to switch recoveries (clockwork to amon ra) after everything is installed and working properly would it be as easy as updating the .img via fastboot and then patching with the mtd_recovery.zip? (as long as the rom and recovery are both patched with the same partition information)
[Desire Android Development] daedelus82:
Yes, I haven't tested it with Amon_ra but it should be fine. Fastboot flash the new recovery, boot into recovery and apply the recovery patch, then reboot into recovery for the change to take affect. Do not do anything else in the unpatched recovery apart from apply patch and reboot, else u may corrupt something as it won't recognize the partition layout until it's patched.

For those people trying to do this on sense roms, I have not tested this with sense, although some users have got it to work, but I'm not sure about sensehd
[Desire Android Development] Moe5508:
Doesn't appear to work on both SenseUI and SenseHD, for me at least. Wondering how AndroHero managed to get it to work on LeeDroid 2.2a?:confused:
[Desire Android Development] Shane2:
I used Richardtrip's UVOC kernel, and it seems to work for me
[Desire Android Development] Moe5508:
Thanks. Trying that now, and from a nandroid restore...been going/at HTC boot logo now for 10min? Give it some more time to fully boot?

EDIT: Nope, didn't work at all. That's it. I give up up. Been trying this for 2 days with no success now. What a pity. I really wanted to get rid of A2SD+...
[Desire Android Development] daedelus82:
Which ROM exactly were you trying? With which recovery? And what partition sizes? I'm going away this weekend but I may look at it Mon/Tue next week.
[Desire Android Development] 360nitrous:
i thought this was gonna be brilliant... i havent tried it yet but from reading i take it its either this or A2SD+? they both dont work? cause this with A2SD+ would kick ass! could install billions of apps (slight exaggeration)
[Desire Android Development] daedelus82:
It's quite possible to use both at the same time, but most people do this in order to get rid of A2SD. If you're keeping A2SD then why bother changing the MTD partitions at all? If you want to install billions of apps, increase the size of your ext3 partition.
[Desire Android Development] Khalen:
Both have their pros and cons.

While a2sd+ leaves your system alone it strains your sd card and requires that you stay with a card or take great care if you want to switch.

this custom partition forces you to stay with CM (besides once you switched to CM why do you want to switch to anything else? I'm currently waiting for 6.1 to switch for good) but will leave your sd card alone.
[Desire Android Development] marinierb:
No. The solution should work for any ROM.
[Desire Android Development] Khalen:
Oh. Okay. Than there's no reason to NOT use this custom partition table.
[Desire Android Development] alienwolf426:
i've got a question about this ... i'm on DeFrost

do i need to apply this patch every time i get a new update? or is it a one time thing like the AlphaRev's S-OFF patch?
[Desire Android Development] quertiy:
omfg it worked. this is unbelievable i don't understand how this topic hasn't got 100000000 replies.

UNBELIEVABLE

thank you.
[Desire Android Development] Moe5508:
ROM: RCMixHD v0.8; SuperVillainHD 0.2; Roufianos v7 (coz it has radio included)

Recovery: Initially AmonRA, but then switched to ClockWorkMod as it was recommended

Partition Sizes: recommended 125, 5

So after getting stuck in bootloop at HTC Spalsh screen, I'd flash a Cyanogen to get out of the loop and be able to boot. I then flash a RUU as any other ROM aborts. Then I root using UnReVoked 3.21; next is S-OFF with latest v1.5; then I'd flash my choice of rooted ROM (preferred one of the SenseHDs; I now run through your procedure and get stuck in boot again. 5 times I've tried this and even with a normal SenseUI Roufianos ROM, it still didn't work.
[Desire Android Development] Moe5508:
It will when the mod can run successfully without being fickle on SenseUI and SenseHD ROMs...
[Desire Android Development] ASD2003ru:
On first page have Warning about flash radio.

125Mb for HD firmware? And 5 for cache? I thing its small...

For LeeDroid 2.2a i use 235 and cache 30.
[Desire Android Development] quertiy:
yes but i never have more than 1,6 mB of cache used. don't know why.
[Desire Android Development] Moe5508:
OK, thanks for that pointer. Will try and adjust the sizes now and try again. Radio flash was only after SenseHD failed and I was trying to update from RUU stock radio...
[Desire Android Development] daedelus82:
Wouldn't 125mb be too small for any sense ROM, particularly Sense HD? I in no way recommend 125mb, the size you set depends on your ROM you should determine this yourself using df command. I'm beginning to think sense users who can't get it to work are doing it wrong. I will test myself after the weekend.
[Desire Android Development] marinierb:
Potential issue when flashing ROMs?

If you have removed the "dalvik.vm.dexopt-data-only" option in build.prop, the dex files for the apps in /system/app will now be located in /cache/dalvik-cache, as well as the framework dex files. If you later install a ROM update (a no-wipe install), and one of the apps in /system/app is newer, or the framework has changed, I don't know if the dex file in /cache/dalvik-cache will be rebuilt. If not, there is a potential for lots of FCs, no?

With CM ROMs, for example, the updater-script formats the SYSTEM partition before installing the new ROM, but it does not format the CACHE partition. And, ClockworkMod Recovery's option to Wipe Dalvik Cache does not clear out the /cache/dalvik-cache directory, only the /data/dalvik-cache. The only way to clear out the /cache/dalvik-cache then is to "wipe cache" from ClockworkMod Recovery.

So, unless Android automatically updates the dex files when updated /system/app apks are installed, or unless you run "wipe cache" prior to any ROM update, there could be a problem here.
[Desire Android Development] daedelus82:
clockwork recovery has a 'wipe cache partition' on the main menu screen. appears to wipe cache on my phone. also doing a wipe data/factory reset wipes cache as well.
[Desire Android Development] marinierb:
Right. The 'wipe cache' option actually does a FORMAT. Also, selecting the wipe option from ROM Manager will format SYSTEM, DATA and CACHE. But if you do not want to wipe, you may want to remember to at least wipe cache, to be on the safe side. It's a bit of a pain when you are used to simply flashing the updates.
[Desire Android Development] daedelus82:
According to Kali, nexus one does not use "dalvik.vm.dexopt-data-only" (have not verified this myself), so it's dalvik-cache would be on cache partition, and they don't have problems flashing updates. Unless I'm mistaken, I'm pre-occupied at work and haven't really looked into this.
[Desire Android Development] marinierb:
Maybe Android automatically updates the cached dex files, anyway.

On a different note, daedelus82, have you seen my post on the Cyanogen forum?

http://forum.cyanogenmod.com/topic/8292-integrate-custom-partitions-into-rom/

It might interest you.
[Desire Android Development] daedelus82:
I like it, hopefully Kali will add something like that.
[Desire Android Development] alienwolf426:
could someone please answer my question, i asked earlier.

do i have to run flash this two update zips in the OP every time i get a new rom update? or is it a one time deal? or is it only required if i'm wiping before installing a rom? etc ..

Also, how do i flash a new radio through fastboot? i tried to find a command similar to fastboot flash recovery recovery.img, but i couldn't find it ... or is it just as simple as fastboot flash radio radio.img?

thanks
[Desire Android Development] marinierb:
bravo-recovery-v1.5.3-CustomMTD.zip patches the recovery ROM. So unless you update the recovery ROM, you only need to patch it once.

The other one patches the regular boot ROM, so yeah, you need to patch it every time you flash an update.
[Desire Android Development] mumilover:
Have a question.

I have this danish htc desire which my friend have been playing with.

I don't know what he have been doing but it's impossible to run any RUU.

Also tried goldcard with PB99IMG.zip... says main-version is older.

I flashed the 1.5 hboot with s-off and the newest clockwork recovery.

Then i flashed the prerooted stock froyo from an 2.10.405.2 version.

Everything is working just fine.

Here comes the question:

I tried to snatch the rom.zip from the official RUU_Bravo_HTC_Europe_1.15.405.3_Radio_32.30.00.28U_4.05.00.11_release_121865.

Whenever i open the zip i see that the system.img is around 230 mb.

I tried 3 other RUUs and they all have almost the same sizes!!!

And whenever i try to flash the system.img from fastboot i get : Data length is too large error.

Boot and userdata flashes with no problem.

I tried fastboot erase system -w with no help. Still the same result.

Is it because my friend somehow have changed the partition layout or i'm doing something wrong!?

How come that official ruu have over 220 mb system img?

What can i do to flash that stock system.img...

Can anyone who got a Scandinavian desire provide the sizes of the mdt partitions?

Thx in advance for any help.
[Desire Android Development] xtcislove:
Worked Great =)

OD 4.0.3.6

System 105 MB Cache 25 MB

Still cant get rid of APP2SD+ :D I should need over 320 MB for all my Datta on SDEXT :D But now i can install more and more =) Before i had 40 MB free Space on Data and now 214 !! Nice !! =) Thanks!

What will happen if my sdext run out of space?
[Desire Android Development] endursa:
works great with mcr r9. did 155 system and 5 cache, but does anyone know what cache partition is for? i tried games and all did work great :)
[Desire Android Development] Moe5508:
SenseHD Settings that work!!!

For those running SenseHD ROMs please try these settings: 245, 15. They've worked for me after many attempts over the past 3 days!!! Not very good with ADB commands and FASTBOOT didn't work consistently across my 3 PCs but in the OP, maybe please a sticky on how to determine your ROM's best settings so that this mod can work successfully. :D

Will be testing lower cache values now as I see I still have 13.85MB free on that partition!

EDIT: And looks like I've managed to push cache down to 5MB successfully: System - 240MB; Cache - 5MB; setting has also just booted successfully!!! Yippeee! Now to get rid of that Ext3 partition on my SD-Card!
[Desire Android Development] mr.r9:
Do you mean you have a full Sense HD rom running in nand? A full version of Sense and not a stripped one?

If so please right a small how to & what rom did you use?
[Desire Android Development] ieftm:
The first patched HBOOT for desire is available.

Find it on AlphaRev.

This HBOOT has the partition table to match the Nexus One.

This allows to use /cache better for AOSP roms.
[Desire Android Development] Enhdojo:
You shine like a million stars! Thank you.
[Desire Android Development] Moe5508:
There's not much to write up. Am running Robocik's RCMixHD v0.8 from here: http://bit.ly/bWuETz and that's as full on HTC Desire as you gonna get. Use either of the value sets for System and Cache I've posted above and you should be good to go. The other steps for doing this successfully are in the OP...just stick to them and use these values above. Instead of a nandroid backup/restore, I'd suggest you FLASH ROM (RCMixHD v0.8) when you get to step 10 where you have the option to either flash new ROM or restore a nandroid backup.

Is it running in NAND? I don't know how to check and verify that but I think so as I have deleted my Ext3 partition and ROM is still running fine.

That's it. This worked for me.;) but may not work for anyone else. If you brick your device, no one else but YOU is liable.
[Desire Android Development] sfjuocekr:
Why not leave cache at 2 minimum and just bind mount it to /data/cache trough an init.d script?

Benefit is there will be less possible space wasted.

Any chance to configure custom sizes in HBOOT someday? I'd like to go along with mtd 128 2.
[Desire Android Development] nbedford:
I see there is now a modified AlphaRev - HBOOT for the N1 partition layout, but I don't understand how all the parts work?

Does having a modified HBOOT still mean I need a nexified recovery and a nexified boot patch?

I have this all working already with CM6 nightlies (currently I have just a nexified recovery and use the nexified-boot-patch.zip each time I flash a new nightly) What does the nexified HBOOT do for me exactly?
[Desire Android Development] TymmyD:
sorry for the silly question but.....

Create mtdpartmap.txt on SD card with size of system & cache, the example provided sets system to 125MB and cache to 5MB, this will depend on your ROM: echo "mtd 125 5" > /sdcard/mtdpartmap.txt

what exactly is written in the mtdpartmap.txt?

having trouble getting this to work.

mcr9

Thanks.
[Desire Android Development] marinierb:
echo "mtd 125 5" > /sdcard/mtdpartmap.txt

means you are putting the text "mtd 125 5" into that file.

Which means /system partition of 125MB and /cache of 5MB, rest goes to /data.
[Desire Android Development] TymmyD:
Thanks for the quick answer.

I take that is with out the quotes?

so just

mtd 125 5

in the text file.

just making sure im getting this right.

many thanks.
[Desire Android Development] alienwolf426:
Where are you seeing this modified AlphaRev HBOOT with N1 partitions? I'm still seeing the AlphaRev1.5 when I go to AlphaRev
[Desire Android Development] aleksei87:
Read more carefully, in the section "The following patches were made" you can find the modified HBOOT
[Desire Android Development] nbedford:
What he says :)
[Desire Android Development] marinierb:
Correct.

.
[Desire Android Development] alienwolf426:
thank you, i had read most of it when i did S-OFF, so i only skimmed it this time and missed that newly added one line ... :)

cheers for that..

so, with the modified hboot image, do i still need to do all the steps in the OP? or just do a full wipe, flash the new HBOOT image and then reflash the rom? thanks for the clarification...
[Desire Android Development] TymmyD:
Finally got this to work.

MCR r9. UVOC kernel. Circle battery.

170 system. 5 cache.

Apps2sd+ enabled.

Thankyou
[Desire Android Development] ieftm:
Do a wipe after flashing HBOOT, reflash the ROM (or nandroid restore, if that fits).

You won't need a modified recovery/boot/whatever. It automagically uses the partition layout like the N1's. There's a line in build.prop specifically for using /cache for dalvik-cache (so it uses that /cache partition more efficiently!)

dalvik.vm.dexopt-data-only=1 <- that line sets dalvik-cache to /data. Removing it would move it to /cache (and take advantage of the increased space)
[Desire Android Development] loedrus:
So we can flash our ROMs and radios exactly the way we did it before? Is a wipe always needed before reflashing, e.g. applying ROM updates/patches? And, just for clarification, we don't need to change/reflash/patch the recovery? Also a change of recoveries (e.g. clockwork to Amon-Ra or vice versa) remains possible, too?

Could one patch the HBOOT with his own partition table, or is this a task better left to the real devs? (danger of bricks? too complicated?)
[Desire Android Development] djind:
Good thing I saw your post! Thank yuuuuuuuuuuu!
[Desire Android Development] Ronaldo_9:
so u going through all this risk for only few MB of free space? correct me if i'm wrong :)
[Desire Android Development] ourfear:
i boot my phone to fastboot mode... found my phone is S-OFF

below is my phone info as below:

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

BRAVO PVT1 SHIP S-OFF

HBOOT 0.80

MICROP-031d

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

now my question is: how can i flash your Custom MTD Partitions ?
[Desire Android Development] marinierb:
There is very little risk and you get more than 100MB extra space for apps. Most people will not need A2SD anymore.
[Desire Android Development] Audioboxer:
Would like to know the answers to these questions as well :)
[Desire Android Development] TymmyD:
The answers to all those questions are in this thread. have a read. Take some notes.

regards.
[Desire Android Development] dur09:
hi

after flashing bravo-recovery-v1.5.3-CustomMTD.zip i stucked at Why So Serious? what i have to do? i cant reboot

thanks
[Desire Android Development] ieftm:
Nope, trust me, you don't want to be editing HBOOT. Leave that up to the reverse engineer devs (us :P).

We will probably also do a Sense deodexed partition table:

/system 180M

/cache 90M

/data 181M

(This eliminates the need for dalvikcache2sd)

Because the partition offsets change, you will most likely always need to either reflash or restore from a nandroid, as long as your data for all three partitions FITS in the new partition layout.

You will never need a MTD-patched recovery/boot or whatever for this. HBOOT defines the partition layouts, and tells recovery and android what they can expect.
[Desire Android Development] mad-murdock:
i also bricked my phone with the original patcher. thanks to irc, i found this thread to unbrick it.

anyways, is there any advantage of internal storage over sdcard?

my idea is, when i repartition the mtd, i have to repartition it again, if i wanna use a sense firmware again - i like trying various firmwares. but if you can tell me, internal storage is much fast -or something else i dont see right now- it would be worth considering.

outstanding work anyways - first time to partition your storage like you want to...
[Desire Android Development] bizkut:
out of topic.If you can un"brick" it then it is not bricked.
[Desire Android Development] mad-murdock:
True and not true. It's officially called usb brick. It was a real brick until people figured out how to unbrick it. For me it took nearly 24 hours until I could use my phone again. I didn't know the search term usb brick, so I read a lot of posts.

Anyways, I should have written semi-brick :-)

via tipatalk on HTC Desire | cyanogen 6.0.2 [speed > sense] | hboot 0.93 S-OFF | openvpn, cifs and sshd
[Desire Android Development] dur09:
hi

everytime when i format system, data, and cache aslo i flash bravo-recovery-v1.5.3-CustomMTD.zip i cant flash new rom, because there is missing recovery-clockwork-2.5.0.7-bravo.img (when i flash clockwork via fastboot back i can flash it, but i didnt reboot recovery), and when i restore nandroid backup and than flash bravo-boot-v1.5.3-CustomMTD.zip my desire stucks at Why So Serious?

any help?
[Desire Android Development] Deathman20:
Yeah! Got this to work on my HTC Desire (US Cellular)

Got now 125 System, 40 Cache, and 272.6Meg Data.

As for wondering what the cache is used for, as far as I know it was used at least with the HTC rom, for downloads from the market place. Multi downloads or large downloads could chew small amounts of cache so I left it what it was at.

So nice will have an extra 125megs on the data partition. Thank you so much!
[Desire Android Development] davdavo:
so you must have s-off to use this, correct?
[Desire Android Development] mad-murdock:
Aye, just like the topic says
[Desire Android Development] Spannaa:
Awesome.

I now have:

145MB system

95MB cache

197MB data

Thanks Guys
[Desire Android Development] Pajorve:
I would just like to know how to write the Part map in txt ....

Hello folks how will everyone?

I'm using the rom Pays Froyo 2.2…. the method would serve for me with this Rom?

I would just like to know how to write the Part map in txt ....

This information Need only: Only do the procedure described at the beginning of the topic by downloading the zips, but how do I create the part maps and how to know the ideal size ... would like to use the Rom Sense HD, ja released!

Thanks for the info and congratulations for the beautiful discussion!

=]