Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[28th Jun][AOSP] INT2SD, a new D2EXT method (added CM 7.1 and 7.2.0.1 INT2SD-S)

OP Proz0r

22nd November 2011, 12:44 AM   |  #1  
Proz0r's Avatar
OP Senior Member
Flag Zagreb
Thanks Meter: 238
 
277 posts
Join Date:Joined: Oct 2010
More
Progress update and INT2SD implementation request form!
With holidays starting, and more free time on my hands, I've decided to revive this project. Having my hard drive fail on me recently, and losing the request log, it has become obvious that I need a new system of handling requests, and it is here. If you have requested a ROM before, please send a request again, via this form.
Please submit all further requests via this form!

---

This is the INT2SD thread for AOSP ROMs and their developers and users.
INT2SD thread for Sense ROMs

-

This is INT2SD, a new method of achieving D2EXT. It is meant for developers who wish to implement this functionality in their ROMs, since, due to the nature of the method, there is no way of making a flashable .zip which would be universal and work on most ROMs (yet?).

What differs this method from the old ways is that it uses no symlinks whatsoever.
INT2SD mounts an SD ext partition directly to /data, and this requires making changes to the boot.img, hence why universal flashable zips are not an option. The real userdata partition is mounted on /realdata and used for the e2fsck log.

Sorry for the link downtime, there were some critical bugs which I did not have time to fix. Therefore I took my time and added symlink checks, fixed fsck and more.


INT2SD-S - "Speed" (default as of 29th Jun)

Main characteristics:
  • /data on SD ext, /data/data on internal
  • /data/data limited to 280 MB (probably enough for more than 100 user apps)
  • noticeably faster on slower cards
  • for use with CM7r2 HBOOT
Description:
The new "speed" flavour mounts ext to /data and userdata to /data/data, achieving great speed while still retaining excellent storage capabilities. It's used with the CM7r2 HBOOT. This is now the default flavour, offering great speed while still being able to hold a hefty amount of apps.


INT2SD-M - "Mass" (discontinued)

Main characteristics:
  • /data on SD ext
  • number of apps is only limited by ext size
  • requires a faster card
  • for use with fatsys HBOOT
Description:
The classic "mass" flavour mounts ext to /data, thus eliminating the need for the mtd5 userdata partition. It has proven to be slow even on some of the faster cards. Due to INT2SD-S being able to hold a very high number of applications, and still being much faster, this flavour is discontinued.


FAQ

For users: How to get this in your favorite ROM
For ROM developers: How to get this implemented in your ROM
Please fill out this form.

Cross-device implementations
For now, no. You may submit requests, but I won't be able to fulfill them for a while. I have quite a lot of real life work on my plate, not to mention a list of Desire ROMs I have to tend to. After that's done, I'll be happy to try blind-porting it to whichever device you wish, but my priority are Desire ROMs, primarily because it's a lot easier to implement INT2SD into ROMs for a phone I already have.

Universal update zips
Also, no. Each ROM is different, and due to the nature of INT2SD, it is simply not possible to make a one-for-all universal update zip. Every ROM requires tending to its peculiarities, especially Sense ROMs, and I would rather not take the change of trying to make one and end up with a flashable bootloop zip.

Why don't you just publish instructions on how to implement INT2SD for devs to use?
Quote:
Originally Posted by Proz0r

You can take a look at the modified ROM and you will find 3 new files in /system/etc, dalchk, fsck and sleep. These files are executed by init.rc because of my modifications to it. You can also decompile the boot.img and use a tool such as diff or diffuse (a GUI for diff) and check the differences between it and the unmodified init.rc from Alex's standard, D2EXT ROM. However, his ROM required another init.d script to move weather animations to /data, and modifications to the updater-script to flash everything that would normally be flashed to /data, to be flashed to /sd-ext. Sounds simple enough, right? Well, it's actually not quite as simple. When I have first implemented INT2SD to CyanogenMod 7, all I had to do was edit a few lines and add those three scripts. There was not a single ROM (and there are a few unreleased ones which I've worked on) to which I could apply a "standard" procedure. Each ROM required further modifications on its own and being the one who devised INT2SD, I know what I should look out for in order to avoid catastrophical bugs. ROM developers do not. This is why I do NOT offer support for "homemade" INT2SD implementations. Every ROM has its own peculiarities that need tending to and INT2SD implementations need to be very flexible to allow the ROM to work in conjunction with it. Sure, everything could go great, but INT2SD is extremely easy to implement horribly wrong and have huge bugs and even unbootable systems, and without knowing what the dev did to put it in their ROM, it is next to impossible for me to troubleshoot and fix. It would probably end up with me having to implement it myself either way in most cases and having angry developers and possibly users on my hands being pissed at me for doing a bad job and releasing a ****ty product, when the problem was just a typo in init.rc. That's why I have not nor will I release instructions for devs on how to implement it themselves.



Instructions:
Pick your ROM featuring INT2SD, download it and flash it. You only need 1 ext2/3/4 partition. Due to /data/data being on the SD, a high-class card is recommended. Due to Gingerbread AOSP ROMs generally being pretty small, there's still quite a lot of unused space left on /realdata, to which I plan symlinking the /data/data directory so that INT2SD plays nice with lower-class cards too.
Remember to flash Google Apps, available here, if you opt for CyanogenMod.
All zips are signed for your convenience.
Flashing other kernels on top of these ROMs should work, though it hasn't been tested. If you try it, please let me know how it went.

EDIT: Seems there are people spreading false information on how this should be installed due to their own misunderstanding of my post. While I thought the instructions are simple enough, it seems they are too simple and do not describe the process. So, let me clear this up once and for all:
THE ROMS HERE ARE FULL ROMS THAT ALREADY HAVE INT2SD IN THEM.
THESE ARE NOT ADD-ON ZIPS.

Meaning, if you wish to use CM7 with INT2SD, just download CM7 from here. It is actually full CM7, along with INT2SD. So, the process is as follows:
  1. Make a backup of all your apps
  2. Download the full CyanogenMod 7 Stable ROM with INT2SD here
  3. Do a full wipe
  4. Flash it
  5. Flash gapps
  6. Restore your apps



Download:
Thanks to Ante0 for hosting the files!

INT2SD implemented in:

CyanogenMod 7.1.0 Stable INT2SD-M (Download)
CyanogenMod 7.1.0 Stable INT2SD-S (Download)
CyanogenMod 7.2.0.1 Stable INT2SD-S (Download)
GingerVillain 3.3 INT2SD-M (Thread | Download)
GingerVillain 3.3 INT2SD-S (Thread | Download)

Google Apps (not included in CyanogenMod)



It's compatible with Titanium Backup, here's how TB sees it:




Current bugs:
-


Credits (alphabetically):
Alex-V - providing me with the first Sense ROM to implement INT2SD in
brabo, GShellz admin - huge help with bash scripts implemented in the ROMs
CM - a base ROM for implementing the method in
Droidzone - suggestions, help with HBOOTs
Hacre - massive assistance as well, kicking me to try and realise the main idea and for coming up with names "INT2SD" and "fatsys"
JieeHD - help with compiling/decompiling the boot.img files and his excellent guides on FYA
Pulser_g2 - massive assistance, ideas on the reboot bug and hosting
Richard Trip - making GingerVillain which now has a version featuring INT2SD
snq- - pointing out a huge typo and saving me multiple hours of pointless work
ubuntubhoy - a kick in the arse I needed
... and everyone else in the #villainrom IRC channel for help and mental support! Thank you all, and everyone I forgot to mention (PM!).


Disclamer: I'm not responsible if something goes wrong and wreaks havoc upon you, your phone, your card, any part of your phone, your friends, your family, your close or distant relatives and/or your pet, but I will gladly provide assistance if it does.
Last edited by Proz0r; 29th June 2012 at 08:07 AM.
The Following 32 Users Say Thank You to Proz0r For This Useful Post: [ View ]
22nd November 2011, 02:42 AM   |  #2  
Proz0r's Avatar
OP Senior Member
Flag Zagreb
Thanks Meter: 238
 
277 posts
Join Date:Joined: Oct 2010
More
Changelog:
v2.0.1
  • Small bugfix

v2.0
  • Dalvik cache is now by default on /realdata (the actual userdata partition) EDIT: Nope, not a good idea, thanks Droidzone!
  • Fixed fsck
  • Implemented lots of failsafes and small fixes

v1.0
  • First stable version
  • One version for ext2, ext3 and ext4 partitions
  • Implemented e2fsck (cheers Hacre!)
  • Reboot bug fixed (cheers Pulser!)
  • Real data partition is now mounted on /realdata (used only for e2fsck log)

v0.1
  • First beta version
Last edited by Proz0r; 4th February 2012 at 02:17 AM.
The Following 3 Users Say Thank You to Proz0r For This Useful Post: [ View ]
22nd November 2011, 03:28 AM   |  #3  
rayiskon's Avatar
Senior Member
Thanks Meter: 1,251
 
2,019 posts
Join Date:Joined: Jan 2011
Sretno!
The Following User Says Thank You to rayiskon For This Useful Post: [ View ]
22nd November 2011, 04:22 AM   |  #4  
TomWan's Avatar
Junior Member
Thanks Meter: 1
 
17 posts
Join Date:Joined: Feb 2011
More
nice work, I will try it !
The Following User Says Thank You to TomWan For This Useful Post: [ View ]
22nd November 2011, 10:36 AM   |  #5  
PlayPetepp's Avatar
Senior Member
Flag Osijek
Thanks Meter: 525
 
1,823 posts
Join Date:Joined: Dec 2010
Donate to Me
More
This is very nice in theory and I hope devs notice your initiative. Just one question though, if ext is mounted as a /data partition, what happens to the real /data partition then? Is it merged with the ext or something else? Don't see an explanation in the first post. Thanks mate and keep up the good work. With no symlinks this could be somewhat of a speed booster for our roms for people that use higher class sd cards.
The Following User Says Thank You to PlayPetepp For This Useful Post: [ View ]
22nd November 2011, 11:14 AM   |  #6  
Proz0r's Avatar
OP Senior Member
Flag Zagreb
Thanks Meter: 238
 
277 posts
Join Date:Joined: Oct 2010
More
Cheers rayiskon and TomWan!

PlayPetepp, nothing happens, it simply isn't used, or even mounted. I wish I could merge it with the ext partition, but due to several issues this isn't possible.
The Following 2 Users Say Thank You to Proz0r For This Useful Post: [ View ]
22nd November 2011, 11:57 AM   |  #7  
PlayPetepp's Avatar
Senior Member
Flag Osijek
Thanks Meter: 525
 
1,823 posts
Join Date:Joined: Dec 2010
Donate to Me
More
Can /data then be mounted as /sdext? Just so there's no losses.
22nd November 2011, 12:24 PM   |  #8  
Proz0r's Avatar
OP Senior Member
Flag Zagreb
Thanks Meter: 238
 
277 posts
Join Date:Joined: Oct 2010
More
It can, but I intentionally avoided doing that so there was no confusion among users. Besides, I don't see what it could be used for anyway.
I could do a special version which does that, though
22nd November 2011, 12:30 PM   |  #9  
Alex-V's Avatar
Recognized Developer
Thanks Meter: 4,553
 
8,332 posts
Join Date:Joined: Aug 2008
More
Quote:
Originally Posted by PlayPetepp

This is very nice in theory and I hope devs notice your initiative. Just one question though, if ext is mounted as a /data partition, what happens to the real /data partition then? Is it merged with the ext or something else? Don't see an explanation in the first post. Thanks mate and keep up the good work. With no symlinks this could be somewhat of a speed booster for our roms for people that use higher class sd cards.

Quote:
Originally Posted by Proz0r

Cheers rayiskon and TomWan!

PlayPetepp, nothing happens, it simply isn't used, or even mounted. I wish I could merge it with the ext partition, but due to several issues this isn't possible.

Quote:
Originally Posted by PlayPetepp

Can /data then be mounted as /sdext? Just so there's no losses.

Quote:
Originally Posted by Proz0r

It can, but I intentionally avoided doing that so there was no confusion among users. Besides, I don't see what it could be used for anyway.
I could do a special version which does that, though

you can change the hboot and make system partition bigger and data smaller..so you dont need to symlink system apps or libs....
22nd November 2011, 12:33 PM   |  #10  
Proz0r's Avatar
OP Senior Member
Flag Zagreb
Thanks Meter: 238
 
277 posts
Join Date:Joined: Oct 2010
More
Symlinking system apps or libs? There's no need of doing that in the first place

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes