yashsingh1/xdaforums huggingface dataset:
[Desire Android Development] bradputt:
So is it better to use alpharev's custom Hboot partition as i don't have to worry about patching everytime i flash roms?

Thanks for your answers
[Desire Android Development] MrDevil:
Initially found it a hassle as well but it's a small price to pay for more data.

Sent via homing pigeons
[Desire Android Development] bradputt:
Hi MrDevil,

so you using both? i see you using N1 table on your sig.
[Desire Android Development] MrDevil:
Nope. Only custom mtd. Since I have plenty of space left didn't see the need for a2sd. And I'm too lazy to flash another hboot. :P

Sent via homing pigeons
[Desire Android Development] bradputt:
ahh... ok.

i'll try Bravo Data++ table, looks the best fit for CM7 with a big data partition.

guess i'll have to flash radio with fastboot in the future.
[Desire Android Development] MrDevil:
Tried pretty much everything from a2sd to data++. So far this is the best and most flexible.

Sent via homing pigeons
[Desire Android Development] ziggy1001:
So nobody else having the problem where once set up the next CM7 nightly flashover adds 40Mb to data for some unknown reason?:(

I tried this again and still cannot remove the surplus data that's added any ideas ;)
[Desire Android Development] MrDevil:
Hmm... never noticed anything like that. U tried clearing dalvik? I recall having similar issues on leedroid a2sd.

Sent via homing pigeons
[Desire Android Development] ziggy1001:
Thanx for the reply someone else suggested that and i have repeatedly wiped cache dalvik-cache and even formatted cache and i still have the extra 40Mb

I'm wondering if when i flash tomorrows nightly will i get another 40MB :eek:
[Desire Android Development] danarama:
None of the tables are exactly suited to my requirements. As mentioned earlier, patching boot upon ROM flash is no big deal. I have several zips to flash anyway.

Then I get the exact sizes that suit me.
[Desire Android Development] kitsune_snake:
I followed every step on page one carefully with a ''mtd 140 25''

but after I restore my nandroid and flash the bravo-boot zip file, I rebooted my phone and opened quick system info to find that nothing changed (I'm still with hboot data++)

I dont know if it's because I have the latest miui-au rom (1.28 App2sd) and for some weird unexplainable reason it doesn't work on miui but did it happened to anyone else and is there an extra step I should take or just try again until it miraculously work?

i really want the custom MTD to work been waiting for this ever since I got s-off 8D
[Desire Android Development] danarama:
Can you definitely use custom MTD with an alpharev table? I wouldn't have thought it possible, but I don't know for sure.
[Desire Android Development] ziggy1001:
Yep using it now on top of AlphaRev N1Table
[Desire Android Development] ziggy1001:
I missed step 8.Reboot into recovery the first time not sure why that would matter but it didn't work so tried again and it worked

Your mtdpartmap.txt on the sd card does only say mtd 140 25
[Desire Android Development] kitsune_snake:
I copy pasted the line directly from the instruction :

echo "mtd 140 25" > /sdcard/mtdpartmap.txt

and I'm pretty sure I did steps 8 I even wiped everything at the end as an extra precaution (u can never be too careful :p)

update: tried again, using clockwork recovery (since I realised amon-RA doesn't have a system wipe) but still no luck =(
[Desire Android Development] Nuntius:
After that what becomes of the values? Are they back to default values again?
[Desire Android Development] ziggy1001:
Yep the Custom MTD partition sizes are not permanent so the previous default will be restored
[Desire Android Development] danarama:
Create a txt file called mtdparmap.txt and save it on sdcard.

In the file type the line below ONLY:

mtd 140 25
[Desire Android Development] Nuntius:
Good to know, thank you!
[Desire Android Development] kitsune_snake:
Aaahh i feel silly now :p thank you very much
[Desire Android Development] dglockitt:
Stuck on AlphaRev Splash Screen

I flashed the Bravo Cm7 Image and restored following which I got an error saying "E:can't open /cache/recovery/log". The phone is now stuck on the AlphaRev splash screen. I tried flashing the radio using fastboot, but to no avail. Any help will be appreciated.

Edit:

Problem seems to occur when restoring nandroid; wiped and did a clean install and that solved the problem. Just have to reinstall all my apps now.
[Desire Android Development] ziggy1001:
Oh well 3rd time lucky:p;)
[Desire Android Development] Bl@ck:
Hi :D

i just try'd this mtd partitioning method and seems like it worked perfectly even with Clockwork recovery v3.0.0.5, i just installed latest MIUI rom into a "mtd 120 35", but i wanted to ask something:

1. I've to keep the txt file in the sdcard root? If i got it right now my recovery looks for that file before flashing a new rom.

2. Now my recovery will always install a rom following the custom mtd i wrote in the txt file right? So if i want to change it's dimension i'll just have to change the dimensions in the txt file and reformat system/data/cache and reflash/restore.

Thanks :D
[Desire Android Development] Rastaman-FB:
works fine on amonRA 2.0.1 with a few tweeks

guide i made here

http://iamandroid.co/profiles/blogs/guide-custom-mtd
[Desire Android Development] ziggy1001:
Has something changed on this one "mtd 140 5" is written in mtdpartmap.txt yours says only "140 25" (mtd is omitted) does that work?

I'm not expert at these things but if your "140 25" instruction is right wouldn't bravo-recovery-v1.5.3-CustomMTD.zip and bravo-boot-v1.5.3-CustomMTD.zip have to have been rewritten

P.S why doesn't it work with the oxygen hboot installed?
[Desire Android Development] Rastaman-FB:
it works for me 100%

I cant confirm it works with oxygen as ive not flashed that hboot
[Desire Android Development] mistake37:
Great, now I got 184MB data free with around 140 apps installed. Thank you so much :)
[Desire Android Development] Oqudsi:
So I've tried all the steps to a T but I can't seem to get it to work.

I created the mtd.txt file from my computer and copied it to my sdcard before booting into recovery, is that fine?

Also when I put dh-f into terminal (to view partitions) I get "not found" , any idea what that means?

Also when I write the echo "mtd 120 5" in the text file am I supposed to remove.the quotations?

Thanks in advance
[Desire Android Development] ed.dark:
the commmand is df -h (the "h" means Human readable)

just write 120 5 or whatever you need in the txt file. No mtd. No quotes
[Desire Android Development] Oqudsi:
Thanks. Works like a charm :)

Just wondering though, why not say that in the first post?

What does echo and quotations stuff mean in developer lingo?
[Desire Android Development] leader288:
Hi guys, how do i use fastboot to "Flash bravo-recovery-v1.5.3-CustomMTD.zip, this patches recovery to use the new partition sizes”? My terminal output is this:

Sean-Kohs-MacBook-Pro:~ seankoh$ fastboot devices

SH0CTPL02563	fastboot

Sean-Kohs-MacBook-Pro:~ seankoh$ fastboot update bravo-recovery-v1.5.3-CustomMTD.zip

error: failed to load 'bravo-recovery-v1.5.3-CustomMTD.zip'

Sean-Kohs-MacBook-Pro:~ seankoh$ fastboot flash /sdcard/bravo-recovery-v1.5.3-CustomMTD.zip

unknown partition '/sdcard/bravo-recovery-v1.5.3-CustomMTD.zip'

error: cannot determine image filename for '/sdcard/bravo-recovery-v1.5.3-CustomMTD.zip'

Sean-Kohs-MacBook-Pro:~ seankoh$ fastboot update /sdcard/bravo-recovery-v1.5.3-CustomMTD.zip

error: failed to load '/sdcard/bravo-recovery-v1.5.3-CustomMTD.zip

Sean-Kohs-MacBook-Pro:~ seankoh$ fastboot flash recovery /Users/seankoh/Downloads/bravo-recovery-v1.5.3-CustomMTD.zip

sending 'recovery' (252 KB)... OKAY

writing 'recovery'... FAILED (remote: image error! (BootMagic check fail))’
[Desire Android Development] rakludnet:
I have a question.

for example if a rom zip size is 90mb, how much space it takes after installing, so that I can give correct cutsom mtd sizes in mtdpartmap.txt
[Desire Android Development] danarama:
You just put it on sd card, flash via recovery and then reboot recovery.

It's not a replacement recovery, its a patch for existing recovery
[Desire Android Development] danarama:
It's hard to say. mine is 63mb and fits comfortably in 110mb.

Best way, flash it first then see what it takes. Or ask someone who already has it
[Desire Android Development] popasmurfn23:
Can u make something like this for evo shift stock rom?
[Desire Android Development] fire girl:
hi

how to make mtdpartmap.txt?????? :D
[Desire Android Development] MrDevil:
Exactly the same way, you make any txt file. Read the first post. Instructions are very clear.

Sent via homing pigeons
[Desire Android Development] pompeydaz:
Thankyou!

Just wanted to post my appreciation for this thread. I have struggled to get my partitions resized but your instructions worked perfectly for me. I now have a 300Mb data partition (was 140Mb I think).

Fingers crossed, using Apps2SD and my new huge partition, I should no longer be cursed with warnings about lack of storage space.

:D
[Desire Android Development] leader288:
Does this work with the new clockwork recovery version 3.x?
[Desire Android Development] radiosilence:
Works great with alpharev recovery :)
[Desire Android Development] :
Will this work on HTC HD2?

I don't want my sd card to be used at all, EXCEPT for DCIM. I want the maximum amount of total nand storage available with the very best performance as well. I have 1024MB of NAND total, so I want to see atleast 900MB of total internal storage. How would I go about do this? I want the maximum amount of internal storage possible. Thanks.
[Desire Android Development] sunster:
Post deleted. Found answer in another thread.
[Desire Android Development] Jameswgm:
In the first post the instructions are not to flash new radio via recovery, rather to do it via fastboot: What's the reason for this?

James.
[Desire Android Development] :
Because u can have problems with the cache size. It can be too small to contain the radio image during the flashing via recovery.
[Desire Android Development] danarama:
Also, its removing the additional layer of software that is custom recovery. Anything you can flash via fastboot, you should as theres less to go wrong.
[Desire Android Development] Jameswgm:
Thanks guys, I knew there was an issue if the cache size was too small but needed to know if that was the only concern. I don't mind using fastboot, just flashing .zip files via ROM Manager through recovery was so simple!
[Desire Android Development] proxuser:
can alpharev team make a new hboot for big roms like desire s and desire hd ports. we already use a2sd or d2ext. sd-ext give us big space for data.

EXAMPLE:

320 MB SYSTEM

10 MB CACHE

107 MB DATA
[Desire Android Development] Jameswgm:
Got my mtd sorted to fit the requirements of my rom, and have verified I had it working, but does it revert back to the original hboot partion sizes everytime I flash a new rom update? Thanks James.
[Desire Android Development] ziggy1001:
It does if you don't flash bravo-boot-v1.5.3-CustomMTD.zip after flashing new rom

So flash new rom, then bravo-boot-v1.5.3-CustomMTD.zip then boot

I also believe if you have formatted system/data/cache then you have to start from the beginning and reapply CST mounted sizes
[Desire Android Development] raybi jamila:
i tried your method and it worked like a charm :) i re-sized my system to 130Mb cause I'm using cm7 ,but now i want to install sense rom which it requires more space. Could you please show me how can put the system and data back to original so i can install sense roms ?
[Desire Android Development] Jameswgm:
Are you on the CM7 Hboot? If so I reckon your best bet would be to flash the Alpharev Sense Hboot. If you're on the Bravo Stock Hboot, then it won't be a problem as you'll lose the custom partitions you've set up when you wipe before the new Rom flash.
[Desire Android Development] ziggy1001:
I'm a bit lost if you followed the instructions on page 1 you now have a mtdpartmap.txt on SD card with the CM7 values of "mtd 130 5" .So if you change those values to "mtd 250 40" and repeat the process from the start you will have the values you want.If you don't want to do that then you have to flash the Alpharev Bravo Stock 1.8 via Fastboot

Personally i prefer the Custom MTD Partitions it means that if after installing a new rom i remove stuff i don't need i can do a nandroid then custom shrink the partitions to gain sometimes 30-40Mb of data space, on CM7 my system size was 90Mb
[Desire Android Development] danarama:
+100%

I too strip the rom down. remove all the superfluous stuff I dont need. I take maps and gmail out to run from data too.

Now I have Redux in a 75MB partition, 3MB for cache (expands into data for large downloads) and 360MB for /data. No ext partition. Runs well.
[Desire Android Development] raybi jamila:
i already flashed bravo stock image via fastboot but nothing changed,so i'm going to change the value of the text file and see if it going to work .

thank you btw :)
[Desire Android Development] Jameswgm:
You should be able to flash your new sense Rom then. Nandroid, wipe data, cache and dalvik, then flash the new Rom.
[Desire Android Development] raybi jamila:
It works !!!

Finally i did it :D i managed to resize the system to normal, you guys are genius thank you so much :)
[Desire Android Development] ziggy1001:
Glad it worked out;)

I did have a similar situation i was getting bored of flashing the bravo-boot-v1.5.3-CustomMTD.zip after every CM7 nightly so flashed oxygen 90/10 hboot and for some weird reason it took 2 days and a couple of flashes before the cache size changed. Not a clue why that was!
[Desire Android Development] 325i.:
I have managed to change to a custom MTD using the guide, but what do i need to do when i install a new ROM to keep my custom MTD? Do i have to do this every time i install a new rom?
[Desire Android Development] ziggy1001:
Not the whole process:)

It's in the first post but maybe not 100% clear after flashing rom flash bravo-boot-v1.5.3-CustomMTD.zip then boot

Done 40+ flashes using this works like a charm
[Desire Android Development] fabulous69:
Hi everybody

I dont really well understand what i must do at the creation of .txt file step.

What do i enter into my file for example for 150 30 257 ?

Thx to explain me better what do i must to do with this text file :)
[Desire Android Development] ziggy1001:
mtd 150 30

is system 150Mb cache 30Mb
[Desire Android Development] fabulous69:
so i only copy at the root of SD card a text file called mtdpartmap.txt, with just:

"mtd 150 30" into it, no more words or letters?

but what is this:

thx
[Desire Android Development] ziggy1001:
Please read the instructions in post #1 again

Quotation marks " " mean you only write what is between them in the mtdpartmap.txt.... mtd 125 5 Nothing else

Total size for partitions is fixed therefore by specifying mtd 150 30 system & cache you have implicitly set data to whatever space remains

"but what is this"

In code box is output of

su

df -h

command in terminal if you read it has complete info on phone partition and other areas space usage
[Desire Android Development] Jameswgm:
Don't worry about that, you don't need that info. The only text you need to make this work is; 'mtd xx xx'. The first number is the system partition, the second the cache partition.
[Desire Android Development] fabulous69:
thx to you two guys

good night :)
[Desire Android Development] Vuska:
Hi...

I use this custom mtd to change my partition...

140 15

Already done it... install some custom ROM like HiApk, CM7 too... its OK

but strange ... when i install Redux 1.2 ROM (non themed), my custom partition change... :s

it change to Oxygen Hboot.... with composition : 90 10

How can it be like that ????

So i flash CM7 Hboot via fastboot.

and restore Nandroid.

I hope to see that 130 5 as CM7 HBoot has.

But.... strange.. (or is not ? ) .... it back to 140 15 (my Custom MTD composition before i do Nandroid backup).

Why not 130MB and 5MB ?

Please enlighten me....
[Desire Android Development] ziggy1001:
Not a clue mate but what hboot did you have before using Custom MTD?

Did you confirm that your 140 15 partitions were there with the su df -h command?

After applying the 140 15 patition with Custom MTD did you apply bravo-boot-v1.5.3-CustomMTD.zip on every new rom flash
[Desire Android Development] Jameswgm:
When I do the df -h command in terminal I get;

"Filesystem Size Used Free Blksize

-h: No such file or directory."

It has SU permissions, my phone is partitioned how I've set it, obviously it's no big deal as everything is working, but curious why I'm not getting the info displayed.

James
[Desire Android Development] reaper7881:
Can any one make a 250mb system 60mb cache and the rest as data
[Desire Android Development] jungler449:
Great walkthrough :) Now I have nice 290 MB space for data :)
[Desire Android Development] Vuska:
Hboot i using before do custom mtd was Oxygen HBoot and using Oxygen... until I wanna try cm7 then I using this custom mtd with 140 / 15.... it's done... I know it because with root explorer I see that my system has 140MB, my cache directory has 15MB.

Already try some ROM too (Hiapk, CM7, Miui) also this time I'm using Redux themed edition.... its still right, 140MB / 5MB.

but I want to change to redux standart non themed...so after that...I just flash redux 1.2 non themed ---> no wipe this time... done.

But I see with my root explorer again...and the 'System' directory only has 90MB in total, and 10MB in cache dir.

Confuse... then I wipe completely and do Nandroid restore....its back... system dir back to 140MB in total.

yes... I always apply bravo-boot after flashing new ROM so it doesn't stux in Joker face.

Strange for me....
[Desire Android Development] Vuska:
sorry double post... my bad signal hhere..
[Desire Android Development] 325i.:
What is the procedure when you install a new rom? do you have to do the whole procedure again?
[Desire Android Development] ziggy1001:
That confused me as i had the same on the new GB Sense roms with terminal emulator. Now i'm using Better terminal emulator pro and by magic it works:)
[Desire Android Development] ziggy1001:
Please learn how to use a forum you just continually repeat post the same questions or quote your own posts repeatedly

I did answer your question already!
[Desire Android Development] danarama:
Flash rom, patch boot. done
[Desire Android Development] peegee99:
This is great, thanks. I got it to work OK, but can someone please answer me two Q's.

1. Is it possible to do this entirely from phone? I did everything in recovery except step 5 (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). I couldn't figure out any way to do that from the phone, so I used adb shell, but then I also had to adb shell mount /sdcard first.

2. Am I right in thinking that this file mtdpartmap.txt must stay on sdcard always, otherwise phone will not boot, not even into recovery? So we can't boot without sdcard (unless we reflash original recovery)?
[Desire Android Development] ziggy1001:
1.

I haven't tried this but if you have an office app that can create documents even if it doesn't allow for creating a file with the .txt extension create a document on your sd-card with the "mtd 125 5" info then if necessary use a file manager to rename to a .txt file this changing of a files .extension normally works fine

2.

I can't test this as i'm using RCMix S v08++ which has system and framework files on the sd-ext4 partiton. But before i was using CM7 with all system files on internal.

As far as i understand it the mtdpartmap.txt info is only used when the 2 zips are flashed

Flash bravo-recovery-v1.5.3-CustomMTD.zip, this patches recovery to use the new partition sizes

Prior to rebooting, flash bravo-boot-v1.5.3-CustomMTD.zip, this patches ROM kernel to load with same partition sizes

The mtdpartmap.txt isn't needed again until you flash a new rom or want to change the partition sizes

So if the rom you use can boot without access to system file on the sd-card it should be no problem

Update ok quick office .doc or docx don't convert to .txt files:o

But with Root explorer you can create a .txt file on the sd-card with mtd 125 5 info ;)
[Desire Android Development] peegee99:
Thanks ziggy1001! I was confused I thought that the file mtdpartmap.txt was read on every boot, but you're right it's not needed once the 2 zips have been flashed. I just took out my sdcard and phone booted into recovery and into ROM no problem.

I have no problem creating text file on sdcard, just didn't know how to do it when in recovery - now I know I don't have to! thx again man.
[Desire Android Development] danarama:
Ziggy is right, the txt file is only used when you are patching recovery or boot. The zips patch using the file's contents. Once patched its always there. Of course if you flash a rom, you have to patch boot so the txt needs to be there for that.
[Desire Android Development] Sebby:
so if i patch the recovery + install rom + patch the boot of rom

then after that if i make a backup of the rom and i do a restore

then i only have to flash the bravo-boot-v1.5.3-CustomMTD.zip with the txt file on the sd card

but if i do a new partition size then i have to flash both zips
[Desire Android Development] danarama:
If you restore a backup of a rom that already has a patched boot with the same size as your existing partitions, you don't need to patch anything as boot.img is included in the nandroid backup anyway. Its only if its a fresh rom flash you need to patch boot.

If you change the size, you basically do the entire procedure again. Nandroid backups with a patched boot and new fresh installs will require the boot pathcing to the new sizes.
[Desire Android Development] Saenic:
Hmm interesting. I will try this today after uni and I plan on using a partition layout like 130 30 278. This is cm7 hboot just with more cache.

So I can install roms with cm7 partition layout and still can install large apps and play games.

What do you guys think, will this work?

Sent from my HTC Desire
[Desire Android Development] daedelus82:
OP updated.
[Desire Android Development] Narfx:
Care to elaborate? I was interested in having everything fit neatly in the internal storage, but if this brings new problems I'll stick to a2sd.

(... meanwhile waiting for the first daredevil to test the posted zips :D)
[Desire Android Development] daedelus82:
Hehe, I have tested, but I understand hesitance.
[Desire Android Development] superfloup:
Hi daedelus82,

First of all : great job and thanks for sharing !

I want to apply your patch, but i have a question : is it compatible with all kernels ? or just with HTC stock Kernel ?
[Desire Android Development] daedelus82:
Running desire-boot-xxx.zip should work with any kernel, although I've only tested it with CM6 kernel.
[Desire Android Development] ephumuris:
Looks great for us HD Rom users however i'm wondering whether the cache partition is important on Desire? Why do they include it if it isnt used?

Eph.
[Desire Android Development] superfloup:
Thanks daedelus82, I will give it a try this afternoon or tomorrow.
[Desire Android Development] wrsg:
it involved too much messing about to set up, then when i flashed a new rom, the layout broke completely. you can't upgrade unless you apply the patch every time. also you can't undo without wiping the phone. kinda sucks if you like flashing new roms.

i think i will just wait for cyanogens apps2sd. until then, the standard froyo apps2sd is working out fine for me.
[Desire Android Development] daedelus82:
For those who use CM6, I'm working on an easier method, should be similar to the following:

1. flash a modified clockwork recovery.img via fastboot

2. boot into recovery

3. perform factory reset

4. flash cm6

This should make it a little easier for some users, but will be stuck with predefined partition sizes which are the same as the Nexus Ones.