yashsingh1/xdaforums huggingface dataset:
[Desire Android Development] HTF:
I have created an Defrost 6.0j update zip that works fine for existing defrost data2sd users, all I did is add the files from the op including busybox, removed the apps2sd script and updated one line in the update script (to make sure busybox has 777 permissions). It works perfectly fine for me. I am uploading it now so you can take a look.

28mins remaining though, damn my slow internet connection.
[Desire Android Development] HTF:
I would help you with the script but the rom you use makes it so much different to what I would do due to the A2SD method used in that rom.

Have you tried removing the A2SD from the rom/update-script then creating a script to make the data2sd stuff and then execute it?
[Desire Android Development] dakore:
Is it ok to get only 1700 I/O score? Before I had around 800 I/O... Overall Quadrant score is 1700-1800 (before: 1400-1500).

I have sandisk mobile ultra class 6 sdcard (w:15MB, r:17MB). It's quite fast card when using it with card reader.
[Desire Android Development] HTF:
I get 1915 overall using defrost 6.0j and the same sdcard as you. Stock defrost kernel, governor set to performance for the benchmark.
[Desire Android Development] HTF:
Here is the defrost 6.0j for existing data2sd users running defrost that want to update to j:

here
[Desire Android Development] danarama:
Thanks for your effort.

Quick q. You mention update script. Is this just updated 01data? Or something further?

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

DeFroST FAQ... http://xdaforums.com/showpost.php?p=6622965&postcount=2
[Desire Android Development] coutts99:
Does 'wipe dalvik cache' from recovery still do whats it's meant to when using this mod?
[Desire Android Development] HTF:
No it is the script included with every update.zip, it is in the meta-inf/com/google/android/ folder.

It basically tells the phone what to do when installing the update.
[Desire Android Development] danarama:
Ok.thanks. I didn't touch that.

Downloading now ;)

I may have to swap 01 data as I remove sync

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

DeFroST FAQ... http://xdaforums.com/showpost.php?p=6622965&postcount=2
[Desire Android Development] shawe_ewahs:
New version of my script, now do all correctly, but ROM don't boot.

Only tested on AuraxTSense 8.0.
[Desire Android Development] danarama:
Did you perform any wipes prior to flash? I didn't and got a boot loop
[Desire Android Development] HTF:
I changed the following lines to the following to match my setup:

MP_SDEXT="/mnt/asec/ext"	# MountPoint for SDEXT

SD_DATA_PARTITION="/mnt/asec/ext/ext2"	# Partition file on SD Card FAT (ext2/ext3/ext4)

And it works fine on defrost.
[Desire Android Development] sibere:
no, because the ext partition in not mounted over /data in recovery mode.

but you can do it manually in recovery by mounting partition 2 on sd-ext, then ext2 over /data and rm /data/dalvik-cache/*
[Desire Android Development] HTF:
No wipes at all. If you replaced the data script with your own all I can think is that the one you are replacing it with is wrong. Just edit the second mount line in the rom I posted removing the word sync and see if that works.
[Desire Android Development] danarama:
Thats exactly what I did :( literally deleted "sync," from the one within your zip.

it is identical to the one I put in mine too. I used winrar for mine, and Astro with yours as usually I can chop and change signed and unsigned zips fine using these methods.
[Desire Android Development] HTF:
Weird then, no idea what is up with yours.
[Desire Android Development] danarama:
Nope. Me neither.

Ah well...
[Desire Android Development] coutts99:
K, thought so but just checking :)
[Desire Android Development] @ngel:
It'll work, but you'll get tons of lags and your Desire will be unusable. Tried with a Class2 16GB Sandisk card.

Switched to a Class6 8GB Sandisk card and the Desire now rocks!
[Desire Android Development] @ngel:
I upgraded from DeFroST 6.0i to 6.0j, both with DATA2SD: the only step I took was to edit the ROM ZIP file deleting the A2SD script, adding the DATA2SD one and replacing busybox in /system/xbin.

The subsequent flash was just fine, without any wipe.

Remember to turn off signature verification in console.
[Desire Android Development] danarama:
It just doesn't want to work for me at all

Edit> Will boot with a data wipe, but ends up back at 148MB internal memory.

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

DeFroST FAQ... http://xdaforums.com/showpost.php?p=6622965&postcount=2
[Desire Android Development] shawe_ewahs:
Only this change? This seems to not be a reason for work :S The only different is that I haven't 2 FAT partition, I use the partitions created from recovery.

HTF the reason that I do this script, is because my script can create the file without recovery commands, but my problem is that don't boot for me. Can be possible that the reason is that I'm using ext3 partition for sd-ext??
[Desire Android Development] danarama:
Ok.upgraded. had to wipe data to boot. Normal internal memory. Advanced restore nandroid of sd ext all ok

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

DeFroST FAQ... http://xdaforums.com/showpost.php?p=6622965&postcount=2
[Desire Android Development] mattiadj:
Sorry but I don't understand well.

Exists a script to insert in a ROM that make data2SD automatic during flashing ROM??

sent from the future
[Desire Android Development] @ngel:
Glad to read that you solved wiping, I was uploading the modified ZIP I used for my Desire: it can be downloaded here.

It's an unsigned DeFroST 6.0j flashable ROM with Google apps, Sense sounds, additional fonts and DATA2SD already in.
[Desire Android Development] @ngel:
Why did you restored sd ext partition? With DATA2SD you don't need it anymore...
[Desire Android Development] mattiadj:
Angel have you made an automatic way to install data2sd in our rom???:eek:
[Desire Android Development] HTF:
I think that is the reason, I am using two fat32 partitions and it seems to work ok. Someone in a previous thread about this mentioned problems when using a normal ext partition, that is why this method normally uses the two fat32 partitions and then creates the ext filesystem within the file you create.

I'll take another look at it shortly and see if I can see anything that might be causing the script to fail.
[Desire Android Development] shawe_ewahs:
Y also try using fat, and script works with a lot of error on this case, using same ROM.
[Desire Android Development] Droidzone:
Going to try with a Class 2 Kingston..If it doesnt work, there's a nice Class 10 Kingmax available for purchase..

So if something bad happens, the only thing we need to do is to reflash the custom ROM or restore a Nandroid, rt?

Edit: Oh well..Realworld testing of the Class 2 Kingston yielded a speed of only 950Kbps (supposed to do 2Mbps). So, Kingmax it is.
[Desire Android Development] Renz33:
help pls, no one seems to reply to this problem

im stuck at

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

mount: can't setup loop device: No space left on device
[Desire Android Development] navalynt:
Try putting that in /system/etc/init.d and see if it works. Should be fully automated but I've only tested on my own phone and from a clean install so use at your own risk!

Edit: I'm using a CDMA Desire with The Ultimate Droid 2.3.0 and my own compile of the VorkKernel, scoring consistently in the 2200 range on quadrant now. This mod almost tripled my I/O scores!
[Desire Android Development] CreaB:
if i use this script and copy it to /system/etc/init.d is there still a need to do the steps from post 1, or will it be fully automated?

i'm asking becasue i tested it few minutes ago, but my device is stuck on the white HTC-screen =)
[Desire Android Development] danarama:
No, nandroid sees the data2sd ext file created on the second fat partition as sd ext. Essentially I restored the data2sd /data partition

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

DeFroST FAQ... http://xdaforums.com/showpost.php?p=6622965&postcount=2
[Desire Android Development] sibere:
very good! specially CPU!

is it at stock speed?

I/O wise, do you get that score with sync ON or OFF? With OFF I'm getting around 4500 for I/O.
[Desire Android Development] sibere:
True.

clockwordmod recovery is backing-up the ext2 file in the 2nd partition.
[Desire Android Development] op8867555:
Is this mean I need more space to do a nandroid backup?
[Desire Android Development] danarama:
Yes it will increase the size of your backup.

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

DeFroST FAQ... http://xdaforums.com/showpost.php?p=6622965&postcount=2
[Desire Android Development] navalynt:
It should be fully automated :) BUT, keep in mind it takes a few minutes to create the partition file! During that time the phone will be stuck on the bootsplash but if you plug it in to your computer you should find adb running. With a class 10 microSD and 1.8GB second partition I think it took about 7 minutes for the first boot for me. Subsequent reboots are much faster since the file already exists.
[Desire Android Development] sibere:
Yes but you can ZIP the backup. You will have to unzip it before restoring it of course :)
[Desire Android Development] @ngel:
Nope, as I said @410 it was a manual workout. ;)
[Desire Android Development] Ignore.z:
have a problem on DeFrost 6.0j:

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

mount: can't setup loop device: No such file or directory
[Desire Android Development] danarama:
Add Chmod 777 /system/xbin/busybox before the above command

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

DeFroST FAQ... http://xdaforums.com/showpost.php?p=6622965&postcount=2
[Desire Android Development] Ignore.z:
it's not helping me. tried before every busybox command.
[Desire Android Development] HTF:
try mkdir /sd
[Desire Android Development] Ignore.z:
nothing changes
[Desire Android Development] sibere:
Does your kernel support loop devices?
[Desire Android Development] Ignore.z:
I tride it with custom kernel and with vorkKernel r8
[Desire Android Development] danarama:
Vork definitely works

Busybox on system/xbin is definitely called busybox and not busybox-armv6l?

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

DeFroST FAQ... http://xdaforums.com/showpost.php?p=6622965&postcount=2
[Desire Android Development] iinga:
Quick question:

I'm trying to automate this process for rom upgrades and I was wondering if

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

is needed to be run every time you reflash a rom?

EDIT: Guess not from reading people's posts.

Am i right in thinking, on upgrading a rom, all that is required is a new busybox, the script and deleting the apps2sd script? Does ef2sck_recvy need pushing back to the rom, or is this not required?
[Desire Android Development] iinga:
Ok, so through lack of any other easy options, i have created an update zip to be flashed immediately after flashing an upgraded rom. It should work on any rom.

http://www.iinga.net/desire/data2sd/data2sd-reinstall-signed.zip

This is a beta so testers are appreciated. Also, if someone could let me know whether the e2fsck_recvy is required to be flashed (i assume so, considering the script calls for it) but whether it needs 777 chmod. The only way i could boot was to chmod it so i picked 777.

I also require some people who have not yet installed data2sd but would like to, to test a batch script I have made to automatically install data2sd (it requires you partition your sd card and then run it).
[Desire Android Development] Ignore.z:
will your update work with DeFrost 6.0j?
[Desire Android Development] iinga:
If you have previously installed and had a working data2sd then yes. Otherwise, i'd like you to test my other script that needs testing before launch
[Desire Android Development] Ignore.z:
ok, I'll try it.
[Desire Android Development] iinga:
please check edit. If data2sd has worked for you before, then use the flashable zip i posted. Otherwise, pm me
[Desire Android Development] danarama:
It should work, but you'll still need to remove a2sd script don't you?

Also for some reason flashing doesn't work for me without data wipe. May have had some erroneous data somewhere. Will see eats required next upgrade

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

DeFroST FAQ... http://xdaforums.com/showpost.php?p=6622965&postcount=2
[Desire Android Development] iinga:
The zip removes the apps2sd script and replaces it with data2sd. As far as i know, it can be flashed over any ROM for someone that previously had data2sd, but would obviously need testers.

FYI: I tested on a defrost upgrade.
[Desire Android Development] hajen78:
As i have told you, your the best and thanks for all your help.
[Desire Android Development] LoQo_:
What type of partition is needed to work?
[Desire Android Development] iinga:
2 lots of FAT-32 Primary partitions
[Desire Android Development] LoQo_:
Another question, what is the correct procedure to get it right? Rom works with sense? Thanks

Sent from my HTC
[Desire Android Development] Café King:
A big thanks to iinga and dnlgee for their time on helping me with this... Two God damn hardcore android dudes!!!

Sorry for ot.

/CK
[Desire Android Development] Alex-V:
Don´t know if its posted...but here is a thread with a automatic script

http://xdaforums.com/showthread.php?t=855660

with kind regards...Alex
[Desire Android Development] Renz33:
Urgent pls..

i can't seems to get through this step.

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

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

what is wrong???????????
[Desire Android Development] kimi789:
my rom is oxygen,and there is no 40a2sd in etc,which one should i delete?
[Desire Android Development] BriEE:
I don't know what's the next step usually...
[Desire Android Development] @ngel:
Ok, don't know if this has something to do with data2sd, but my Desire has just lost all settings and roughly 70% of the installed apps now appear ad zero-byte generic icons. Running DeFroST 6.0j.
[Desire Android Development] iinga:
10apps2sd

10char
[Desire Android Development] iinga:
In recovery, if you mount sd-ext and then cd into /sd are all the files there?
[Desire Android Development] Droidzone:
Ok, my turn to try this..

And getting the first error message..

I'm doing Sibere's method now..

The full log of my commands is given below:

C:\Software\htc\android-sdk-windows\tools>adb shell
~ # mount /data
mount /data
~ # mount /sdcard
mount /sdcard
~ # mount
mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
/dev/block/mtdblock4 on /cache type yaffs2 (rw,nodev,noatime,nodiratime)
/dev/block/mtdblock3 on /system type yaffs2 (rw,relatime)
/dev/block/mtdblock5 on /data type yaffs2 (rw,relatime)
/dev/block/mmcblk0p1 on /sdcard type vfat (rw,relatime,fmask=0000,dmask=0000,all
ow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-
ro)
~ # 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/swap bs=1048576 count=64
dd if=/dev/zero of=/sd-ext/swap bs=1048576 count=64
64+0 records in
64+0 records out
67108864 bytes (64.0MB) copied, 2.957713 seconds, 21.6MB/s
~ # /system/xbin/busybox/mkswap /sd-ext/swap
/system/xbin/busybox/mkswap /sd-ext/swap
/sbin/sh: /system/xbin/busybox/mkswap: not found
~ #

So the first error is here:

~ # /system/xbin/busybox/mkswap /sd-ext/swap
/system/xbin/busybox/mkswap /sd-ext/swap
[B][COLOR=DarkRed]/sbin/sh: /system/xbin/busybox/mkswap: not found[/COLOR][/B]

So I've pushed busybox to /xbin, but I believe I havent made it an executable or 'installed' it yet. Maybe that's why system says that there is no /mkswap inside / /system/xbin/busybox..

What to do next?
[Desire Android Development] danarama:
Bit hard to see on xda app but do you need 2 lines starting dd if you want swap?

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

DeFroST FAQ... http://xdaforums.com/showpost.php?p=6622965&postcount=2
[Desire Android Development] hajen78:
I had iinga to do this for me but every time i reboot it changes language. Does someone no what to do ?
[Desire Android Development] @ngel:
Thank you for your answer, but I've already rolled back to A2SD+.

Just for information, how could be possible for the recovery to recognize the sdext file on the second FAT32 partition as an actual ext2 partition without any script running in advance (/system/etc/init.d/01data)?
[Desire Android Development] EViollet:
Thanks

Hi all.

Thanks for this tutorial.

I find that my phone is now even faster than before. Excellent job!! :)

Just one question. Once using data2sd, how do Nandroids work?

If I do a nandroid, will it backup the data on the second partition as one file?

Regards,
[Desire Android Development] coutts99:
Anyone tried this with RCmixHD
[Desire Android Development] op8867555:
Is there any other way to make a minimun backup? :confused:
[Desire Android Development] sibere:
How can we know with so few information?

give details like kernel, rom, commands you typed before and their results.
[Desire Android Development] sibere:
This has already been answered here but I'm gonna explain again.

clockworkmod recovery is backing-up the ext2 (and if present swap) file(s) as a simple file.

When you restore it, the file is just restored and when you reboot, it remounted as a ext2 file system over /data via a loop device.
[Desire Android Development] sibere:
See my answer to a similar question one post above.
[Desire Android Development] Droidzone:
That's it..

C:\Software\htc\android-sdk-windows\tools>adb shell
$ /system/xbin/busybox
/system/xbin/busybox
/system/xbin/busybox: not found
$

This is a stock rooted Desire..Fresh after rooting..Busybox wasnt installed. I'll try to get it installed and revert back..
[Desire Android Development] sibere:
Great job!

755 should be ok for the rights.

# ls -l /system/bin/e2fsck_*

ls -l /system/bin/e2fsck_*

-rwxr-xr-x root shell 195628 2008-08-01 14:00 e2fsck_recvy

# ls -l /system/xbin/busy*

ls -l /system/xbin/busy*

-rwxr-xr-x root root 1062992 2010-11-10 18:01 busybox
[Desire Android Development] sibere:
Well, you're close to victory :) just chmod 755 /system/xbin/busybox and chown 0 0 /system/xbin/busybox

I've added this to the OP to for e2fsck

If you don't have e2fsck_recvy in you rom, unzip it and push it to /system/bin the same way:
adb push c:\e2fsck_recvy /system/bin/
adb chmod 755 /system/bin/e2fsck_recvy
adb chown 0 2000 /system/bin/e2fsck_recvy

and this for busybox:

chmod 755 /system/xbin/busybox
chown 0 0 /system/xbin/busybox
chmod 755 /system/etc/init.d/01data
chown 0 0 /system/etc/init.d/01data
[Desire Android Development] shawe_ewahs:
With your changes work perfect, you can solve the Fc's on first boot with ROM Manager, and use it without more problems on next reboot :D
[Desire Android Development] fogbav:
+1 - this would be awesome ... but this Rom works different to other Roms ... 8(
[Desire Android Development] coutts99:
Hmm, nearly there, but it resets the permissions on /system/etc/init.d/01data to just rw on reboot so it won't run.
[Desire Android Development] shawe_ewahs:
For people who want integrate on here ROM's without do nothing on recovery, use the attached script.

Only need use ROM Manager on first boot for solve FC's, and reboot, tested on AuraxTSense 8.0.

If anybody know how to solve FC's from script, this is the only needed on this script work perfectly.
[Desire Android Development] @ngel:
That's right. So are you stating that the 01data startup script located under /system/etc/init.d will be executed even if the Desire is booted up into recovery?
[Desire Android Development] coutts99:
Fixed that but have some other issues
[Desire Android Development] sibere:
Never said that and it looks like I'm not clear enough...

this script is NOT and doesn't need to be executed at boot in recovery. and it's the same for any script like a2sd!

The clockworkmod recovery is automatically backing-up ALL the data in each partition except mmcblk0p1 (your usual /sdcard/). The EXT2 file is backed-up as a normal file and will be restored that way. It'll be then mounted as an ext2 file system (remember that there is no ext2 partition! just 2 FAT32) on normal boot.

Got-it? ;)
[Desire Android Development] @ngel:
This is crystal clear to me, pal. ;)

But, I was wondering about what iinga said in this post (which I was quoting when I asked that stuff about the script).

If I mount /data via clockworkmod recovery, how can I see the actual content of the ext2 file as a file system? That sounds quite strange to me.
[Desire Android Development] @ngel:
So, let me understand: if I put your script into /system/etc/init.d (after wiping out the a2sd' one) I get DATA2SD without the need of re-partitioning my sdcard with two FAT32 partitions and of making the ext2 file on the second one? Can I leave my sdcard as required by standard A2SD+ (one FAT32 partition and an ext3 one)? :)
[Desire Android Development] coutts99:
I have this working now :)

Basically follow normal instructions, except call 01data 02data when pushing onto the phone

I used http://xdaforums.com/showpost.php?p=9481871&postcount=358

The after, boot into recovery

rm /system/app

rm /system/customize

ln -s /data/app_s /system/app

ln -s /data/customize_s /system/customize

I now have 1.06gb free internal memory on RCMixHD :)

You also need to change /system/etc/init.d/98zipalign -:

echo "Starting Automatic ZipAlign $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
for apk in [B]/system/sd/app/*.apk[/B] ; do

to

echo "Starting Automatic ZipAlign $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
for apk in [B]/data/app/*.apk[/B] ; do
[Desire Android Development] shawe_ewahs:
I do all tests with partitions do it from recovery, ext2 and fat32.

You can use this script with partitions do it from recovery without problems (ext and fat or fat and fat, you can have a little more space with 2 fat partitions but I don't test it), only a lot of FC's appears on first boot, caused for this script, but this can be solved for the moment with ROM Manager. Next release must have this feature solved ;)

You don't need do nothing from recovery, only flash a ROM with this script on /system/etc/init.d and without others script for a2sd, a2sd+ or darktremor.
[Desire Android Development] Bengaal:
will there be a difference choosing ext2, ext3 or ext4
[Desire Android Development] @ngel:
Thank you pal. Keep up the great work! :)
[Desire Android Development] Droidzone:
I'm having a weird problem now..

Was again doing it from scratch.

But adb shell shows the prompt for a couple of seconds, and exits the shell immediately. Weird..
[Desire Android Development] bluelavender:
One idiot question from me...how to use ROM manager to solve force close ? run the rom manager...or ? :)

Thanks :)

BL
[Desire Android Development] Droidzone:
Does anyone know what on Earth this is:

C:\Software\htc\android-sdk-windows\tools>adb devices
adb server is out of date. killing...
ADB server didn't ACK
* failed to start daemon *
error:

C:\Software\htc\android-sdk-windows\tools>

Then it shows the device. Then, again exits the shell. At that point if I do a "adb devices", the previous error repeats itself..

C:\Software\htc\android-sdk-windows\tools>adb devices
adb server is out of date. killing...
ADB server didn't ACK
* failed to start daemon *
error:

C:\Software\htc\android-sdk-windows\tools>adb devices
adb server is out of date. killing...
* daemon started successfully *
List of devices attached
MB040PL01575 recovery

C:\Software\htc\android-sdk-windows\tools>adb shell
adb server is out of date. killing...
* daemon started successfully *
~ #
C:\Software\htc\android-sdk-windows\tools>adb devices
adb server is out of date. killing...
ADB server didn't ACK
* failed to start daemon *
error:

C:\Software\htc\android-sdk-windows\tools>
[Desire Android Development] mattiadj:
If i want use it with clean flash of leedroid what i must do?
[Desire Android Development] Droidzone:
Rom Manager>"Fix system file permissions"
[Desire Android Development] Bengaal:
edit; already answered
[Desire Android Development] @ngel:
Please read this: http://xdaforums.com/showpost.php?p=4913853&postcount=10