yashsingh1/xdaforums huggingface dataset:
[Desire Android Development] Narfx:
Thanks. So the main problem is you must always apply the second patch after flashing a new rom. Hmm... I can live with that :). I always flash a couple of zips after flashing a new Defrost rom (adblock, kernel).
[Desire Android Development] BlackWhiteOne:
I just want to know which size is suitable for my rom.

How can I get a appropriate size?
[Desire Android Development] philje123:
The only bit that is confusing me is the the bit about the .txt file.

Do I just enter this into the txt file?: echo "mtd 125 5"
[Desire Android Development] daedelus82:
mtdpartmap.txt should contain only the following:

mtd 125 5

125 represents size of system partition in MB

5 represents size of cache partition in MB

You should replace these with sizes relevant to the ROM you are using.

Those values work fine for the CM6 nightly I had installed.
[Desire Android Development] Shane2:
125MB would sadly not be enough for those of using Sense ROMs, the current R9 revision of paul's custom ROM has a 159MB system folder, so 170MB would probably be needed to provide absolute assurance of having enough room
[Desire Android Development] wrsg:
for the g1 it was not as simple as flashing a new rom, otherwise i wouldn't have bothered with the warning. read up the custom mtd thread on the g1 development forum.
[Desire Android Development] heavymetalmage:
I would assume that this would work for the CDMA Desire but I better ask, seeing how this almost bricked your phone. So, will it work for the BravoC?
[Desire Android Development] daedelus82:
Hi, reboot your phone, and run the following command: adb shell dmesg|awk '/0x.+: "/{ print }'

If the output looks similar to this then yes it should work fine:

<5>[ 11.619476] 0x00001ff60000-0x000020000000 : "misc"
<5>[ 11.620727] 0x000004240000-0x0000046c0000 : "recovery"
<5>[ 11.625396] 0x0000046c0000-0x0000049c0000 : "boot"
<5>[ 11.628723] 0x0000049c0000-0x0000143c0000 : "system"
<5>[ 11.866302] 0x0000143c0000-0x000016bc0000 : "cache"
<5>[ 11.904357] 0x000016bc0000-0x00001ff60000 : "userdata"
[Desire Android Development] philje123:
Can't get this to work.

Set my system to 200 as root explorer was reporting 192mb being used there but it just won't boot now!

Phil
[Desire Android Development] wrsg:
lol

darwin award
[Desire Android Development] Shane2:
Applied this patch, and it works, my available internal space is 174MB and system partition did resize to 170 MB (6.21MB free) :D
[Desire Android Development] davidep85:
I want to try this too!

Just a question, I have Miui. Everytime you flash a Miui update have you to reflash the bravo boot every time or only if I change the rom? Will be this patch compatible with all kernel?
[Desire Android Development] kerrari:
Same question here as well...? I would like to hope vice versa.
[Desire Android Development] anunna:
Yes. I use xj and after an update you have to flash the bravo boot zip otherwise it won't boot. However I've found it's not necessary after flashing a kernel. Always do a backup first anyway then you're safe.
[Desire Android Development] cartmanotfat:
I can't flash mtd partition with this 3.0.2.8 version :

Can't open the file package

(bad)

Why ?
[Desire Android Development] Sebby:
i have 3.0.28 to

and it works great with this recovery

do you have the mtdpartmap.txt on the sdcard

or the zip file is corrupt try and download it again
[Desire Android Development] cartmanotfat:
The bravo-boot work but the bravo-recovery doesn't
[Desire Android Development] ziggy1001:
Not sure what you mean! if bravo-recovery doesn't work how could you confirm bravo-boot is working:confused:

You wouldn't have been able to boot a rom with custom MTD partition sizes if bravo-recovery doesn't work!
[Desire Android Development] cartmanotfat:
I have update the recovery without a full wipe, so I had to reflash bravo-boot and it work, but i can not Change the size of system partition because bravo-recovery does not work
[Desire Android Development] ziggy1001:
So you changed the values in mtdpartmap.txt then started again at step

6.Format system, data, and cache went through the whole process again and it didn't work
[Desire Android Development] cartmanotfat:
I use mtd for 4 months, and since the update 3.0.2.8 it does not work. Strange?

Perhaps it's necessary to update The Script to the new Edify's script?
[Desire Android Development] ziggy1001:
Well simply put this zip on your sd-card flash it in recovery and you have CWM2.5.07 but still retain CWM3X as your main recovery;)
[Desire Android Development] Sebby:
it's working fine here with 3.0.2.8 recovery
[Desire Android Development] ziggy1001:
Please for God's sake tell me you have confirmed Bravo-recovery zip is not corrupted

I get this MD5

505037F833227CAFA57FA98D3BF3A722

For the zip on my sd-card and one i d/l again to my PC
[Desire Android Development] leader288:
What do you do when you update to a new recovery...which zips do you flash? both, or just the recovery one?

EDIT: After updating the recovery, I’ve flashed the recovery mtd zip, then rebooted, and all I got was stock GV with none of my data there at all. rebooted then after flashing both, i’m now at the splash screen and it’s not budging. some help?
[Desire Android Development] leader288:
no one?

10char
[Desire Android Development] ziggy1001:
Just go through the whole process from start to finish and restore appropriate nandroid or flash a new rom, that should do it
[Desire Android Development] danarama:
Yeah this ^^. If you're ever stuck, THIS!!!
[Desire Android Development] mattmanwrx:
Hi,

I'm having difficulty getting this to work. I go through the instructions step by step, and all the flashes work fine, however, after booting into the nandroid i made (and boot screen taking longer than usual (but that maybe cos i'm restoring a nandroid? i've not restored one for a long time)), but my partitions are still N1 table... Could it be to do with my mtdpartmap.txt on sd card? could someone post theirs and i'll just use that? then I can cross that off the list...!

Thanks, Matt :)
[Desire Android Development] ziggy1001:
I'm lost what values did you use for mtdpartmap.txt, If you use custom MTD a nandroid may or may not fit the new partition sizes, did you check the system/data/cache sizes of your nandroid

P.S someone elses "random" partition sizes also may or may not work with your setup!
[Desire Android Development] mattmanwrx:
i'm using the same /system size minus 2mb (143mb) and i'm on gingervillain with a /system of 135mb. my cache is not full, only 25mb in there, and the cache i set was 50mb. Data should be the rest, which would be more than enough room!

basicaly, 143 50... :)

Would it be easier to flash the rom again on a new install?

EDIT: I would cange the partition sizes, just making sure the formatiing of the .txt was correct as mine may not be (dont know if that is possible lol)
[Desire Android Development] ziggy1001:
mtd 143 50

Should be the mtdpartmap.txt text for that size;)
[Desire Android Development] mattmanwrx:
Sorry dont uderstand what you mean...

attached is my txt file... I copied what is writen in the TUT and changed to my partition sizes...

here is what is in the txt file -

echo "mtd 143 50" > /sdcard/mtdpartmap.txt
[Desire Android Development] rakludnet:
you dont need to write echo etc. just write as ziggy said in the above post
[Desire Android Development] ziggy1001:
Exactly "" means only use the text between the " symbols

Like this attachment

echo means copy

> /sdcard/mtdpartmap.txt shows location to put file
[Desire Android Development] mattmanwrx:
I've just realised that... got it working... and feel like a dummy... ;) I will thanks you all in a minute... thank you all :)

Edit: also when writing the VDD levels you do put the echo - so kinda confused me! Example - echo 19200 875 > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
[Desire Android Development] neilp83:
perfect for a desire user!!! a must do....thanx bro for this post.
[Desire Android Development] backfromthestorm:
It works! cool. Thanks.

Does this mean I can go back to stock hboot now or will I have to redo the process after I flash a new hboot image?
[Desire Android Development] ziggy1001:
Follow this to go back to any hboot

Now if you did that for a different sized rom why would you then want to apply Custom MTD on top of that
[Desire Android Development] ziggy1001:
@daedelus82

Any ideas about this?

http://xdaforums.com/showpost.php?p=16953073&postcount=2698
[Desire Android Development] vacsed:
Can anyone confirm that the CustomMTD scripts still work with CWM 5.0.1.0?

I'm planning on flashing a new ROM next week while changing partition sizes at the same time...
[Desire Android Development] sagementor:
I installed clockwork recovery 5.0.1.0, and tried to re-patch the recovery with bravo-recovery-v1.5.3-CustomMTD.zip. Now the phone hang on the splash screen. It forgot to backup. Anyone can help?
[Desire Android Development] HwyXingFrog:
I had the same problem when trying to restore from backup, I was also stuck at splash screen.

I had to do a fresh rom install.
[Desire Android Development] danarama:
Flash an older cwm (2.5.0.7 is still by far the best IMHO) and patch that.
[Desire Android Development] ziggy1001:
Have to agree if you don't want to change your default recovery i keep this fake flash cwm 2.5.0.7 on my sd-card and do all my backups and Custom MTD flashing with it and probably 100 + flashes, restores and changes of Custom MTD never failed me:)

Just flash the CWM 2.5.0.7.zip from your default recovery
[Desire Android Development] punky.mtp:
I lost all my config just by doing a backup with clockworkmod recovery 5.0.2.0 (from ROM manager)...:mad:

Go back with 2.5.1.8, and restore my last good nandroid backup. But it's failed : I loose all my parameters/custom stuff.:mad:

Custom MTD seems to be compatible only with CWM recovery 2.2.x.x

Finally, I go to the CM7r2 HBOOT. Seems to be more safe:cool:
[Desire Android Development] danarama:
Any cwm after 2.5.0.7 is unofficial. This is ,also the best imo.

Also doing anything on the desire with Rom manager is bad if you have a true flash recovery. Also if you use the new true flash in Rom manager, you are effectively unpatching your recovery
[Desire Android Development] angusc:
Imho, I don't think you can knock 4ext variation on CWM......

Sent with Desire.
[Desire Android Development] danarama:
Havent tried that tbh. I'm more refering to the cwm 3.x, 4.x and 5.x variations/compiles/whatever they are
[Desire Android Development] AlxMAX:
http://thalamus-hacking.blogspot.com/2011/07/custom-hbootsupdate.html

Edited: Please read this message too: http://xdaforums.com/showpost.php?p=17484827&postcount=10 . It describes an experiment I have performed.
[Desire Android Development] danarama:
Yes this is good. I have been using this. The only issue is that you can only use multiples of 5MB, but for less advanced or more forgetful users, this is pretty cool.
[Desire Android Development] AlxMAX:
Have you read my message about the experiment I have run? About the 5 MB, as far as I could understand by running the tool, it requires a minimum partition size of 5 MB, not the size being a multiple of 5 MB! I have created a 142/5/290 MB partition table and it hasn't complained.
[Desire Android Development] danarama:
No I hadn't. That's better but I would like 3MB cache as with cmtd
[Desire Android Development] AlxMAX:
This was my message http://xdaforums.com/showpost.php?p=17484827&postcount=10 . About the 3MB of cache, I find it too small. The recovery is able to fill it quite quickly only by logging the operations!
[Desire Android Development] danarama:
I only use it for market downloads which I bind elsewhere anyway. If there were a way to get it smaller than 3, I would but its the minimum that still functions with a bind to data/local I've found, sadly
[Desire Android Development] HwyXingFrog:
Has anyone had this affect the Market working from gapps with Cyanogenmod 7.0.3?

I did this at the same time as the sim-unlock utility and now my market doesn't work. I have tried re-installing roms and resetting everything (except my sd card)

Thanks.
[Desire Android Development] virus2013:
Never had any problems except one time because the text file wasn't on my sd any more...
[Desire Android Development] HwyXingFrog:
Tried this rom and it's working, at least i know the partitions didn't break the market.

http://xdaforums.com/showthread.php?t=1079469
[Desire Android Development] englebert.lai:
I am using HTC Salsa and I had successfully mount my /data partition to sdcard during start up. So, I can have any size I would like for my internal memory. I am currently set to 4GB using my sdcard as internal memory.

Below is the link to the details:

http://xdaforums.com/showthread.php?t=1281964

I am not sure for other models but htc salsa is working perfectly.

Pro:

- Can have any defined size as long as the SDCard partition is enough.

- It will not be effected when plugin the usb cable as thumb drive. It will still stay put and will not unmounting the ext2 partition

- No more suffering from low internal memory.

Con:

- Sometimes will have a bit lagging due to power saving.

- must be using the higher transfer rate SDCard. I am using class 10.
[Desire Android Development] jermaine151:
Hello people. I was wondering if anyone could help me with the cmdline for changing my MTD partitions on the Droid Incredible. I just want to take at least 1/2 of the size from cache and give it to datadata. Here's the default MTD layout:

misc	0x00001ff60000-0x000020000000
recovery	0x000004240000-0x000004740000
boot	0x000004740000-0x0000049c0000
system	0x0000049c0000-0x0000141c0000
local	0x00001fec0000-0x00001ff60000
cache	0x0000141c0000-0x0000169c0000
datadata	0x0000169c0000-0x00001fec0000

ANY help would be greatly appreciated. I've looked at the script that you guys use for your device. I don't even need mine to be user sizable. I just want to go into recovery, pull the image, unpack it, push it back with the new cmdline to change sizes, reboot into recovery again, flash rom, pull boot.img and repeat. It's the converting to bytes and offsets that's throwing me off. I've never had to mess with the phone's partitions before.
[Desire Android Development] JokerAce:
This definitely greatly reduced the infuriating low mem on storage problem for my girl's HTC Desire. Thank you for this.
[Desire Android Development] dan281082:
does anybody no if this patch will work on desire s? i have it on my desire wanna cmtd on my friends desire s?
[Desire Android Development] yreham:
Wrong answer look on the first page or pm the dev
[Desire Android Development] dan281082:
this makes no sense but thanks for your input!
[Desire Android Development] 2WildFirE:
all files are down pls reupload
[Desire Android Development] roalex:
actually nm those
[Desire Android Development] roalex:
Use this for boot and this for recovery
[Desire Android Development] agismaniax:
Official CustomMTD download link: click here.

I think only version 1.5.6 works perfectly with BravoC.
[Desire Android Development] wiggles87:
Worked like a charm for CM6 Nightly Build 132

Thanks legend!
[Desire Android Development] daedelus82:
Have created another thread containing a pre-modified version of clockwork recovery along with a pre-modified version of CM6.

It is as simple as:

1. Fastboot flash the modified recovery

2. Reboot into recovery

3. Wipe data/factory reset

4. Flash modified CM6 ROM

5. Flash gapps and anything else you want

6. Reboot & Enjoy

See the thread for all the details:

http://xdaforums.com/showthread.php?p=8581384
[Desire Android Development] mklass:
Wow the RC Mix HD rom is like 270 mb :O
[Desire Android Development] philje123:
So really can't get this to work.

Is it sense compatible?

I am using the pre-rooted stock rom.

Flashed recovery back and nandroiding back for now until I know whats going on with this.

Phil
[Desire Android Development] AndroHero:
+1 can we get a version for sence, maybe based on richardtripps kernel or snq's leedroid kernel
[Desire Android Development] blu3angel:
I've got S-off but could'nt get it to work with AuraXtSense 7.8.1...
[Desire Android Development] AndroHero:
its because its made for cm6's kernel, we need someone to port it for one or more of the sence kernels
[Desire Android Development] killawatts:
Alright before I take the plunge I wanted to ask a few questions.

Does the recovery patch work with Amon ra recovery?

I can easily flash to clockwork if it doesn't.

Also I see in the original thread that you have to flash the recovery patch via fastboot... what would be the command for flashing the .zip via recovery? I know how to flash a recovery.img but I've never patched recovery via fastboot.

The rest seems easy enough. Once I have answers to these questions I'm ready to go!!! (very very stoked on this... been waiting for someone to figure it out)
[Desire Android Development] Shane2:
My phone has a sense kernel, and it worked for me.

Yes. I use Amon RA 1.7.0.1 R5 and it worked for me.
[Desire Android Development] killawatts:
Thanks! and how do you flash: bravo-recovery-v1.5.3-CustomMTD.zip via fastboot?
[Desire Android Development] AndroHero:
shane what kernel are you using?
[Desire Android Development] heavymetalmage:
My ouput:

<5>[ 10.590362] 0x00001ff60000-0x000020000000 : "misc"
<5>[ 10.591918] 0x000004240000-0x0000046c0000 : "recovery"
<5>[ 10.597930] 0x0000046c0000-0x0000049c0000 : "boot"
<5>[ 10.602111] 0x0000049c0000-0x0000143c0000 : "system"
<5>[ 10.887542] 0x0000143c0000-0x000016bc0000 : "cache"
<5>[ 10.934020] 0x000016bc0000-0x00001ff60000 : "userdata"

Looks pretty much the same except for the 10.591918 etc. part. Seems like it should work, I'll give it a try.
[Desire Android Development] Shane2:
RichardTrip's uvoc kernel (built from the HTC source) along with MCR r9

Nope, flash them via recovery. However AmonRA's recovery lacks the option to erase /system, you'll have to boot into fastboot to do that (you can still erase data and cache from recovery though)

Just boot into bootloader, go into fastboot mode, then from a command line just enter "fastboot erase -w system"

Then reboot back into recovery and erase the rest of your data
[Desire Android Development] AndroHero:
i tried with leedroid and snq's kernel and i just get a bootloop with the android logo :mad:

edit *ooh no its booted up now :o 209mb free on boot :D wonder why its not using my bootanimation and sound tho :s
[Desire Android Development] Narfx:
Yep, it works flawlessly with a custom defrost rom. I left 120MB for system and 5 for cache. After boot I get 309MB free in data (a2sd still enabled, I'll remove the ext3 partition now and forget about a2sd forever :) ).
[Desire Android Development] killawatts:
When I try to erase system through fastboot using "fastboot erase system -w I get the error:

FAILED <remote: not allow>

I'm s-off and have never run into this issue before... any ideas?
[Desire Android Development] Moe5508:
Sweet - this is the whole reason we applied the S-OFF patch after all! :D
[Desire Android Development] mr_dinosaur:
Have you flashed the latest HBOOT patch? Version 1.5 (I think) from AlphaRev? The inability to erase via flashboot was fixed in this version if my memory serves me correctly.
[Desire Android Development] ephumuris:
Were they previously symlinked to /data ? As i think that may have been broken.
[Desire Android Development] Mekrel:
I think Lee moved them back to /system as S-OFF is now out.

So maybe he's flashed 2.2a and is still placing the files in /data/local. :)
[Desire Android Development] ephumuris:
Possibly!

Can anyone explain what the hell the cache partition does? if it's possible to resize to 5mb is it safe to say it does nothing? if so why do we have it?
[Desire Android Development] Mekrel:
I read somewhere that it's to do with storage for OTA files, which would make sense because if you can't write to it then it's a place for the OTA that's guaranteed to have space for it.
[Desire Android Development] ephumuris:
What and that's all? As i would never use an OTA update...i suppose unless the custom roms had it. So does Defrost and Open Desire use the cache for OTA? Hmm...I like my Sense HD anyway!
[Desire Android Development] AndroHero:
guys im sorry, when i coppied the .zip from my previous rom it must of got corrupt, when i tried to extract it to check i packed it correctly, it said no archives found :rolleyes: i swapped it with another and all is fine now :D i have one question tho, is the cache partiton not used to store apk's when there being downloaded from the market? :confused:
[Desire Android Development] Moe5508:
Hmmm, struggling to erase system via FASTBOOT as well using AmonRA recovery...can I switch to Clockwork Mod recovery instead?
[Desire Android Development] killawatts:
Yeah in order to use "erase" commands via fastboot you need to have the newest hboot installed from Alpharev. It's super easy to update it via fastboot though. (no need to boot from disk this time)

I ended up going back to clockwork mod in order to make this work and now I'm sitting on a solid 181mb free on /data. I'm gonna disable a2sd and go back to froyo a2sd now. No more EXT partition needed!

Thank you sooooo much. This is amazing/epic.
[Desire Android Development] AndroHero:
It seems the cache partiton is used to store temp data the phone is using, the device is alot slower with 5mb cache partition and most games are unplayable :eek:
[Desire Android Development] qbus00:
This is a great news.

And what is the best way to undo custom MTD partitions sizes?

Flashing original HTC ROM (from exec) will do the trick or do we have to revert partition sizes to original ones?
[Desire Android Development] AndroHero:
just change the mtdpartmap.txt to the original values and repeat process init :D
[Desire Android Development] killawatts:
That's what I figured... nice! Makes for easy modification. May have to change the cache partition size if the above post holds true. I just played mini-squadron a bit with a 5mb cache partition and it looks fine. Anyone else finding things slow with the small cache?
[Desire Android Development] AndroHero:
i tried hero of sparta HD and the intro video was all choppy and the sound was scratchy, when the game started it was dead laggy :mad:
[Desire Android Development] killawatts:
What was the /cache size initially? I wonder what the minimum size would be to still have good functionality. I've got some MB to spare now... haha.
[Desire Android Development] AndroHero:
i think it was 35mb, i tried 20 mb and although it was better i still didnt like it, im going to do a nandroid and restore all 35mb see if its back to normal :D
[Desire Android Development] killawatts:
I will do the same! (I love fiddling with stuff like this)
[Desire Android Development] Moe5508:
I get an error that sbin/sh can't be found to erase system. I've managed to enter # shell in recovery. Any pointers please?
[Desire Android Development] ownjoouk:
Been looking forward to this! Thank you.
[Desire Android Development] killawatts:
You need to be in fastboot mode to use the erase command. You also need to make sure you have the latest hboot from alpharev.
[Desire Android Development] daedelus82:
I currently have my phone configured as follows:

145MB for system, 197MB for data, 95MB for cache

These settings closely match Nexus One which is current developer phone.

And I removed "dalvik.vm.dexopt-data-only=1" from build.prop so davlik resides on cache like it's supposed to.

I currently have 70MB free on data, and 50MB free on cache.

Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 208092 0 208092 0% /dev
tmpfs 208092 0 208092 0% /mnt/asec
/dev/block/mtdblock3 148480 118376 30104 80% /system
/dev/block/mtdblock5 202368 130124 72244 64% /data
/dev/block/mtdblock4 97280 46536 50744 48% /cache
/dev/block/vold/179:1
7431564 5484240 1947324 74% /mnt/sdcard
/dev/block/vold/179:1
7431564 5484240 1947324 74% /mnt/secure/asec
/dev/block/dm-0 3124 1504 1620 48% /mnt/asec/com.google.android.stardroid-1
[Desire Android Development] ice_prophecy:
Does resizing these partition wipe what is on them?

ie, can I do these procedures without affecting current functions of phone?
[Desire Android Development] Enhdojo:
Thanx a lot man! I'll try tomorrow.