data2extV2.2 and a2sd-blaster (updated 5/6/2011)

unCoRrUpTeD

Senior Member
Mar 22, 2010
1,707
237
0
Fort Worth, TX
unCoRrUpTeD DATA2EXT
&
A2SD BLASTER


DATA2EXT
What is data2ext?
data2ext was started as a way to move the entire contents of the data partition to an ext partition on the sdcard. It gives you a way to increase the size of your data partition and also increase benchmark scores. This should work on most phones as it detects the block location of the sdcard, regardless if it is /dev/block/mmcblk0 or /dev/block/mmcblk1.

SETUP

The following commands are optional and need to be put in before the 1st or 2nd boot
Make sure that the data partition is mounted before issueing the commands
Code:
adb shell
mount /data
*Converting to ext3 or ext4 on first boot
Code:
echo "extA" > /data/.d2ext
A is either 2, 3 or 4, depending on what ext format you want.
In the future you can convert to ext3 or ext4 even after data is on the sdcard.

*Formatting the ext partition on first boot to ensure a clean and fresh filesystem
(Note: This does not need to be done)
Code:
echo "extA format" > /data/.d2ext
A is either 2, 3 or 4, depending on what ext format you want.

*Create a custom read_ahead speed for the sdcard.
(Info on what it does can be found here courtesy of brainmaster)
Code:
echo XXXX > /data/.sdrw
XXXX is any value you want. By default it will be set at 2048.

You will need your sdcard partitioned with at least 1 ext partition. Either you can do that through your recovery or go here to download a script that will repartition without loosing your fat32 contents.

WARNING:
Due to some changes made, you will need to either backup your apps and do a fresh install or install over my data2extV1 script. Do not try and use the a2sd-copy-and-blast method at this time.

Install on a ROM you are currently running that has a2sd or data2ext enabled:
1. Reboot into recovery
2. Flash a2sd-copy-and-blast.zip
3. Flash data2ext.zip
4. Once your phone has booted, reboot again (This is to limit the time of the first boot and the setup won't be complete until you reboot.)


Install on a ROM you are currently running that has my previous data2ext installed:
1. Reboot into recovery
2. Flash data2ext.zip
3. Reboot your phone.

Install on a ROM you are currently running that does not have a2sd or data2ext enabled:
1. Reboot into recovery
2. Flash data2ext.zip
3. Once your phone has booted, reboot again (This is to limit the time of the first boot and the setup won't be complete until you reboot.)

Install on a fresh intall of a rom:
(It doesn't matter if it has a2sd or not as this will remove all a2sd scripts if they are present)
1. Reboot into recovery
2, Wipe everything
3. Flash ROM
4. Flash data2ext.zip
5. Reboot
6. Once your phone has booted, reboot again (This is to limit the time of the first boot and the setup won't be complete until you reboot.)
[/SIZE]


A2SD-BLASTER
unCoRrUpTeD-a2sd-blaster.zip: Use this one to remove a2sd from the ROM if you are doing a fresh install or want to keep all data on your ext partition for data2ext

unCoRrUpTeD-a2sd-copy-and-blast.zip: Use this one if the ROM your are currently running is using a2sd. It will remove a2sd from it and copy all apps from the ext partition back onto your phone's /data partition.



Changelog
data2ext-V2.2:Fixed issue with V2.1 freezing on boot, due to deleting /system/bin
data2ext-V2.1:Added a check for those already using data2ext
data2ext-V2:included checks if the ROM has the needed files, included the option to change the format to ext3 or ext4 on first boot, added sdcard read ahead tweak. Reboot needed after any install, added custom_backup_list.txt for new installs or updates
a2sd-copy-and-blast_V2:changed to move data back to phone along with apps
data2ext-V1: 1st release
a2sd-blaster: 1st release
a2sd-copy-and-blast: 1st release
 

Attachments

Last edited:
A

AspenTree

Guest
i'm going to test on a fresh install of liquidsense and hopefully this works b/c i just switched back to gingerbread to get the speed of data2ext and i just installed all my apps again so hopefully you found the fix....i'll post back with results
 
A

AspenTree

Guest
sigh....bootloops.........i'm going back to gingerbread.... :(

someday i wish someone could get app2sd removed so that i could have data2ext working on sense 2.1
 

unCoRrUpTeD

Senior Member
Mar 22, 2010
1,707
237
0
Fort Worth, TX
sigh....bootloops.........i'm going back to gingerbread.... :(

someday i wish someone could get app2sd removed so that i could have data2ext working on sense 2.1
I just downloaded and flashed liquidsense and then a2sd_removal.zip. Booted right up.
It does remove busybox.a2sd, but in all testing across several different phones that has not caused any problems as the regular busybox is still in the ROM. The copy_remove.zip was missing some code to mount data before copying over, but I changed that one as well.
 
A

AspenTree

Guest
unCoRrUpTeD A2SD BLASTER
&
DATA2EXT​

SETUP:
You will need your sdcard partitioned with at least 1 ext partition. Either you can do that through your recovery or go here to download a script that will repartition without loosing your fat32 contents.

If you are currently running a rom with a2sd of data2ext enabled you will need to reboot into recovery and flash a2sd-copy-and-blast.zip and then data2ext.zip

If you are doing a fresh install or running a rom with a2sd disabled or nonexistent then flash data2ext.zip

If setting this up after a fresh install you will need to reboot the phone after it has booted up. This is only done to speed up the first boot startup time. Once it is running you can do whatever you want, and on the next reboot it will set everything up.


A2SD-BLASTER
unCoRrUpTeD-a2sd-blaster.zip: Use this one to remove a2sd from the ROM if you are doing a fresh install or want to keep all data on your ext partition for data2ext

unCoRrUpTeD-a2sd-copy-and-blast.zip: Use this one if the ROM your are currently running is using a2sd. It will remove a2sd from it and copy all apps from the ext partition back onto your phone's /data partition.

OKay so is this the correct instructions:

- wipe everything
- partition sd card to have 512mb ext2 (that's what i always use for ext)
- flash fresh install of rom
- flash data2ext.zip
- then reboot into system?

or do i

- wipe everything
- partition sd card to have 512mb ext2 (that's what i always use for ext)
- flash fresh install of rom
- reboot into rom
- reboot recovery
- then flash data2ext.zip?

thanks for all they help you've given me :D
 

unCoRrUpTeD

Senior Member
Mar 22, 2010
1,707
237
0
Fort Worth, TX
OKay so is this the correct instructions:

- wipe everything
- partition sd card to have 512mb ext2 (that's what i always use for ext)
- flash fresh install of rom
- flash data2ext.zip
- then reboot into system?

or do i

- wipe everything
- partition sd card to have 512mb ext2 (that's what i always use for ext)
- flash fresh install of rom
- reboot into rom
- reboot recovery
- then flash data2ext.zip?

thanks for all they help you've given me :D
Updated OP.

Should be pretty clear now. :D
 

maxq1

Senior Member
May 28, 2010
541
175
0
With Sansa @Winterfell
before i dive into this, bro, some questions if you will:

  1. this moves everything in /data to sd-ext right? by everything, does this include even dalvik cache?
  2. if, for any reason, i decide or need to return everything back to internal storage i could simply flash a2sd-copy-and-blast right?
thanks in advance!

EDIT 1:
bootloop! htc legend on cm6.1 w/ darktremor a2sd; ext3 partition. restored everything to internal storage, flashed a2sd-blaster then data2ext-V1. after restart, bootloop :(..will try on ext2 partition later

EDIT 2:
bootloop also on ext2..was really hoping this mod will work on my phone
 
Last edited:

unCoRrUpTeD

Senior Member
Mar 22, 2010
1,707
237
0
Fort Worth, TX
before i dive into this, bro, some questions if you will:

  1. this moves everything in /data to sd-ext right? by everything, does this include even dalvik cache?
  2. if, for any reason, i decide or need to return everything back to internal storage i could simply flash a2sd-copy-and-blast right?
thanks in advance!

EDIT 1:
bootloop! htc legend on cm6.1 w/ darktremor a2sd; ext3 partition. restored everything to internal storage, flashed a2sd-blaster then data2ext-V1. after restart, bootloop :(..will try on ext2 partition later

EDIT 2:
bootloop also on ext2..was really hoping this mod will work on my phone
I'll look into it as this is also part of my dual-boot script that I am working on, which means that if this doesn't work on certain phones then the dual boot scripts won't work on all phones.
 
A

AspenTree

Guest
this didn't give me bootloops so you've completed that step
but this didn't work at all :(

here's what i did:

- partition sd card
- wipe everything
- fresh install NFX stock 2.31.651.7 oxed (without apps2sd)
- install data2ext.zip
- reboot into rom
- once i approached the initial lock screen, i did adb shell reboot
- then i signed into google
- let it sync and load
- then i check application storage and it said 136mb
- so then installed titanium backup from makret
- after install i checked internal storage
- it went down to 131mb!


summary: not only did internal storage not say like 4xxmb like it does when gingerbread uses data2ext w/ 512mb, internal storage didn't even say anything different than the stock amount of internal storage :(

also even if the interal storage didn't correctly say how much storage we had after installing 1 app i knew this zip didn't take affect b/c of the great lost in internal storage :(

again i testing on nfx stock 2.31.651.7 (without apps2sd and oxed) and this did not work :(

edit: after fresh install method i tried the method where the rom doesn't have apps2sd.....this still doesn't work :(
 
Last edited:
A

AspenTree

Guest
this would be awesome if i got this to work on my rom but it doesn't even work on my rom's base....:( and you haven't fixed yet....but i'll be checking up on this for fixes whenever you release a fix :D
 

unCoRrUpTeD

Senior Member
Mar 22, 2010
1,707
237
0
Fort Worth, TX
I might be able to get to it tomorrow. If not it will be Wednesday. Been hard at work on my dualboot script, which uses a very complicated method of determining how to set it up. I only need to make a couple changes to this and symlink everything differently. I'm going to download nfx's Rom without a2sd as I had been testing on his a2sd stock Rom.
Sent from my dual-booted liquidsense 2.1
 
A

AspenTree

Guest
I might be able to get to it tomorrow. If not it will be Wednesday. Been hard at work on my dualboot script, which uses a very complicated method of determining how to set it up. I only need to make a couple changes to this and symlink everything differently. I'm going to download nfx's Rom without a2sd as I had been testing on his a2sd stock Rom.
Sent from my dual-booted liquidsense 2.1
After talking with TGF about getting this to work with sense roms he said we need the correct e2fsck for sense 2.1 roms and also the libext2fs.so file for sense. Then we need to make sure busybox is intergrated into the ron by default. He couldn't help me get those files so the rest was left up to me but he did correct the script for sense roms though. Thought. I'd share that with you so that you could try and get this working for sense roms on the hero CDMA after you complete your dual boot mod. :)
 

[email protected]

Senior Member
Nov 6, 2010
65
0
0
Install on a ROM you are currently running that has a2sd or data2ext enabled:
1. Reboot into recovery
2. Flash a2sd-copy-and-blast.zip
3. Flash data2ext.zip
4. Reboot your phone

Install on a ROM you are currently running that does not have a2sd or data2ext enabled:
1. Reboot into recovery
2. Flash data2ext.zip
3. Reboot your phone

Install on a fresh intall of a rom:
(It doesn't matter if it has a2sd or not as this will remove all a2sd scripts if they are present)
1. Reboot into recovery
2, Wipe everything...

A2SD-BLASTER[/B]
unCoRrUpTeD-a2sd-blaster.zip: Use this one to remove a2sd from the ROM if you are doing a fresh install or want to keep...

unCoRrUpTeD-a2sd-copy-and-blast.zip: Use this one if the ROM your are currently running is using a2sd...
Sorry to sound noobish here, but I'm running AOSP 2.2.1 on my heroc. i have moved all my apps to internal using titanium backup (in preparation for this). i have formatted by sdcard using cwm 3.0.0.5, with a 512 MB partition and 0 (zero) swap. Now I want to flash your cool data2ext! Which one do I use?

Important note! I have already tried flashing GrammarFreak's data2ext (ext2 version), and for some reason it didn't take.

And just now when I go into terminal emulator,
Code:
su
and then
Code:
data2ext -- enable
I get the following: "data2ext already enabled but not active."

Does this mess things up terribly? Can I still flash your stuff?

Yours,
Jim
 
Last edited:

unCoRrUpTeD

Senior Member
Mar 22, 2010
1,707
237
0
Fort Worth, TX
Sorry to sound noobish here, but I'm running AOSP 2.2.1 on my heroc. i have moved all my apps to internal using titanium backup (in preparation for this). i have formatted by sdcard using cwm 3.0.0.5, with a 512 MB partition and 0 (zero) swap. Now I want to flash your cool data2ext! Which one do I use?

Important note! I have already tried flashing GrammarFreak's data2ext (ext2 version), and for some reason it didn't take.

And just now when I go into terminal emulator,
Code:
su
and then
Code:
data2ext -- enable
I get the following: "data2ext already enabled but not active."

Does this mess things up terribly? Can I still flash your stuff?

Yours,
Jim

I haven't changed what is here. It might work, might not. I tested on a couple of roms and it worked, but didn't work on others. Nandroid first. Flash a2sd-blaster.zip which removes any instance of a2sd and data2ext. Flash data2ext.zip.

Like I said I haven't changed it yet. Been working on my dualboot script. So it might work and might not.
 
  • Like
Reactions: [email protected]

[email protected]

Senior Member
Nov 6, 2010
65
0
0
I haven't changed what is here. It might work, might not. I tested on a couple of roms and it worked, but didn't work on others. Nandroid first. Flash a2sd-blaster.zip which removes any instance of a2sd and data2ext. Flash data2ext.zip.

Like I said I haven't changed it yet. Been working on my dualboot script. So it might work and might not.
That's completely cool. Thanks for taking the time to reply!
Yrs,
Jim
 

grifovunque

Senior Member
Nov 9, 2009
648
109
0
genova
...perfect...

very good apps.... i ' m very happy....
now i have used data2ext on new installation of rom and work perfectly on ideos with 1gb ext4....
it's a beautiful utility for adding space to internal memory...
excellent...
later i try with an already installed rom with a2sd....
thank you very much!!!!
:):eek:


update: i have a problem, apparently all work perfectly but when i active wifi the cell reboot :-(
 
Last edited:

zicoxx

Senior Member
Dec 26, 2010
285
234
73
update: i have a problem, apparently all work perfectly but when i active wifi the cell reboot :-(
same problem with wifi..
on my ideos script runs very very well but when i enabled wifi my phone reboot..sigh

i hope that's you can fix it..
however thanks,great script!
 

evilvoice

Senior Member
May 4, 2008
921
565
0
Conyers GA
Works semi-great on a heavily modded Sprint stock rom. Overall, it took a few reboots, but is working. I have 409mb available. The only issue I found is that AlarmDroid does not work. I tried moving it to system/app and still not loading...i may try moving it in the actual rom, reflash everything and see what happens. The offending apk is not your fault by any means, just listing what I came across. I flashed the zip after I used your sd partitioner. On first reboot after flash, phone was normal...read that you said it takes another reboot, so I performed another reboot. On 2nd reboot, the whole system FC (just about every app came up and FC), performed another reboot. On 3rd reboot, AlarmDroid complained - but everything seemed fine...did a few more reboots, but it looks like the 3rd is the magic number for my rom...I may include this in my personal rom (obviously removing duplicate files like bb

I have one request and that is to make it more like the other scripts and allow it to be enabled, or not enabled. I am not saying have an on/off switch as the scripting for that would be extremely complicated, but have an off until enabled on switch for those looking to throw this in a rom. It is possible to put this in a rom, but some may not want it enabled right off the bat (like me)...Could it be possible to have an enabler script that upon running would move files where they needed to go? Like for instance have the tmp folder, add a file called enabled2e (or something) that runs mountpoints.sh and moves /tmp/50data2ext to system/etc/init.d...I dunno, just spitballing
 

unCoRrUpTeD

Senior Member
Mar 22, 2010
1,707
237
0
Fort Worth, TX
Works semi-great on a heavily modded Sprint stock rom. Overall, it took a few reboots, but is working. I have 409mb available. The only issue I found is that AlarmDroid does not work. I tried moving it to system/app and still not loading...i may try moving it in the actual rom, reflash everything and see what happens. The offending apk is not your fault by any means, just listing what I came across. I flashed the zip after I used your sd partitioner. On first reboot after flash, phone was normal...read that you said it takes another reboot, so I performed another reboot. On 2nd reboot, the whole system FC (just about every app came up and FC), performed another reboot. On 3rd reboot, AlarmDroid complained - but everything seemed fine...did a few more reboots, but it looks like the 3rd is the magic number for my rom...I may include this in my personal rom (obviously removing duplicate files like bb

I have one request and that is to make it more like the other scripts and allow it to be enabled, or not enabled. I am not saying have an on/off switch as the scripting for that would be extremely complicated, but have an off until enabled on switch for those looking to throw this in a rom. It is possible to put this in a rom, but some may not want it enabled right off the bat (like me)...Could it be possible to have an enabler script that upon running would move files where they needed to go? Like for instance have the tmp folder, add a file called enabled2e (or something) that runs mountpoints.sh and moves /tmp/50data2ext to system/etc/init.d...I dunno, just spitballing
Creating a flag to enable or disable is pretty simple. Not sure if I put one in there. I'm not looking at it right now. All it needs is ...
Code:
if [ -f /data/.data2ext ];then
xxxx   -------
xxxx  /        
xxxx |           Existing commands
xxxx  \
xxxx   -------
else
# move everything back to /data
cp -a /xxx/xxxx/* /data
exit 0
I'm going to update this at one point with some checks and a different way to mount everything, which will reduce the overall script size and make it more compatible with more roms and phones. It's been a while since I looked at it , but I know that I include busybox in somethings as it has more functions than what is normally provided in the roms.