yashsingh1/xdaforums huggingface dataset:
[Desire Android Development] Droidzone:
@Sibere,

A few more debug notes

These dont seem to work all at once.

I need to do it as:

adb shell

chmod 755 /system/bin/e2fsck_recvy

chown 0.2000 /system/bin/e2fsck_recvy

And then, before the following commands, add "exit"

Regards,
[Desire Android Development] Ronaldo_9:
ok guys bit confused here. I see there is a zip that can be flashed. So say i partition my SD card 1st partition fat32 storage 2nd partition 1.5GB data.

then install desire RemixHD rom and then flash the data2sd zip and i'm done?

then i can nandroid restore ext content?

cheers
[Desire Android Development] Droidzone:
Done it!

Data2sd works on my teppic Rom. Thanks, sibere and everyone else who helped.
[Desire Android Development] sibere:
Ok thks I will update OP.
[Desire Android Development] Droidzone:
@Sibere,

I've posted your guide in Androidforums.com with Credits. All that I've added are a few annotations. If you don't like it, tell me and I'll take it down..
[Desire Android Development] Orka82:
My phone is acting up now. Using data2sd for over a week.

Lots of FC's and after reboot none of my widges on my homescreens loads. "Could not load...."

Trying to add som widgets = FC

com.htc.bgp FC's all the time now..
[Desire Android Development] Droidzone:
Wish there was a way to sticky some posts within threads! These are the kind of info one needs..

What aboutt trying to incorporate this in a fully working ROM, one in which apps are already installed. After Nandroid Restore of that image, what steps would be needed? I'm going to try it, to break it up.. :)

Edit: Guess that's not possible..Some apps would have been installed to sd-ext.
[Desire Android Development] sibere:
I'll have a look but no worries, you can post it anywhere with credits and maybe a link to this thread :)
[Desire Android Development] op8867555:
Yes you can

backup anything in /system/sd before data2sd and restore them to the new /data partition.
[Desire Android Development] mattiadj:
I have read in rcmixhd forum that some people have installed data2sd on this Rom but how if I can't install the Rom without ext???

sent from the future
[Desire Android Development] danarama:
It's the a2sd+ script that prevents boot without ext is it not? Have you removed it before flash?

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

DeFroST FAQ... http://xdaforums.com/showpost.php?p=6622965&postcount=2
[Desire Android Development] mattiadj:
I have removed the file from init.d folder and try to flash but installation was aborted since it try to mount ext.

sent from the future
[Desire Android Development] coutts99:
I got that working.

You install the rom, then convert to data2sd
[Desire Android Development] mattiadj:
How???

sent from the future
[Desire Android Development] coutts99:
I'm busy writing a full howto right now, give me a few minutes
[Desire Android Development] Renz33:
Running on leedroid 2.2f

C:\AndroidSDK\tools>adb shell

~ # mount /system

mount /system

~ # mount /data

mount /data

~ # mount /sdcard

mount /sdcard

~ # exit

exit

C:\AndroidSDK\tools>adb push c:\01data /system/etc/init.d

29 KB/s (367 bytes in 0.012s)

C:\AndroidSDK\tools>adb shell

~ # chmod 755 /system/etc/init.d/01data

chmod 755 /system/etc/init.d/01data

~ # cd /

cd /

~ # mount /dev/block/mmcblk0p2 /sd-ext

mount /dev/block/mmcblk0p2 /sd-ext

~ # dd if=/dev/zero of=/sd-ext/ext2 bs=1048576

dd if=/dev/zero of=/sd-ext/ext2 bs=1048576

dd: writing '/sd-ext/ext2': No space left on device

1995+0 records in

1993+1 records out

2090229760 bytes (1.9GB) copied, 480.456848 seconds, 4.1MB/s

~ # /system/xbin/busybox mke2fs -F -L userdata /sd-ext/ext2

/system/xbin/busybox mke2fs -F -L userdata /sd-ext/ext2

Filesystem label=userdata

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

127744 inodes, 510310 blocks

25515 blocks (5%) reserved for the super user

First data block=0

Maximum filesystem blocks=4194304

16 block groups

32768 blocks per group, 32768 fragments per group

7984 inodes per group

Superblock backups stored on blocks:

32768, 98304, 163840, 229376, 294912

~ # mkdir /sd

mkdir /sd

~ # /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

~ # cd /data

cd /data

/data # cp -a * /sd

cp -a * /sd

/data # cd /

cd /

~ # /system/xbin/busybox umount /sd

/system/xbin/busybox umount /sd

umount: can't umount /sd: Invalid argument

~ # exit

exit

C:\AndroidSDK\tools>adb reboot

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

mount: can't setup loop device: No space left on device.
[Desire Android Development] coutts99:
Not with RemixHD, I don't think the zip will work with that rom
[Desire Android Development] iinga:
I think you have missed out some points. Your busybox will need updating if you haven't and then chmod to 777 and you'll also need to push e2fsck_recvy over and chmod that (to 755 or 777).

If you want to give my batch script a try (just edit the actualy script to correctly reflect your sdk path) and put the 3 files in tools, it should set it up for you.
[Desire Android Development] coutts99:
Installing on RCMixHD

Install RemixHD rom and boot.

Replace you old busybox exec with the new one. Get new busybox from http://www.busybox.net/downloads/binaries/1.17.2/busybox-armv6l

In adb shell

mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system

exit shell

adb push busybox-armv6l /system/xbin/busybox

Go to adb shell

adb shell

DO NOT MISS THE PERIOD FROM THE END OF THE TAR COMMAND

chmod 755 /system/xbin/busybox
cd /system/sd
tar -cvzf /mnt/sdcard/backup.tar.gz .

Boot into recovery

Go to adb shell

Use fdisk to change /dev/block/mmcblk0p2 to fat32

fdisk /dev/block/mmcblk0
t
2
c
w

go to mounts and storage on the phone itself

mount /system

mount /data

mount /sdcard

adb shell

/system/xbin/busybox mkfs.vfat /dev/block/mmcblk0p2
rm /system/etc/init.d/40a2sd

Exit shell

adb push 01data.txt /system/etc/init.d/02data
adb push 98zipalign.txt /system/etc/init.d/98zipalign

Back in adb shell

chmod 755 /system/etc/init.d/02data
chmod 755 /system/etc/init.d/98zipalign
cd /
mount /dev/block/mmcblk0p2 /sd-ext
dd if=/dev/zero of=/sd-ext/ext2 bs=1048576
/system/xbin/busybox mke2fs -F -L userdata /sd-ext/ext2
mkdir /sd
/system/xbin/busybox mount -o loop /sd-ext/ext2 /sd
cd /data
cp -a * /sd
cd /sd
rm -r app app-private dalvik-cache
mkdir app app-private dalvik-cache
tar -xvzf /sdcard/backup.tar.gz
rm /system/app
rm /system/customize
ln -s /data/app_s /system/app
ln -s /data/customize_s /system/customize
cd /
/system/xbin/busybox umount /sd

Go to mounts and storage again

unmount /system

unmount /data

unmount /sdcard

Reboot system
[Desire Android Development] madman_cro:
it would be nice if first post is updatet with premade data2sd roms if anybody did it
[Desire Android Development] mattiadj:
Thanks but how can I install this Rom with two fat32 partition?

Without ext it give me installation aborted

sent from the future
[Desire Android Development] coutts99:
Install it with ext and fat32 partitions as if you were doing it normally.

Once you have rom installed follow this guide.
[Desire Android Development] mattiadj:
Ok!!!thanks I'll do it and make feedback!!!

sent from the future
[Desire Android Development] bhutanigaurav:
i get a permission denied error when i try to tar the files in to /mnt/sdcard/backup.tar.gz.

I tried copying the files to a backup directory instead and then moving them to /sdcard/ when the guide says to untar, but then the phones going into a bootloop.

coutts99, any ideas on how to get 'tar' working? if i do chmod 755 busybox, tar works but then it says empty archive and errors out again...please help
[Desire Android Development] bhutanigaurav:
Also, will flashing your kernel on top of data2sd have any effect on data2sd - i.e. will it mess things up or does kernel flashing not touch all the links that you're creating in the guide?

Thanks again.
[Desire Android Development] coutts99:
No idea, tar just works for me and most other people.

You can't execute tar at all?
[Desire Android Development] coutts99:
You can chop and change kernel as much as you like.

:D:D
[Desire Android Development] bhutanigaurav:
very surprising because i can't run tar at all. it either gives me a permission denied error or errors out with an 'empty archive error'. i then used he cp -r command to copy the direcotries /mnt/sdcard/Backup/ and then again cp -r to copy /mnt/sdcard/Backup/ to /sdcard/. this worked but then it went into boot loop.

Good to know that kernels have no effect on the mod. Will try it one more time i guess.

Am flashing the rom and your kernel again as i write this.
[Desire Android Development] coutts99:
Did you try

/system/xbin/busybox tar -cvzf /mnt/sdcard/backup.tar.gz .

This also works for me
[Desire Android Development] coutts99:
Can you copy and pasted the shell output on your screen if it fails this time
[Desire Android Development] bhutanigaurav:
ok got the tar working. turns out it was throwing errors because it didn't know what to backup. so a simple tar --create --file=/mnt/sdcard/backup.tar.gz * worked just fine. moving onto the next step now..cheers guys. fingers crossed
[Desire Android Development] coutts99:
DO this before tar

chmod 755 /system/xbin/busybox

Guide has been updated
[Desire Android Development] bhutanigaurav:
don't think its just the issue of 755ing busybox. after 755ing, it gives an empty archive error. this can be fixed by putting * in the line which tells it to tar everything in the directory.
[Desire Android Development] coutts99:
Ok, when you restore you backup my tar command might not work as I don't think you are using compression on yours, so drop the z from the command.

My command should have worked though, did you have the '.' at the end? That says backup current directory
[Desire Android Development] bhutanigaurav:
i'll make a note of dropping the z. Thanks. and NO, i didn't have the '.' at the end. That was the issue!! no wonder! silly silly mistake! thanks for the help. cheers...
[Desire Android Development] balthor80:
Hi !

I have folow this but, when I reboot I have a bootloop...
[Desire Android Development] coutts99:
PM me a logcat output while it's looping
[Desire Android Development] balthor80:
I have 2 "bug" with the command of the tuto :

tar -cvzf /mnt/sdcard/backup.tar.gz .

---> permission denied

mount /dev/block/mmcblk0p2 /sd-ext

-->directory not found

I will try a next time tonight
[Desire Android Development] bhutanigaurav:
Kudos to coutts99!! got this to work and it works flawlessly! i now have over 700 mb of internal space free. will try running quadrant and switching off sync now.

reload the instruction page to understand why you're getting the permission denied error. do a chmod 755 on busybox and you should be alright.
[Desire Android Development] zerocool76:
When I try to mount with loop, it returns with not enough space to mount loop.I've tried to increase the partition up to 2Gb but same result.Any idea?
[Desire Android Development] vivmar:
if i update my rom,without wipe,i have to re-apply the hack?
[Desire Android Development] iinga:
just flash the reinstall zip in my sig before you reboot
[Desire Android Development] sibere:
Just found a bug in your very good tutorial

~ # chown 0:2000 /system/bin/e2fsck_recvy

it shoud be ~ # chown 0.2000 /system/bin/e2fsck_recvy
[Desire Android Development] vivmar:
thx..

i'm doing the procedure and at the "tar -cvzf /mnt/sdcard/backup.tar.gz ." comand i have this error: "tar: can't open '/mnt/sdcard/backup.tar.gz': Read-only file system"

any idea?

C:\android-sdk-windows\tools>adb push busybox-armv6l /system/xbin/busybox
2507 KB/s (1062992 bytes in 0.414s)

C:\android-sdk-windows\tools>adb shell
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# chmod 755 /system/xbin/busybox
chmod 755 /system/xbin/busybox
# cd /system/sd
cd /system/sd
# tar -cvzf /mnt/sdcard/backup.tar.gz .
tar -cvzf /mnt/sdcard/backup.tar.gz .
tar: can't open '/mnt/sdcard/backup.tar.gz': Read-only file system
#
[Desire Android Development] danarama:
The first post has got very complicated since when I did this

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

DeFroST FAQ... http://xdaforums.com/showpost.php?p=6622965&postcount=2
[Desire Android Development] Droidzone:
I'd put Data2SD on my system..

After 10-15 normal boots, suddenly everything started failing..Forced closes.

Tried to Wipe everything..

Rebooted and started looping in the Joker's image.

Flashed Clockwork mod..Recovery still corrupted.

Amon Ra too..No hope

Does anyone know what is going on..

In Fastboot, it still shows S-OFF

Fastboot flashing Recovery goes through..But using recovery leads to the Joker loop
[Desire Android Development] rottunix:
DATA2SD on "Stock" ROM

Hello All,

I would like to contribute by explaining what I did on my HTC Desire.

Being pissed at HTC for the limited internal storage I decided to root and look for a solution (in my opinion) better than apps2sd(+).

1. Rooted my Desire

2. Backup via Titanium Backup

3. Backup via Nandroid

4. Download HTC Froyo kernel (http://developer.htc.com)

5. Download dsixda's HTC Android Kitchen (http://xdaforums.com/showthread.php?t=633246)

6. Repartitioned SD (14GB FAT32, 2GB EXT4) with GParted.

7. Build a new kernel with EXT4 support (and some other stuff I needed).

8. Copy compiled modules to /system/lib/modules

9. Flashed new Boot image via Recovery (and test)

10. Boot in Recovery and use adb to copy /data to ext4 partition and pushed modified 01data to init.d directory (choose to mount wihtout sync option)

11. Create second Nandroid backup

12. Copy boot.img and system.img from second Nandroid backup to the Kitchen

13. Add init.d support to ROM (and some other stuff, just go tru the menu)

14. Build new ROM (will only flash system and boot) and flash new ROM

15. Boot up and you will have DATA2SD. You can now move all apps to phone.

I did not use ext file on fat32 partition but a ext partition directly.

But I also noticed after gparted that windows won't reconize the fat32 partition but linux will and the Desire too.

All this was done in Ubuntu running in VM on Windows 7.

Lot's of steps, but seems to work.

Once I have time I will try automate some processes. Need to spend time with the wife too :D

R
[Desire Android Development] sibere:
I did that before going for ext2 file in fat32 because I had less IO specially on small files with that configuration. What are you I/Os that way?
[Desire Android Development] sibere:
is e2fsck done correctly at boot?

try sync then e2fsck_recovry -y -f /mnt/asec/ext/ext2 under android.

Really dirty but it will correct errors if any.
[Desire Android Development] rottunix:
Hi,

I am still evaluating it. The IO is not bad once the stuffs are loaded. But the initial load takes a little bit long. Just went to Gallery and it took some time. But that one was always slow.

I will do some more test during the weekend and let you guys know about my findings.

Did anyone tried ext4 on fat32?

R
[Desire Android Development] sibere:
Just a simple question: where are your pics stored? If they are on /sdcard, there should be no reason for a speed improvement ;)
[Desire Android Development] Ignore.z:
I don't know why, but on LeeDroid I have 2300+ and on Defrost only 1800+
[Desire Android Development] iroironz:
Hey majiadj,

Comparing your 01data (in the zip file) with sibere's original, it's quite different. In your version you don't seem to be forcing e2fsck check at boot. I originally used yours, but then after a few days kept getting bootloops. Switching to sibere's fixed it. Just thought I let you know since a few people have used your guide.

Jay.
[Desire Android Development] paulove:
I have RCMixHD and just wonder where my bootanimation is?

I have got the standard android boot animation, after data2sd.

It's no big deal...

paulove
[Desire Android Development] rottunix:
Yep you are right.

What are your experience regarding battery life?
[Desire Android Development] mattiadj:
Ok so it's better to use sibere file?

I have all installed from a much of days without any problem :-)

sent from the future
[Desire Android Development] Ronaldo_9:
i have this rom installed but do i just take the memory stick out and make 2 partition 1.5GB fat32 and Rest Fat32

then follow your guide? after that how do i restore the rom's apps and stuff? nandroid restore?
[Desire Android Development] ghiki:
I tried with ext4 on FAT32 and it works a bit laggy, but much more stable than with ext2; it's done simply following the guide in 3-4 post changing "mke2fs" for "mke2fs -t ext4" [needs latest possible busybox; it work without changing anything in Leedroid], also I pushed e2fsck_recvy in /system/bin [dont know if it's needed] and 01data script launching it in init.d. Theorically ext4 self-checks every 27 mounts
[Desire Android Development] iroironz:
I would say so. They're not much different, but Sibere's 01data file forces the e2fsck check at boot, and mounts the ext file with a few extra options (nosuid,nodev).

Jay.
[Desire Android Development] coutts99:
No.

Start the guide with the rom booted.

If all goes well you won't have to restore anything.

Read everything twice and take backups first.
[Desire Android Development] pjm77:
Does this mod give any REAL performance improvements or is it just space and benchmark numbers?
[Desire Android Development] sibere:
If you have a fast SD, you'll get both. If not, you'll get just more space :)
[Desire Android Development] pjm77:
Will class 6 give any extra speed or is class 10 the only way to go? Do you expect using the card this way is going to sgnificantly reduce its lifespan? Thank you very much for your answers:)
[Desire Android Development] hajen78:
A class 4 gives me better preformance ;)
[Desire Android Development] rafi300:
Coutts , im on ur modified 2.6.32.26 v5kernel europa#27 875mv @ 998mhz, with leedroid 2.2f .. Im getting I/o of 1820 max .. Can u help in a better configuration so I can have higher scores ? I have a 1.85gig data2sd up and running on a class 4, 16gig sdcard double fat32 partition.

Any help by any of u experienced developers and testers would be appreciated.

Swyped by a Desire on LeeDroid
[Desire Android Development] coutts99:
See the very first post in this thread. The bit about removing sync from mount options.
[Desire Android Development] danarama:
Incase anyone is interested, I managed to successfully edit Defrost 6.0k with 01data and busybox and flash without wipe.

I guess the first upgrade, I did have some dodgy data causing my issue.

I = happy bunny.

iinga, I was going to use your update.zip but when I looked, the file was called 40data and wasn't sure why, so I didn't use it (also because I would have to edit sync out) I just didn't know what other differences there would be.

Since the first post has many more commands than when I followed the procedure, I thought it best to stick with my existing files.
[Desire Android Development] budvajs:
speedboost (disable sync via adb console) is permanently or i must do it after each restart my desire?

because my qr score goes rapidly down (1,6k) after restart,but when i make speedboost again score is awesome 2,5k.

my english isnt good,sorry.
[Desire Android Development] coutts99:
To make permanent you have to edit 01data and remove sync option from mount line.

See very 1st post in this thread.
[Desire Android Development] Richy Freeway:
Running richardtrip kernel on stock froyo rooted. Everything seems to go ok but I'm still only showing 22mb free. Any suggestions?
[Desire Android Development] danarama:
Where does it show this?

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

DeFroST FAQ... http://xdaforums.com/showpost.php?p=6622965&postcount=2
[Desire Android Development] Richy Freeway:
Settings, SD and phone storage.
[Desire Android Development] LoQo_:
something is wrong because it shows me 800 mb
[Desire Android Development] angelom:
Does it work with miui rom with defrost kernel and custom Bravodata+ (mtd table)?
[Desire Android Development] Richy Freeway:
No idea, didn't really want to go to the hassle of changing roms. The original poster has it working on stock froyo so I can't see why it won't on mine.

It's as though the script isn't running and mounting the partition. Is there any way of checking logs or seeing what's mounted as what?

Edit :

Ok, so i've just fired up adb shell and I can't see anything referencing a mount for the second partition. What should I be looking for?

Edit again :

Think I've worked it out, I'll report back shortly.

Edit again again :

Yup fixed, thought my rom had init.d support, it turns out it didn't. Reflashed, added richardtrips kernel, ran through the process again.

SORTED! 877mb free.
[Desire Android Development] OpenMinded:
Wow, that was a bit unhelpfull?

I happen to have the same thing:

mounting /dev/block/mmcblk0p2 on /sd-ext failed: Invalid argument

I read the tutorial several times.

Any1 know what I might be missing?

Maybe it matters with which rom loaded one does this?
[Desire Android Development] soft-touch:
I got the whole thing working by using Mac... very easy and straight forward procedure... Big Thanks
[Desire Android Development] danarama:
Does it say that of its already mounted? I think maybe. Or sd ext didn't create properly.

Like other poster suggested, maybe start again? Including formatting 2nd fat 32 partition.

I did this a few times. It's easier to start from step 1 after a format otherwise things from previous attempts can be left over and causing trouble

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

DeFroST FAQ... http://xdaforums.com/showpost.php?p=6622965&postcount=2
[Desire Android Development] Zeljko1234:
I think that usually problem is with partitioning. I suggest fdisk from Linux CLI, than check is it formated not just partition created!

I'm running now HD rom and tried to make data2sd but I missed something. I have two sd card and I'll tray it again later :)
[Desire Android Development] OpenMinded:
maybe the SDcard is faulty. I partitioned and checked it on my mac, no trouble.

Ok, I'll start over with pertitioning
[Desire Android Development] buzzboy:
Happy bunny

using Ultimate droid 2.3.0, 1gb ext4, 13gb fat32, running like a madman, no forceclose issues.....:)
[Desire Android Development] buzzboy:
sorry......
[Desire Android Development] anko184:
Can someone explain what sync really does and if it should be on or off.
[Desire Android Development] danarama:
What class card? Sync on or off? What clock.speed?

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

DeFroST FAQ... http://xdaforums.com/showpost.php?p=6622965&postcount=2
[Desire Android Development] buzzboy:
Class 6, sync off, 998 clock speed, no set- CPU.....yet.
[Desire Android Development] buzzboy:
Plenty of room i would say.......
[Desire Android Development] OpenMinded:
Nice!

I noticed that my mount error was caused by a faulty SD card.

Used another one and it did work.

Maybe a nice one to add to the OP
[Desire Android Development] mazeli:
hey guys,

i'm coming from the winmo front and i'm not really familiar with the flashing procedures right now. so i started reading a few days ago but its really hard to follow this whole thing.

I really need more space on my desire, i hate the 'low memory space' message! :-)

I'm currently on a Froyo stock rom which is not rooted.

My question is now, can i just root my phone with unrevoked and then follow the instructions in the first post? or do i have to flash another rom for this?

would be gread if you guys could help me!

have a nice weekend!

maze
[Desire Android Development] psygbert:
you can also use this idea even without init.d or loop/ext3/ext4 support. i'm using all stock (only rooted) froyo on my desire.

this is just a sample script. save it as /system/etc/install-recovery.sh and make it executable

#!/system/bin/sh

#

/system/bin/e2fsck_recvy -y -v /dev/block/mmcblk0p2

/system/xbin/busybox mount -onoatime,nodiratime,nosuid,nodev /dev/block/mmcblk0p2 /data

chown 1000:1000 /data

chmod 771 /data

same effect. my desire now shows 0.92GB available space in my internal phone storage. you can use this file to invoke init.d too :)