• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[DATA2whatever] Flashable All-in-one-data2sd-Solution v0.2e + v0.4 test (dec 27th)

Search This thread

melethron

Senior Member
Sep 13, 2010
854
193
data2whatever v0.2



UPDATE: For the new test version of v0.3 and v0.4 look at the end of the post.



Features:

- Supports: Ext2, Ext3, Ext4 (and if kernel supports it: ) btrfs, ReiserFS
- Supports loop device as optional addon (as siberes data2sd)
- Flashable zip for many app2sd ROMs (no long setup required)
- It does a e2fsck (disk check) on every boot and creates a logfile on the sdcard (/sdcard/e2fscklog.txt)
- looks nice if you do a logcat on boot ;)
- no "settings lost on reboot" bug like in my old or siberes script
- changes the scheduler for the sd-card and internal to noop for better performance on sd.
- Nandroid Backup of EXT2/3/4 external with AmonRa 2.0.0.1 or any clockwork recovery.
- Removes the common app2sd scripts on its own


Requirements


- A second partition (same as app2sd - Min 512 mb - 1024mb is highly recommended - max 2048 MB or there will be issues with market) in any format (as long as the kernel supports - ext2/3/4 support is default in most kernels - Ext4 or ReiserFS is recommended).
- An app2sd or non app2sd ROM (data2sd versions wont work) (this SHOULD work with most or at least many ROMs . Roms that are confirmed to work can be found in the post below. Please report to me it it works or not so i can update this thread. If it doesn't work i try to make it compatible asap. )



Installation

1.) Full wipe (at least needed on first installation)
2.) Flash the app2sd Version of the ROM of your choice
3.) DONT REBOOT
4.) If you rebooted then start over at 1.)
5.) flash the attached "data2whatever.zip"
6.) now reboot ;)

ADDITIONAL INFO: Even without "life on the edge" you should watch the first 4 "don't"s of "life on the edge". The normal script use the same disk safety methods as NTFS on Windows or EXT4 on linux. But as you know you shouldnt just switch off the computer because there can still be issues in very rare cases. Reboots with tools like "snqs power menu" is the same as a batterypull (or pulling the ac plug on PC) and this isn't good in general (and this also applies for using it with app2sd). If you want to go to recovery just make a normal shutdown and switch the phone on with "volume down" button pressed.


Optional life-on-the-edge add on

EDIT:
Life on the edge causes reboots. Don't use it for now.

This patch has the same effect as sibere's and ownhere's script (loop device - the way ownhere does in v4 doesnt work though). Other than those scripts it this addon doesnt need any repartitioning or other setup (like FAT or a third partition) and can simply be installed or removed with a flashable zip. All you need for this is a normal ext 2/3/4 partition (as above ^^). Ext4 is recommended for this (as above) since it is the fastest of those 3. This patch is more risky than normal ext3/4 considering the possibility of data loss. If you want to use this add-on you should watch the following (this also applys to ownheres and sibere script and is NOT more risky than their scripts):

- DON'T use the reboot of snq's powermenu (or any other reboot app)
- DON'T use anything in the "ROM Manager" that makes it reboot.
- DON'T do adb reboot / abd reboot recovery / adb reboot bootloader
- DON'T pull the battery while the phone is on (this should be obvious)
- DON'T remove the "sync" mount options for the Quadrant "boost" (this is a fake boost anyway)

All of this is like a powerloss for the sd-card and has a high change of data corruption.

From my test with this i give you an estimate what can happen if a powerloss occurs or any of the 5 points above happen:

- 50% general chance of corruption that will be autofixed on boot (not a problem)
- 10% chance of forcecloses after reboot of some apps (this can be fixed by deleting the app data or restoring it with titanium (or other) backup)
- REALLY tiny chance (didnt happen for me in over 40 "simulated" powerlosses) that partition gets corrupted (needs complete repartitioning of the microSD so all data on it will be gone then)

As long as you watch the 5 points above and as long as you don't drop the phone and the battery jumps out this will be safe.

Installation of the addon:

- Flash the "life-on-the-edge.zip" any time after you installed "data2whatever".

Installation of the addon:

- Flash the "life-on-the-edge-UNPATCH.zip" any time after you installed "data2whatever" and the addon. (this will revert back to the normal script)

Personal remark: While this is a improvement over normal ext4 it is not the "holy-grale" of a data2sd lag fix. I'm not using this myself and use a ReiserFS as second partition instead which is more safe and completly feels the same as a "loop" device considering performance.



Further Plans
- Changes for the mount options of the internal YAFFS2 Partition to optimize the speed of the "dalvik-cache" (have to look into YAFFS2 what can be done)
- Make Roms that doesn't work yet compatible to this


Thanks:

- cyanogen who made app2sd+ in the first place.
- sibere and ownhere who started all the data2sd.
- supercurio and Unhelpful of SGS' Voodoolagfix (#Project-Voodoo on freenode) for their helpfull script tipps.
- Coutts99 and Neophyte for their Kernels.
- woti23 for all those test's in this thread.
- All devs of XDA in generall for all this nice stuff that is done here



UPDATE: Test version of v0.3 and v0.4:

BOTH NEED A FULL WIPE BEFORE INSTALLED FOR THE FIRST TIME.
Please make a logcat of the first boot. This can help me to find possible issues.

This version now checks if your second partition is aligned and if not it will ERASE it and recreate it aligned. You will find more info about alignment later here (in the meantime you can google "ssd alignment" to get some info).


WARNING:
THIS WILL ERASE THE SD-EXT PARTITION IF IT IS NOT ALIGNED. On top of that there is a little risk that it messes up the partition table. Although i made a lot of test with this and added busybox to assure compatibility there could still issues with it. If something should go wrong in recreating the partition you may have to REPARTITION the COMPLETE Sd-card. So make a BACKUP OF ALL YOUR DATA ON THE SD before you test this .

Additional info: Don't let yourself get confused by the many deleting messages on install. The update script tries to erase:
- busybox (newest version gets installed afterwards)
- 4 different versions of app2sd scripts
- dalvikcache2cache script
- the 3 binaries included (e2fsck, tune2fs, mkfs.ext4)
- 3 possible symlinks for the binaries
- mtab file

Everything that is erased gets either installed afterwards (busybox, etc ...) or isn't needed (app2sd scripts).

Please post the alignment log if you testet this. This log can be found on the sdcard ( /sdcard/sd-ext-alignment-log.txt).





==================================================================================
changelog

0.4d test release

- If the partitions gets aligned it will be formated with ext3 now instead of ext4 so it works with ROMs without ext4 kernel support.


0.4c test release

-fixed a rare issue that could happen on alignment if a partition has set the bootflag.


v0.4b test release

- fixed and Oxygen 2.0 RC4 related issue:
- renamed the "99complete" to "991complete" to prevent similiar issues on other AOSP ROMs that use individual properties.


v0.4 test release

- dalvik cache is now left internal. This should spread i/o and thus speed things up a bit.
- change scheduler to "deadline" if the kernel supports it
- changed logging: One file (data2whateverlog.txt on sdcard) for alignement and fsck with more info (thx moebius83)
- In case there is a swap partition (mmcblck0p3) this will also get aligned.


v0.3 test release
- this version will now recreate your sd-ext partition if it is not aligned (format: ext4)
- fixed the mtab error that could cause issues in some cases
- added busybox v1.17.2 to assure compatibility.
- added support for swap partition (if kernel supports it and partition 3 exists)
- removing more stuff on install (to make sure there are no old symlinks)


0.2e
-fixed an issue caused by the s-off fix.


0.2d
-fixed the cm6 fix

v0.2c
-fixed a bug that made this only work with S-OFF. (i totally forgot that system can't be mounted rw as default :eek: )


v0.2b
- fixed a typo of the last fix . This could have caused issues on leedroid. (thanks woti)
- added the patch for CM6 (thanks iinga)

v0.2
- fixed a syntax error making the script not working at all
- fixed a bug that would have occured on leedroid if it would have worked ^^


------------------------------------------
data2whatever v0.1 (dec 23.)

-completly rewrote of the data2ext script
 

Attachments

  • life-on-the-edge.zip
    2.4 KB · Views: 1,980
  • life-on-the-edge-UNPATCH.zip
    2.1 KB · Views: 1,313
  • data2whatever-v0.2e.zip
    359.5 KB · Views: 5,903
  • data2whatever-v0.4d.zip
    2.7 MB · Views: 17,815
  • data2whatever-v0.4c.zip
    2.7 MB · Views: 10,104
Last edited:

melethron

Senior Member
Sep 13, 2010
854
193
Confirmed to work with:

- LeeDroid 2.3b A2SD (life-on-the-edge may not work)
- MIUI 0.12.18 R3
- Gingerbread Oxygen RC2
- Ginger Villain ROM
- CM6
- MidianUI r2e
- Desire stock (with init.d support enabled through ramdisk - more info)

Don't work yet:
(about HD roms in general. They will be the ones with most issues because they use external space for system stuff because of the size of the HD Rom - ill still try to make my script work with them)

- robocik's Z v06
- ReflexTSenseHD 1.5
 
Last edited:
  • Like
Reactions: Pavelol and lipers

Rastaman-FB

Senior Member
Sep 2, 2010
722
48
nice work man
im using miui currently and it hass 04apps2sd instead
is this the same thing?
 

Madeli

Senior Member
May 31, 2010
372
55
Very nice work.... and it kinda confirmed what i've been thinking all the time about it. Ppl thinks it speeds up your phone! Still this is of very good use if u want alot of space for apps :)
 

Dany0

Senior Member
Jun 1, 2010
586
11
So generally, it should work on any rom with CM6/AOSP based A2SD script? Mkay...
 

K900

Senior Member
Aug 12, 2010
4,847
2,893
Moscow
Didn't get to experimenting with btrfs today, will test it tomorrow

Sent from my HTC Desire using XDA App
 

baadnewz

Recognized Developer
Sep 2, 2008
14,340
34,069
37
Bucharest
insertcoin-roms.org
@melethron great work man, but I will remain to my opinion that data2sd(ext) is bad for so many reasons. But it is good to have choices.

But nevertheless your work is apreciated
 

abz54

Senior Member
Jul 21, 2010
137
11
Hi, having small issue here, trying to install this on the baadnwz rc2 hd rom, following all the steps, when i finally restart and everything boots up as it should, it freezes on the white htc screen before it asks you to select your network provider and force closes.

Anyone have a solution?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 31
    data2whatever v0.2



    UPDATE: For the new test version of v0.3 and v0.4 look at the end of the post.



    Features:

    - Supports: Ext2, Ext3, Ext4 (and if kernel supports it: ) btrfs, ReiserFS
    - Supports loop device as optional addon (as siberes data2sd)
    - Flashable zip for many app2sd ROMs (no long setup required)
    - It does a e2fsck (disk check) on every boot and creates a logfile on the sdcard (/sdcard/e2fscklog.txt)
    - looks nice if you do a logcat on boot ;)
    - no "settings lost on reboot" bug like in my old or siberes script
    - changes the scheduler for the sd-card and internal to noop for better performance on sd.
    - Nandroid Backup of EXT2/3/4 external with AmonRa 2.0.0.1 or any clockwork recovery.
    - Removes the common app2sd scripts on its own


    Requirements


    - A second partition (same as app2sd - Min 512 mb - 1024mb is highly recommended - max 2048 MB or there will be issues with market) in any format (as long as the kernel supports - ext2/3/4 support is default in most kernels - Ext4 or ReiserFS is recommended).
    - An app2sd or non app2sd ROM (data2sd versions wont work) (this SHOULD work with most or at least many ROMs . Roms that are confirmed to work can be found in the post below. Please report to me it it works or not so i can update this thread. If it doesn't work i try to make it compatible asap. )



    Installation

    1.) Full wipe (at least needed on first installation)
    2.) Flash the app2sd Version of the ROM of your choice
    3.) DONT REBOOT
    4.) If you rebooted then start over at 1.)
    5.) flash the attached "data2whatever.zip"
    6.) now reboot ;)

    ADDITIONAL INFO: Even without "life on the edge" you should watch the first 4 "don't"s of "life on the edge". The normal script use the same disk safety methods as NTFS on Windows or EXT4 on linux. But as you know you shouldnt just switch off the computer because there can still be issues in very rare cases. Reboots with tools like "snqs power menu" is the same as a batterypull (or pulling the ac plug on PC) and this isn't good in general (and this also applies for using it with app2sd). If you want to go to recovery just make a normal shutdown and switch the phone on with "volume down" button pressed.


    Optional life-on-the-edge add on

    EDIT:
    Life on the edge causes reboots. Don't use it for now.

    This patch has the same effect as sibere's and ownhere's script (loop device - the way ownhere does in v4 doesnt work though). Other than those scripts it this addon doesnt need any repartitioning or other setup (like FAT or a third partition) and can simply be installed or removed with a flashable zip. All you need for this is a normal ext 2/3/4 partition (as above ^^). Ext4 is recommended for this (as above) since it is the fastest of those 3. This patch is more risky than normal ext3/4 considering the possibility of data loss. If you want to use this add-on you should watch the following (this also applys to ownheres and sibere script and is NOT more risky than their scripts):

    - DON'T use the reboot of snq's powermenu (or any other reboot app)
    - DON'T use anything in the "ROM Manager" that makes it reboot.
    - DON'T do adb reboot / abd reboot recovery / adb reboot bootloader
    - DON'T pull the battery while the phone is on (this should be obvious)
    - DON'T remove the "sync" mount options for the Quadrant "boost" (this is a fake boost anyway)

    All of this is like a powerloss for the sd-card and has a high change of data corruption.

    From my test with this i give you an estimate what can happen if a powerloss occurs or any of the 5 points above happen:

    - 50% general chance of corruption that will be autofixed on boot (not a problem)
    - 10% chance of forcecloses after reboot of some apps (this can be fixed by deleting the app data or restoring it with titanium (or other) backup)
    - REALLY tiny chance (didnt happen for me in over 40 "simulated" powerlosses) that partition gets corrupted (needs complete repartitioning of the microSD so all data on it will be gone then)

    As long as you watch the 5 points above and as long as you don't drop the phone and the battery jumps out this will be safe.

    Installation of the addon:

    - Flash the "life-on-the-edge.zip" any time after you installed "data2whatever".

    Installation of the addon:

    - Flash the "life-on-the-edge-UNPATCH.zip" any time after you installed "data2whatever" and the addon. (this will revert back to the normal script)

    Personal remark: While this is a improvement over normal ext4 it is not the "holy-grale" of a data2sd lag fix. I'm not using this myself and use a ReiserFS as second partition instead which is more safe and completly feels the same as a "loop" device considering performance.



    Further Plans
    - Changes for the mount options of the internal YAFFS2 Partition to optimize the speed of the "dalvik-cache" (have to look into YAFFS2 what can be done)
    - Make Roms that doesn't work yet compatible to this


    Thanks:

    - cyanogen who made app2sd+ in the first place.
    - sibere and ownhere who started all the data2sd.
    - supercurio and Unhelpful of SGS' Voodoolagfix (#Project-Voodoo on freenode) for their helpfull script tipps.
    - Coutts99 and Neophyte for their Kernels.
    - woti23 for all those test's in this thread.
    - All devs of XDA in generall for all this nice stuff that is done here



    UPDATE: Test version of v0.3 and v0.4:

    BOTH NEED A FULL WIPE BEFORE INSTALLED FOR THE FIRST TIME.
    Please make a logcat of the first boot. This can help me to find possible issues.

    This version now checks if your second partition is aligned and if not it will ERASE it and recreate it aligned. You will find more info about alignment later here (in the meantime you can google "ssd alignment" to get some info).


    WARNING:
    THIS WILL ERASE THE SD-EXT PARTITION IF IT IS NOT ALIGNED. On top of that there is a little risk that it messes up the partition table. Although i made a lot of test with this and added busybox to assure compatibility there could still issues with it. If something should go wrong in recreating the partition you may have to REPARTITION the COMPLETE Sd-card. So make a BACKUP OF ALL YOUR DATA ON THE SD before you test this .

    Additional info: Don't let yourself get confused by the many deleting messages on install. The update script tries to erase:
    - busybox (newest version gets installed afterwards)
    - 4 different versions of app2sd scripts
    - dalvikcache2cache script
    - the 3 binaries included (e2fsck, tune2fs, mkfs.ext4)
    - 3 possible symlinks for the binaries
    - mtab file

    Everything that is erased gets either installed afterwards (busybox, etc ...) or isn't needed (app2sd scripts).

    Please post the alignment log if you testet this. This log can be found on the sdcard ( /sdcard/sd-ext-alignment-log.txt).





    ==================================================================================
    changelog

    0.4d test release

    - If the partitions gets aligned it will be formated with ext3 now instead of ext4 so it works with ROMs without ext4 kernel support.


    0.4c test release

    -fixed a rare issue that could happen on alignment if a partition has set the bootflag.


    v0.4b test release

    - fixed and Oxygen 2.0 RC4 related issue:
    - renamed the "99complete" to "991complete" to prevent similiar issues on other AOSP ROMs that use individual properties.


    v0.4 test release

    - dalvik cache is now left internal. This should spread i/o and thus speed things up a bit.
    - change scheduler to "deadline" if the kernel supports it
    - changed logging: One file (data2whateverlog.txt on sdcard) for alignement and fsck with more info (thx moebius83)
    - In case there is a swap partition (mmcblck0p3) this will also get aligned.


    v0.3 test release
    - this version will now recreate your sd-ext partition if it is not aligned (format: ext4)
    - fixed the mtab error that could cause issues in some cases
    - added busybox v1.17.2 to assure compatibility.
    - added support for swap partition (if kernel supports it and partition 3 exists)
    - removing more stuff on install (to make sure there are no old symlinks)


    0.2e
    -fixed an issue caused by the s-off fix.


    0.2d
    -fixed the cm6 fix

    v0.2c
    -fixed a bug that made this only work with S-OFF. (i totally forgot that system can't be mounted rw as default :eek: )


    v0.2b
    - fixed a typo of the last fix . This could have caused issues on leedroid. (thanks woti)
    - added the patch for CM6 (thanks iinga)

    v0.2
    - fixed a syntax error making the script not working at all
    - fixed a bug that would have occured on leedroid if it would have worked ^^


    ------------------------------------------
    data2whatever v0.1 (dec 23.)

    -completly rewrote of the data2ext script
    2
    Confirmed to work with:

    - LeeDroid 2.3b A2SD (life-on-the-edge may not work)
    - MIUI 0.12.18 R3
    - Gingerbread Oxygen RC2
    - Ginger Villain ROM
    - CM6
    - MidianUI r2e
    - Desire stock (with init.d support enabled through ramdisk - more info)

    Don't work yet:
    (about HD roms in general. They will be the ones with most issues because they use external space for system stuff because of the size of the HD Rom - ill still try to make my script work with them)

    - robocik's Z v06
    - ReflexTSenseHD 1.5
    2
    I have the same issue.. flashed leedroid 2.3d, full wipe, gparted 16gb class 4 into 14gb fat32 1gb ext4(by the way how do I disable journaling?) using life on edge, phone randomly reboots.. e2fscklog shows rebuild too.. any ideas?

    The issue is life-on-the-edge (i just updated the op). Loopmount can cause reboots. Ill update the script soon and recommend to use it without life on the edge. e2fsck shows error because those reboots doesnt proberly unmount. Journal will be enabled if LOTE is not installed and disabled if it is. So no way to use unjournaled ext4 without LOTE as long as you dont change the script.

    Ownhere has a much better alternative to "loopmount":
    http://forum.xda-developers.com/showthread.php?t=903507

    If this is more tested i add this as life-on-the-edge. I will upgrade this script in future but atm i focus on my ROM so this may take some time. As for the ROM the script will get a config file on the sd-card so that stuff like journal can be set. But update will take time.
    2
    @melethron and @sibere,
    I wrote a post on how to enable init.d on stock desire rom, maybe you can link it to the OP so people willing to try these scripts on stock rom will know how to do it, this is the post
    2
    Damn. I know where the issues lies: i made some last minute changes and didnt test them and there was a ` missing. This tiny backquote made the whole script not working:

    Code:
    /system/etc/init.d/01data2whatever: 248: Syntax error: EOF in backquote substitution

    Fixed it and updated the OP. I can confirm that it works now (for leedroid at least - may still be issues on other ROMs so i still need feedback).