yashsingh1/xdaforums huggingface dataset:
[Desire Android Development] _bryan_:
@sibere

if I does not have s-off

can i do these with adb in recovery mode? can I write /system

adb push 01data /system/etc/init.d

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

thanks
[Desire Android Development] chding:
ownhere released his version of ROM with Data2SD

http://u.115.com/file/f5777c6cfe

can we use the script in ownhere in auraxt?
[Desire Android Development] mcmikev:
Yesterday I let my battery drain completely. After the warning (at 15%) I kept the phone on and let the battery drain more.

On normal reboots there was no problems with this script. However when my phone died suddenly because the battery was empty, and I plugged in the charger and then waited an hour, turn on the phone, i got all kinds of FC's and my settings where gone.

I tried a nandrestore (i made before this test) but that didn't helped me out either.

I tried the e2fsck but in the 01data script there is a command that I don't have in the phone (e2fsck_rcvy or like that) and even when I tried is without the _recvry but that does not work either. (i have pushed the files to /system/bin and /system/lib)

I had to go through all the steps again to make it work again.

So the file must have got seriously corrupted because of the sudden powerloss and the check in the 01data does not check at all at boot because that does not work.

I run defrost 6.0i image with default kernel .
[Desire Android Development] navalynt:
Everything seems to be going ok until I get to this part:

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

It hangs for about 30 seconds then I get an error: "Mount" can't setup loop device: No space left on device

Any ideas? I can't seem to get past this.
[Desire Android Development] ownhere:
yes. but you need copy /system/xbin/busybox,/system/bin/e2fsck_recvy to your ROM, and mkdir /system/mtddata in your ROM zip.
[Desire Android Development] kecinzer:
I have Kingston 16GB Class10 microSDHC card - this is very strange model and experiencing very lagy behaviour. After boot start all apps taking long time.

I think this is because my buggy 16GB SD card. But on App2SD+ I don't have that speed issues.

Now I looking for another SD card, because this mod is by all other ways better than App2SD+.
[Desire Android Development] sibere:
The fact that you don't have init.d is really strange for a stock rom.

You can always try to remake the directory, with the right rights and put the 01data script with the right rights in it.

edit: rights and owner for init.d are drwxr-xr-x root shell 2010-11-28 18:33 init.d
[Desire Android Development] sibere:
Sure! I don't have S-OFF either :)

to make it sure do adb push 01data /system/etc/init.d/01data
[Desire Android Development] bluelavender:
i agree..that's quite strange. i thought init.d folder is basic android folder that should have existed, as it contains all the initial tasks to be launched upon boot.

BL
[Desire Android Development] sibere:
You like to live dangerously ;)

I had e2fsck_recvy in my stock rom. Maybe it came with something else...

But if you don't have it, I provided the full e2fsck progs. in OP

What you need to do if your file is corrupted:

boot in recovery and mount /system

install e2fsprogs exec & libs in you system partition (bin for exec and lib for libs)

then mount ext partition : mount /dev/block/mmcblk0p2 /sd-ext

/system/bin/e2fsck -F -y /sd-ext/ext2

and pray for e2fsck to clean your ext2 file errors :)

The check I do in the script is running on every boot. I can tell you because I've slightly modified my personal script to get a log file at the end of the process.

try the latest 01data script on OP
[Desire Android Development] sibere:
Does you kernel have loop device support?
[Desire Android Development] mcmikev:
I have changed the 01data script and replaced the line with the line you mentioned. Does that mean that the check is done now during boot ?

I did the line manually and there where a lot of errors !!!!!! all fixed..

How can I check the ext file before boot ? can you help me on how to do that ? what script must i make or change for a check before mount ?
[Desire Android Development] sibere:
All fixed. Sounds good. The latest 01data script is checking and fixing errors on every boot before mount.

/data is unmounted when you turn off your phone. You shouldn't let it turn off on it's own with a dead battery because the unmount is not done and you end-up with a corrupted FS. You're playing with fire ;) Was sync turned off or on?
[Desire Android Development] mcmikev:
I like living dangerously ;)

Sync of or on ? hmmm let me see..

Sync is on.

(/system/xbin/busybox mount -o loop,sync,noatime,nodiratime,nosuid,nodev /mnt/asec/ext/ext2 /data )

I have the latest 01data in the phone.. Hope it will keep going fine now :)

thx for the help.. Nice job !

Ow and the check line looks like this now for me :

/system/bin/e2fsck -F -y -v /mnt/asec/ext/ext2

I don't have the e2fsck_rcvry file (also not in the zip ! in the OP).
[Desire Android Development] sibere:
OK, looks fine now :) good luck :D

e2fsck_recvy is not in the zip because I had it out of the box with my rom.

but it's similar to the e2fsck in the zip on OP

EDIT: I have attached the e2fsck_recvy in OP.

if you want to get a report of the check; make a log dir in /cache (mkdir /cache/log)

and replace the e2fsck line in the script with this one:

/system/bin/e2fsck_recvy -y -v -f /mnt/asec/ext/ext2 2>&1 >/cache/log/e2fsck.log

or if you have e2fsck only

/system/bin/e2fsck -y -v -f /mnt/asec/ext/ext2 2>&1 >/cache/log/e2fsck.log

cat /cache/log/e2fsck.log will show you the report :)
[Desire Android Development] DearTanker:
Can you teach me how to add this great script to a rom when i cooked.

Teach me detail with step by step.

Thank you so so so so much.

Because someone like me feel tired to type those script after flash a new ROM.

Thank you for this great work.
[Desire Android Development] Droidzone:
Lazy bones! :D

Other than the mods in init.d, other steps seem to be common.. Rt?

Don't Linux Scripts work in adb shell?

Cant we copy these commands into a script, give it exec permission and run it after an 'adb shell'?
[Desire Android Development] felix1318:
I really wannna try data2sd, but i cannot even format ext3 to fat32 (previously create rom partition using rom manager)... so sad... this need some knowledge to begin with... :(
[Desire Android Development] Droidzone:
Just download Gparted, write the image to a Cd, Reboot with that CD, and do whatever you want with your partitions. :D
[Desire Android Development] danarama:
It's been suggested that ypu just need to put script and busybox. In the correct locations.

Waiting for new rom to test on

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

DeFroST FAQ... http://xdaforums.com/showpost.php?p=6622965&postcount=2
[Desire Android Development] melethron:
Hmm, i'm really wondering about this, because if the phone is 'dying' due to low battery it is still shutting down normally. I never saw my phone simply switching off but always shutting down as if I had it done manually. So this might be more of a problem of android.

I had a corruption of my fat partition 2 times when I plugged in usb (could fix it with chdsk). Since it is also unmounted then it might be that android either can't unmount the partition bcs it's in use or it 'force unmounts' the partition while smth is written to it (don't know if this is possible).

Hmm I think I wait a bit b4 I try data2sd and see if others have also probs.
[Desire Android Development] felix1318:
I tried, but i only can edit my FAT32 partition, EXT3 partition act like it's invisible... 8gig sd card, but it only let me resize 6.93 gig of space... :( i have no idea how to edit the 512mb ext3 partition...
[Desire Android Development] Droidzone:
You must be missing something. Use the menus to change the partition type selected. There should be another partition choosable.. Ext partitions have to be visible in Gparted.
[Desire Android Development] sibere:
I never had such a big corruption for /sdcard and ext since I started to use data2sd. The partitions had always been unmounted properly by android before shutting down.
[Desire Android Development] sibere:
basically... no :D
[Desire Android Development] ghmail2:
For just giving it a try, type in adb shell window with android running:

busybox mount -o remount,noatime,nodiratime,nodev,nosuid /mnt/asec/ext/ext2 /data

Then run quadrant...

Type again:

busybox mount -o remount,noatime,nodiratime,sync,nosuid,nodev /mnt/asec/ext/ext2 /data

adb tolds me i need root access

but i can not use su in adb shell, can i use the terminal from market?
[Desire Android Development] sibere:
if your phone is rooted you should get root access.

you can try with the terminal from market with "su" to be root.
[Desire Android Development] bluelavender:
Looks like Alex-V will be 2nd one to make his rom to data2sd version :)

http://xdaforums.com/showpost.php?p=9463307&postcount=1010

waiting with delight for this :)

BL
[Desire Android Development] sibere:
It'll be with my data2sd, my kernel and my battfix ;)
[Desire Android Development] Café King:
Sorry if this have already been answered... But will this work with a class 2 sd card?

Thank you in advance.

/CK
[Desire Android Development] bluelavender:
I'll sure be waiting for this one :)

BL
[Desire Android Development] sibere:
sure, but don't expect speed improvement. You'll get more space tho :)
[Desire Android Development] bluelavender:
In theory, it should be possible ... in practice, well, if you are very patience and your card is very good, and you like to live "on the edge"...you can give it a try and update the result in here :)

BL
[Desire Android Development] Café King:
That's the most important for me. Thanks. Will try this method later today.

/CK
[Desire Android Development] DearTanker:
Sorry,i'm sorry i can't understand very well.

Seems i just have skill like add some file into some folder.

So,is there some way add DATE2SD into rom as easy as i say.:(
[Desire Android Development] DearTanker:
Why?:confused:

Is that i'am so stupid or there is no way to add DATE2SD without input code by using computer?
[Desire Android Development] sibere:
no, just that I won't do it :)

Other guys atm a integrating data2sd int their roms. search for that on the forum.
[Desire Android Development] shawe_ewahs:
I try to create another script based on this, for do it by itself all work (with no commands from recovery), but seems that nobody here can help to do it working well. Can you try to help?
[Desire Android Development] coutts99:
Perfect instructions for AuraxTSense 8.0, worked first time, 1.14GB free on phone storage now :)
[Desire Android Development] felix1318:
tat's the problem, ext partition is not visible in gparted, only fat32...
[Desire Android Development] Alex-V:
sounds interesting :)

Hope you find people who can help you :)

i used the first time adb so i´m not the one...but maybe sibere or tkirton from darktremor a2sd...maybe snq...

with kind regards..Alex
[Desire Android Development] DearTanker:
I was hope dsixda to add DATE2SD to his kichen.
[Desire Android Development] Zeljko1234:
Thank you for all you have done and for patience to help me and everyone here. As I said, I'm now on business trip out of my country and I need my phone. You've already answered my question (about permission) and I'll try it when I back home. Actually maybe camera for HD rom will be fixed and I'll try it with HD rom. Actually HD rom need your mod :)
[Desire Android Development] dakore:
Is it ok if "df" command shows me that sd-ext is 100% full before and after step below?

mkdir /sd
/system/xbin/busybox mount -o loop /sd-ext/ext2 /sd
cd /data
cp -a * /sd
cd /

~ # df
df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 208116 0 208116 0% /dev
/dev/block/mtdblock4 97280 31136 66144 32% /cache
/dev/block/mtdblock5 202368 99472 102896 49% /data
/dev/block/mmcblk0p1 7438584 5968692 1469892 80% /sdcard
/dev/block/mtdblock3 148480 114132 34348 77% /system
/dev/block/mmcblk0p2 521760 521760 0 100% /sd-ext

Also, I can't find any file on sd-ext regarding this part of text:

I'm using Defrost 6.0e and N1Table hboot (everything is in my sig). Partitions are created from zero - fully erased, created main fat32 partition + 512 MB fat32 for data. I didn't touch ROM or anything regarding existing a2sd scripts...
[Desire Android Development] danarama:
Ok I placed /system/xbin/busybox and /system/etc/init.d/01data into a new version of defrost and flashed it. I got a boot loop, so it seems that the script and busybox is not enough - which I would have expected anyway.

So to upgrade, I'm thinking:

1)Complete data wipe

2)Flash rom

3)Carry out procedure

4)Restore data

Although its 3) I am unclear on. Since the EXT file is already created, what steps can be skipped? I understand we still need to tell android it is there, but surely deleting then re-creating the EXT file is overkill?
[Desire Android Development] sibere:
If you already have the ext2 file , just skip the dd part but do the rest.

If the procedure has so many steps and commands, it's obvious that busybox and the 01data scripts are far from being enough :)
[Desire Android Development] sibere:
sd-ext is full and it's normal. It has been filled by the dd command to create the ext2 file.

Make sure that you did all the steps properly without skipping anything.

Defrost is not stock so if it doesn't work, I can't provide support.
[Desire Android Development] dakore:
As far as I read, danfrance has managed data2sd to work on Defrost. Correct me if I'm wrong...

Tnx for the info, will try again from beginning with clean ROM.
[Desire Android Development] danarama:
Well I thought that too, but someone suggested it was possible :)

Thanks for that sibere. I'll give it a go ;)
[Desire Android Development] sibere:
I dunno. I just say that if something goes wrong, I might not be able to help :)
[Desire Android Development] danarama:
Yes got it to work.
[Desire Android Development] sibere:
EXCELLENT! :D That's very good news for the other defrost users!
[Desire Android Development] danarama:
We are just talking about data2sd working on defrost arent we?
[Desire Android Development] sibere:
sure. what else? :)
[Desire Android Development] danarama:
Wasn't sure ,)

Can I just add that if anyone flashes a Rom and tries to reproduce data2sd, and fails.. you may need to format data before restore

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

DeFroST FAQ... http://xdaforums.com/showpost.php?p=6622965&postcount=2
[Desire Android Development] sibere:
You're the one who got it working on defrost. you can add anything you like to help others to get it working :)
[Desire Android Development] mattiadj:
Can anyone test if this hack works with sensehd version?now camera working!!!!

sent from the future
[Desire Android Development] ghmail2:
i try this on cm6.1 rc2.the process had no problem.i just can not get 1GB interstorage,anyon get data2sd work on cm6.1 rc2??
[Desire Android Development] danarama:
Other than chmod 777 /system/xbin/busybox before each busybox command, i just followed your guide step by step

Although I did titanium backup, data wipe, format system, data and cache. Fresh flash of Rom first. Follow guide and then restore.

Not sure if it is required but I wanted to as had a modified feamework-res I wanted rid of.

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

DeFroST FAQ... http://xdaforums.com/showpost.php?p=6622965&postcount=2
[Desire Android Development] danarama:
Double post
[Desire Android Development] dakore:
Done!! :D

a2sd script was a problem. I've removed it from ROM zip, put busybox, 01data and all other files into zip and flashed it. I've also skipped few steps and done the rest. Thanks sibere!

If anyone is interested, here is how it looks:

NOTICE! Some steps are skipped.

C:\>adb shell
~ # mount /system
mount /system
~ # mount /data
mount /data
~ # mount /sdcard
mount /sdcard

~ # 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
511+0 records in
509+1 records out
534278144 bytes (509.5MB) copied, 37.147378 seconds, 13.7MB/s
~ # chmod 777 /system/xbin/busybox
chmod 777 /system/xbin/busybox
~ # /system/xbin/busybox mke2fs -m 0 -F -L userdata /sd-ext/ext2
/system/xbin/busybox mke2fs -m 0 -F -L userdata /sd-ext/ext2
Filesystem label=userdata
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
130560 inodes, 521756 blocks
0 blocks (0%) reserved for the super user
First data block=1
Maximum filesystem blocks=524288
64 block groups
8192 blocks per group, 8192 fragments per group
2040 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409

~ # df
df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 208116 0 208116 0% /dev
/dev/block/mtdblock4 97280 1168 96112 1% /cache
/dev/block/mtdblock3 148480 114196 34284 77% /system
/dev/block/mtdblock5 202368 44632 157736 22% /data
/dev/block/mmcblk0p1 7438584 6021316 1417268 81% /sdcard
/dev/block/mmcblk0p2 521760 521760 0 100% /sd-ext

~ # mkdir /sd
mkdir /sd
~ # /system/xbin/busybox mount -o loop /sd-ext/ext2 /sd
/system/xbin/busybox mount -o loop /sd-ext/ext2 /sd
~ # cd /data
cd /data
/data # cp -a * /sd
cp -a * /sd
/data # cd /
cd /

~ # ls -l /sd
ls -l /sd
drwxrwx--x 2 system system 1024 Nov 29 21:39 app
drwxrwx--x 2 system system 1024 Nov 29 21:42 app-private
drwx------ 5 system system 1024 Nov 29 21:43 backup
-rw-r--r-- 1 root root 31833 Aug 1 2008 changelog.txt
drwxrwx--x 2 system system 7168 Nov 29 21:43 dalvik-cache
drwxr-xr-x 75 root root 5120 Nov 29 21:43 data
drwxr-x--- 2 root log 1024 Nov 29 21:42 dontpanic
drwxr-xr-x 3 root root 1024 Nov 29 21:42 local
drwxrwx--- 2 root root 12288 Nov 29 21:42 lost+found
drwxrwx--t 9 system misc 1024 Nov 29 21:44 misc
drwx------ 2 root root 1024 Nov 29 21:42 property
drwxrwxr-x 8 system system 1024 Nov 29 21:45 system
drwxr-xr-x 2 root root 1024 Nov 29 21:39 xbin

~ # /system/xbin/busybox umount /sd
/system/xbin/busybox umount /sd

~ # exit
exit

C:\>adb reboot
[Desire Android Development] mattiadj:
No only all app don't work.

You only have a lot of fc

sent from the future
[Desire Android Development] AndroHero:
Matt you should edit that post on the first page, with the tut for the leedroid apps2sd, remember on step 9 i forgot to put you should enter adb shell after you push the script, before you try to chmod it ;)
[Desire Android Development] AndroHero:
epic thread this sibere, the day our desires got unlimited internal storage :) well done mate :D
[Desire Android Development] ghmail2:
this won't work for a2sd+ roms?
[Desire Android Development] AndroHero:
this will work for apps2sd roms but you need to remove the apps2sd script from /system/etc/init.d/ first
[Desire Android Development] fogbav:
How about compression on this ext2 partition on fat32 ... good or not good ? Possible ?

Snapdragon should be fast enough and powerfull ... doubling the transfer rate on SD with compression ...

Any comments ?
[Desire Android Development] vybztymz:
I backup my entire sdcard to Dropbox folder and my NAS box using synctoy...just in case my phone is lost \ stolen \ falls into the bath etc :D:D
[Desire Android Development] mattiadj:
Fixed Andro :)

It's time to buy a 32gb class 10 sdcard and have 16gb internal memory!! :D
[Desire Android Development] danarama:
Does this only work on Sense roms? Has anyone tried it on AOSP?

Not especially needing more space, but the Big boost sounds good. If only that link in the first post worked :(
[Desire Android Development] fogbav:
Leedroid 2.2f flashed ... everything fine ... but i'm running out of space on 2 Gig Fat32 with :

dd if=/dev/zero of=/sd-ext/ext2 bs=1048576
[Desire Android Development] AndroHero:
yeah thats meant to happen, adb is creating a big ext2 file on the partition, when it runs out of space the ext file is complete :D
[Desire Android Development] AndroHero:
the desire would be a beast with 16gb internal storage :D lol
[Desire Android Development] fogbav:
Doesn't bs=1048576 means -> do it with 1 GB ... ?
[Desire Android Development] AndroHero:
no bs means bytesize ;) you /data/ partiton will be whatever size your secondary partition is :D
[Desire Android Development] fogbav:
Oh **** ... ok ... now i am on 2 Gig ... 8) ... my internal memory is soooo empty .... 8)

Thank you ...

Is there someone who can give me a answer to my question about compression on ext2 ... ?

wouldn't it be good for transfer rate to sd cards to have compression on the ext2 file system - snapdragon should handle compression very easy i think ... ?
[Desire Android Development] mattiadj:
With class 10 system will improve?

With boost what are the risk?

Thanks for all!!

sent from the future
[Desire Android Development] AndroHero:
i dont think it would work, the fat fs is just there for the ext file, i wouldnt like to guess how an uncompressed ext file would work on a compressed fat fs, by all means give it a try and post your results, thats what this community is all about :D
[Desire Android Development] AndroHero:
yeah you would get a massive speed boost with a class 10, its nearly 3 times as fast as the desires nand chip :D
[Desire Android Development] danarama:
Ok, although you were talking to someone else, I'm follwing your lead and going to try this on AOSP (unless someone stops me in the next 30 minutes)...

I does say for stock 2.2 though...
[Desire Android Development] mattiadj:
Woooooow.

And about boost script what are risk of sync off?

sent from the future
[Desire Android Development] scaeac:
sporadically losing apps

sporadically losing apps which had been installed in /data partation when battery changing.

but they will come back when reboot the phone again!

strange & puzzled!
[Desire Android Development] mirotis:
PLEASE HELP!!!

I have managed to make it work one time. But now I am following the exact same procedure but when I give the command .... /system/xbin/busybox mount -o loop /sd-ext/ext2 /sd

mount: mounting /sd-ext/ext2 on /sd failed: No such file or directory

I have tried to repartiton the sd 3 times so I guess it is not because of the partitions. I HAVE NO CLUE WHAT IS WRONG :( :( :( :( HELP!!!!
[Desire Android Development] snakeeyes21:
When in gparted boot in to your phone recovery, go to mounts and storage and mount USB storage

The ext partition will then show up, delete both partitions and create you 2 new ones :)
[Desire Android Development] miyu-hitori:
what's wrong with me:

mount /dev/block/mmcblk0p2 /sd-ext

mount: mounting /dev/block/mmcblk0p2 on /sd-ext failed: No such file or director

y
[Desire Android Development] kimi789:
i have a strange trouble,when it was faild,the second partition is 100% full,why?
[Desire Android Development] danarama:
Because the partition has a file that has an ext file system format. This file is essentially where your data and apps are. It fills the space because unused space us useless space

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

DeFroST FAQ... http://xdaforums.com/showpost.php?p=6622965&postcount=2
[Desire Android Development] shawe_ewahs:
mount /dev/block/mmcblk0p2 /sd-ext
dd if=/dev/zero of=/sd-ext/ext2 bs=1048576
chmod 777 /system/xbin/busybox
/system/xbin/busybox mke2fs -m 0 -F -L userdata /sd-ext/ext2
[Desire Android Development] shawe_ewahs:
Nobody can help with this script for DATA2SD?

http://xdaforums.com/showpost.php?p=9471453&postcount=313

Seems to be tottally ignored.
[Desire Android Development] danarama:
Id expect no at this point

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

DeFroST FAQ... http://xdaforums.com/showpost.php?p=6622965&postcount=2
[Desire Android Development] shawe_ewahs:
The problem on my script seems to be the ROM that I'm using. AuraxTSense is using A2SD configuration on here update-script, I update my script to control this and don't copy symlinks to ext file, it need to copy real link, in this case copy /system/sd/app, /system/sd/app-private and /system/sd/dalvik-cache inside ext file, and then remove the original folder for don't waste space in secondary partition on SD card.