[DEV][S-OFF] Custom MTD Partitions (resize data, system, and cache)

Search This thread

AlxMAX

Senior Member
Sep 30, 2007
560
138
Bucharest
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.
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.
 
Last edited:

danarama

Senior Member
Aug 22, 2010
31,277
18,811
Oxenhope, West Yorkshire, UK
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

Sent from my HTC Desire using XDA App
 

HwyXingFrog

Senior Member
Dec 11, 2008
154
115
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.
 

HwyXingFrog

Senior Member
Dec 11, 2008
154
115

englebert.lai

Member
Sep 29, 2011
21
3
www.bluebert.info
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.
 

jermaine151

Senior Member
Jun 19, 2010
4,237
3,690
Columbus, Ohio
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:

Code:
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.
 
Last edited:

dan281082

Senior Member
Aug 29, 2011
484
54
does anybody no if this patch will work on desire s? i have it on my desire wanna cmtd on my friends desire s?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 26
    Good news for those who have disabled security on their HTC Desire.

    Having tried Firerat's Custom MTD patch on my HTC Desire and almost bricking it twice, I decided to break it apart and examine things in more detail.

    As it currently stands v1.5.3 of his patch will corrupt your mtd0 partition if applied to your desire, so do not try it!

    I read through lbcoder's custom partitions layout thread, then broke apart Firerat's patch to determine what it was doing, and what was going wrong on the HTC Desire.

    The result, I have modified Firerat's Custom MTD script so it works on the HTC Desire and have successfully modified the partitions on my phone so system is 125MB, cache is 5MB, and data is 317MB.

    Now after moving all my apps & dalvik-cache from SD-EXT back to DATA I still have 130MB free! w00t!

    I will be providing minimal support for this, I am purely providing this to allow others to modify their partition table just as I have done. Ensure you read Firerat's original thread for further information and/or troubleshooting, it's 99% his patch/work, I just made a small change to stop mtd0 from being overwritten.

    These are the steps I performed on my phone and are based on ClockworkMod Recovery v2.5.0.7.
    If none of this makes sense to you then this is not for you:

    1. Disable security on your phone. (S-OFF in FASTBOOT)
    2. Place bravo-recovery-v1.5.3-CustomMTD.zip & bravo-boot-v1.5.3-CustomMTD.zip on SD card
    3. Reboot into recovery
    4. Take a Nandroid backup
    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
    6. Format system, data, and cache (found under mounts and storage)
    7. Flash bravo-recovery-v1.5.3-CustomMTD.zip, this patches recovery to use the new partition sizes
    8. Reboot into recovery
    9. Format system, data, and cache again for good measure (found under mounts and storage)
    10. Flash ROM, or restore Nandroid backup, it will be flashed to NAND based on new partition sizes
    11. Prior to rebooting, flash bravo-boot-v1.5.3-CustomMTD.zip, this patches ROM kernel to load with same partition sizes.
    12. Enjoy

    Warnings:
    Do not attempt to flash radio via recovery/ZIP, only do it via fastboot.
    Has only been tested on HTC Desire, may not work on other phones.
    Some users have suggested small cache size affects performance in games, if you play games on your phone it may be worth setting cache to 20-35MB

    Uninstalling:
    Removing this is simple.
    Boot in to fastboot
    Fastboot flash the original unmodified clockwork img
    Reboot into recovery
    Format system, data, cache
    Install ROM/ZIP, gapps etc, reboot

    Download:
    bravo-recovery-v1.5.3-CustomMTD.zip
    bravo-boot-v1.5.3-CustomMTD.zip

    Credits:
    • AlphaRev - for bringing S-OFF to HTC Desire
    • Firerat - for the original patch. I will be forwarding you the exact changes/details shortly.
    • Lbcoder - for coming up with the idea
    • Skraw ( CM forums ) - for getting lbcoder interested
    • Koush - for AnyKernel
    • Cyanogen & Co - for giving us all such great ROMs to play with
    • Amon_RA and Koush - for giving us something to patch
    • Techjosh - for fixing the patchers for use with Rogers (EBi1)
    • Mblaster - for pointing out my nasty habit of using -r zip flag at the end of command ( breaks compatibility with older zip versions, fixed in AutoPatcher v1.5)
    • Kali- for porting CM6 to Desire thanks a bunch
    • I don't take any credit for this, other than the time invested to get it working on the Desire.


    Code:
    Filesystem           1K-blocks      Used Available Use% Mounted on
    tmpfs                   208112         0    208112   0% /dev
    tmpfs                   208112         0    208112   0% /mnt/asec
    /dev/block/mtdblock3    128000    123932      4068  97% /system
    /dev/block/mtdblock5    315008    184048    130960  58% /data
    /dev/block/mtdblock4      5120       776      4344  15% /cache
    /dev/block/mmcblk0p2    505636      2307    477224   0% /sd-ext
    /dev/block/vold/179:1
                           7431564   5413644   2017920  73% /mnt/sdcard
    /dev/block/vold/179:1
                           7431564   5413644   2017920  73% /mnt/secure/asec
    /dev/block/dm-0           3124      1504      1620  48% /mnt/asec/com.google.android.stardroid-1
    2
    Exactly "" means only use the text between the " symbols
    Like this attachment

    echo means copy
    > /sdcard/mtdpartmap.txt shows location to put file
    1
    Reserved

    Just in case
    1
    Interesting :D

    Nice work.
    1
    Official CustomMTD download link: click here.
    I think only version 1.5.6 works perfectly with BravoC.