Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,741,305 Members 44,665 Now Online
XDA Developers Android and Mobile Development Forum

[MOD][S-OFF] AOSP Based ROM Custom MTD Partitions Nexus One - Easy Flash/Patch

Tip us?
(Last edited by daedelus82; 19th October 2010 at 12:57 PM.)
Senior Member - OP
Thanks Meter 38
Posts: 154
Join Date: Sep 2009
Talking [MOD][S-OFF] AOSP Based ROM Custom MTD Partitions Nexus One - Easy Flash/Patch

This recovery & patch allow installation of AOSP based ROM (CyanogenMod/OpenDesire/DeFrost) with partition sizes set to match that of Nexus One.

No more need for Apps2SD hacks!

It is very easy to install, however requires security to be disabled on your device (S-OFF in FASTBOOT).

Steps to install:
1. Download AOSP Based ROM to your SD card.
2. Download to your SD card.
3. Reboot in Fastboot
4. Fastboot flash recovery nexified-recovery-clockwork-
5. Reboot into recovery
6. Wipe data/factory reset
7. Flash ROM
8. Flash
9. Reboot & Enjoy

Both the recovery, and the boot patch, have kernel cmdline:
Select Code
Advantage is more space on DATA, whilst keeping phone as close to AOSP as possible. Nexus One is current developer phone, and it's partition sizes are 145MB for system, 197MB for data, 95MB for cache, same as what this patch achieves. Meaning your phone is as close to Android/AOSP as Google intended.

The patch also removes "dalvik.vm.dexopt-data-only=1" from build.prop which places dalvik-cache on the cache partition as per AOSP.

I have done this to my phone and am personally very happy with it, I have restored all my apps and still have 70MB free in data, and dalvik-cache resides in cache.

My current partitions are:
Select Code
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
                       7431564   5484240   1947324  74% /mnt/sdcard
                       7431564   5484240   1947324  74% /mnt/secure/asec
/dev/block/dm-0           3124      1504      1620  48% /mnt/asec/
Do not flash radio via recovery, only via fastboot. You should not be flashing radio via recovery anyway, it is strongly discouraged.

  • AlphaRev - for bringing S-OFF to HTC Desire
  • Firerat - for the original mtd patch which I learned a lot from.
  • Lbcoder - for the initial information on how to modify partitions via kernel commands, i learned a lot from him as well.
  • 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
  • Kali- for porting CM6 to Desire thanks a bunch

I am doing this to try and spark further interest in this, in the hopes that other developers may improve on it, as the default partition sizes on the desire are crap.

How to uninstall / set partitions back to normal:
Boot into Fastboot
Fastboot flash standard/unmodified clockwork recovery or amon_ra
Reboot into recovery
Wipe data/factory reset
Flash ROM & Reboot

HTC One X | Team Venom: ViperX

Senior Member
Thanks Meter 42
Posts: 567
Join Date: Jan 2010
Should this work with OpenDesire 0.34,too?

And do we need the recovery al the time? Or can we use an other one like PsfMod after flashing the update?
beanbean50's Avatar
Senior Member
Thanks Meter 830
Posts: 2,252
Join Date: Jul 2008
Location: London
nice work.....
back in a flash
Senior Member - OP
Thanks Meter 38
Posts: 154
Join Date: Sep 2009
Originally Posted by xtcislove View Post
Should this work with OpenDesire 0.34,too?

And do we need the recovery al the time? Or can we use an other one like PsfMod after flashing the update?
No, the partition sizes are passed as kernel parameters, so recovery & ROM must be patched to use the same parameters.
HTC One X | Team Venom: ViperX

Senior Member
Thanks Meter 23
Posts: 916
Join Date: Dec 2009
Location: London
so what are the advantages of this?
i see data is 197mb, does this mean that there is about 70mb+ storage space for apps?
thanks for your hard works

If you like my work, then please consider a small donation

Senior Member
Thanks Meter 9
Posts: 213
Join Date: Jun 2008
Location: Rotterdam
Well done!

Very brave of you to almost brick your device (twice?) and continue development nonetheless.

I don't need it, but many others will love this. Thanks a lot.
Senior Member
Thanks Meter 1
Posts: 113
Join Date: Feb 2007
If I follow your procedure am I stuck on nightly-132, or once i've got the resized partitions can I continue to flash CM6 nighlites?
marinierb's Avatar
Senior Member
Thanks Meter 131
Posts: 1,044
Join Date: Mar 2008
Location: Hull, Québec
These kernel parameters:
Select Code
Where exactly are they set? I assume it's somewhere inside the boot.img?
"Those who mind don't matter and those who matter don't mind." ~Dr. Seuss
Running rooted stock KitKat on a Nexus 5
Senior Member
Thanks Meter 6
Posts: 489
Join Date: Jul 2008
I am on CM602 with kernel update1 and psfmod unrevoked recovery. No chance of me getting the extra space for apps?
Senior Member
Thanks Meter 59
Posts: 560
Join Date: Jun 2010
great works on my Desire..Thanks daedelus82 and other persons...I see 197 Mb on available space..

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Mod Lets You Have Stereo Speakers on Your Sony Xperia Z1 (Sort Of)

The stereo speakers onthe Sony Xperia Z2areprobably a relatively large … more

Give Your Screen Some Color with HexaTime Live Wallpaper

We don’t often cover very many live wallpapers here on the XDA Portal. You may … more

Android Wear App Review: Command Google Now with Commandr – XDA Developer TV

OK Google. Make Me a sandwich. How many times have you … more

Play Your Hits and Learn the Lyrics with NextGen Music Player

There are plenty of music players for Android available in Play Store. They … more