yashsingh1/xdaforums huggingface dataset:
[Legend Android Development] h4kudoshi:
yes because it will give you an error if you mis input the command.

ok so i am now having new issues. i am using the aospcm7 mod for the hero and apps will not restore upon a fresh install. i have tried it so many ways and the apps will only resync if data2ext is not enabled. here is my process

complete wipe (factory data/cache/boot/etc.........)

flash rom

flash data2ext

reboot

enable data2ext

recovery

flash gapps

reboot

sign in

*nothing*

also i have tried:

complete wipe (factory data/cache/boot/etc.........)

flashing rom and gapps

reboot

skip account setup

reboot

flash data2ext

reboot

enable airplane mode

enable data2ext

reboot

sign in

*nothing*

the list goes on and on the ways i have tried it.

any insights appreciated!
[Legend Android Development] fabi280:
As always - post logcat's of the startup after you enabled data2ext
[Legend Android Development] Takenover83:
For rom's without e2fsck (pretty much all of the Optimus V 2.2.1 Froyo roms). This is not working. What is the correct way of adding this binary? I pulled it from another rom dump I had and copied it to the correct directory(system/bin), but just ran into another error (running e2fsck = "CANNOT LINK EXUCUTABLE".)
[Legend Android Development] BlaY0:
You need either statically linked e2fsck or dynamically linked one + shared libs. You obviously got the later one withou shared libs. Check for libs (libext2*.so) in /system/lib and put them into the same dir in your rom.

Sent from my HTC Legend
[Legend Android Development] bubu12345:
I assume you use cwm recovery. Did you wipe the dalvik-cache? Per my experience if you wipe dalvik-cache it will wipe your sd-ext partition and remove all of your installed apks in that partition. So don't do if you want to keep the apk. I could be wrong but it seems the dalvik-cache is in cache partition now, so clean cache effectively clean your dalvik as well. Please correct me if I am wrong as I am new to this as well.
[Legend Android Development] BlaY0:
99% of your post is wrong.

Sent from my HTC Legend
[Legend Android Development] bubu12345:
Good to know. It will be helpful if you can explain and correct it because if I clear dalvik-cache all my apps are gone.
[Legend Android Development] wm542971618:
thankyou ~~~
[Legend Android Development] jawz101:
GrammerFreak- curious why you set read_ahead_kb to 128. I've seen a lot of posts saying 4096 is an optimal value
[Legend Android Development] BlaY0:
Did any of them explain why 4 MB is suppose to be optimal? I guess not. For instance 4MB is a lot of preloading for a few kB big DB. Also over the time data is actually scattered all over the partition and 4 MB readahead does a whole lot of unnecessary IO because of that.

But it may help in some cases... for instance app2sd where only apk and dalvik files are on SD.

Sent from my HTC Legend
[Legend Android Development] SKAm69:
Guys, can anyone help? I'm using data2ext with a 520mb ext3 partition. Apks install on the ext partition, but app data goes to internal storage data partition and it gets full frequently. If that happens, some certain apps will just dissappear, and some won't install properly. I wonder if there's a way to make app data go to ext partition instead of internal data one.
[Legend Android Development] Sui77:
data2ext2

Used another CWM 3.0.1.3 and created 1024MB/0MB/0MB

Hope that was the right choice for EXT2

Now i am stucked: mmcblk0p2 is in use

I tried to umount, but without success.

Any advice for me?

PS: I am not a pro ;)
[Legend Android Development] TheGrammarFreak:
Edit the script to no symlink /data/data back to internal memory, then start over. Backup with titanium backup, perform a full data wipe, re-install the data2ext script (replacing the script with your edited version) then restore the titanium backup. I know it's long winded, sorry.

A nandroid backup will backup and restore sd-ext po problem. To change SD card perform a nandroid backup, then wipe data and disable data2ext. Replace the SD card with your old one, and remember to copy your nandroid across. Partition your new card and then restore your nandroid.

Another option would be to boot into a linux distro, and plug the SD card into your PC using an adapter (not the phone). The PC will mount the EXT partition as a removable drive. Copy the contents onto your PC (make sure you copy it onto a linux filesystem) then put your new SD card into the PC, partition it using GParted (or similar) then copy the files to the EXT partition on your new card. IF you don't own an adapter you could do the above using ADB, but the EXT partition NEEDS to be copied onto a linux filesystem
[Legend Android Development] Sui77:
@TheGrammarFreak

Thanks for your reply.

However, i am stuck (edited my post above).

mmcblk0p2 and i am not able to umount it :(
[Legend Android Development] TheGrammarFreak:
Damn you and your edits! Lol

Why do you want to unmount it? If you really want to the command is

umount /data

I would strongly recommend not doing this to a running system though. To make myself more clear:

Don't do it!
[Legend Android Development] Sui77:
Sorry for messing you up ;)

I am a noob and don't want to bother you with basics, so i updated my post according to my progress :D

However, i tried to follow the steps in your post #1

After flashing the zip, i tried to do the commands in the terminal window of the phone -> mke2fs -m0 -b4096 /dev/block/mmcblk0p2

But it is mounted, so i have no access.

Damn, i feel so stupid
[Legend Android Development] TheGrammarFreak:
So data2ext isn't running?

Issue "mount|egrep ext" and if it returns anything issue "umount /sdext" and if it doesn't return anything then something else is the problem
[Legend Android Development] Sui77:
export PATH=/data/local/bin:$PATH

$ export PATH=/data/local/bin:$PATH

$su

#mount|egrep ext

/dev/block/mmcblk0p2 on /data type ext2 (rw,nosuid,nodev,noatime,nodiratime,errors=continue)

/dev/block/dm-0 on /mnt/asec/nextapp.systempanel-1 type vfat (ro,dirsync,nosuid,nodev,relatime,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)

/dev/block/dm-9 on /mnt/asec/com.handcent.lang.nextsms.de-1 type vfat (ro,dirsync,nosuid,nodev,relatime,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)

/dev/block/dm-25 on /mnt/asec/com.handcent.nextsms-2 type vfat (ro,dirsync,nosuid,nodev,relatime,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)

#

I made a ext2 with 1024mb via clockworkmod and flashed your file #1

Then i wanted to use the Terminal window of the phone to type in your 2 commands.

export PATH=/data/local/bin:$PATH

$ export PATH=/data/local/bin:$PATH

$su

# mke2fs -m0 -b4096 /dev/block/mmcblk0p2

mke2fs 1.41.10 (10-Feb-2009)

/dev/block/mmcblk0p2 is apparently in use by the system; will not make a filesystem here!

# data2ext --enable

Data2EXT is already enabled and active...

#

I think i have done it! Internal memory appr. 1GB

But Quadrant is still appr. 1000
[Legend Android Development] TheGrammarFreak:
Looks to me like data2ext is working, am I missing something?
[Legend Android Development] BlaY0:
Hmm, if log says there's something "not found", then I guess you are missing something aren't you?
[Legend Android Development] TheGrammarFreak:
Update, check OP. Cheers BlaY0

@maxq1

Get rid of DT, it mounts the ext partition elsewhere, which screws things over.
[Legend Android Development] HpX:
Works like a charm for CM 6.1 :) Good work mate!!!!!
[Legend Android Development] TheLegendaryJay:
Will give this a try tomorrow I think :) It's too late on a work night to be geeking out. Again. Even geeks need sleep!
[Legend Android Development] dju:
works well with CM7 , thanks
[Legend Android Development] Iainoco:
Working good for me too on CM7.0. My Legend is working better than ever.

Thanks for all the hardwork guys.
[Legend Android Development] TheGrammarFreak:
OP updated. I'd consider this fairly stable. Nandroid before you try. (Same zip, but it seems to be working for a lot of people.)
[Legend Android Development] BlaY0:
The script itself is now rock solid but solution is still unstable. EXT2 is fast but may cause you some problems if you don't unmount it properly. Even auto check (e2fsck) may fail if your phone experienced power failure. Power failure here means anything else than shutdown using power button!

I'm working on a more robust solution using EXT4 but it is still in test phase.
[Legend Android Development] TheGrammarFreak:
EXT4 is sloow in comparison. ~1040 in quadrant in my testing... Lol, it does seem safer though. Fun times...
[Legend Android Development] BlaY0:
With right mount options and tunables it can be nearly as fast as EXT2 ;)

But than again let's put aside Quadrant scores and concentrate on real life expirience.
[Legend Android Development] TheGrammarFreak:
Indeed, it feels just as fast. What mount options are you using?
[Legend Android Development] dju:
just a little question

after a working data2ext

if i would like flash a new rom version on my nexus, what the best procedure to keep all previosly installed apps ?

perhaps :

data2ext --disable

reboot

flash new rom

flash new gapps

flash data2ext-CM-testX-ish.zip

reboot

data2ext --enable

reboot

?
[Legend Android Development] TheGrammarFreak:
On a Nexus?!

Hmm... The more I think about it, the more I think you don't even need to do data2ext --disable. As long as you don't wipe you should be able to do this:

nand backup

flash ROM

flash data2ext

reboot

Ye. Nand backup and be prepared to restore. But if you don't wipe anything it should just work, as long as you flash data2ext ;)
[Legend Android Development] curto:
ok i have some questions. first off, i have darktremor a2sd installed.. should i just put a fresh copy of cm on? or is there some way or installing it and still having data2ext still working fine?

also, i understand all the steps for installation except "Make sure the second partition on your SD card is ext2, with a 4Kb block size (mke2fs -m0 -b4096 /dev/block/mmcblk0p2)"

i only know how to make a partition following darktremors instructions where you gotta go into recovery, select a size, select a swap size and then the type of partition ie ext2/3/4

so uh, if you guys have explained this in the last 4 pages and ive missed it then um, sorry lol link to the explanation? if not yeah a fresh explanation would be sick as or link somewhere else or otherwise or yeah whatever floats your boat.

cheers

oh and my current partition is 512mb with ext3 so im guess i defiantly need to make a new one huh?
[Legend Android Development] BlaY0:
No, partition itself is prolly OK, you just have to format it the right way. Check partitioning guide in General board.

Sent from my HTC Legend
[Legend Android Development] curto:
ok i think its working as apparently i have 800mb+ available internal space :D thanks guys!!
[Legend Android Development] greenolive:
How did you overcome the compatibility issues with dark tremor and this mod?
[Legend Android Development] BlaY0:
By disabling DT.
[Legend Android Development] curto:
uhh yeah well i dont think it was actually working when i was on cm6 and no i didnt do anything to DT so it prolly wasnt disabled. anyways i was trying the data2ext last night on a fresh cm7 and its completely unusable. nearly everything i do results in a freeze and then a force close/wait option and usually whatever im doing eventually starts working after a while, but yeah utterly unusable. im gonna try it on a fresh cm6 but i might try partitioning again, maybe i didnt do something correctly. ill let you guys know what happens

EDIT: ok its working now with a fresh copy of cm6, cheers
[Legend Android Development] Sui77:
Seems to be.

But two thinks are strange:

You mentioned, that there it will take some time copying the data annd also a quadrant score appr. 1600

I am at 806Mhz with 7.0.3 but only reach 1000pts, in fact no increase

The app "system panel" shows me 90mb free, but the system itself shows 910Mb free
[Legend Android Development] TheGrammarFreak:
Latest version doesn't affect quadrant
[Legend Android Development] Sui77:
Perfekt....good n8 :rolleyes:
[Legend Android Development] amoskas:
Nice, I'll try it out with the next stable CM7
[Legend Android Development] Sui77:
Damn

It does not work for me :(

When i type in "data2ext --enable" i get back "data2ext is already enabled and active..."

However, the app SystemApp shows only the default memory size and also the CM7 system info.

Seems not to work on my legend :/
[Legend Android Development] TheGrammarFreak:
df -h

And

mount

plox. Chrz ;)
[Legend Android Development] fabi280:
EDIT: I was too late, do what TheGrammarFreak says! He knows better.

Sui77: Connect your phone to your computer. I hope you got adb installed, you need it.

[WindowsKey]+[R] -> cmd [Enter]

adb reboot

adb logcat

Wait a bit until your Legend goes to the Boot Animation, then there should be output.

After about 3 seconds you can [CTRL]+[C]

Now you have to search and look for this line if you have data2ext4

--START OF SCRIPT, PASTE LOGCAT FROM HERE ON!--

or if you have data2ext2

Initiating Data2EXT...

Copy the text till

I DON'T NEED ANY MORE OF THE LOGCAT! (ext4)

or

Data2EXT enabled... (ext2)

And paste it here.

Most time there will be something like this in front:

I//system/xbin/run-parts( 72):

As an alternative solution you could do instead of adb logcat this

adb logcat >> out.txt

After 2 seconds in the Startup Spinner you can press CTRL+C.

You can attach the File and we have to look for those lines then. Dont be lazy, try to do it on your own.
[Legend Android Development] Sui77:
@TheGrammarFreak:

Made your steps and got a looong log.

Maybe too long to paste it here?

@fabi280

Thanks for your backup :)

I will do so, but i have to quit for this night.

Will be back with the logs tomorrow ;)

A man has to do what a man has to do :D
[Legend Android Development] TheGrammarFreak:
Oh hell no, do what fabi says, that'd help too. And I hardly know better

Pastebin. To make it shorter issue "mount egrep|data" instead of "mount"
[Legend Android Development] Sui77:
Ok, i have done TGF steps.

Should i post the Log here?

It is long :(
[Legend Android Development] fabi280:
Go to

http://pastebin.com/

and post it there.

Then just put the Link into a new reply.
[Legend Android Development] Sui77:
Here we go:

http://pastebin.com/zeSQDPUN

However, i will be back tomorrow.

Was already kind of dead at work today :o
[Legend Android Development] TheGrammarFreak:
You have more apps than is reasonable ;) It's working, maybe the flag I used to tell the system it's working has failed; but trust me, it's working
[Legend Android Development] SKAm69:
I'm sorry for such a noob question, but can you please tell me how to do that? (edit script)
[Legend Android Development] TheGrammarFreak:
I'll write a short guide later today, if someone doesn't beat me to it. I gotta go to work now though
[Legend Android Development] TheGrammarFreak:
While I hate to double post, this way I should get your attention.

On a Windows box you'll need to download and install Notepad++. On Linux the default text editor is fine.

Open up the file in your text editor, then look for this line:

cp -a `ls -A|egrep -v '^misc$|^system$|^property$|^local$|^lost\+found$|^data$'` /data/

It's near the bottom. Remove the "^data$" from the end, then save the file. Copy it into the data2ext.zip you downloaded it (in the zip it needs to go in /system/etc/init.d, overwrite the old version). Once done, start over. Titanium backup, disable data2ext then wipe the ext partition. While in recovery issue

rm -f /data/.data2ext

. Then flash your modified zip and boot up. Enable data2ext, reboot then use titanium to restore your apps
[Legend Android Development] SKAm69:
Thank you very much for your help, it seems to work fine now. Just one more question: is it possible to modify the script to work with GB Sense roms, for example Salsa port? http://xdaforums.com/showthread.php?t=1080680

They've managed to implement app2ext function already. I tried your script with that rom but it didn't work.
[Legend Android Development] TheGrammarFreak:
In the OP there are instructions on debugging the script. I have no time for flashing ROMs to my phone just to test a script I don't use any more ;)

Logcat the boot process according to the OP, post the results here and I'll try to help you get it to work. Fair?
[Legend Android Development] J0s3f:
Any idea what is wrong here?

It only shows me very very few apps after aROM update, but they seem to be in data...

Logcat: http://pastebin.com/xfwGKajD

df: http://pastebin.com/wtLtVt9E

mount: http://pastebin.com/gLvVQPAp

my /etc/init.d: http://pastebin.com/eE5Vv98q
[Legend Android Development] TheGrammarFreak:
How strange... the logcat you posted seems to be missing the bit I need to see, did you perform the logcat during boot? Also, how have you used ~360MB with apps?
[Legend Android Development] J0s3f:
Yeah I know... I did the logcat just after boot, while the phone was asking for my PIN.

And I have a lot of apps...
[Legend Android Development] J0s3f:
If I don't use your apps2ext4 script, my apps are there but there is not enouhg internal space because not everything is moved to ext :(

Here is the default script:

cat /etc/init.d/05mountsd
#!/system/bin/sh
#
# mount ext partition from sd card

BB="logwrapper busybox";

if [ "$SD_EXT_DIRECTORY" = "" ];
then
SD_EXT_DIRECTORY=/sd-ext;
fi;

# find SD Card
for MMC_NUM in `seq 0 9`;
do
MMC_TYPE=`cat /sys/block/mmcblk$MMC_NUM/device/type`
if [ "$MMC_TYPE" = "SD" ];
then
# 2nd partition of sdcard should be the sd-ext if exist
SD_EXT_PART=/dev/block/mmcblk${MMC_NUM}p2
break
fi
done

if [ -b "$SD_EXT_PART" ];
then
log -p i -t mountsd "Checking filesystems..";

# fsck the sdcard filesystem first
if [ -x `which e2fsck` ];
then
e2fsck -y $SD_EXT_PART
e2fsk_exitcode=$?
else
echo "executable e2fsck not found, assuming no filesystem errors"
e2fsk_exitcode=0
fi

# set property with exit code in case an error occurs
setprop cm.e2fsck.errors $e2fsk_exitcode;
if [ "$e2fsk_exitcode" -lt 2 ];
then
# mount and set perms
$BB mount -o noatime,nodiratime,barrier=1 -t ext3 $SD_EXT_PART $SD_EXT_DIRECTORY;
if [ "$?" = 0 ];
then
$BB chown 1000:1000 $SD_EXT_DIRECTORY;
$BB chmod 771 $SD_EXT_DIRECTORY;
log -p i -t mountsd "$SD_EXT_DIRECTORY successfully mounted";
else
log -p e -t mountsd "Unable to mount filesystem for $SD_EXT_DIRECTORY!";
fi
else
log -p e -t mountsd "Unable to repair filesystem, disabling apps2sd";
fi
fi
[Legend Android Development] basketthis:
Having trouble getting data2ext to work... Links2SD works just fine...

http://pastebin.com/qEbG1G0e

Can anyone help me out with my pastebin posted above?
[Legend Android Development] basketthis:
Anybody? I'm really lost here...
[Legend Android Development] TheGrammarFreak:
Looks like to me like a syntax error in the script you're using. Did you edit it?
[Legend Android Development] basketthis:
Thank you for the reply! The only thing I tried to edit was the 'data$' part that was described on pg 40. I will download the file again and try fresh and post another logcat if issues arise.
[Legend Android Development] TheGrammarFreak:
2 zips are attached, one for ext4 and one for ext2, both with the required edit. Be sure to compare these to your version to see where things went wrong ;)

These zips are unsigned
[Legend Android Development] basketthis:
Got this now:

http://pastebin.com/f80dYVWU

Gonna try from a fresh install...

Does it make a difference that my ext partition is called "SDEXT" by my recovery/kernel?
[Legend Android Development] basketthis:
This now:

http://pastebin.com/jvxaqPCX

After fresh wipe and following the instructions on first page using the zip included on the most recent response to my question. Please help :confused::confused:
[Legend Android Development] TheGrammarFreak:
What phone, what rom?
[Legend Android Development] basketthis:
LG optimus s. Reborn ROM. Xionia Kernel (which supports ext2, ext3, and ext4)
[Legend Android Development] TheGrammarFreak:
e2fsck isn't included in the rom, contact the developer.
[Legend Android Development] basketthis:
Thank you. Is there a way for me to add it without having to bother them? Something I can flash?

Maybe helpful, maybe not:

When I'm typing the adb commands it doesn't return any errors.... I'm talking of the commands listed on the first page. I can remember the tune commands return a version number. I can't remember exactly what the e2 command returned.
[Legend Android Development] TheGrammarFreak:
Call e2fsck while the phone is running, what happens?
[Legend Android Development] basketthis:
lol. e2fsck: not found

something i can install on my own? i can pack a flashable zip, and am doing a quick search on google but would like to hear from you what you think ;)
[Legend Android Development] TheGrammarFreak:
Find busybox installer on the market. Use it.
[Legend Android Development] basketthis:
Installed and ran e2fsck again with same results... :o
[Legend Android Development] basketthis:
So embarrassed

My results when typing commands from first page in recovery mode:

http://pastebin.com/Hsb1WS7P

When phone is booted, e2fsck returns nothing though...

EDIT: Newest logcat after issuing data2ext --enable and rebooting:

http://pastebin.com/CFL6593C
[Legend Android Development] TheGrammarFreak:
Hmm... I have an exam tomorrow, I'm gonna sleep. I'll have a think tomorrow.

Sorry
[Legend Android Development] basketthis:
I tried both busybox apps available and different versions of busybox and still have come up with no results...
[Legend Android Development] TheGrammarFreak:
I'm a bit stumped really. It's beyond the scope of what I currently know, and I still think that this issue is best raised in the ROM's thread :o
[Legend Android Development] frostrunner:
Ok ive ran into a problem and cant seem to troubleshoot my way out of it.

Ive used your data2ext4 v4 before and used it just fine with my cdma hero running CM7.0.2

No problems there. But i recently decided to start over and update to 7.0.3. So i factory wiped, wiped dalvik, wiped cache, wiped everything.

Flashed CM7 7.0.3 and gApps then your data2ext zip.

Followed instructions down to the dot on terminal emulator. i reinstall all my apps via titanium then i try and open my apps and i get booted back to home screen. doing a reinstall of the app fixes it till i reboot the phone.

So my problem is just that. When i check my storage it looks all fine, but when i open my apps they all seem to not work.

Any ideas?
[Legend Android Development] frostrunner:
Is there any way to check if your data2ext is running correctly? cause under settings > storage it looks like it is, just when i reset my phone all my apps no longer work.
[Legend Android Development] waterpolo:
Run logcat during reboot.

See if data2ext is running.
[Legend Android Development] skygunner:
Thanks, works well on the Cyanogenmod for ZTE V9 tab.

One question: what's the right steps to flash new CyanogenMod build if I have this enabled?

disable it, flash new build? need to flash this .zip again after flash new build?

Do I have to disable it first before flash new build? Thanks.
[Legend Android Development] YouArePoop:
Not sure if its the right method, but I disable, flash rom, flash data2extra, enable. Works fine, but breaks widgets. Have to remove and re-add.
[Legend Android Development] jjsan:
working

its working like a charm.

only problem for me was finding out that data2ext --enable has to be executed after booting the phone so maybe it will be good to write in first post (because mke2fs -m0 -b4096 /dev/block/mmcblk0p2 can be executed still in recovery mode)

but still many thanks
[Legend Android Development] eracet:
Works good thanks
[Legend Android Development] TheGrammarFreak:
Nice edit dude ;)