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

Proz0r

Senior Member
Oct 3, 2010
277
238
0
Zagreb
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?
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:

Proz0r

Senior Member
Oct 3, 2010
277
238
0
Zagreb
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:

PlayPetepp

Senior Member
Dec 19, 2010
2,128
656
0
Osijek
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.
 
  • Like
Reactions: Proz0r

Proz0r

Senior Member
Oct 3, 2010
277
238
0
Zagreb
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
 

Alex-V

Inactive Recognized Developer
Aug 26, 2008
9,516
5,256
253
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.
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.
Can /data then be mounted as /sdext? Just so there's no losses. ;)
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....
 

PlayPetepp

Senior Member
Dec 19, 2010
2,128
656
0
Osijek
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
Devs would probably find a use for it since it's additional space on the phone. Imagine having all your apps and other stuff like boot/downanimation on /data and only dalvik, and I mean only dalvik, on /sdext (using your partitioning method ofcourse). That's my understanding of it so far. :)

-. typewrited .-
 

Proz0r

Senior Member
Oct 3, 2010
277
238
0
Zagreb
Yeah, I think putting just Dalvik on the real userdata partition could be done, that's a great idea, thanks!
Ah, you mean for the Sense ROMs which symlink stuff to the sd-ext! Yeah, the /system partition could be enlarged, even to the point where userdata is only a few megabytes in size since it doesn't even get mounted as is. I'll leave those things to someone else though, since I'm not great editing partition tables :)
 

Alex-V

Inactive Recognized Developer
Aug 26, 2008
9,516
5,256
253
That's one of the uses I also had in mind. Could lead to a better responce of the rom in general.

-. typewrited .-
I guess he was thinking of bypassing symlinking alltogether. Just like you. :)

-. typewrited .-
Yeah, I think putting just Dalvik on the real userdata partition could be done, that's a great idea, thanks!
Ah, you mean for the Sense ROMs which symlink stuff to the sd-ext! Yeah, the /system partition could be enlarged, even to the point where userdata is only a few megabytes in size since it doesn't even get mounted as is. I'll leave those things to someone else though, since I'm not great editing partition tables :)

Thats what i make since a half year or so...withthe 387mb system hboot and take the sd-ext with data2xxxx scripts as data partition.... :) lol :) to make the system faster without symlinks...

using nands data partition (internal) for dalvik is a bad idea...because it can be that you cant install apps but you still have free sd-ext because of data is full with dalvik because of internal

instead its better to move dalvik to sd-ext and use a odexed rom...so the dalvik (odex) from system apps and framework is internal...and only third party apps dalvik is extern...

this make system fly also whith data2xxxx scripts


anyway...good idea...i will try the script also :)

with kind regards
 

rayiskon

Senior Member
Jan 9, 2011
2,124
1,257
0
instead its better to move dalvik to sd-ext and use a odexed rom...so the dalvik (odex) from system apps and framework is internal...and only third party apps dalvik is extern...

this make system fly also whith data2xxxx scripts
PlayPetepp is one of the supporters of the odexed roms idea, i remember he mentioned it a while ago through pm ;) i am too in a way, although it makes it a lil harder to customize stuff, i don't feel like using smali and baksmali everytime i want to do a battery mod or stuff like that ;) despite it's advantages regarding speed.
nways, i think this script can be very helpful for future plans.
 

PlayPetepp

Senior Member
Dec 19, 2010
2,128
656
0
Osijek
This is my idea for deodexed roms: /system as it is (cm7r2 hboot preferably), ext mounted as /data and data as /sdext. Now, all apps and other rom stuff that can't go to /system go to /data and only dalvik goes to /sdext. That way, there's still enough space for all apps and for dalvik because, let's face it, you'll hardly fill up 287mb with just dalvik. I have like 100+ apps on my phone and after moving dalvik to ext I got 160mb more space on /data so that's the size of dalvik.

Odexed roms are different but actually the same could be applied. Since /data gets bigger we can still use /sdext as a place for dalvik since it will be occupied with only installed apps dalvik and no framework/system dalvik (since it's odexed and everything goes to either /system or /data). Then free space would be evened out with apps going to /data where some odexed apps are stored. The only downside would be symlinking but there would be no need to change hboots. Am I making any sense here? :)
 

Alex-V

Inactive Recognized Developer
Aug 26, 2008
9,516
5,256
253
PlayPetepp is one of the supporters of the odexed roms idea, i remember he mentioned it a while ago through pm ;) i am too in a way, although it makes it a lil harder to customize stuff, i don't feel like using smali and baksmali everytime i want to do a battery mod or stuff like that ;) despite it's advantages regarding speed.
nways, i think this script can be very helpful for future plans.
i dont say anything bad...i know that he is a good man ..lol..i only say that this way of rom..speed things..is the way i do for around a half year..but he or michael..never ask me...maybe for tips or soo..

you dont need to deodex if you want change battery or so...first: UOT have a odex support...second: framework-res.apk and com htc resources apk is never odexed (also not in original htc roms :)

This is my idea for deodexed roms: /system as it is (cm7r2 hboot preferably), ext mounted as /data and data as /sdext. Now, all apps and other rom stuff that can't go to /system go to /data and only dalvik goes to /sdext. That way, there's still enough space for all apps and for dalvik because, let's face it, you'll hardly fill up 287mb with just dalvik. I have like 100+ apps on my phone and after moving dalvik to ext I got 160mb more space on /data so that's the size of dalvik.

Odexed roms are different but actually the same could be applied. Since /data gets bigger we can still use /sdext as a place for dalvik since it will be occupied with only installed apps dalvik and no framework/system dalvik (since it's odexed and everything goes to either /system or /data). Then free space would be evened out with apps going to /data where some odexed apps are stored. The only downside would be symlinking but there would be no need to change hboots. Am I making any sense here? :)
i was full with dalvik on data (internal) in the past...with older data2ext and whatever scripts...and also other people (i had the same thinking as you...once a day a person say..he cant install apps but he have free memory...it was a full data partition because of dalvik)...

but idea is nice...anyway dalvik is on sd-ext if i understand it right..so no limit of 2xx mb..or..?

yes symlink some files and you dont change hboot...but if you use data2xxx scripts with dalvik to sd-ext you dont need the data partition because sd-ext is data...so you can make the system partition bigger and dont need symlinks...so rom will be faster...mmmhh but this is maybe only my personal feeling...?!?

with kind regards...Alex
 
Last edited:

Iperzampem0

Senior Member
Aug 4, 2008
788
404
0
Venezia
@Alex-V & other People here:
Hi guys,

I'm from the Nexus One forum, and I'm looking for a better script for my HyperSense ROM, based on the AceSMod007-v41 by michael.

I was trying to understand how can I modify my ROM having only dalvik-cache into an sd-ext folder... I have succesfully transferred all the stuff into /system with a modified HBOOT and so I have only a /data folder with some apps.
Obviously /data partition will have only around 70mb remaining for apps. So it's a must that I can transfer dalvik-cache to sd-ext.
How can I do?

Thanks!
 

Alex-V

Inactive Recognized Developer
Aug 26, 2008
9,516
5,256
253
@Alex-V & other People here:
Hi guys,

I'm from the Nexus One forum, and I'm looking for a better script for my HyperSense ROM, based on the AceSMod007-v41 by michael.

I was trying to understand how can I modify my ROM having only dalvik-cache into an sd-ext folder... I have succesfully transferred all the stuff into /system with a modified HBOOT and so I have only a /data folder with some apps.
Obviously /data partition will have only around 70mb remaining for apps. So it's a must that I can transfer dalvik-cache to sd-ext.
How can I do?

Thanks!
what script you use at the moment...?
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone