[1.4][AROMA][MOD][GB/ICS][Aug19-2012] DataSwap + Auto SD-EXT & SD-Swap Enabler - G2 and Desire Z Android Development

Tested Roms (will not test SD-SWAP on most)
These are some roms I've tried the enabler on, since I don't use a swap partition on my SD card I don't bother testing it and usually don't advise using SD-Swap. It's only in the enabler for sake of completeness. All sd-ext tests are done as ext4 unless otherwise specified.
Andromadus Slim Bean Build 6 (JB 4.2.2)
DataSwap - OK
SD-EXT - OK
SD-Swap - Untested
Andromadus Mimicry 1.3+ (CM9 ICS)
DataSwap - OK
SD-EXT - OK
SD-SWAP - Not Tested
Andromadus Test builds - Jelly Bean(CM10) - Build #61+
DataSwap - OK
SD-EXT - OK
SD-SWAP - Not Tested
Virtuous Infinity 1.31.0 Alpha3 (Full Sense 4.0)
DataSwap - ISSUES*
SD-EXT - OK
SD-SWAP - Not Tested
*The init script in /system/init.d/80dataswap didn't automatically execute upon boot. However when running it manually it worked fine. (might be fixed in 1.3, have not tested yet).
ILWT CM7 (Build 471) with ILWT CM7 Kernel
DataSwap - OK
SD-EXT (as ext4) - Not Working *
SD-EXT (as ext3) - OK
SD-SWAP - Not Tested
* When /sd-ext formated as ext4 was not working, I used 4EXT recovery to format it to ext3 under tools -> wipe/format => ext3, rebooted and it worked.
Gen.Y VisionX B4
DataSwap - FIXED*
SD-EXT - OK
SD-SWAP - Not Tested
*Fixed in 1.3 to include the busybox prefix, 1.4 to include shebang (#!) string.
UPDATED Aug 19th 2012
v1.4 Changes from 1.3
Added shebang (#!) string to dataswap scripts
Changed init script permissions from 750 to 755
v1.3 Changes from 1.2
Updated dataswap script to use busybox prefix for swapon/mkswap
Updated SD-Swap to use busybox prefix
v1.2 Changes from 1.1
Added addon.d support for supporting Roms
v1.1 Changes from 1.0
Fixed a bug where 96MB option installed 64MB
Added 128MB DataSwap Option
Added ability to enable SD-Swap (choose w/ Sd-Ext if SD-Ext partition exists, without w/o)
Changes from previous version (1.0):
Migrated to Aroma 2.50 Installer
Removed SD-Swap activation from SD-Ext Enabler Script
SD-Ext Init Script made smaller (Specific to HTC Vision/G2/Desire-Z now)
Now with the Aroma installer allowing for an easier selection of mods to be applied.
DataSwap Enabler
64MB DataSwap (Recommended for some Roms)
96MB Option (heavier multitasking)
Skip/Off (do nothing, skip to next mod)
Remove (removes the swap file and swap script)
SD-Ext Enabler
Enabled (detects and migrates /data/app and /data/app-private to /sd-ext)
Skip/Off (Do nothing, leaves as-is)
Revert (Moves all apps from sd-ext back to /data and removes script)
SD-Swap Enabler
Enabled w/ SD-Ext - does not enable Sd-EXT, simply enables SD-Swap correctly if SD-Ext partition also exists
Enabled w/o SD-Ext - enables SD-Swap when no SD-Ext partition exists on the SD card
Skip/Ignore - Does nothing/skips
Remove - Removes the SD-Swap enabling script
Do not enable SD-Swap if your Rom Already supports SD-Swap out of the box (elitemod, etc), so double check first.
If you don't have an SD-Ext partition, then Swap partition will be the 2nd partition on the SD Card, otherwise it's the 3rd. Thus why the installer makes the distinction for with and without SD-Ext when it comes to SD-Swap options.
Regarding addon.d support
In roms that support /system/addon.d, during an upgrade (flashing a new rom) shell scripts in /system/addon.d would be utilized by the backuptool allowing the ability to upgrade the rom without having to re-flash the extra roms.
For example in my /system/addon.d/ folder there will be a 60-kbeezie.sh script when flashing version 1.2. If you were to upgrade your rom (for example Mimicry 1.3.2 to 1.3.3), the dataswap, sd-ext, sd-swap init scripts will be backed up, and then restored after the new rom has been upgraded (the same way google apps is preserved in the 1.3.3 upgrade, so no need to re-flash google apps).
So on any roms that support addon.d, you'll be able to upgrade your rom to the next version without having to reflash the dataswap/sd-ext enabler.
What is DataSwap
Dramatically improves multitasking. (Can be used with or without SuperChargerV6).
In layman's terms it's a swapfile placed in the /data partition, where it should be faster than using a swap partition on the SD card. Unlike SDSwap repartitioning is not needed. Every reboot removes and re-adds the file so that the file isn't working on one specific part of the emmc chip all the time (one of the downsides to SD Swap).
More information can be found on the original DataSwap post by Nik3r
http://forum.xda-developers.com/showpost.php?p=27608489&postcount=153
What is SD-EXT
The /sd-ext mount is a partition on the SD card formatted as ext4 allowing you more app storage space. Unlike other means of running apps off an /sd-ext partition, this mod/script only maps /data/app and /data/app-private to the /sd-ext leaving caching and other features on the internal memory where it is most efficient.
Because SD-EXT in this case is replacing your /data/app and /data/app-private you want to ideally make it bigger than your /data partition (no less than 1.5GB, 2GB is a good fit). However bear in mind that if you wish to revert back to using only internal storage, you'll want to make sure that your /data partition has enough room for the applications to be moved back.
Why Both Together?
When all the user apps are placed on /sd-ext you are typically freed of roughly 600-700MB of storage on your /data partition. Doing so gives the swap file more room to move about the /data partition, but also splits the I/O (input/output traffic) between your SD card for apps, and internal memory for swap/cache, which may improve the overall experience (and may also prolong the life of your device... in theory).
Also You are not as likely to run the risk of /data suddenly running out of memory because a 64MB swap file is created on top of your app space. (i.e.: say you only have 70MB free in /data from all your apps, and you reboot to apply DataSwap but not SD-EXT, your /data would become dangerously close to being full when the swapfile is created). Hence DataSwap should be used in conjunction with SD-Ext.
Tips
If you currently use EliteMod ICS, you should be able to use this zip to revert a SD-Ext installation back to internal memory. Just make sure you re-partition the SD card after reverting so that EliteMod's init script doesn't automatically move the applications back to sd-ext upon the next reboot.
The effect of DataSwap will greatly depend on how your rom handles memory. For example on Mimicry with SuperChargerV6 option selected, the DataSwap will rarely be used, but it is handy for rapid burst of memory when apps need it. Without SuperChargerV6 the dataswap does get used a bit more often with more apps active in memory, but the extent of it varies on your rom's configuration.
If you're considering reverting SD-EXT apps back to the internal memory the following command will show you partition usage (can be run in either terminal emulator, or adb shell):
Code:
busybox df -hm
With an output similar to this:
Code:
Filesystem Size Used Available Use% Mounted on
tmpfs 183.6M 60.0K 183.5M 0% /dev
tmpfs 183.6M 0 183.6M 0% /mnt/asec
tmpfs 183.6M 0 183.6M 0% /mnt/obb
/dev/block/mmcblk0p25
549.2M 236.1M 313.1M 43% /system
/dev/block/mmcblk0p26
1.0G 239.8M 834.1M 22% /data
/dev/block/mmcblk0p27
295.3M 25.5M 269.7M 9% /cache
/dev/block/mmcblk0p28
20.6M 14.7M 5.9M 71% /devlog
/dev/block/mmcblk1p2 2.0G 374.4M 1.6G 19% /sd-ext
/dev/block/mmcblk1p2 2.0G 374.4M 1.6G 19% /data/app
/dev/block/mmcblk1p2 2.0G 374.4M 1.6G 19% /data/app-private
Note how above /data has 834MB available, and /sd-ext is using 374MB, meaning /data will have enough room for the apps if you wish to revert.
DISCLAIMER
There is no guarantee this will work with all Roms, I've only tested it on a small handful of ICS roms (mimicry 1.3.1, EliteMod ICS). It is known to be skittish/non-working with most GB roms.
Do not ask if this would work on JellyBean, there's quite a bit of work that still needs to be done with JellyBean, and trying this on an alpha/preview JB rom will not likely work, plus I won't provide any support for someone complaining that it doesn't work on JellyBean as I'm not using JB right now.
Credits and Thanks
Thanks to Nik3r who originally wrote both scripts for his own EliteMod ICS Rom which provides both of these features natively to the rom (DataSwap is a seperate zip, but the rom itself already has SD-Ext/Swap support built in).
Thanks to blk_jack for providing support and information regarding the Aroma installer and assistance in testing swap on mimicry.
Checking if it worked
Typing free in either Terminal Emulator or adb shell, should show the approximate dataswap size on the swap line:
Code:
total used free shared buffers
Mem: 375916 372156 3760 0 4352
-/+ buffers: 367804 8112
Swap: 65532 17132 48400
For checking to see if SD-EXT is active, you can use the following command in terminal emulator or adb shell
Code:
adb shell busybox df -hm
Code:
Filesystem Size Used Available Use% Mounted on
tmpfs 183.6M 60.0K 183.5M 0% /dev
tmpfs 183.6M 0 183.6M 0% /mnt/asec
tmpfs 183.6M 0 183.6M 0% /mnt/obb
/dev/block/mmcblk0p25
549.2M 235.9M 313.3M 43% /system
/dev/block/mmcblk0p26
1.0G 287.8M 786.1M 27% /data
/dev/block/mmcblk0p27
295.3M 73.9M 221.3M 25% /cache
/dev/block/mmcblk0p28
20.6M 8.8M 11.8M 43% /devlog
/dev/block/mmcblk1p2 2.0G 362.5M 1.6G 18% /sd-ext
/dev/block/mmcblk1p2 2.0G 362.5M 1.6G 18% /data/app
/dev/block/mmcblk1p2 2.0G 362.5M 1.6G 18% /data/app-private
/dev/block/vold/179:65
12.8G 7.8G 5.1G 61% /mnt/sdcard
/dev/block/vold/179:65
12.8G 7.8G 5.1G 61% /mnt/secure/asec
You'll see that /sd-ext /data/app /data/app-private are identical in their capacity, usage and free space.
AGAIN there is no garantee it will work in every rom, if you do find success with it, post what rom and version you are using.
ALWAYS PERFORM A NANDROID BACKUP BEFORE APPLYING MODS JUST IN CASE
MD5 Checksum for kbeezie_dsext_enablerv1.4.zip: b0d00d89f265c57ba2aee0d7dc5ead24

you've moved really fast i can't keep up
great job.
any support for GB? did anyone try that on GB? or is it impossible?
———————————————————
i didn't mean to mock you or to offend you in any kind of way

Riro Zizo said:
you've moved really fast i can't keep up
great job.
any support for GB? did anyone try that on GB? or is it impossible?
———————————————————
i didn't mean to mock you or to offend you in any kind of way
Click to expand...
Click to collapse
I supposed its possible both features are just init.d scripts. But I don't know enough about the shell scripting differences between GB and ICS to know whether or not there will be conflicts. In theory you could take the sdparts init from elitmod cm7 and replace it in the zip (or I can when I get home)
The data swap one is very simple and may work without a problem, I'm more concerned about the sdext part.
Sent from my T-Mobile G2

kbeezie said:
I supposed its possible both features are just init.d scripts. But I don't know enough about the shell scripting differences between GB and ICS to know whether or not there will be conflicts. In theory you could take the sdparts init from elitmod cm7 and replace it in the zip (or I can when I get home)
The data swap one is very simple and may work without a problem, I'm more concerned about the sdext part.
Sent from my T-Mobile G2
Click to expand...
Click to collapse
it's currently 2:07am here so you'll do it when you get home
at first try the data swap (since you have high hopes, and since i'm more interested in it), then try the sdext...
data swap can be used without sdext, but as you mentioned, using both allows the data swap file to have more physical space to move around on every reboot...
but if everything woked out, i'll be using the data swap without sdext... cuz i really don't have sd space (i dunno why)
———————————————————
i didn't mean to mock you or to offend you in any kind of way

Riro Zizo said:
it's currently 2:07am here so you'll do it when you get home
at first try the data swap (since you have high hopes, and since i'm more interested in it), then try the sdext...
data swap can be used without sdext, but as you mentioned, using both allows the data swap file to have more physical space to move around on every reboot...
but if everything woked out, i'll be using the data swap without sdext... cuz i really don't have sd space (i dunno why)
———————————————————
i didn't mean to mock you or to offend you in any kind of way
Click to expand...
Click to collapse
Yea I mean if you flash the zip and don't have an sd-ext partition, nothing should happen, since it'll only activate if it see's an sd-ext partition.
And to see what I mean about the dataswap init script, this is all it is:
Code:
# Enables swap on data partition
# file is /data/local/swap
# POI: this can be used along with sdcard swap partition
# the load will be automatically evenly divided between the two locations
mv /data/local/swap /data/local/swap.old
busybox dd if=/dev/zero of=/data/local/swap bs=1M count=64
chmod 0600 /data/local/swap
mkswap /data/local/swap
swapon /data/local/swap
rm -f /data/local/swap.old
All it does is move the swap file to old (which course only does it if it exists), create a file of 64MB, make it a swap file, and turn it on. Rinse and repeat every time you boot up the phone.
I doubt those commands changed much from GB to ICS. The 04sdcardparts file on the other hand is around 240 lines. I'll unpack the one from EliteMod CM7 and run a diff on them to see if they're any different (if not, its because he simply migrated his latest work from ICS that he's currently on, to CM7 to fix the bug, which I think you were the one to report initially).
But yea as long as you understand the caveats of using DataSwap without an sd-ext I don't think it would be a major problem (just probably wouldn't perform as well in my opinion since you're accessing the same device for both swap and standard apps).

kbeezie said:
Yea I mean if you flash the zip and don't have an sd-ext partition, nothing should happen, since it'll only activate if it see's an sd-ext partition.
And to see what I mean about the dataswap init script, this is all it is:
Code:
# Enables swap on data partition
# file is /data/local/swap
# POI: this can be used along with sdcard swap partition
# the load will be automatically evenly divided between the two locations
mv /data/local/swap /data/local/swap.old
busybox dd if=/dev/zero of=/data/local/swap bs=1M count=64
chmod 0600 /data/local/swap
mkswap /data/local/swap
swapon /data/local/swap
rm -f /data/local/swap.old
All it does is move the swap file to old (which course only does it if it exists), create a file of 64MB, make it a swap file, and turn it on. Rinse and repeat every time you boot up the phone.
I doubt those commands changed much from GB to ICS. The 04sdcardparts file on the other hand is around 240 lines. I'll unpack the one from EliteMod CM7 and run a diff on them to see if they're any different (if not, its because he simply migrated his latest work from ICS that he's currently on, to CM7 to fix the bug, which I think you were the one to report initially).
But yea as long as you understand the caveats of using DataSwap without an sd-ext I don't think it would be a major problem (just probably wouldn't perform as well in my opinion since you're accessing the same device for both swap and standard apps).
Click to expand...
Click to collapse
well, i have sdswap that is on too so this might increase multitasking and swap speed a little more...
the data swap commands, is this it? all of it? cuz i can just copy past them into a .sh file and execute the script at boot... is it legit if i do that?
———————————————————
i didn't mean to mock you or to offend you in any kind of way

Riro Zizo said:
well, i have sdswap that is on too so this might increase multitasking and swap speed a little more...
the data swap commands, is this it? all of it? cuz i can just copy past them into a .sh file and execute the script at boot... is it legit if i do that?
Click to expand...
Click to collapse
Yea that's all of it, the zip basically installs it by doing:
Code:
...
package_extract_file("system/etc/init.d/80dataswap", "/system/etc/init.d/80dataswap");
package_extract_file("system/etc/init.d/04sdcardparts", "/system/etc/init.d/04sdcardparts");
ui_print("Modifying permissions...");
set_perm(0, 0, 0775, "/system/etc/init.d/80dataswap");
set_perm(0, 0, 0775, "/system/etc/init.d/04sdcardparts");
unmount("/system");
...
So technically if you want to do it manually all you have to do is save that as 80dataswap in /system/etc/init.d and make sure to set chmod 0775 on it, and reboot.
I just took a look at the one on EliteMod CM7, it's different and a heck of a lot smaller. It's a file called 10apps2sd and only 39 lines. I'm almost wondering though if other aspects of the /sd-ext partition are in other init scripts (i.e.: initialized variables and such set before reaching that level of the init).
Also the EliteMod CM7 thread doesn't seem to make any mentions of DataSwap, was probably only created for his ICS rom (though the script seems like it'd work on just about any rom supporting those commands and had enough free space to work with).
In fact because nothing has changed dataswap wise from his own dataswap zip you could just grab it from his thread whichever size you want and flash it. It'd be identical to this bundled one without the sd-ext.

well init.d commands are supported for all Vision ROMs, and i'm sure they are supported on CM builds. so now the problem only lies on auto-sdext for GB.
EDIT: ok, before i reboot:
i have a 128MB sd swap already active... how do i know that the 64MB data swap is active too?
you knew that by noticing the 64MB in "free"command ... but i already have a 128MB swap in "free" command
———————————————————
i didn't mean to mock you or to offend you in any kind of way

Riro Zizo said:
well init.d commands are supported for all Vision ROMs, and i'm sure they are supported on CM builds. so now the problem only lies on auto-sdext for GB
Click to expand...
Click to collapse
Got a suggestion for a good GB-based rom you were thinking of?

kbeezie said:
Got a suggestion for a good GB-based rom you were thinking of?
Click to expand...
Click to collapse
lol, tsubus in his ILWT thread was talking about it 2 days ago... if it works, i might switch back to his ROM
———————————————————
i didn't mean to mock you or to offend you in any kind of way

Riro Zizo said:
lol, tsubus in his ILWT thread was talking about it 2 days ago... if it works, i might switch back to his ROM
Click to expand...
Click to collapse
Well later tonight (i.e.: after the hours someone might likely call/text), I'll give ILWT a try. Will install it clean, install some apps, then apply the mod, then install some more apps so that I know 1) already installed apps get moved, and 2) it continues to work even if you reboot.

kbeezie said:
Well later tonight (i.e.: after the hours someone might likely call/text), I'll give ILWT a try. Will install it clean, install some apps, then apply the mod, then install some more apps so that I know 1) already installed apps get moved, and 2) it continues to work even if you reboot.
Click to expand...
Click to collapse
i've configured the dataswap script... i'll reboot and report now
EDIT: ready for the big news? IT WORKS!
before the reboot, i had about 128MB sdswap on, and 166MB free in the /data partition.
afterr reboot, i now have 197MB swap (which is 128MB + 64MB... + the extra numbers ) and 95MB free in /data...
now with the deletion of some bloat apps (i have about 210 apps) i might get over 100MB free in /data, that way the file could have some space to physically move...
i'll throw my 5 thanks of the day to you now
EDIT: whoa! now with that much extra RAM, i think i should bump up my VM heap size.
EDIT: something weirrd just happened:
while i uninstalled 2 apps (100 floors and its official cheats) i went to check /data's free memory and it showed me 163MB, that's only 3MB "eaten" by the dataswap. so i went to terminal and saw that the total is still 197MB... is it because the file has a "dynamic" size? (meaning it gets larger when it needs to) or is it a constant size... and if it has a constant (64MB) size, what just happened with my /data partition?
———————————————————
i didn't mean to mock you or to offend you in any kind of way

The dataswap file would be a prefixed size, i.e.: if it was created as 64MB it stays as 64MB, what it consumes internally may vary, but its always eating least 64MB of the /data partition.
You could always run something like du -hs /data/*
to see what is using what space.
In other news the swap seems to be maxing out on mimicry (but I wonder if it's because a 1.3GB app is being installed from the play store and is using all the ram and then some), on elitemod it normally wouldn't get higher than 40mb or so.

ok, i confirmed this, no need to test it yourself... it practically works on ILWT as there is not much difference between EMCM7 and ILWTCM7...so you might wanna change OP and put that data swap works on GB... although never tested on sense or MIUI.
i can see it's using it a little bit... i mean i opened root explorer, play store, settings, then tapatalk. and when going back to root explorer it restarted... it didn't keep root explorer cached... is there a way to increase swap caching? i mean if i were android i would start caching in swap until i at least use 75% of it
———————————————————
i didn't mean to mock you or to offend you in any kind of way

Riro Zizo said:
ok, i confirmed this, no need to test it yourself... it practically works on ILWT as there is not much difference between EMCM7 and ILWTCM7...so you might wanna change OP and put that data swap works on GB... although never tested on sense or MIUI.
i can see it's using it a little bit... i mean i opened root explorer, play store, settings, then tapatalk. and when going back to root explorer it restarted... it didn't keep root explorer cached... is there a way to increase swap caching? i mean if i were android i would start caching in swap until i at least use 75% of it
———————————————————
i didn't mean to mock you or to offend you in any kind of way
Click to expand...
Click to collapse
I think it's going to vary by the app, the swap is only used when memory is being run out of which is the way you want it to work. Swap shouldn't be used as caching per-se, just mainly as a ceiling for when ram is being used up.
I noticed that when using SuperChargerV6 the swap usage is almost nil, but course SuperCharger may prevent apps from multitasking as much.

I think it's a good idea to use the init.d scripts from the CM9 compatible kernel if you didn't. It basically just removes the support for async init.d ordering but should work everywhere even on AOKP. I had to make sure the scripts run in an order for the ROM installation but alone they don't need the syncing code and it reportedly freezes on CM9.
(EDIT, nevermind, it doesn't really matter since this script is the first of the sequence. Still the extra lines are unnecessary)
Also an "OFF" package may be a good idea
The swap usage is due to the tweaks in elitemod_kernel.sh, when the swap gets full it will slow the phone down to a crawl. That's why supercharger causes problems with swap, it overrides something in there.

nik3r said:
Also an "OFF" package may be a good idea
Click to expand...
Click to collapse
I'd imagine off for dataswap would simply be your original OFF mod zip, since int wouldn't do anything differently. What would be interesting would be an "off" for sd-ext, which I guess would just be a edify script to move /sd-ext/app and /sd-ext/app-private back to /data and then the removal of the init script.
But yea not all roms are designed to be used with swap storage, those that don't normally have a means of using swap on their own may behave differently when that's introduced into the mix, where as your rom actually has been tweaked with the possibility of using swap in mind.
I still get the best battery life and smoothest swap transfer with EliteMod though. (on mimify for example ,the CPU steps are not as frequent, and is a minimum of 245mhz, with no vdd_levels exposed for undervolting).

Well I wonder if it can be done entirely in recovery. I suppose it's as simple as mounting /data and /sd-ext and copying the data, then wiping /sd-ext. All in one neat flashable package. I guess 4EXT is pretty smart about mount points so it may be as simple as
Code:
run_program("/sbin/busybox", "mount", "/sd-ext");
and maybe not

nik3r said:
Well I wonder if it can be done entirely in recovery. I suppose it's as simple as mounting /data and /sd-ext and copying the data, then wiping /sd-ext. All in one neat flashable package. I guess 4EXT is pretty smart about mount points so it may be as simple as
Code:
run_program("/sbin/busybox", "mount", "/sd-ext");
and maybe not
Click to expand...
Click to collapse
I would think so too, but course I'd be more concerned about checking to see if /data will be able to contain the apps stored in /sd-ext if someone went past the 1GB size. But ya I was thinking bout it being done completely in recovery, and just removing the init script from /system after the move and wipe has been done to sd-ext.
Could probably even run_program () a small shell script copied to /tmp.

Well even if it was impossible to check free space and filesizes directly from recovery you can still invoke shell scripts and use busybox. Something like
Code:
run_program("/sbin/su", "/tmp/script.sh");
Even do the move from there. And then share the flashable zip
I admit you are most likely better at shell than I am, I don't use desktop linux outside VM.

Related

sd-ext/a2sd - 128mb free /data: insufficient memory

Perhaps I don't understand the purpose of sd-ext/4ext/a2sd etc [I'm sure this is the case!]
I'm running the Aurora v3 rom - basically a sense2.1 with an ext partition. I cannot understand why I've 128mb free in /data after installing pretty much all my apps yet I'm getting insufficient storage errors; I can't install anything despite having a lot of /data free- it seems if my sd-ext if nearly full I can't use my /data?
1. The rom's files flash to /system, and a few to /data. As it's large, we partition the sd card with a 4ext part of say 342mb for overspill of the system/data files.
2. If we change the hboot (to cm7) such that the /system is smaller - overflowing into sd-ext - we get a larger /data partition for apps on the internal memory. (I've done this for for Oxygen/Redux roms and had over 340mb /data with no sd-ext.) Thus alpharev say's we'd get 287mb /data.
3. This rom installs apps to /sd-ext, and/or /data[?]; in Android's App usage I'm reporting 152mb used, 135mb free (the 287mb /data?); and 128mb free storage.
4. 4ext recovery reports 1.7mb free of 342mb for sd-ext - it's full. Which makes sense if apps install to /sd-ext, but why not fill the internal /data first? adb shell df -h gives:
Code:
Filesystem Size Used Available Use% Mounted on
/dev/block/mtdblock4 5.0M 796.0K 4.2M 16% /cache
/dev/block/mmcblk0p1 7.1G 4.5G 2.6G 63% /sdcard
/dev/block/mtdblock5 287.6M 159.3M 128.3M 55% /data
/dev/block/mmcblk0p2 331.3M 329.6M 1.7M 99% /sd-ext
/dev/block/mtdblock3 145.0M 122.8M 22.2M 85% /system
5. To me this means /data has 128mb free for apps; sd-ext is full with system files and apps - seeming to me that apps take space up on both /data and /sd-ext, duplicating space usage. Obviously I'm wrong on this but that's how I see my space disappearing lol Yet I cannot install any apps as I've insufficient storage.
6. Clearly I'm misunderstanding things after installing just 150mb apps and thinking I'd have 287mb of apps /data, not just /sd-ext: why shrink hboot's /system to make a large /data if the apps go to sd-ext?
7. I've not moved dalvik cache to sd as I thought I'd not need to given the seemingly large /data, and it's free amount. Clearly I can do so but why isn't my /data space available?
Sorry for long post and sounding dumb, I'm really trying not to be!
These Roms use sdext for both Rom and part of the apps and possibly dalvik too. Traditionally it would just be apps and maybe dalvik.
With these bigger roms, you need bigger ext to get the same. Yes when ext is full, you can't install anything. Maybe you need a bigger ext partition
Sent from my HTC Desire using XDA App
Thanks for the reply.
That's what I thought - I just cannot understand why I cannot use the free /data though; what's the point of changing to the CM7 hboot when your /data is limited to that of the sd-ext? Isn't it doubling up on storage use by apps, placing them in sd-ext and /data, and when one is full you can't utilise the other?
Sorry for sounding stupid, it just makes no sense to me.
btw I checked out your dGB, looks great. I do love miinimalist roms but also prize my Sense-720p'd camera!
No its not doubling up. The point is that /data/app and /data/dalvik-cache are symlinked to /sd-ext/app and /sd-ext/dalvik-cache.
However, /data/data where the libs, preferences and databases are, remain on /data/data
So when you install an .apk, it installs the app to /sd-ext/app, the dalvik is created on /sd-ext/dalvik-cache and the libs & db's etc will install to /data/data
If sd-ext is full, there is no where for the apk to go.
Thanks for clearing that up for me, I feel kinda stupid - I just couldn't get my head around it: why the nand wasn't being used for apk placement but I see they are split up and components spread over the combined sd-ext and /data. Thanks!
No probs. Not seen you on AF for a while?
OT
Android Forum? = xda? I've been offline a lot recently as this Indian Summer has made for some prime ultrarunning weather, but also takes a ton of time (by definition) although I've been rocking Redux/Aurora roms recently. Just been perusing the Desire forum today and there's been a ton of awesome rom progress since my last visit. I remember your help and work on Redux/thread/pm, great stuff. Still a beginner but it's very interesting learning this stuff, just also takes a lot of time for a non programmer!
Of potential note, 'found' a bug in gnu parted trying to partition out a 512mb 4ext sd-ext via 4EXTRecovery (madmaxx82 located it, I merely experienced it!) Always feels good to in a tiny way contribute

Rebooting after flash

Hi guys.. I just wanted to ask whether it is normal if my phone reboots few times after flashing new ROM...
and after the reboots your in the os ok? not normal but my guess is there's a kernel problem, maybe you didn't fully wipe. but if all works after a few reboots you should be ok
Sent from my HTC Vision using xda premium
jumptoin said:
Hi guys.. I just wanted to ask whether it is normal if my phone reboots few times after flashing new ROM...
Click to expand...
Click to collapse
Depends on the ROM/Kernel. For example with EliteMod/Kernel a reboot is actually required for it to finish up post-install steps.
But if you're talking bout rebooting like 4 or 6 times and never entering the OS, that could be indications of a problem causing a boot loop. One example is flashing a Rom/Kernel that doesn't support your radio (some require the newer *.19 radio), or if you try to flash a larger (sense?) rom onto a G2 hboot instead of DZ hboot.
More information is needed if you need further help.
it was exactly elite rom with elite kernel so it means everythings allright?
jumptoin said:
it was exactly elite rom with elite kernel so it means everythings allright?
Click to expand...
Click to collapse
Should be fine, the usual process is:
Recovery (backup if needed)
Partition SD Card if needed (i.e.: sd-ext, no sd-ext2, don't bother with swap if using dataswap)
Factory Reset / Cache / Dalvik Cache Wipe
Flash Rom (no need to flash Kernel as it's included in the Rom)
Flash Addons if desired (DataSwap Mod, Google Talk, as specified in thread, etc)
Reboot
Initial boot may take a while, and might reboot once or twice
Setup your information and when you reach the home screen you may be prompted with a dialog that says Apex Launcher and "Reboot Now!", you select the Reboot Now, and follow the instructions to do the final reboot and then all is done.
kbeezie said:
Should be fine, the usual process is:
Recovery (backup if needed)
Partition SD Card if needed (i.e.: sd-ext, no sd-ext2, don't bother with swap if using dataswap)
Factory Reset / Cache / Dalvik Cache Wipe
Flash Rom (no need to flash Kernel as it's included in the Rom)
Flash Addons if desired (DataSwap Mod, Google Talk, as specified in thread, etc)
Reboot
Initial boot may take a while, and might reboot once or twice
Setup your information and when you reach the home screen you may be prompted with a dialog that says Apex Launcher and "Reboot Now!", you select the Reboot Now, and follow the instructions to do the final reboot and then all is done.
Click to expand...
Click to collapse
thats exactly what i did now my phone is like a wind and could i have one more question ..sorry for stupid questions iam just curious and i like these things ... what is dataswap for? i know that it makes something faster... thank you bro
jumptoin said:
thats exactly what i did now my phone is like a wind and could i have one more question ..sorry for stupid questions iam just curious and i like these things ... what is dataswap for? i know that it makes something faster... thank you bro
Click to expand...
Click to collapse
In a nutshell = using /data for your swap instead of the SD card for faster access and no need to partition the SD Card for swap space.
DataSwap is a mod that nik3r created for EliteMod that utilizes a swapfile on the /data partition (as he said compliments the use of sd-ext since space on /data is freed up when all the apps are moved to sd-ext).
Using Dataswap would be faster than a swap partition on the SD card because it's run off internal memory, and to prevent wear on the internal memory the location of the swap file is moved after every reboot (where as sd-swap is always swapping to that portion of the SD card).
With both dataswap and sd-ext used you distribute your usage across two different sets of storage which in the long run might improve the life of the device.
If you're unfamiliar with swap, its basically 'extra' space when you run out of ram which can help improve multitasking. Without any swap space at all you tend to run into Force Closes and applications hanging when you actually run out of memory.
64MB is the recommended size, where as 96MB would be good for people who do a lot of heavy multitasking. You *can* use both DataSwap and SD Swap, but not much point to it.
PS: The DataSwap mod he made only works with the EliteKernel, and is not recommended to be used without sd-ext since you want that free space on /data for it.
Details in his own words here : http://forum.xda-developers.com/showpost.php?p=27608489&postcount=153
The cliff notes:
- complements sd-ext
- dramatically improves multitasking
Click to expand...
Click to collapse
kbeezie said:
In a nutshell = using /data for your swap instead of the SD card for faster access and no need to partition the SD Card for swap space.
DataSwap is a mod that nik3r created for EliteMod that utilizes a swapfile on the /data partition (as he said compliments the use of sd-ext since space on /data is freed up when all the apps are moved to sd-ext).
Using Dataswap would be faster than a swap partition on the SD card because it's run off internal memory, and to prevent wear on the internal memory the location of the swap file is moved after every reboot (where as sd-swap is always swapping to that portion of the SD card).
With both dataswap and sd-ext used you distribute your usage across two different sets of storage which in the long run might improve the life of the device.
If you're unfamiliar with swap, its basically 'extra' space when you run out of ram which can help improve multitasking. Without any swap space at all you tend to run into Force Closes and applications hanging when you actually run out of memory.
64MB is the recommended size, where as 96MB would be good for people who do a lot of heavy multitasking. You *can* use both DataSwap and SD Swap, but not much point to it.
PS: The DataSwap mod he made only works with the EliteKernel, and is not recommended to be used without sd-ext since you want that free space on /data for it.
Details in his own words here : http://forum.xda-developers.com/showpost.php?p=27608489&postcount=153
The cliff notes:
Click to expand...
Click to collapse
thanks now i understand it at least partly ... and what do you think does it really worth flashing ? does it come with any bugs,problems?
jumptoin said:
thanks now i understand it at least partly ... and what do you think does it really worth flashing ? does it come with any bugs,problems?
Click to expand...
Click to collapse
Not that I've noticed, but swap space just like SDSwap always has that 'inherent' risk of long term use (but course when used with sd-ext you kind of spread that usage out a little). Just like how there's always a risk when rooting your phone.
If you want to give it a go, but haven't partitioned your SD Card yet (I recommend 4EXT recovery over clockwork mod especially since it can convert your existing /data /cache /system to ext4 instead of ext3 which EliteMod supports), you can backup your SD Card, partition it with sd-ext (2GB or so should do fine if you got an 8GB or 16GB card), no swap, and no sd-ext2, formatted as ext4 (then copy back the SD card stuff you saved). Then flash the DataSwap mod.
The EliteMod rom will notice the new sd-ext partition and move everything from /data/app and /data/app-private over to the sd-ext and map it from there so that the phone just see's it as internal storage ("move to SD" will refer to Fat32 partition, so ideally you don't want any of your apps showing as on "SD").
With that freed up space on /data the dataswap mode will create a swap file in /data/local
Code:
[email protected]:/data/local # busybox ls -lah
drwxr-x--x 4 root root 4.0K Jul 11 17:10 .
drwxrwx--x 18 system system 4.0K Jul 11 17:10 ..
drwxrwx--x 2 system cache 4.0K Jun 26 21:05 download
-rw-r--r-- 1 root shell 7 Jul 6 16:03 elitemod.present
-rwxrwxrwx 1 root root 42 Aug 1 2008 postcleaner.sh
-rw------- 1 root shell 96.0M Jul 11 17:10 swap
drwxrwx--x 2 shell shell 4.0K Jun 26 21:05 tmp
-rwxrwxrwx 1 root shell 2.0K Jun 26 21:12 undervolt.sh
-rwxrwxr-x 1 root root 2.0K Jun 26 20:35 userinit.sh
I'm not sure how his code 'moves' it physically around the emmc chip but it does (i.e.: to prevent any excessive usage of any one part of the internal memory).
You can verify that the dataswap is active via free
Code:
[email protected]:/data/local # free
total used free shared buffers
Mem: 375212 367000 8212 0 8176
-/+ buffers: 358824 16388
Swap: 98300 2732 95568
If you also have a swap partition on the SD card you should see the swap line contain the total of DataSwap + SDSwap space. If neither then it would simply be zero. Nik3r used to use a 32MB dataswap but found that the 'sweet spot' was around 52MB as such 64MB became the new recommended size.
You can use Dataswap without an sd-ext partition, but it's not recommended.
kbeezie said:
Not that I've noticed, but swap space just like SDSwap always has that 'inherent' risk of long term use (but course when used with sd-ext you kind of spread that usage out a little). Just like how there's always a risk when rooting your phone.
If you want to give it a go, but haven't partitioned your SD Card yet (I recommend 4EXT recovery over clockwork mod especially since it can convert your existing /data /cache /system to ext4 instead of ext3 which EliteMod supports), you can backup your SD Card, partition it with sd-ext (2GB or so should do fine if you got an 8GB or 16GB card), no swap, and no sd-ext2, formatted as ext4 (then copy back the SD card stuff you saved). Then flash the DataSwap mod.
The EliteMod rom will notice the new sd-ext partition and move everything from /data/app and /data/app-private over to the sd-ext and map it from there so that the phone just see's it as internal storage ("move to SD" will refer to Fat32 partition, so ideally you don't want any of your apps showing as on "SD").
With that freed up space on /data the dataswap mode will create a swap file in /data/local
Code:
[email protected]:/data/local # busybox ls -lah
drwxr-x--x 4 root root 4.0K Jul 11 17:10 .
drwxrwx--x 18 system system 4.0K Jul 11 17:10 ..
drwxrwx--x 2 system cache 4.0K Jun 26 21:05 download
-rw-r--r-- 1 root shell 7 Jul 6 16:03 elitemod.present
-rwxrwxrwx 1 root root 42 Aug 1 2008 postcleaner.sh
-rw------- 1 root shell 96.0M Jul 11 17:10 swap
drwxrwx--x 2 shell shell 4.0K Jun 26 21:05 tmp
-rwxrwxrwx 1 root shell 2.0K Jun 26 21:12 undervolt.sh
-rwxrwxr-x 1 root root 2.0K Jun 26 20:35 userinit.sh
I'm not sure how his code 'moves' it physically around the emmc chip but it does (i.e.: to prevent any excessive usage of any one part of the internal memory).
You can verify that the dataswap is active via free
Code:
[email protected]:/data/local # free
total used free shared buffers
Mem: 375212 367000 8212 0 8176
-/+ buffers: 358824 16388
Swap: 98300 2732 95568
If you also have a swap partition on the SD card you should see the swap line contain the total of DataSwap + SDSwap space. If neither then it would simply be zero. Nik3r used to use a 32MB dataswap but found that the 'sweet spot' was around 52MB as such 64MB became the new recommended size.
You can use Dataswap without an sd-ext partition, but it's not recommended.
Click to expand...
Click to collapse
Can i make partition .through rom manager?
Or, could I use this way http://www.youtube.com/watch?v=Cygl0qZnbaM to make ext4 partiotion?
jumptoin said:
Can i make partition .through rom manager?
Or, could I use this way http://www.youtube.com/watch?v=Cygl0qZnbaM to make ext4 partiotion?
Click to expand...
Click to collapse
I would strongly advise against using rom manager or any other app to partition or convert existing partitions. You should stick to recovery mode for those kinds of tasks.
Sent from my T-Mobile G2
4EXT recovery would be the best recovery to use for those kinds of tasks on a DZ/G2. While the paid version is in Google play, there is a free apk that simply downloads and installs the latest version of 4EXT touch recovery.
Sent from my T-Mobile G2
Ok man, Iam sure I will do it soon.
Sent from my HTC Vision

[DEV][19NOV] Native Mount DataOnEXT with DalvikOnNAND (Test #2)

Index
Post 1 - Android Boot Process, Space Restrictions in /data, Usual Workaround scripts that load from init.d
Post 2 - The Permanent Solution for Internal space issues in /data, and how it is executed (Step by Step)
Post 3 - Credits, Benefits, Note on Cache, Note to ROM Makers on ClockWorkMod Updater Script, FAQ
Post 568 - Test ROM for Native Mount DataOnEXT with DalvikOnNAND
Post 622 - Test #2 ROM for Native Mount DataOnEXT with DalvikOnNAND
Thanks to quite a lot of inputs, ideas, testing and feedback, I have been able to give a working solution to reliably mount /data to the EXT partition in our HD2’s SD Card before Android initializes. I am redoing the first three posts of this thread to give a complete info that answers the what, why, how questions.
Before I even start, let me make my objectives clear:
Have a system partition that is as big as I want in NAND, so that I can install any bloated ROM I want without chopping down anything, and yet have a /data partition for all my apps and their bloated data
Avoid using internal (NAND) userdata partition completely, so that if the day comes where my /system is full of bad blocks, I will still be able to create a system partition in the ~900+ MB internal NAND my TMoUS HD2 has
With this method, this is how I am using my phone:
Device - TMoUS HD2
Boot Loader - cLK 1.5.0.9
Partitions (in order) and Sizes - Recovery - 10 MB, Boot - 10 MB, System - 500 MB, Userdata - <I didn't bother >, Misc - 1 MB, Cache - 2 MB.
Recovery - CWM Based Touch Recovery B8
SD Card - 16GB Transcend Class 6 with 4 GB EXT4 Partition (mounted as /data, of course!)
My idea for this setup is that a user should not be having to get into the boot loader or changing partition sizes for every ROM. With this setup, I am having a close-to-native-Android device setup and can flash any ROM I want, without worrying if my partitions will accommodate it.
So what exactly does this method do? Before I answer that, a brief on the Android booting process – Note that this is simplified to meet this thread’s requirement, and not necessarily completely accurate. When you power on the phone the following actions happen…
The Android Boot Process
Bootloader – In HD2’s case, Magldr or cLK – loads the kernel based on how you have configured the phone.
Kernel – The kernel (zImage) is loaded into RAM along with an initial ramdisk (initrd.gz), which initializes various devices (IO, memory, GPU, etc.), interrupts, and mounts the root file system (/). After this, the first user-space process called init is started.
Init – this is a binary file that is contained within the initrd.gz. The init binary processes init.rc and init..rc , along with other .rc files that are called by these two .rc files. Some of the key functions (from this thread’s perspective) in the order of their initialization/ execution are:
The init process follows the instructions in the init.rc and init.xyz.rc files and creates empty directories including /data. It then mounts the storage devices (partitions in the internal NAND (MTD)) to these empty directories. The NAND partition for system is mounted to /system, followed by the partitions specified for data, cache, etc. The directories for dalvik-cache (/data/dalvik-cache) are also created by the init process after mounting the specified device to /data.
The init process then starts various services including adb, service manager, Volume Daemon (vold) for media like SD Card (FAT partition). Most importantly, the zygote service which initiates the Dalivk-Cache is loaded in this sequence.
As we all know, Android is based on Linux. The boot sequence described above is common for all Linux machines – until the zygote stage. Core Android file like core, framework, services, IME, policy, etc. are executed from the Dalvik-Cache and hence Initialization of the Dalvik Cache is pretty much where Android comes into the picture
The sysinit/ run-parts part, which runs scripts from the /system/etc/init.d later the Zygote stage. No matter how this is done, Android has already started loading by the time the boot process comes to executing scripts in /system/etc/init.d
Now that you know what happens when Android boots, you may also have realized that mounting a device to /data happens early in the boot process.
Space Restriction in HD2, and the twist with bad blocks
The 'normal' way to store all OS data (dalvik-cache, Configurations & Settings, Accounts, etc.) and User data (Apps, app data, mails and messages, call logs, etc.) is to have a partition named userdata in the HD2’s NAND, and have it mounted to /data during the init process. The drawback in using the userdata partition is that the space you can have for userdata is inversely affected by the size of your system partition, and whether your phone is an EU/ International HD2 or a TMoUS HD2.
Best case is, if you have a ~100 MB system partition for a really scaled-down, space-optimized OS, you will get about 800+ MB for userdata partition on TMoUS and ~400 MB on an International/ EU HD2. This space might be good enough for a lot of us who only have light-to-medium use of our phones. But for quite a lot of us, this is a bottleneck. As if that is not enough, we have these villainous bad-blocks that creep up slowly, determined to swallow up the internal NAND completely, though it would be several years down the line before that happens
The Workaround
The workaround for this method is to have a script in the /system/etc/init.d that mounts the EXT partition in the SD Card to sd-ext, moves a part of /data from the userdata (NAND) to the EXT partition (sd-ext) and creates symlinks (symbolic link) in /data (userdata) to point to the new location in the EXT partition. In this method you will not see an increase in what the phone shows for internal space. The apps you install and then some more will be installed in the EXT partition, which will be symlinked as /data/app and so on.
The other way is to move the mount point (and the contents) for the /data directory from userdata (NAND) to the EXT partition in the SD Card, mount the userdata (NAND) as sd-ext or some other directory, create dalvik-cache (and maybe /data/data - where all user apps' data are stored) in the userdata and symlink that location back to the EXT partition (which is now /data). In this method, you will get the size of your EXT partition as the internal space. Moving parts of /data to NAND will in theory give you better performance, as the most read/ written part of the phone resides in NAND.
The benefit of these methods is that it is very simple and easy to install on any rooted ROM through the recovery. This method balances performance by moving the static part of /data (like the .apk you install) to the EXT partition, keeping the dynamic part (/data/data – where all app data are stored, or /data/dalvik-cache – from where all apks are executed) in NAND.
The drawbacks with this workaround:
This method is initiated AFTER Android boots. No matter how it is executed or what it does, anything that loads from /system/etc/init.d is executed only after at least some parts of Android loading process is initialized. This leads to weird outcomes – low sound issues, unpredictable behavior of the OS or some apps (Notification Widget toggles not working, etc.), and then some more. There is no reasonable way to predict what issues you may get. In fact you cannot be sure if the issue is with the ROM or if the issue is occurring because of the move2sd script you are using. If you are facing an issue that none others are facing and if you have a move2sd script, then you MUST undo what the script does before you can start troubleshooting.
In some cases, an in place upgrade (upgrading from one version of the same ROM to a higher/ newer version, or upgrading from one ROM to another ROM of the same Android version/ build) will corrupt the apps' data as well as configuration, etc.
Moreover, one move2sd script that works fine with one ROM will not work exactly the same way with another ROM or even an updated version of the same ROM.
There is always some amount hit or miss involved in this workaround!!!
The Solution
…is what this thread is all about. Like we saw, /data directory is mounted to a storage device pretty early in the boot process – so early that it is only Linux at the time /data gets mounted and Android is still yet to be loaded. The storage device that is traditionally mounted to /data directory is the internal NAND’s userdata partition.
The simple solution I have for unrestricted and reliable internal space is to directly mount the EXT partition of the SD Card to /data during the Linux init process (instead of first mounting the NAND’s userdata, loading Android, and moving the /data mount point or some contents within /data to the EXT partition while Android is loading).
How is this done?
The Easy way - Thanks to @Kokotas (Note that I have not updated Kokotas' .zip file to include the recent changes (20th October 2012) (See The Long Way below)
Visit the post (quoted below), thank @Kokotas, download the .zip from the post, flash it in recovery and lets us know how it goes. Did I tell you to make sure you have a NANDROID backup?
This .zip can be used to install DataOnEXT mod on the fly - your ROM will be the same when you reboot after flashing this .zip, except that /data will be mounted from the EXT partition with all your apps, settings, etc. intact.
kokotas said:
If you have a normal NAND installation(and an ext2/3/4 partition on your card) and want to give ph03n!x's DataOnEXT method a try,
BUT you think it is difficult THEN you can try the attached recovery package.
It follows all the steps of the described process AND at the end it copies all of your /data to the ext2/3/4 partition. <= This means that after rebooting, you'll have your system set up as before but with DataOnEXT!
And if you want to go back to your previous setup (that is a normal NAND installation without DataOnEXT), just flash the original kernel to your device.
Have in mind that I have only tested it on my phone. If you do try it, please leave a comment. Especially MAGLDR users! Cause it is not tested with MAGLDR.
Thank you ph03n!x for a great concept!
Click to expand...
Click to collapse
The Long Way (or this is how I started off doing this mod )
The following steps show how to modify a ROM’s boot process to mount the EXT partition as /data.
IMPORTANT: THIS PROCESS INVOLVES USING DISXDA’s KITCHEN in CYGWIN. I EXPECT YOU TO BE ABLE TO SETUP CYGWIN AND USE DSIXDA KITCHEN. EVEN WHILE I AM TRYING TO GIVE A STEP-BY-STEP HERE, I WILL NOT ANSWER QUESTIONS ON HOW TO SETUP AND TROUBLESHOOT DSIXDA’s KITCHEN OR CYGWIN.
Assumption:
For the sake of simplicity, I am going to assume that you have a ROM that is installed in your phone, and you want to modify the same ROM for natively mounting EXT to /data.
I am also going to assume that your HD2 has a SD Card in it, and the SD Card has been partitioned in such a way that the first partition is the FAT partition that Windows sees, and the second partition is a EXT2/3/4 partition. You may or may not have a Swap partition, but I strongly recommend NOT enabling Swap.
Prerequisites:
Take a NANDROID backup using ClockWorkMod
Back up all user apps and system app data using Titanium Backup
Install Cygwin
Install @dsixda’s Kitchen
Install Notepad++ (or any other UNIX compatible text editor)
@dsixda’s Kitchen – Setting up a working folder
While these steps will involve the entire ROM, note that you will only using the boot directory or boot.img for this mod.
You need a rom.zip file that has at least these three directories when you open the .zip – META-INF, system, boot (or boot.img)
If your rom.zip file has a different structure, just extract the three directories alone from it and create a new zip. Essentially, when open the rom.zip you should see only these three directories
An Example:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Place this zip file in the original_update directory under Kitchen. A sample directory structure of the Kitchen is as follows:
From Command Prompt, run cygwin.bat, browse to the directory where you have installed the kitchen and run it using ./menu
Select option 1 for setting up a Working Folder, follow instructions. Congratulation! You should have a working folder now. After the Working Folder is setup, navigate to the WORKING_091712_123456 directory. Make sure you have a directory named boot, or a boot.img here. To be double sure, you can replace the boot directory or boot.img with the one from the ROM you want to modify and flash.
Steps for mounting EXT to /data
Back in the Kitchen Menu, select 0 for Advanced Options
Select 20 for Tools for boot image
Hit z for Extract kernel+ramdisk from NAND boot folder (or w for Extract kernel+ramdisk from boot.img)
Now navigate to the BOOT-EXTRACTED directory that got created under the directory where you installed the kitchen. You will see something similar to this:
Edit init.rc and init.htcleo.rc to find all mentions of sd-ext and comment them out with # in the begining. This step is to ensure there is no directory called sd-ext when your phone boots, avoiding any confusions
In init.rc, look for the on fs part. Under this part there will be a line that reads mount yaffs2 [email protected] /system noatime nodiratime. Below this will be another line that reads mount yaffs2 [email protected] /data nosuid nodev noatime nodiratime. Comment this line out with a # (#mount yaffs2 [email protected] /data nosuid nodev noatime nodiratime). Also, if you have mount yaffs2 [email protected] /system ro remount, comment that out too (make it #mount yaffs2 [email protected] /system ro remount)
Do all the following changes AFTER mount yaffs2 [email protected] /system noatime nodiratime, else the process will fail.
Code:
# Wait to ensure SD Card is available, and scanning file system of EXT
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
exec /system/xbin/busybox sh -c "/system/bin/e2fsck -f -p -t -t -v /dev/block/mmcblk0p2 > /system/fsck.log"
# Native Mount DataOnEXT
mount ext4 /dev/block/mmcblk0p2 /data wait nosuid nodev noatime nodiratime barrier=0 data=writeback
Leave everything else in this section as is - you will have another line to mount cache, do not remove or modify it.
Next, scroll down to the section that reads on boot. Add the following like under it:
Code:
# SD Card Cache
write /sys/devices/virtual/bdi/179:0/read_ahead_kb 2048
Build the NAND boot folder (for Magldr yboot) or boot.img (for cLK / Magldr rboot) as per your requirements
Head back to the Working folder, copy the boot directory or the boot.img and include it in your original ROM’s zip file (not the one you created for the kitchen, in case you had to). Check the init.d directory of the ROM’s zip to ensure there is no script that mounts the EXT partition to sd-ext directory, or has a move2sd/ app2sd/ int2sd script – delete such scripts!. Also make sure that your ROM's inatallation does not copy anything to /data during Installation. If it does, move those parts to /system. Or use the instructions I had given under Note to ROM Makers on ClockWorkMod Updater Script to mount the EXT partition as /data in Recovery.
Format your phone’s /system, /data, / sd-ext and /boot from clockworkmod and flash this modified rom.zip
Let your phone boot into Android and settle down.
Configure your Google Account
Download and install Titanium Backup
In Titanium Backup, restore all apps and their data from the backup you had taken earlier
You phone must now have an internal storage that is roughly equal to the size of your SD Card
Note:
I have tested this method with CM7, CM9, CM10 (ParanoidAndroid JB) and Sense ROMs. There has also been feedback that this is working on other AOSP based ROMs like MIUI.
The mount wait command is available in the init binary from CM7 onwards (not sure if it is there in CM6). If you are not sure (or cannot check the source code for init.c)
Misc & Changelog
Credits
All the Devs who are contributing their valuable time to get Android working on our phones
Proz0r for implementing something very similar to what I had wanted. He has essentially implemented the same thing, I am implementing this in a slightly different way, that's all. (To be clear, I did not borrow the idea even though a few others have had the same brainwave that I thought I got first - I only borrowed the part where we have the phone wait until the sd-ext partition is ready for being mounted)
Rick_1995 for the first hint to get this modification to work
Securecrt for showing that this modification is indeed possible
Xylograph for pointing me to another thread where this modification is already done
marco.palumbi - for showing me that I need not have an elaborate script to ensure /dev/block/mmcblk0p2 is available, and a mount... wait option is available in the CM source for init. Also for doing away with the need for extprep script and including the e2fsck routine complete with a fsck.log in init.rc itself.
kokotas - For the recovery-flashable version of this mod that simplifies migrating to DataOnEXT
Some of the benefits of this mod are:
Space - Obvisiouly. The 1GB/ 2GB/ 4GB sd-ext partition will be mounted as internal memory, instead of the usual /data partition from NAND
Reliability - EXT4 partition is arguably more reliable than YAFFS2
Working around Bad Blocks - Most of our phones would be having a bunch of bad blocks by now (lucky you, Hynix NAND folks!). With this method, the /data partition is mounted directly to the EXT partition in your SD Card, and the internal userdata NAND partition is untouched. This means you can create bigger system partitions to work your way around bad blocks. Incidently all the bad blocks my phone has is in the userdata partition - this might be so because that is the area that is written to the most.
Performance - A fast SD Card gives better transfer speeds than NAND (My ParanoidAndroid build is noticeably faster after this modification, with my Class 6 Transcend SD Card with 4GB sd-ext partition)
Simplicity - Don't have to worry about hoards of the a2sd scripts and their variants, and carry-out trial and error as to which ones work reliably with your ROM of choice. /data is transparently and natively mounted to sd-ext, so no more low-sound or other odd issues
/data/data can be in the sd-ext partition, and ROM updates will not corrupt it like in some a2sd scripts
Hassle-free - Whether an EU HD2 or TMoUS HD2, you set a large size (445 MB?!!) for /system and forget about partitioning, as the internal userdata partition is not used at all and can be of whatever size. I am using 300 MB system in both my phones. This is close to native Android phones, where we do not keep changing the system partition size for every ROM that is installed.
A proper multi-user setup - if you had to share the phone with someone else, all you have to do is swap out the SD Card you usually have in the phone to a fresh one that has the required FAT and EXT partitions. The other user will see a fresh Android install and configure whatever they want. When you get the phone back, all you have to do is put your usual SD Card back in, and voila! you have all your stuff just the way it was (Thanks to @teemoo for the tip!)
Trying a new ROM? Make sure you do not botch up your data! Just remove the SD Card you usually use and place one for testing. You can always mod the initrd.gz of your new ROM, flash the boot image or place the initrd,gz in /boot and replace your usual SD Card when you want all your apps, data and settings!
A Note on Cache
As many may remember (and some have pointed out), I had the initial trial with 8 MB of cache for SD Card interface. Over a period of time, I tried various sizes from 512 KB to 16 MB and found out that the cache size is dependant on the phone AND the SD Card that is in it. This experiment involves:
Setting a cache size in the extprep script
Booting from the boot.img using fastboot boot command
Waiting for my phone to connect to Google servers
Opening Root Explorer and confirming the cache size
Running SD Tools, testing the SD Card Read/ Write speeds thrice in a row
Changing the cache size in extprep script, recreating a boot,img, and starting from fastboot boot...
And here are my test results:
As you can see, the higher the cache, higher the difference between the Minimum and Maximum values for Reads. While this test does not consider ALL aspects (like random reads), this gives a good idea of what is the cache size that is the best for my phone and my SD Card. Note that I have two HD2 with 2 different brand/ class of SD Cards, and bot gave pretty different results. You may have to find the right cache size for your phone! Once you got the right cache, even a Class 2 card (the stock Sandisk 16 GB Class 2 that comes with the TMoUS HD2) performa pretty well - no deal-breaking lags even in games like Temple Run or Ninjump.
Also, you should be worried more about read speeds - that is what the phone does most of the time. Write speeds comes into picture mostly when you are installing something. All writes that happen after that are mostly incremental, and never something a major as what happens when you install an app.
Note to ROM Makers on ClockWorkMod Updater Script
While one of the benefits of this mod is that you can set a huge /system partition and forget trimming down anything, some ROMs mounts /data during CWM install to copy certain apps or parts of /system to the /data partition. For such a setup to work well with this mod, the /data partition should be mounted to the EXT partition in the SD Card. I am not sure if there is a straightforward mount command that can be used in updater-script to mount an MMC partition. Thanks to Looki75's post, I have made the script simpler...
The code in updater-script...
Code:
package_extract_dir("work", "/tmp");
format("MTD", "system");
format("MTD", "boot");
mount("MTD", "system", "/system");
mount("ext4","/dev/block/mmcblk0p2","/data");
ui_print("Copying files to /system");
package_extract_dir("system", "/system");
...
...
ui_print("Copying files to /data");
package_extract_dir("data", "/data");
FAQ
I will try and compile some sensible Questions from this thread in the FAQ Section. I request all to read the first three posts at least before asking any questions.
Q: I have an EXT2/ EXT3 partition. You are mounting it as EXT4. What gives?
A: Mounting as EXT4 is backwards compatible with EXT2/3
Q: Where are the initrd.gz that you had posted earlier?
A: I have moved them to this post
Q: Will you modify the initrd.gz from the <name of ROM>?
A: I took more than 6 Hours on a Sunday Night to re-do the first three posts, and give a step-by-step guide. Do you still want me to modify the initrd.gz for you?!! I might post the initrd.gz of ROMs I use or try from time to time, but please don't post requests for modding <name of your ROM>'s initrd.gz. What is that saying about giving a man a fish vs. teaching how to fish...??!
Q: Is ClockWorkMod or 4EXT or TWRP compatible with this mod?
A: Before I answer, note that almost all Recovery tools available for HD2 will mount the SD Card's EXT partition to the sd-ext directory. After doing this mod, /data (in Android) = /sd-ext (in Recovery)
Any backup that includes the sd-ext partition will backup your /data.
At least CWM based recovery will delete dalvik-cache from NAND's data and /sd-ext. After this mod, /data/dalvik-cache (Android) = sd-ext/dalvik-cache (Recovery), so yes deleting Dalvik Cache works
CWN Recovery's Fix Permissions runs in both internal data and sd-ext, so yes that works too
Q: Will installing <name of script/ mod for ROM>, which involves flashing something in Recovery, work after this mod?
A: If whatever you are flashing is limited to modifications in /system, no problems - it will work.
If what you are flashing involves changing or adding content to any part of /data then it will probably not. The reason is when you mount data in Recovery, you will by default mount the internal NAND. After this method, the internal NAND is untouched. You must either modify the updater-script (See Note to ROM Makers on ClockWorkMod Updater Script), or use QtADB/ ADB shell to do what the flashing is supposed to do.
Q: I am getting stuck at boot animation/ getting "Encryption Unsuccessful" message when Android boots...
A: Your ROM's init binary may not support the mount... wait option that I am using. There are other variants like wait <device>, and then mount <device>, see if you can find what it is from the source code of your ROM's init binary (init.c). If all else fails, you may have to include a copy of busybox in sbin, point all commands in extprep script to that busybox, and increase the sleep time using /sbin/busybox sleep 25 (that is an example). In any case, you DO NOT HAVE TO WIPE DATA or WIPE ANYTHING AS SUGGESTED BY THE INSTRUCTIONS IN "Encryption Unsuccessful" message
Q: Can I move part of /data from EXT partition to NAND?
A: You don't have to move anything - that is the beauty of this mod. If, for example, you want dalvik-cache to be in NAND, all you have to do is create a directory, mount NAND to that directory, and symlink /data/dalvik-cache to that directory. Example: In init.rc, make sure /data/dalvik-cache is NOT getting created (comment that line out with a #)
Code:
mkdir /dalvik 0771 system system
mount yaffs2 [email protected] /dalvik nodev nosuid noatime nodiratime
symlink /dalvik /data/dalvik-cache
Q: How do I improve performance?
SD Card interface by design cannot handle multiple read/ write activities simultaneously. An example: Put the SD Card in a card reader attached to your computer. Copy a ~500MB file to it, see what write speeds your get (Win 7 shows an approx value). Now, while the first file is still being copied, copy another similar sized file - what happens to the write speed? It crawls, right?
When you have DataOnEXT, the SD Card is continuously being read from and written to because all your apps, their data, system data and configuration, etc. resides in the EXT partition. You SHOULD NOT expect the same speeds like a full-NAND setup. That said, there a few things you can do to improve performance:
Get a performance SD Card like SanDisk Ultra® microSDXC™UHS-I card
ODEX your ROM
See the previous question's answer for moving dalvik cache to NAND
Increase the NAND's read ahead cache from 4KB to 128 ot 256KB (in init.htcleo.rc)
Set your IO Scheduler to Deadline (use No frills CPU Control)
Q: My ROM slows to a crawl after installing this mod when I install or remove an app...
A: That is normal behavior, let it be for a min or two and it will get back to the usual speeds. This is because installing or removing an app involves creating the DEX file in the dalvik cache, extracting the components (lib files, config files, etc.) for the app and placing them in appropriate locations in /data and so on. This will slow down the system responsiveness because all of these are in the EXT partition, and the SD Card interface is a serial interface that will slow down with multiple simultaneous read/ write requests. However, doing what I have said for the previous question will improve performance quite a bit
FAQ is still WIP, I will keep adding to this section as and when...
ph03n!x said:
Devs - Would be great if you can help me with a way to reliably mount the ext partition to /data in init.rc!!!
Click to expand...
Click to collapse
The problem is with the slow sd cards, Try something of this sort.
Code:
mount ....
while [ $? -ne 0]
do
echo "Waiting for slow sd card!"
sleep 5
mount ....
done
You might have to check a2sd script since I'm not sure what is the success test case for mount, most unix programs return zero so i've based it on that assumption.
Rick_1995 said:
The problem is with the slow sd cards, Try something of this sort.
Code:
mount ....
while [ $? -ne 0]
do
echo "Waiting for slow sd card!"
sleep 5
mount ....
done
You might have to check a2sd script since I'm not sure what is the success test case for mount, most unix programs return zero so i've based it on that assumption.
Click to expand...
Click to collapse
I tried a sleep command before the part where I mount the ext partition to /data, but that doesn't seem to work. I am still figuring out the script language used in Android's init.rc, including a if loop or a whole loop.
Looks like I have to create a service that calls an external script- at least that is how far I have come with my searching
Swyped from my HTC HD2 using xda premium
ph03n!x said:
Space - Obvisiouly. The 1GB/ 2GB/ 4GB sd-ext partition will be mounted as external memory
Click to expand...
Click to collapse
Think you mean internal here, I take it internal space is still used as cache (have an unanswered question in one of Xylo's threads as to why sdcard isn't mounted as cache).
Could you post just the init.rc file to see what modifications have been made?
In terms of loop, while trying to get a squashed system up and running (last squashed rom for HD2 was on gingerbread), the squashed files mounted fine (but couldn't get the system to fully boot, probably a libs issue), the mount command used in init.rc were:
Code:
mount squashfs [email protected]/system/fonts.sfs /system/fonts ro
placed after "on fs".
So modifying for this:
Code:
mount ext4 [email protected]/dev/block/mmcblk0p2 /data rw
, failing that you may need to mount it first as say /mnt/ext then loop.
The issue with the ext mount scripts that I've found (at least with link2sd) is that there is a delay in being granted superuser permissions, using init.rc should overcome that issue.
HypoTurtle said:
Think you mean internal here, I take it internal space is still used as cache (have an unanswered question in one of Xylo's threads as to why sdcard isn't mounted as cache).
Could you post just the init.rc file to see what modifications have been made?
In terms of loop, while trying to get a squashed system up and running (last squashed rom for HD2 was on gingerbread), the squashed files mounted fine (but couldn't get the system to fully boot, probably a libs issue), the mount command used in init.rc were:
Code:
mount squashfs [email protected]/system/fonts.sfs /system/fonts ro
placed after "on fs".
So modifying for this:
Code:
mount ext4 [email protected]/dev/block/mmcblk0p2 /data rw
, failing that you may need to mount it first as say /mnt/ext then loop.
The issue with the ext mount scripts that I've found (at least with link2sd) is that there is a delay in being granted superuser permissions, using init.rc should overcome that issue.
Click to expand...
Click to collapse
I meant internal indeed - corrected it
SD Card as Cache - Not sure if I checked back on the question, but I do remember the discussion. In most recent ROMs, /cache is a part of /data - this is to make space for large apps from the market that may otherwise be limited to the size of the cache partition. Instead of /data, we can have any other writable partition - SD Card or even SD-EXT - but symlinking it to /data seems hassle free and does not require anything more. Linking to SD Card may mean that the SD Card has to always be in the phone, and it should be mounted soon enough.
I haven't checked the loop part you have given - let me do some reading about it (or you can try it and let us know!). I will driving for the next several hours, will post the init.rc later today/ tomorrow...
HypoTurtle said:
Think you mean internal here, I take it internal space is still used as cache (have an unanswered question in one of Xylo's threads as to why sdcard isn't mounted as cache).
Could you post just the init.rc file to see what modifications have been made?
In terms of loop, while trying to get a squashed system up and running (last squashed rom for HD2 was on gingerbread), the squashed files mounted fine (but couldn't get the system to fully boot, probably a libs issue), the mount command used in init.rc were:
Code:
mount squashfs [email protected]/system/fonts.sfs /system/fonts ro
placed after "on fs".
So modifying for this:
Code:
mount ext4 [email protected]/dev/block/mmcblk0p2 /data rw
, failing that you may need to mount it first as say /mnt/ext then loop.
The issue with the ext mount scripts that I've found (at least with link2sd) is that there is a delay in being granted superuser permissions, using init.rc should overcome that issue.
Click to expand...
Click to collapse
ph03n!x said:
I meant internal indeed - corrected it
SD Card as Cache - Not sure if I checked back on the question, but I do remember the discussion. In most recent ROMs, /cache is a part of /data - this is to make space for large apps from the market that may otherwise be limited to the size of the cache partition. Instead of /data, we can have any other writable partition - SD Card or even SD-EXT - but symlinking it to /data seems hassle free and does not require anything more. Linking to SD Card may mean that the SD Card has to always be in the phone, and it should be mounted soon enough.
I haven't checked the loop part you have given - let me do some reading about it (or you can try it and let us know!). I will driving for the next several hours, will post the init.rc later today/ tomorrow...
Click to expand...
Click to collapse
Alright the mount loop command you mentioned and the looping I was discussing with Rick are different. The mount loop command mounts a file (eg: a .iso image) as a device.
The loop I was looking to create is a logical if... else or a while... do loop that will check if /dev/block/mmcblk0p2 is available, else will halt the boot process until it becomes available. The challenge (for me) its that the scripting language used in init.rc its not like the scripts we create for init.d
I am still doing some reading up...
Swyped from my HTC HD2 using XDA Premium
Will this work??
Starting your own service at boot.
...If you have a reason to add something or just what to try things out however it is relatively straight forward to add a native service to that init sequence. I have created a simple example that writes the time elapsed since it started to the log. It wakes up every three seconds. The code for exampleservice.c looks like:
Code:
#define LOG_TAG "Example Service"
#include < utils/log.h >
#include < unistd.h >
int main(int argc, char **argv)
{
LOGI("Service started");
int elapsed = 0;
while(1)
{
sleep(3);
elapsed += 3;
LOGI("Service elapsed time is %d", elapsed);
}
}
Place this somewhere in the platform build system and build as an executable. The build system will place the output in the /system/bin folder on the device. Now all that is needed is to add the following to the init.rc script:
Code:
service exampleservice /system/bin/exampleservice
user exampleservice
group exampleservice
oneshot
and your service will start on init. It is also possible to write your own file using the Android init language that enables your services and variables. Then just add a line to import the file in init.rc and you are done.
Source
Click to expand...
Click to collapse
Will this method work to pause the boot process until /dev/block/mmcblk0p2 becomes available? I do not have a dev environment setup - all I have is Cygwin that I use to edit boot.img, port some ROMs to test etc. Can someone help me create such a binary please? Again, I am good at logic and bad at writing/ compiling stuff
Alternatively, can cLK be made to wait until /dev/block/mmcblk0p2 is available? Thoughts?
What is the difference to this methods:
http://forum.xda-developers.com/showthread.php?t=1716124
Are you sure we need more I/O performance with sequencial r/w? Isn't the task with multitasking sutuations to have more perfomance with random r/w? Sdcards won't give that much improvement then: http://www.tomshardware.com/reviews/microsdhc-memory-card-performance,3011-12.html
ReinerK said:
What is the difference to this methods:
http://forum.xda-developers.com/showthread.php?t=1716124
Are you sure we need more I/O performance with sequencial r/w? Isn't the task with multitasking sutuations to have more perfomance with random r/w? Sdcards won't give that much improvement then: http://www.tomshardware.com/reviews/microsdhc-memory-card-performance,3011-12.html
Click to expand...
Click to collapse
In the CronMod as well as all A2SD methods, the Linux boot init process will mount /data to the internal NAND partition (userdata). During Android boot, /data or a part of /data is remounted or symlinked to the SD-EXT partition. This method has its own set of issues, both known and unpredictable. Read up the ROM threads with A2SD or similar stuff in HD2 Android NAND forum and HD2 Android General forum and you will know. This is a trial and error method which is a hit or a miss.
What I am trying to achieve is to have the Linux boot init process mount /data directly to the EXT partition in the SD Card, making this transparent to Android. As far as Android is concerned, it will see a /data partition like it sees a NAND /data partition when you do not use any of these scripts. With this method, there is no miss that I have experienced so far in my testing, except not being able to get the SD Card device ready in time for the Linux boot init process to mount it as /data. Once that is fixed, am sure many will see the benefits.
While the benchmark you have linked to gives a comparison of random and sequential transfer rates of Flash Memory from 9 months ago (it does not even have all that many decent class6 cards that are available now), have you find anything on the transfer rates of NAND? While I remember a HD2 user benchmarking NAND transfer rates, I do not remember the exact values but do remember it was not good. From my personal opinion, the same ROM felt faster with this modification - note that after the first boot all the apps (system or user) that you see and use will be loaded from dalvik-cache which is located in /data. All app data and databases are read/ written in the /data partition. Hence the responsiveness of the phone will be directly proportional on how fast the data partition is - in my case it is my class6 SD Card's EXT partition.
There is also the issue with bad block NAND making several flashaholics' phones unusable or unstable. EXT2/3/4 partitions have better data consistency management and also have e2fsck - it would not be without a reason that Google moved to EXT4 NAND format for their recent phones
Even if you have an International HD2 with 512 MB NAND, with this method you can use almost all of that space (except spaces reserved for bootloader, recovery, misc, etc.) for /system partition which will definitely make the phone live a lot longer even with bad blocks, what with recent cLK versions letting you manipulate partition layouts.
I can keep going on the benefits of having EXT partitions and the benefits of this method, but that would beat the purpose of this thread. Let's see if we can get EXT mounted during boot to /data reliably and consistently. Whether anyone wants to use that method is, of course, their choice
By the way, have anyone used the test ROMs? Any feedback?
I think yaffs file system is used by HTC only, other droid phones already using EXT file system on NAND.
Thats why some phones has good I/O benchmark
Even if it was possible to use EXT4 on HTC HD2 nand would be big improvment
ph03n!x said:
...This is a trial and error method which is a hit or a miss.
Click to expand...
Click to collapse
That's true. Sine even tytung Roms are bigger than 150MB I used 40a2sdx, and I noticed performance problems and sometimes low sound bug. Well I can live with this, but without of cource would be better
ph03n!x said:
While the benchmark you have linked to gives a comparison of random and sequential transfer rates of Flash Memory from 9 months ago
Click to expand...
Click to collapse
I am sorry, I did not found any newer tests in english language. But I think 9 month old test are okay, cause most people use their µSDs several years (my 2009 SanDisk 16GB one just died ).
ph03n!x said:
There is also the issue with bad block NAND making several flashaholics' phones unusable or unstable
Click to expand...
Click to collapse
They should just stop doin' task29 whenever they only wanna flash a rom or change the partition layout.
ph03n!x said:
I can keep going on the benefits of having EXT partitions and the benefits of this method, but that would beat the purpose of this thread. Let's see if we can get EXT mounted during boot to /data reliably and consistently. Whether anyone wants to use that method is, of course, their choice
Click to expand...
Click to collapse
I am pleased to hear that you wanna find a way that way. I just don't have an extra phone to test your rom atm.
Anyway, thaks a lot for your explanations!
ph03n!x said:
In the CronMod as well as all A2SD methods, the Linux boot init process will mount /data to the internal NAND partition (userdata). During Android boot, /data or a part of /data is remounted or symlinked to the SD-EXT partition. This method has its own set of issues, both known and unpredictable. Read up the ROM threads with A2SD or similar stuff in HD2 Android NAND forum and HD2 Android General forum and you will know. This is a trial and error method which is a hit or a miss.
Click to expand...
Click to collapse
Reason I believe it is hit or miss is because during boot init.d scripts in most of the roms runs in parallel. hence while scripts is trying to re-mount/re-link the data partition Android boot-up continues and causes problem. if we pause the android bootup while scripts finishes its job of setting up links correctly I think problem should go away. take a look at this
Code:
# Execute files in /system/etc/init.d before booting
# service sysinit /system/bin/logwrapper /system/xbin/busybox run-parts /system/etc/init.d
# class main
# disabled
# oneshot
if we change that to
Code:
exec /system/bin/sysinit
problem with A2SD scripts should be solved of-course you will have to modify any scripts which sits in infinite loop.
take a look at my latest JB AOSP roms or miui ICS roms.
-----Update----
what if we leave both the method in there
service method to run init.d scripts
and
exec method to pause the boot-up till sd-card is mounted and sd-ext is available.
lets says
make sysinit-1 which will execute the script from init.d1 directory which will have script to check the sd-ext availability
I am close to a solution - looks like a few other devices have already mounted EXT partitions in the SD Card to /system or /data. Here is the command:
Code:
devwait /dev/block/mmcblk0p2
mount ext2 /dev/block/mmcblk0p2 /data nodev nosuid noatime nodiratime
(Check this thread).
But the problem is it is still not mounting. Does this need anything in the kernel/ init? Even the batter-pull technique is not working! The phone is booting as if it is a fresh installation, though I do not see any mounted /data partition
The other option from the same thread is to have
Code:
pause (5);
in init.c and compile is at a binary.
Another bit of information I have come across:
Code:
on emmc-fs
# mount mmc partitions
wait /dev/block/mmcblk0p13
exec /system/bin/e2fsck -p /dev/block/mmcblk0p13
mount ext4 /dev/block/mmcblk0p13 /data nosuid nodev barrier=1 noauto_da_alloc,noinit_itable,nodelalloc
(from here).
With this, the phone is going back to the Encryption Unsuccessful mode.
Pretty sleepy already, gonna call it a day for now - my poor phone has undergone a bunch of boots and reboots for a day
smokin901 said:
Reason I believe it is hit or miss is because during boot init.d scripts in most of the roms runs in parallel. hence while scripts is trying to re-mount/re-link the data partition Android boot-up continues and causes problem. if we pause the android bootup while scripts finishes its job of setting up links correctly I think problem should go away. take a look at this
Code:
# Execute files in /system/etc/init.d before booting
# service sysinit /system/bin/logwrapper /system/xbin/busybox run-parts /system/etc/init.d
# class main
# disabled
# oneshot
if we change that to
Code:
exec /system/bin/sysinit
problem with A2SD scripts should be solved of-course you will have to modify any scripts which sits in infinite loop.
take a look at my latest JB AOSP roms or miui ICS roms.
Click to expand...
Click to collapse
Thanks, I will check your ROM. I would still like to get /data to sd-ext working before Android boots though I thought I was close today, but unfortunately no!
Looks like there had been some progress to this cause, thanks to @securecrt! Check this post.
Swyped from my HTC HD2 using XDA Premium
ph03n!x said:
Mounting - /dev/block/mmcblk0p2 is not getting mounted to /data at every boot/ reboot reliably. This results is the phone not booting at all (Gingerbread) or giving an Encryption Failed, wipe data prompt (This is a feature of ICS/ JB, if /data is not accessible, the OS will boot with a temporary /data file system to show this error).
I have not been able to find a way to reliably carry out this mount - my best guess is that the SD Card Reader interface is not getting ready in time to be mounted to /data. I do not know how to make the boot process wait until the device is available.
ClockWorkMod/ Other recoveries - As the recovery boot images are still mounting userdata to /data and the ext partition to sd-ext, you will have to access sd-ext to access your data. What this means is that if you are moving ROMs, a direct CWM backup restore won't work unless the new ROM also has this modification
Performance- is only as good or bad as your SD Card. My second HD2 has a class 2 SD Card, and I do not find any performance difference. While this is not bad, the SD Card I am talking about is a decent SanDisk card. If you have something with poor transfer rates, performance will suffer
SD Card cannot be removed from the system while Android is running!!!
Click to expand...
Click to collapse
This is, obviously, not compatible with other setups, such as those using some type of ad2sd script (i.e. Amarulls), correct?
CWM Recovery backup should still work since it does backup sd-ext, no?
I need another sd card to play..
Ok, I need some help-
securecrt said:
the trick is:
1. rename the init to init.android
2. create a script named init, mount the system/data in this script, you can add a few sleep time in this to confirm the mount is alreay done and then execut init.android
3. disable the system/data mount in init.rc
Click to expand...
Click to collapse
Ever since @securecrt posted this, I have been running in circles. Here is what I have done:
Renamed init to init.android
Commented out in init.rc:
Code:
#mkdir /data 0771 system system
Commented out in init.rc:
Code:
#mount ext4 /dev/block/mmcblk0p2 /data nosuid nodev noatime nodiratime
Created a script named init with
Code:
#!/sbin/busybox sh
export PATH=/sbin
sleep 10
mkdir /dev
mkdir /dev/block
mknod /dev/block/mmcblk0p2 b 179 2
mkdir /data 0771 system system
mount ext4 /dev/block/mmcblk0p2 /data nosuid nodev noatime nodiratime
/init.android
Copied busybox binary to /sbin/busybox
Created the initrd.gz and flashed
The phone is booting to second boot (logo.rle loads), and then reboots.
Like I've said I have very limited Linux/ coding skills. Would be great if someone can nudge me in the right direction!
ny_limited said:
This is, obviously, not compatible with other setups, such as those using some type of ad2sd script (i.e. Amarulls), correct?
CWM Recovery backup should still work since it does backup sd-ext, no?
Click to expand...
Click to collapse
Yes, you need to remove all variants of a2sd/ link2sd scripts.
CWM Recovery will back up SD-EXT as /sd-ext, but Android will load it as /data after this mod. So if you are going to try this mod, you need to titanium backup all you system/ user app+data, install the modified mod or initrd.gz, make sure you have a ext partition, boot to Android and restore the backup from titanium. And the exact same if you are removing the mod (in which case it will be original initrd.gz).
I can sense that I am pretty close to getting this to work reliably, except for being a dunce in Linux/ Scripting. With little help this mod is a go for daily use
ph03n!x said:
Ok, I need some help-Ever since @securecrt posted this, I have been running in circles. Here is what I have done:
Renamed init to init.android
Commented out in init.rc:
Code:
#mkdir /data 0771 system system
Commented out in init.rc:
Code:
#mount ext4 /dev/block/mmcblk0p2 /data nosuid nodev noatime nodiratime
Created a script named init with
Code:
#!/sbin/busybox sh
export PATH=/sbin
sleep 10
mkdir /dev
mkdir /dev/block
mknod /dev/block/mmcblk0p2 b 179 2
mkdir /data 0771 system system
mount ext4 /dev/block/mmcblk0p2 /data nosuid nodev noatime nodiratime
/init.android
Copied busybox binary to /sbin/busybox
Created the initrd.gz and flashed
The phone is booting to second boot (logo.rle loads), and then reboots.
Like I've said I have very limited Linux/ coding skills. Would be great if someone can nudge me in the right direction!
Click to expand...
Click to collapse
I am sure securecrt will reveal his secret soon, m8.. I wouldn't 'waste' my time on it since he is already running it and knows how to do it
Maybe you can send him a PM if the wait is killing you ?

Flashing the Ext4 update

I've just recently seen in some other threads information about this Ext4 update but after searching haven't really been able to get a handle on what exactly it does and the proper process for doing it. I would love to be rid of the Low Memory messages and may even decide to root my wives as well if it will fix it for her as well. Does anyone have a link to a step by step that covers what needs to be done? I am currently running the Albinoman's Jelly Bean ROM and loving it but would really like to kick this low memory message for good.
Thanks for any insight
devo4040 said:
I've just recently seen in some other threads information about this Ext4 update but after searching haven't really been able to get a handle on what exactly it does and the proper process for doing it. I would love to be rid of the Low Memory messages and may even decide to root my wives as well if it will fix it for her as well. Does anyone have a link to a step by step that covers what needs to be done? I am currently running the Albinoman's Jelly Bean ROM and loving it but would really like to kick this low memory message for good.
Thanks for any insight
Click to expand...
Click to collapse
Im not sure if the ext4 mod will work on JB, im pretty sure its only for GB. If you go to a GB rom, its as easy as flashing the mod thru recovery.
How it works is it flashes the gingertiny kernel with a modified ramdisk. Normally the phone has a larger /data partition, and a /datadata (/data/data) partition that is way undersized. The mod takes the undersized /datadata partition and instead mounts it to the larger /data partition, esentialy giving you /data/data just as you had before. So it makes /datadata a folder on the larger /data partition, instead of being on its own smaller seperate partition.
Hope that wasnt to confusing.
There's also an ext4 mod with no kernel, got it from invisiblek's stash. I've been using it on his nightly ICS builds and it seems to work very well.
Try Link2sd and see if that helps. I use both and have never seen a warning about low space.
...sorry...I was on the phone...
omniatic said:
There's also an ext4 mod with no kernel, got it from invisiblek's stash. I've been using it on his nightly ICS builds and it seems to work very well.
Try Link2sd and see if that helps. I use both and have never seen a warning about low space.
...sorry...I was on the phone...
Click to expand...
Click to collapse
The common misconception of my mod it seems is that it flashes the kernel all the time. No. It only does that if there is a specific HTC framework file in system and that's the only difference between mine and invisibleks. Mine should work fine on ICS as it basically does a find and replace to modify the ramdisk and leave the same kernel. If you look at the script in the mod you'll see that.
Sent from my Galaxy Nexus using Tapatalk 2
tiny4579 said:
The common misconception of my mod it seems is that it flashes the kernel all the time. No. It only does that if there is a specific HTC framework file in system and that's the only difference between mine and invisibleks. Mine should work fine on ICS as it basically does a find and replace to modify the ramdisk and leave the same kernel. If you look at the script in the mod you'll see that.
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
So from what i'm gathering I should be ok on the Jelly Bean ROM even as it isn't going to affect the Kernel but just modify the ramdisk? I have seen a few links around is there a link to the developers site that has the most recent version to flash? Thanks for the input.
devo4040 said:
So from what i'm gathering I should be ok on the Jelly Bean ROM even as it isn't going to affect the Kernel but just modify the ramdisk? I have seen a few links around is there a link to the developers site that has the most recent version to flash? Thanks for the input.
Click to expand...
Click to collapse
I was under the impressin it always flashed the kernel, but i guess i was wrong. So it should work.
I cant find the ext4 thread right now, but you can get the files from here. http://dinc.does-it.net/EXT4_Mods/
cmlusco said:
I was under the impressin it always flashed the kernel, but i guess i was wrong. So it should work.
I cant find the ext4 thread right now, but you can get the files from here. http://dinc.does-it.net/EXT4_Mods/
Click to expand...
Click to collapse
Thanks for the link, do I just need the Convert2Ext4_normal_data.v1.0.zip or do I need one of the dalvik .zip files as well?
devo4040 said:
Thanks for the link, do I just need the Convert2Ext4_normal_data.v1.0.zip or do I need one of the dalvik .zip files as well?
Click to expand...
Click to collapse
There are 3 different mods.
1. Ext4 normal data - Converts data and cache to ext4. Does nothing for low space problem.
2. Ext4 no data limit normal dalvik - Converts data and cache to ext4. Moves /datadata to /data, fixing low space issue.
3. Ext4 no data limit dalvik moved - Converts data and cache to ext4. Moves /datadata to /data. Moves dalvik cache from /data to the former /datadata partition.
#2 is the most popular and will solve the low space issue. You can use #3, however some people have issues moving the dalvik. You can always try dalvik moved if you want. If it causes issues flash the dalvik moved revert, and you will be left with no data limit normal dalvik.
tiny4579 said:
The common misconception of my mod it seems is that it flashes the kernel all the time. No. It only does that if there is a specific HTC framework file in system and that's the only difference between mine and invisibleks.
Click to expand...
Click to collapse
But doesn't it always flash the kernel that's bundled with the mod? And won't flashing a new kernel afterward undo the mod?
(Given, all this only matters on Sense ROMs...)
Edit: Never mind. The mod only needs to modify boot.img, while a kernel uses the boot.img file that's already there. Derp.
ardax said:
But doesn't it always flash the kernel that's bundled with the mod? And won't flashing a new kernel afterward undo the mod?
(Given, all this only matters on Sense ROMs...)
Edit: Never mind. The mod only needs to modify boot.img, while a kernel uses the boot.img file that's already there. Derp.
Click to expand...
Click to collapse
Just FYI, We (jermaine151 and I) wouldn't have had a kernel in the mod for sense if it weren't for the fact that HTC's kernel doesn't support ext4 and CM's and other AOSP kernels already supported ext4.
You're correct, the mod takes the boot.img, unpacks it, makes the change, repacks it, and flashes the boot.img. If it's sense, instead of repacking with the same kernel it repacks with the bundled kernel. On AOSP it repacks with the existing kernel.
So I finally had a free night and attempted to flash Convert2Ext4_no_data_limit_normal_dalvik.zip last night. It appeared to go just fine for me but I am still getting the low space message this morning if I add any apps. I went in with Link2SD and it still shows my /system as only having 4% free while everything else has around 50% free. I've tried moving everything to the SD card that it will let me but still no luck.
devo4040 said:
So I finally had a free night and attempted to flash Convert2Ext4_no_data_limit_normal_dalvik.zip last night. It appeared to go just fine for me but I am still getting the low space message this morning if I add any apps. I went in with Link2SD and it still shows my /system as only having 4% free while everything else has around 50% free. I've tried moving everything to the SD card that it will let me but still no luck.
Click to expand...
Click to collapse
Go to menu - settings - sd & phone storrage - and look for application data storrage category. Total space should say 748mb if the mod worked. Or use a termimal app with su permission to type " mounts ". Look for /cache and /data, they should say ext4 after both.
Which EXT4 mod should I use with Pons CM10? Are there any performance improvements?
spectre559 said:
Which EXT4 mod should I use with Pons CM10? Are there any performance improvements?
Click to expand...
Click to collapse
Which mod you use is really up to you. No data limit normal dalvik is the most used. Heres a breakdown:
Convert2Ext4_no_data_limit_normal_dalvik.v2.0.zip - Converts cache and data to ext4 from ext3 (ext4 is faster than ext3), moves datadata partition to a folder on the data partition (fixes low space issues), leaves dalvik-cache in its original position on the data partition.
Convert2Ext4_no_data_limit_dalvik_moved.v2.0.zip - Converts cache and data to ext4 from ext3 (ext4 is faster than ext3), moves datadata partition to a folder on the data partition (fixes low space issues), moves dalvik-cache from the data partition to the former datadata partition (frees up more space for data, but has been said to slow the phone down/cause issues).
Convert2Ext4_no_data_limit_dalvik_moved_revert.v2.0.zip - Converts cache and data to ext4 from ext3 (ext4 is faster than ext3), moves datadata partition to a folder on the data partition (fixes low space issues), moves dalvik-cache from the datadata partition back to its original position on the data partition after using the dalvik moved mod.
Convert2Ext4_normal_data.v2.0.zip - Converts cache and data to ext4 from ext3 (ext4 is faster than ext3), leaves datadata on its original (undersized) partition (does not fix low space issues), leaves dalvik-cache in its original location on the data partition.
No_Data_Limit_Mod.v2.0.zip - Leaves data and cache as ext3 (no conversion to the faster ext4), moves the datadata partition to a folder on the data partition (fixes low space issues), leaves dalvik-cache in its original position on the data partition.
http://dinc.does-it.net/EXT4_Mods/
All right I went for the no data limit / normal dalvik option. Flashed with TWRP 2.3.x. Everything seems to have worked but is there any way I can verify that the mod took? Sorry for the noob question.
* EDIT * Never mind. The answer is a couple posts up!
spectre559 said:
All right I went for the no data limit / normal dalvik option. Flashed with TWRP 2.3.x. Everything seems to have worked but is there any way I can verify that the mod took? Sorry for the noob question.
* EDIT * Never mind. The answer is a couple posts up!
Click to expand...
Click to collapse
Go to menu - settings - sd & phone storrage - and look for application data storrage category. Total space should say 748mb if the mod worked. Or use a termimal app with su permission to type " mounts ". Look for /cache and /data, they should say ext4 after both.
Lol i copied and posted from above.
cmlusco said:
Go to menu - settings - sd & phone storrage - and look for application data storrage category. Total space should say 748mb if the mod worked. Or use a termimal app with su permission to type " mounts ". Look for /cache and /data, they should say ext4 after both.
Lol i copied and posted from above.
Click to expand...
Click to collapse
The first part is not a good way of telling (by checking storage). It will show 748mb regardless. Not mounting /data/data will not have an impact on the size of /data which is 748mb. The best way is to do the following from terminal:
su
mount | grep /data
It should show a line with /data and ext4 and, if it has the no data limit, also a line with /data/data and ext4. If you're on an ICS/JB ROM it will show ext4 anyways. The best way to tell with the new version of the mod is to see if noauto_da_alloc shows in the results of the above commands.
tiny4579 said:
The first part is not a good way of telling (by checking storage). It will show 748mb regardless. Not mounting /data/data will not have an impact on the size of /data which is 748mb. The best way is to do the following from terminal:
su
mount | grep /data
It should show a line with /data and ext4 and, if it has the no data limit, also a line with /data/data and ext4. If you're on an ICS/JB ROM it will show ext4 anyways. The best way to tell with the new version of the mod is to see if noauto_da_alloc shows in the results of the above commands.
Click to expand...
Click to collapse
Actually on the latest ota anyways, the sd & storage menu shows both Phone Memory (/data) as 748mb, and Application Data Storage (/data/data) as 748mb with the mod, and 147mb without. But your still correct, your way is a better way to see if its working. I just cant ever seem to remember that command.
cmlusco said:
Actually on the latest ota anyways, the sd & storage menu shows both Phone Memory (/data) as 748mb, and Application Data Storage (/data/data) as 748mb with the mod, and 147mb without. But your still correct, your way is a better way to see if its working. I just cant ever seem to remember that command.
Click to expand...
Click to collapse
I added the commands to check to the OP of the mod thread under FAQs.
Oh, the ota does show it? Wow, it's been a while since I've really used sense.
yo, this really speeded my INC up right away! thanks!

[GUIDE][INFO] CronMod-INT2EXT(+) --> How To Use, What To Use, etc...

Introduction:
I have written this tutorial because many people especially in legacy ARMv6 or older device forums suffer from low internal storage. Out of those, some do not know how to increase their internal memory, some use the wrong scripts and get problems, and some, well, do it right. This tutorial is not just meant for all of us, but for anyone who has these problems, or just wants to know some things.
croniccorey said:
About:
CronMod INT2EXT was wrote for use in my rom with the goal to achive a stable and fast way of moving the data partition of your phone to the sd-ext partition, they are available for all users and developers to use in any rooted rom with init.d support.
CronMod INT2EXT scripts are the first universal INT2EXT method released.
Features:
(All scripts are tested on Android 2.3.7 - 4.2.2)
INT2EXT
-Mounts /sd-ext to /data
-Works with EXT 2/3/4 filesystems
-ZipAligns /data/app on every boot
-No symlinks
INT2EXT+
-Mounts /sd-ext to /data
-Leaves /data/data on internal for speed
-Works with EXT 2/3/4 filesystems
-ZipAligns /data/app on every boot
-No symlinks
INT2EXT4
-Mounts /sd-ext to /data
-Works with EXT 4 filesystem
-ZipAligns /data/app on every boot
-No symlinks
INT2EXT4+
-Mounts /sd-ext to /data
-Leaves /data/data on internal for speed
-Works with EXT 4 filesystem
-ZipAligns /data/app on every boot
-No symlinks
INT2EXTV2+
-Mounts /sd-ext to /data
-Leaves /data/data on internal for speed
-Works with EXT 2/3/4 filesystems
-ZipAligns /data/app on every boot
-No symlinks
-Supports SWAP2INT
-Completely universal (Testing is needed)
Prerequisites:
-Rooted Rom with init.d support
-SD-EXT partition
-100mb internal is needed for every 500mb sd-ext
SD Card Partitioning:
Partition 1 - Fat32
Partition 2 - Ext 2/3/4
Install:
(Instructions based on ClockWorkMod recovery)
-Download Chosen Script Below
-Place on root of your sdcard
-Reboot Recovery
-Select "install zip from sdcard"
-Select "choose zip from sdcard"
-Select "CronMod-****_signed"
-Select "mounts and storage" category
-Select "format /sd-ext"
-Reboot
(if you already use a A2SD/D2EXT/INT2EXT/M2SD script then you will need to remove it completely)
Click to expand...
Click to collapse
That's about it on croniccorey's side. Now, onto the basics.
What is INT2EXT?
Basically, INT2EXT is an init.d script which increases your internal memory according to the size of your EXT partition.
How do I use it?
Prerequisites and install instructions are above.
Which Script do I choose?
Now, this is the topic I would like to stress upon. Croniccorey has a bunch of nice scripts, and obviously it is difficult to choose, when you know close to or absolutely nothing of these scripts.
Alright, so let's look at each of these scripts and what they do, again.
INT2EXT
-Mounts /sd-ext to /data
-Works with EXT 2/3/4 filesystems
-ZipAligns /data/app on every boot
-No symlinks
INT2EXT+
-Mounts /sd-ext to /data
-Leaves /data/data on internal for speed
-Works with EXT 2/3/4 filesystems
-ZipAligns /data/app on every boot
-No symlinks
INT2EXTV2+
-Mounts /sd-ext to /data
-Leaves /data/data on internal for speed
-Works with EXT 2/3/4 filesystems
-ZipAligns /data/app on every boot
-No symlinks
-Supports SWAP2INT
-Completely universal (Testing is needed)
Click to expand...
Click to collapse
Note: I have not included INT2EXT4(+) because they're the same thing, only that they support ONLY EXT4.
Now, let's talk about INT2EXT+ first, as that's what majority of Wildfire S users have.
My opinion:
Not such a good choice for some people. Look at it again.
INT2EXT+
-Mounts /sd-ext to /data
-Leaves /data/data on internal for speed
Click to expand...
Click to collapse
Agreed, the red part is done for speed, but this STILL keeps some part of your data on your REAL INTERNAL MEMORY. This is exactly why croniccorey has stated in the prerequisites:
-100mb internal is needed for every 500mb sd-ext
Click to expand...
Click to collapse
This means that every 100MB of real internal memory you have, it is equivalent to 500MB of your EXT partition.
To be more clear -
Our phone has 150MB of internal memory. This means, that if you use INT2EXT+ and have a 1GB partition for example, and if you install loads of apps, it's going to say "Storage Full" on around 750MB. That means, the remaining is practically waste and you can actually use only 750MB. This is why, if you are going to install loads of apps, you can use 750MB only, with this script.
Now then, let's move on to INT2EXT.
-Mounts /sd-ext to /data
-Works with EXT 2/3/4 filesystems
-ZipAligns /data/app on every boot
-No symlinks
Click to expand...
Click to collapse
Now, you can see that there's no leaving /data/data on internal for speed. This means that your phone will become slightly laggier.
But, if you have, say, a 2GB EXT Partition and flash this script, you get the FULL 2GB to use / torture / whatever as per your wish. No catches, only con is that it becomes slightly laggier (only on some ROMs, notably on stock).
My Opinion:
If you're ready to live with some more lag, (which we're all used to, anyway) and have loads of apps on your phone which won't fit in 750MB of space, then INT2EXT is for you.
Final Verdict:
-If you're not a heavy apps installer and can happily live with 750MB of space (which is enough for most people), go for INT2EXT+. This will make your phone less laggier than INT2EXT.
-If you are a heavy apps / widgets / whatever installer, and 750MB isn't enough for you, go for INT2EXT. This will, however, make your phone slightly laggier (as aforementioned only on certain ROMs, like stock).
-If you are a heavy apps installer, can't live with 750MB of space and want good speeds, well, I'm sorry, this isn't for you.
And finally, the link you've been waiting for!
Downloads:
Click to go to the CronMod-INT2EXT Scripts page to download
Credits:
croniccorey for the scripts of course!
dk75 for teaching me on the scripts thread on which is better to use. If it wasn't for him, this thread wouldn't be here for a long time or wouldn't be here at all!
Click to expand...
Click to collapse
Coming Soon:
Tell me what to add!
And this one too
Re: [GUIDE][INFO] CronMod-INT2EXT(+) --> How To Use, What To Use, etc...
Very...very clear :thumbup:
Sent from MARVEL JellyScream
How do I run?
I have HTC wildfire s and am just learning about rooting and this internal memory issue I am having with this phone..I have NO memory but was able to root and move some stuff to sd card but I tried to install the ROM "touchwiz v6" and all that happens is the phone is stuck on the S. Do I run the :cronmod zip just like I would install a ROM?
Lt.Win said:
Coming Soon:
INT2EXTV2+ information and guide, with information on SWAP2INT!
Something else I forgot.
Click to expand...
Click to collapse
I've been trying to install the cronmod scripts for well over a couple of weeks now. Tried three different recoveries, different scripts but I always get status 0 error. What is going wrong, I even moved the files from the script folder into a rom and tried installing it from there, the files do go into the init.d folder but they don't seem to be working. I even verified the init.d by using universal init.d apk
Did you use Primary ext4 partition?
Anil_Sharma said:
I've been trying to install the cronmod scripts for well over a couple of weeks now. Tried three different recoveries, different scripts but I always get status 0 error.
Click to expand...
Click to collapse
Hi, I can just suggest you to check if your ext 2/3/4 partition is set as Primary (not logical). You must have two primary partition (1. Fat 32; 2. Ext 2/3/4)
Int2extv2+ tutorial...
Any updates
Sent from my Wildfire S A510e using xda app-developers app
[email protected]¡[email protected]_S¡D said:
Int2extv2+ tutorial...
Any updates
Sent from my Wildfire S A510e using xda app-developers app
Click to expand...
Click to collapse
Sorry,I got a new phone about a month or so back and since then I've been inactive (college).
Anyways, the v2+ tutorial is the same as the remaining. In the time I had my WFS, i could only say that INT2EXTv2+ felt faster than INT2EXT+.
That is all. And the SWAP2INT is it puts your Swap partition on your internal, that is all.
If you need me to add something, do tell me!
How do I use it?
Prerequisites and install instructions are above.
Click to expand...
Click to collapse
Can someone please help. I am on a P500. I have followed all the instructions and flashed INT2EXT+. I am using AmonRA and dont have a format sd-ext option. What should I do? And once I have completed the process, what do I actually do to shift the apps to the sd-ext partition? There are no instructions for this.
Thanks very much and I appreciate your work. :good:
Internal memory required every 500 MB sd-ext
I saw in some people's signature in this forum sd-ext up to 8GB with int2ext+, int2ext4+ or int2extv2+, which according with tutorial, needs 100 MB of internal memory every 500MB sd-ext... Any exceeding sd-ext won't be considered by system
This means that every 100MB of real internal memory you have, it is equivalent to 500MB of your EXT partition.
To be more clear -
Our phone has 150MB of internal memory. This means, that if you use INT2EXT+ and have a 1GB partition for example, and if you install loads of apps, it's going to say "Storage Full" on around 750MB. That means, the remaining is practically waste and you can actually use only 750MB. This is why, if you are going to install loads of apps, you can use 750MB only, with this script.
Click to expand...
Click to collapse
So, it is possible to use "+" scripts with sd-ext bigger than this requirement (and use the entire sd-ext))??
Good work. i ve install Int2ext+v2 with ext3 on jelly king 2.0....working theeeeee best..congrats ..keep on development....very good work .thankful for that
archstanton2013 said:
I saw in some people's signature in this forum sd-ext up to 8GB with int2ext+, int2ext4+ or int2extv2+, which according with tutorial, needs 100 MB of internal memory every 500MB sd-ext... Any exceeding sd-ext won't be considered by system
So, it is possible to use "+" scripts with sd-ext bigger than this requirement (and use the entire sd-ext))??
Click to expand...
Click to collapse
If you use the entire sd-ext you will have no space for your private stuff like pictures, etc.
If you connect to computer there will be nothing I suppose.
i am using int2extv2+ and i have 1 gb ext partition on my wfs .
my problem is that i cant install any app because it is saying that your internal is full although in settings it shows that i still have 730 mb of free space plz help me with this
umairchang said:
i am using int2extv2+ and i have 1 gb ext partition on my wfs .
my problem is that i cant install any app because it is saying that your internal is full although in settings it shows that i still have 730 mb of free space plz help me with this
Click to expand...
Click to collapse
For every 500mb ext memory you need 100mb (actual) internal storage for int2ext+,int2ext4+ and int2extv2+.
The creator of these scripts clearly mentioned it in his op!!!
Thus 750mb is maximum we can use.
If you wanna use the extra memory next time flash int2ext or int2ext4 scripts.
Sent from my Wildfire S A510e using xda app-developers app
[email protected]¡[email protected]_S¡D said:
For every 500mb ext memory you need 100mb (actual) internal storage for int2ext+,int2ext4+ and int2extv2+.
The creator of these scripts clearly mentioned it in his op!!!
Thus 750mb is maximum we can use.
If you wanna use the extra memory next time flash int2ext or int2ext4 scripts.
Sent from my Wildfire S A510e using xda app-developers app
Click to expand...
Click to collapse
actually it is full on around 250 mb not on 750 mb . 750 mb is the free space it is showing but i m not able use it
umairchang said:
actually it is full on around 250 mb not on 750 mb . 750 mb is the free space it is showing but i m not able use it
Click to expand...
Click to collapse
Flash int2ext only script.
Sent from my Wildfire S A510e using xda app-developers app
hello
thanks for this post
i've read and practiced it earlier before i register this forum
i've used kimsmodrom which have link2sd and i replace it with int2ext
now i'm using crosssfire v1
one thing i noticed, that both rom won't reboot after i wipe cache / dalvik cache, also when i use defragment
i've been through 5 times a night reinstalling rom because of this..
so i conclude that do not ever wipe cache and defragment when using int2ext
Good Tutorial man, thx
So i installed int2ext+ 1gb partition for that. Got it working, the phone shows internal storage 1gb. I'm having one problem though. When I shut down or reboot the phone it loads the internal storage and no downloaded apps work. I have to pull the battery, then it starts with int2ext again. Any ideas?
Sent from my HTC One S using xda app-developers app

Categories

Resources