yashsingh1/xdaforums huggingface dataset:
[Desire Android Development] OpenMinded:
Does anyone know how to get this working with MUI ROM?

When I install the ROM , the sd-ext partition gets wiped.

Or should I install first and then do all this?

Can anyone also explain what is the difference with APP2SD(+)?

I noticed when I used Rom manager to partition 512 mb, I still got out of space of phone memory. I thought it would be on SD, like with this method?
[Desire Android Development] danarama:
Well all the commands you do you are changing how the Rom operates so it stands to reason you flash the Rom first

In regards to a2sd+, app cache is still on internal memory. With this sd is internal memory for all intents and purposes

--------------------

DeFroST FAQ... http://xdaforums.com/showpost.php?p=6622965&postcount=2
[Desire Android Development] OpenMinded:
Thank you for your explanation.

Do you know why with APP2SD+ setup when apps are moved to SD, the free memory does not become more empty?

I get the impression the apps are somehow not really moved to the SD.

Anyway, maybe a bit off topic.

Thanks for your help. I ordered 16 GB class 10, hope it will work on that :).
[Desire Android Development] hajen78:
I have data2sd, iinga help me do it. I was just thinking if i buy a 16gb sd-card, could i then make a backup with rom manager, and make a partition on the new sd-card an then restore to the phone and the new sd-card without flashing anything else ???
[Desire Android Development] danarama:
You would need to at least do the dd command to create the ext file first

--------------------

DeFroST FAQ... http://xdaforums.com/showpost.php?p=6622965&postcount=2
[Desire Android Development] danarama:
Sounds like a2sd+ wasn't working properly

--------------------

DeFroST FAQ... http://xdaforums.com/showpost.php?p=6622965&postcount=2
[Desire Android Development] bernabap:
Someone made the procedure to align the FATs partition?

I read the OP link to do that and I got some doubts, can someone help me?

My firts FAT32 partiion is like this:

mkfs.vfat 3.0.9 (31 Jan 2010)

/dev/sdc1 has 224 heads and 56 sectors per track,

logical sector size is 512,

using 0xf8 media descriptor, with 29603584 sectors;

file system has 2 32-bit FATs and 32 sectors per cluster.

FAT size is 7232 sectors, and provides 924659 clusters.

There are 32 reserved sectors.

Volume ID is d18dc5e0, volume label SD_Desire .

(Sector 256 x 512 bytes/sector = 128K (131,072 bytes)

So I did:

7,232 sector FAT x 2 FATs x 512 bytes/sector = 7,405,568 bytes

7,405,568 / 131072 = 56.5 erase block sized chunks

131,072 x 57 = 7,471,104 bytes in 57 erase blocks

7,471,104 - 7,405,568 = 65,536 bytes remainder

65,536 / 512 = 128 sectors remain

New reserved sector count for alignment = 128

#sudo mkfs.vfat -F 32 -R 128 -n SD_Desire -s 32 -v /dev/sdc1

mkfs.vfat 3.0.9 (31 Jan 2010)

/dev/sdc1 has 224 heads and 56 sectors per track,

logical sector size is 512,

using 0xf8 media descriptor, with 29603584 sectors;

file system has 2 32-bit FATs and 32 sectors per cluster.

FAT size is 7232 sectors, and provides 924656 clusters.

There are 128 reserved sectors.

Volume ID is 0f05a0a3, volume label SD_Desire.

I think my first FAT32 partition is aligned this way. Please correct me if I am wrong!

My doubt comes in the second partition, I also must align? If so how?

In the first partition I added 200 sectors to match the 256 sectors recommended. But the second partition starts after the last sector of first partition something close to 2332 ... Should I change the beginning of data to sectors too? Shoul I add 200 sector too?

Sorry for the noobs questions.

If anyone can help I will be grateful.

And thanks Sibere for the hack, very handy!
[Desire Android Development] iroironz:
Hey guys,

Running data2sd on teppic's pre-rooted ROM and everything is going greato. Anyways, just noticed something strange when I tried to use disk mode on my wife's macbook pro - it mounted both fat32 partitions. I.e. the normal fat32 partition but also the one I created for data2sd (with the single large ext2 file on there). Doesn't do that on my win7-64 machine.

My first thought was "that's not good". However checking in root explorer I still had access to (i.e. could traverse) /data (which is really the ext2 file mounted). So it seems even though her mac mounts 2nd fat32 partition the phone can still use the mounted ext2 file.

Anyone with a mac or linux machine notice this to? Think it's a prob?

I remembered teppic74's app2sd+ script (which I'm not using obviously) had another file 'fstabfix' file in there with the following:

Just wondering what this does and if it may fix/stop the 2nd partition from being mounted on mac/linux. I'm going to do a nandroid now and give it a go.

-------------------------

UPDATE

Okay, so indeed teppics' script does stop the 2nd partition from being mounted. Basically looks like it replaces "/mnt/sdcard auto" with "/mnt/sdcard 1" - which instructs it to only mount the first partition.

If you have s-off you could just edit /system/etc/vold.fstab and change auto to 1 - or else do what I did and just use the apps2sd+ script but removing the /system/etc/init.d/04apps2sd file (or whatever apps2sd script it puts in there).

Jay.
[Desire Android Development] Ignore.z:
I have problem with new Oxygen 1.0. After reboot data2sd disappear with all apps. How to fix that?
[Desire Android Development] noble8:
I put a patch together for oxygen 1.0. http://xdaforums.com/showpost.php?p=9592722&postcount=3031
[Desire Android Development] vivmar:
someone can help me with this command:

~ # /system/xbin/busybox mount -o loop /sd-ext/ext2 /sd

/system/xbin/busybox mount -o loop /sd-ext/ext2 /sd

mount: can't setup loop device: No space left on device

why i got this error?
[Desire Android Development] OpenMinded:
Finally got it working on MIUI rom!

Some things that can go wrong:

- Your SD card is messed up so you get some error mounting -> repartion or replace SD

- You have tried the trick before and do it again -> wipe leftovers in /sd (app, app-private) -> gave me crashed when I did not and after that hung my phone

Basically what I did was:

- flashed MIUI rom from a SD without ext partition (you need to or no boot after changes)

- boot phone and make sure it works

- create SD card with 2 FAT partitions

- follow OP instructions, use no swap

I have a 4 GB SD partitioned with 700 MB ext2 for system.

Works fast, no problems untill now
[Desire Android Development] OpenMinded:
just a question:

If I boot in Clockwork recovery, I suppose the 01data script is not run.

So if I update stuff in de /data dir there, this will go the 'old' place, right?

How would I arrange that it behaves like it should?

I tried the mount commands but something failed.
[Desire Android Development] mazeli:
ok i got through the tutorial on post 1 without problems but it didn't work. I have only 8 mb left in internal storage.

How can i determine if i have init.d support?
[Desire Android Development] ASD2003ru:
Right!

I try install LeeDroid, make Data2sd - all good. After install Theme from zip, and have problem.

For normal usage, request modify recovery. So wait guru for this.
[Desire Android Development] sibere:
You're right!

did you try this?

Recovery mode:

adb shell

cd /

mount /dev/block/mmcblk0p2 /sd-ext

/system/xbin/busybox mount -o loop,sync /sd-ext/ext2 /data

chown 1000.1000 /data

chmod 771 /data

Copy what you want to /data and then:

sync

/system/xbin/busybox umount /data
[Desire Android Development] OpenMinded:
Hi, thank you for your reply.

I think I missed at least part of that :).

Anyway, without doing all that properly (some mount error), i did this anyway:

http://androidforums.com/incredible...et-adfree-android-working-htc-incredible.html

Somehow that fixed my AdFree for Android problem, but maybe that is because it is no longer in the system dir?

Anyway, I will try it next time I need it.

Maybe these instructions can be added tot the OP?

I guess anyone using DATA2SD must do that before being able to slash a zip?

Thanks!
[Desire Android Development] ASD2003ru:
sibere

If I do this, I can set the theme from the zip?

adb shell

cd /

mount /dev/block/mmcblk0p2 /sd-ext

/system/xbin/busybox mount -o loop,sync /sd-ext/ext2 /data

chown 1000.1000 /data

chmod 771 /data

And then

sync

/system/xbin/busybox umount /data

???
[Desire Android Development] dipje:
question at the script author:

why the loopback hassle on this?

What is the bad-side of one just ext2 partition to mount /data on?

To make it more easy to create the partition from a dos prompt or something?

The regular /data is a yaffs2 system and afaik ext2 can do everything yaffs2 can.
[Desire Android Development] sasopu:
This is fu**** frustrating... a bunch of people already asked about the "mount: can't setup loop device: No space left on device" problem, I've been redoing the whole process over and over again, re adb pushing, re chmoding etc. for the last 4 hours.

And I can't find an answer to the problem in the entire thread.

I'm around 95% sure I'm gonna sell my desire right now...

So please, can someone help those of us, who got ""mount: can't setup loop device: No space left on device" problem?

thank you
[Desire Android Development] iinga:
Delete the 2nd fat32 then make it again. Follow the instructions by sibere or use my batch script in my sig. Then see if it still happens.
[Desire Android Development] sasopu:
I've deleted my entire SDcard, and repartitioned it, to make 2 new fat32 partitions again, and redone the process described in the first post.

I still get "mount: can't setup loop device: No space left on device"

Now I made a bigger fat32 partition (almost 1Gig) and I still get that error.

....
[Desire Android Development] danarama:
Try 1GB. Pretty sure if you're following steps in OP, your trying to create a 1GB file in a smaller space

--------------------

DeFroST FAQ... http://xdaforums.com/showpost.php?p=6622965&postcount=2
[Desire Android Development] iroironz:
What kernel are using (i.e. does it support loop?) . What rom are you using?
[Desire Android Development] sibere:
I never tried to flash something in recovery with data2SD activated.

With those commands, you should get sd ext2 mounted to /data (df or mount to check)

then do your update.zip flash

and the the rest (sync, umount)

should work.
[Desire Android Development] sibere:
I already answered this question in OP.

basically EXT2 over fat32 gave me more I/O, specially with small files (tested manually, not with quadrant)

But as stated in OP, you can use ext2/3/4 straight on you SD without the loop device. It's up to you and I have nothing against that :)

There is a few DATA2SD-EXT or DATA2EXT scripts around here. If you don't wanna use loop, go for it!
[Desire Android Development] sibere:
I have that script in /system/etc/install-recovery.sh to enable init.d

#!/system/bin/sh

# hook into the system startup sequence, /system/etc/install-recovery.sh

CM_FILESYSTEM_READY=$(getprop cm.filesystem.ready)

if [ "x$CM_FILESYSTEM_READY" = "x" ]; then
BUSYBOX=/system/xbin/busybox
if [ -x "$BUSYBOX" ]; then
SYSINITDIR=/system/etc/init.d
if [ -d "$SYSINITDIR" ]; then
log -t SysInit "Starting sysinit scripts from $SYSINITDIR"
/system/bin/logwrapper "$BUSYBOX" run-parts "$SYSINITDIR"
fi
else
log -p e -t SysInit "No $BUSYBOX found, skipping sysinit"
fi
else
log -p w -t SysInit 'sysinit is already completed, skipping'
fi

# EOF

it has chmod 777 and root.shell users
[Desire Android Development] Zeljko1234:
sibere, what's the different between your fat32 data2sd and ownhere's ext data2sd? Why did you prefer fat32? I'm running now ownhere and it's also fast as yours.
[Desire Android Development] sibere:
I'd say, no answer means... no answer. This question has been posted 10 times.

If you don't have loop support could be the reason.

Try DATA2EXT or DATA2SD-EXT instead. It's a bit different and doesn't need the loop device. The ext partition is formatted straight to ext2/3/4 and mounted on /data.
[Desire Android Development] sibere:
Did you read the comments in the OP?

You can also format your 2nd partition directly as ext2/3/4 and mount it over /data.

I tried myself but I experienced lower I/O that way, specially with small files.

Try and see what suits you better.

If you prefer the EXT2 partition, then you will have to change the 01data script to reflect that.

And I mean less I/O with sync ON and tested manually, not with quadrant!

It's up to you, I choose ext2 file in fat32 partition but I initially tried the other way (ext2 partition).

Did you get this I/O score with sync ON or OFF?

If you can't choose, flip a coin ;)
[Desire Android Development] sckc23:
sibere can i ask how different would a2sd and data2sd/data2ext do to the sd card? ppl were keep saying data2ext would stress the card a lot.. is it due to ext4 was needed?

thanks.
[Desire Android Development] sibere:
ext4 is NOT needed.

I use ext2 and I explain why in OP

I quote myself again:

If you prefer journaling, use EXT4, EXT3 is slower.

With ext3/4 you'll get journaling, so it'll be safer. However that could add more wear to your SD.

With ext2, the file system is faster, less wear, but less safe because the partition is probably not unmounted nicely by the system and you don't have journaling. The partition could become corrupted after a while. I'm living on the edge so I personally choose ext2 with a e2fsck on boot. Maybe ext4 later. If you want to run a check manually, login with adb and run "e2fsck_recvy -p -v -f /mnt/asec/ext/ext2".

EDIT: After a few reboots of my phone, no issues with EXT2. I run an e2fsck at boot time before mounting the ext2 file and the log always returns "clean" so far. This could be because android is unmounting /data and by doing so, unmounting nicely the ext2 partition. I recommend ext2 then

I prefer killing my SD than the NAND anyway :D
[Desire Android Development] sckc23:
Cool thanks for the explanation=)

didn't understand all but sort of get the idea of it. i'm using ext2 atm, will try ext4 to see if theres any difference.
[Desire Android Development] sibere:
And if you "kill" the SD, it'll be only the 2nd partition. If you have a backup (and I'm sure you do), just buy a new SD, make 2 partitions, copy all you /sdcard/ (1st partition) data from you "dead" SD to the 1st partition of you new SD and do a recovery restore :)
[Desire Android Development] Zeljko1234:
I did but I forget, sorry :(

I don't know. Actually I flashed rom on airport waiting for connection flight :D
[Desire Android Development] sckc23:
i'm gonna do backups more regularly from now on lol

one more question, does a2sd 'kill' the sd slower than data2sd?
[Desire Android Development] sibere:
I don't really know because I never used it.

But I'd say that data2sd is writing more often because some apps write stuff like databases, etc, to /data. Ap2sd only writes apps. You can't win everywhere ;)

With data2sd you have much more space, more speed, but more SD wear ...
[Desire Android Development] sckc23:
Nice thanks again for clarifying for me:)
[Desire Android Development] jonloveslou:
I would recheck the commands you are typing, type them again from scratch (in case you are using cmd's command history).

I received this error when I typed 'dd if=/dev/zero of=/sd-ext/ext bs=1048576' instead of 'dd if=/dev/zero of=/sd-ext/ext2 bs=1048576'.

Kinda hard to see the difference!

Failing that, I would expect it is as sibere suggested - lack of loop support in your kernel.

Or perhaps you haven't correctly partitioned your card?

I used this tool: http://www.partition-tool.com/personal.htm

Looks cheap and nasty but hey, it worked a charm. Fat32 2GB (SD_CARD), Fat32 2GB (DATA).
[Desire Android Development] sasopu:
I dled ubuntu and made a pendrive just to be able to do the gparted repartitioning. I've also repartitioned several times. I did not use cmd's command history, because I got pissed and unpluged my PC more than once. After I cooled down, I had to rewrite the commands :-)

I just got home from school, now I'll try with a 2gb+2gb partitions, if having my secondary FAT32 partiton smaller than 1gb may have been the cause or the error. I believe that bs=1048576 doesn't mean my second FAT 32 partition needs to be greater than 1048Mb, but I could've been wrong :-)

I've tried manual commands about 4 times anew on CM 6.1 RC and the batch command found in iinga's sig right after updating to CM 6.1, as instructed. None of the methods worked.

I don't know weather CM has loop support.

The recovery I am using is Clockworkmod 2.5.0.7

I'll retry and report. The only thing keeping me going is the desire to have countless apps instaled. :-)
[Desire Android Development] danarama:
Cm should have loop support since defrost does

--------------------

DeFroST FAQ... http://xdaforums.com/showpost.php?p=6622965&postcount=2
[Desire Android Development] sasopu:
Just did the whole process all over again, this time copy/pasting commands to cmd after making a 2gb fat32 partition. No errors whatsoever, until the mount -o loop part... That's where things went south. Again.

This time, i found this:

-o OPT:

loop Ignored (loop devices are autodetected)

how can i use an ignored command? :P
[Desire Android Development] EViollet:
Did you push the latest busybox version?
[Desire Android Development] sasopu:
I did. Several times. :D
[Desire Android Development] sasopu:
Started from scratch again, this time partitioned my SD with EASUS as suggested

by jonloveslou. Nothing changed...

aborting.
[Desire Android Development] sibere:
Format your 2nd partiton directly to ext2/3/4 and use data2ext / data2sd-ext instead. Should work this time :)
[Desire Android Development] sasopu:
I can not believe my eyes!! Here's what I did:

I left the adb at the loop error. Booted into android, loop mounted /dev/block/mmcblk0p2 first to /sd-ext, loop mounted /sd-ext/ext2 to /sdcard and cp -a * the whole /data dir into the ext2. I then loopmounted the ext2 onto the original /data. Guess what I got, 900megs of internal storage!!! wiiiii :-D

But i did get a lot of force closes until I unmounted /sdcard, since then, not a single one :-)

Now i just have to figure out why my adb didn't create the /sd dir, so i could loop mount to it the ext2... and because I couldn't create the /sd, due to read-only, i did as i did. A **** load of loop mounts :-)

Since I havent't got a clue what I just did, I'd like to know if this is considered data2sd or is it data2ext, because of the multiple loops or something. Or was the ext2 supposed to be mounted to /data? I figure it was meant to be mounted to /sd, but I don't know how having sth in /sd could affect internal storage.

God I love the look of 900megs of internal storage :-)

I have to get up for class in about 5 hours, but there's no way I could possibly sleep without dling just about everything from the market :-P

Now i just have to figure out how to get my real sd card mounted without FCs... :-)
[Desire Android Development] qbus00:
Hello,

Guys I bought CLASS10 card for this hack to work. Yesterda day I setup whole stuff, but after phone start it was so laggy that I can't do anything. So I ask you - do you have any performance loose in UI after applying this fix or is this my card (random access issue)?
[Desire Android Development] bluelavender:
Sibere, your script really revolutionize the desire development world. Now I see more & more Roms using your or variant of your scripts :)
[Desire Android Development] CreaB:
sorry if already asked, but can somebody tell me the difference between data2ext and data2sd

im running a well workin data2sd on auraxt sense 8.0 and neo announced aurax 8.1.1 with data2ext. so i i want to update my rom, is need data2ext so far. should i change the data2sd script to data2ext, if yes, is there a fast smart trick?

thanks in advance =)
[Desire Android Development] danarama:
I have a class 4 card and I don't get any lag. further more, my quadrant scores are increased to 2500+ (overclocked) due to increased I/O.

Where did you get the card? Are you 100% sure its genuine?
[Desire Android Development] qbus00:
I bought it on ebay from Taiwan. I can see that card is very fast when copying files (when writing I get 15-17 mb/sec)... I also tried my old CLASS4 card but had the same problems (laggy UI) however not as much laggy as on this CLASS10...
[Desire Android Development] danarama:
Have you fully tested with H2testw?

Do you keep "Sync" in the 01data script? If so try removing to see if it is any better.
[Desire Android Development] GuestK00150:
Hey!

I like the idea behind data2ext very much, but since using it I´m experiencing a way higher battery drain. Anyone having the same problem? If yes, what can I do about it?!

THX in advance
[Desire Android Development] bluelavender:
Class 10 is supposed to be fast.. blinding fast. I am using class 4 and it works very well.

I am of same opinion with danfrance. Are you sure it is genuine ?
[Desire Android Development] EViollet:
+1.

I have a Class 2 32Gb SanDisk and I find it much less laggy than before. My phone is now on steroids... :D
[Desire Android Development] qbus00:
I cannot be 100% sure that it's genuine.

I bought that card on this auction:

http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=290499233372&ssPageName=STRK:MEWNX:IT

As I wrote in my card reader it is indeed extremally fast...

I suspect that the problem could be in my ROM (modified Modaco R9 ROM) or kernel (I'm using this one: Ziggy471Kernel-BRAVO-update_signed-11142010-0855).
[Desire Android Development] danarama:
Does R9 have the SDcard Speed fix implemented within the kernel? I would expect so but can't guarantee
[Desire Android Development] qbus00:
No, R9 does not SDCard Speed fix implemented. However as I wrote I installed Ziggy's kernel and this one has it inside ;).

BTW - This is screenshot from my H2testw run:

http://twitpic.com/3dpyxo

No problems at all... I will try to install other rom tonight and see what will happend ;).
[Desire Android Development] sibere:
Thanks mate :D

Just noticed that many rom cookers forget to mention that they got the idea from this thread tho :)
[Desire Android Development] sibere:
DATA2SD uses FAT32 with a file as ext2/3/4 file system mounted with a loop device.

DATA2EXT formats the 2nd partition straight to ext2/3/4 and doesn't use loop.

Even though I had same quadrant score with both, I also had better I/O performances with small files with data2sd. Both are very similar, so chose whatever suits you :)
[Desire Android Development] sibere:
2500+? Wow this must be with sync off right?
[Desire Android Development] sibere:
You don't really need a kernel support.

If your kernel doesn't have the mod, you can tune it manually.

check first with this command with android running:

adb shell

cat /sys/devices/virtual/bdi/179:0/read_ahead_kb

if it returns 4, you don't have the mod

to tweak type this:

echo 128 > /sys/devices/virtual/bdi/179:0/read_ahead_kb

then check again with:

cat /sys/devices/virtual/bdi/179:0/read_ahead_kb

If it returns 128, you know have the mod :D

To get it on each boot, add a script in init.d with the "echo ...." in it or add this line to my script :)
[Desire Android Development] qbus00:
I assume that having this mod is recommended for DATA2SD (or at least have no negative impact)?
[Desire Android Development] sibere:
It is recommended even if you don't have DATA2SD :)
[Desire Android Development] danarama:
Oh yeah plus Vork Kernel clocked @ 1152 on defrost 6.0k

Now I'm on 6.1, with a HAVS clocked 1113 and still getting 2400+

:)
[Desire Android Development] mayurh:
hi there

this data2sd sounds good

but no one has yet said if i'l still able to use my phones sd in disk drive mode to transfer stuff? and will it cause any problem?
[Desire Android Development] sibere:
It has been said, and there's no problem at using you sd in disk drive mode.
[Desire Android Development] mayurh:
thanks alot
[Desire Android Development] CreaB:
if i wanna switch to data2ext from data2sd is there a need to do all the steps again, or is it done with for example repartitioning the 2nd partion, use the script and copy over the data-, app-, etc folders?

thanks in advance! =)
[Desire Android Development] sibere:
Why not asking data2ext developers? ;)