yashsingh1/xdaforums huggingface dataset:
[Desire Android Development] moebius83:
Since I moved everything on the sd ext partition I don't want my phone to boot if for some reason it can't find the external partition (for some reason my microSD seems to be unavailable sometime at boot), so I made this change to the script that will generate a bootloop and print some useful errors in case the script can't find the second sd partition:

else
echo " ERROR : No second Partition on microSD found";
echo "-- BEGIN" >> /data/forced_reboot.txt;
date >> /data/forced_reboot.txt;
echo "Forcing system reboot because the ext partition wasnt found!" >> /data
echo "-- END" >> /data/forced_reboot.txt;
echo >> /data/forced_reboot.txt;
sync;
/system/xbin/reboot -f;
fi;

this should substitute the last "else" of the original script. This mod will also cause a file forced_reboot.txt to be created on the internal /data partition so that you'll know the system didn't boot for some reason if you investigate it through the recovery.
[Desire Android Development] melethron:
Ill modify that a bit and add it to next version of the script.
[Desire Android Development] moebius83:
Sure no problem go ahead, that's the best part of an open development community!

I may try rebooting the phone using "init 6" instead of reboot, maybe it's better, but I don't know if it really matters...

(via Tapatalk)
[Desire Android Development] woti23:
so it reboots, checks for the ext partition, fails, reboots, ....

loop mounting literally ;-)

interessting would be to start internal with a minimal config (instead of full start with all the now not available stuff from sd) - say max 50MB, which allows phone, sms, email
[Desire Android Development] moebius83:
Exactly but you can barely do something different, at most you could power off the phone...

What happens if you boot without all the stuff on the Sd is exactly what you say,a minimal config with just the stuff embedded in the Rom (system/apps) , the problem is that when the boot finishes, the phone writes something I don't know where, that will screw some configurations the next time you boot with the SD, for examplei have to manually re-add all the widgets because they "fail to load" for some reason

(via Tapatalk)
[Desire Android Development] moebius83:
@melethron and @sibere,

I wrote a post on how to enable init.d on stock desire rom, maybe you can link it to the OP so people willing to try these scripts on stock rom will know how to do it, this is the post
[Desire Android Development] xavierjohn22:
Okay now i wanted this to be graphical.

Is this correct?

If it is not too much when you are sure of wht exactly it moves please post and i will add it.

/data/app is it also moved by data2whatever and data2sd?

anyways, this image is not done yet for i am searching accurate locations.
[Desire Android Development] woti23:
intern ---- extern (sd)

1 froyo app2sd

moves partially to

/dev/block/dm-0 on /mnt/asec/android.androidVNC-1 type vfat

and

tmpfs on /mnt/sdcard/.android_secure type tmpfs

not available for all apps

2 a2sd (app2sd)/ a2sd+ (app2sd+)

/data/app

/data/app-private

->

/sd-ext/app

/sd-ext/app-private

+ ... also /data/dalvik-cache is move to /sd-ext

(/sd-ext is in roms sometimes shown as /system/sd)

3

DATA2SD

/data (and every subdirectory) mounted on a loopfile in 2nd fat32 partition on sdcard

4

DATA2EXT

this has changed so often, here the latest first post

EDIT:2010/12/12 update V4 script:

/data/:ext4, disable journaling

/data/data:ext4 loopfile on ext4 device, enable journaling on ext4 device, disable journaling on ext4 loopfile, for fast and stable sqlite3 access.

really smooth this time. please trying...

5

data2whatever

/data mounted on 2nd partition (can be ext2-4, reiserfs, btrfs)

dalvik-cache symlinked back to internal data in nand

living on the edge: mount option for ext4: sync
[Desire Android Development] xavierjohn22:
that was so detailed, Cool!! Thank you very much woti23!
[Desire Android Development] adodesign:
thank you very much.:)
[Desire Android Development] sibere:
Linked on my OP! Thanks !

I tried this while ago for flashing my own boot.img ;)
[Desire Android Development] melethron:
Property, misc, system are also on internal to avoid the settings reboot bug...
[Desire Android Development] melethron:
Link added.
[Desire Android Development] hajen78:
Treid that, but it dident work, it still wrote "write 0 (0)" now i have treid installing MIUI based on data2whatever, and that works fine, so maybe it is just Defrost that wont work on data2whatever ?
[Desire Android Development] iinga:
Defrost definitely works, but i'm not sure what's wrong with your setup
[Desire Android Development] omosiro:
When I try 0.4, 0.4b, 0.4c, I worked greatly fine.

BTW 0.4d, First Boot looks fine but on 2nd boot, Phone fall into a loop.

I have a EXT4 1.12Gb partition.

16Gb Class 6. I'm using MIUI 0.12.31
[Desire Android Development] melethron:
Ill take a look at it but want to update my rom first.
[Desire Android Development] kart_man_21:
leedroid 2.3c

Works like a charm with leedroid 2.3c and data2whatever 0.4b.

Is it needed to update to data2whatever 0.4d? Or does this not give any additional benefits for me?

I have 1GB internal memory free :) Thanks!!!
[Desire Android Development] xavierjohn22:
Thanks for the info
[Desire Android Development] melethron:
No real benefit from that. Also 0.4d might have issues.
[Desire Android Development] vivmar:
hey melethron,

yesterday i have installed a miui-au rom with your latest script, on a ext3 partition.

i just noticed that the partition filesystem actually is ext2.

Is it normal? your script can convert my partition from ext3 to ext2?
[Desire Android Development] iinga:
I believe the MIUI-au rom (which currently has a broken data2ext setup) runs the life-on-the-edge addon, which makes the ext2(?) loop.

Try downloading the MIUIau apps2sd rom and then flashing data2whatever over it
[Desire Android Development] JeremyLeroy96:
Everything was going awesome until today....

I rebooted my phone and all of my data was gone. My first thought was maybe that the SD card for some reason didn't start at boot (it was plugged in) i reboot my data is back, but all of my settings are reset! Luckily i backuped like 10 minutes earlier, but as soon as i rebooted that it happened again, and the same thing for the nandroid from the day earlier. And i wasn't experiencing these issues when i backuped! yet... its happening! It literally makes no since!

Again rebooting only resets my settings, but curiously enough my home button completely stops working! So that means no repair settings and go on!
[Desire Android Development] omosiro:
0.4d dont work for me.

I'm using 0.4 script.

how can i get 0.4c script. please anyone can share to me 0.4c script.
[Desire Android Development] vivmar:
Good to know ... i'll try...
[Desire Android Development] iinga:
Are you using the life-on-the-edge addon? Also, what do you use to reboot? What ROM is this on?
[Desire Android Development] xavierjohn22:
Does someone have a link to 0.4b?
[Desire Android Development] mark1316:
I'm sure if you read the thread it states don't re boot ? Think it says that for a reason ? ?
[Desire Android Development] xavierjohn22:
Even without life on the edge add on it is advice not to reboot with any other app or the snqs power menu.

the first post mentioned and explained why.
[Desire Android Development] vivmar:
So,just for be clear,the only one methods for reboot or power off the phone are the commands on power button menù windows...right?
[Desire Android Development] omosiro:
Here is

http://www.mediafire.com/?2z3yhzwgkaxkdik

and I'm finding 0.4c. Is there anyone?
[Desire Android Development] moebius83:
If you read one of my previous post this happened to me too, and the reason is that for some reason the sd card isn't available at the moment the data2whatever script starts, so the phone boots with your original internal /data partition and the phone looks like just reseted, only the app you have on the original rom are present and the settings are all reseted.

If you reboot the sd card will probably be now available and your phone will boot normally, except that some settings are lost, that's because /data/misc /data/property and /data/system were modified and somehow overwritten by the phone booting without the data2whatever script.

To avoid this I posted a mod that will likely be included in the next data2whatever script that will cause a bootloop if the sd can't be mounted when the data2whatever script starts, this will hopefully delay the boot until the sd card becomes available.
[Desire Android Development] iinga:
I will update here seeing as the place where the MIUI_Au forums are hosted consider me to be spamming.

The latest MIUI_Au Data2Ext build (which has been pulled) is very buggy. It contains both the Data2ext script and an Apps2sd script (which isn't removed by an update script or anything). People have found that it boots fine first boot, but on subsequent boots will bootloop (and some people have reported errors on installing apps).

Can anyone with this issue either: remove the 04apps2sd prior to flashing, or reflash the data2whatever script provided here.

FYI: it also installs life-on-the-edge by default and not everyone wants that, so you may want to delete that too.

http://www.iinga.net/desire/miui/i-data2we-0.4d-signed.zip will remove the apps2sd script and also the life on the edge (loop) addon for those that don't want it.

Another alternative is to just choose the MIUI_Au apps2sd and flash data2whatever over it.
[Desire Android Development] melethron:
There is actualy no real "ext3". Ext3 is just ext2 + journal. When you use life on the edge the journal will be removed (and ext3 is ext2 then) and when you use it without life on the edge it will add a journal and its ext3 then.

^ this.

But i think thats a little bit different. If the sd-card wouldn't be ready the internal will still be mounted to /system/data_internal and there will be no /data overall. The phone shouldn't boot at all. So i think the issue is that /data doesnt get unmounted. This could proberly be fixed through ramdisk mount but its impossible to make a script that works for all roms then ....

LOL: data2whatever + 40a2sd = fail
[Desire Android Development] melethron:
What recovery did you use to backup? If its amonra 2.0.0 or lower this might be the issue because it doesnt backup /sd-ext/data. So after a restore the complete /data/data folder will be gone.
[Desire Android Development] _bryan_:
Here you are!
[Desire Android Development] melethron:
@ all:

I won't have much time the next days. And if i find some time i want to update my ROM.

I reuploaded 0.4c to the OP for those that have issues with 0.4d.

Edit: bryan was a bit faster uploading 0.4c
[Desire Android Development] moebius83:
not really true, because the first part of your script is:

if [ -e /dev/block/mmcblk0p2 ];
then
...
else
echo " ERROR : No second Partition on microSD found: the ROM will most likely not work or only use app2sd";
fi;

so if for some reason the sd isn't ready and the ext partition isn't available, meaning that it doesn't appear at all as device, the whole script won't start and the internal /data doesn't get unmounted and nothing gets mounted as /data_internal either. I'm sure about this because when it happened to me I inspected the phone through adb and saw that mtblock5 was just mounted as /data, so the script didn't run at all, and at that point I decided to make that mod.

Also if the /data unmount fails, it's not a real issue because if the ext partition is available it gets mounted OVER /data anyway and its content will "overwrite" the internal memory one, and then the internal memory will also get mounted as /system/data_internal, this also happened to me previously, but after I correctly enabled init.d it never happened again.
[Desire Android Development] xavierjohn22:
Thanks bro, 0.4c is in the first page and available for download.
[Desire Android Development] xavierjohn22:
Yes Power OFF, (if the intention is go to recovery for most cases)

From power off, do the power on + vol down.
[Desire Android Development] frozeus:
Hi,

How to remove the partition in External SD Card ?

Thanks
[Desire Android Development] xavierjohn22:
i juts use the PC (Windows 7) Disk Management + Minitool Partition Wizard.

There are more ways you can imagine and are all over the web.
[Desire Android Development] frozeus:
Yes,

But it's a MicroSD and i don't have an adaptater :/

And in Recovery you can't format with 0mb :(
[Desire Android Development] moebius83:
If you just need to remove it, run "fdisk /dev/block/mmcblock01" in recovery mode and remove the partition you don't want, no need to format it.

EDIT: I mean through the adb shell
[Desire Android Development] melethron:
you're right ^^

This would also explain the reset of some settings because the /data/data folder will be recreated and on the next boot those data will overwrite the ones in the /data/data folder of the ext partition. But only of these in /data/data because the /data/system, /data/misc and /data/property are there.

I add your reboot on "card missing" soon. But only 3 times and then shutdown.

But it still doesn't explain why the settings are gone after nandroid. The only explanation would be that nandroid didn't backup /sd-ext/data but only the app2sd stuff (which amon ra before 2.0.1 does that way).
[Desire Android Development] melethron:
It's "fdisk /dev/block/mmcblk0". And if you just remove the partition there will be unformatted space. To get only one fat partition with all space you need to remove all partitions and create a new primary partition and then format as fat.
[Desire Android Development] Terepin:
So I'm NOT the only one with this problem after all!
[Desire Android Development] melethron:
Hmm. I tested nand+ext backup with amon ra 2.0.1 one time and it worked. I'll take a look where the issues lies if i have time.
[Desire Android Development] Terepin:
Now it worked even for me. There must be hidden rare bug that hard to reproduce.
[Desire Android Development] melethron:
I tested it again. It worked...

Well 2.0.1 is a beta version. I would prefer clockwork anyway but i use the "usb-ms toggle" of RA quite often.
[Desire Android Development] frozeus:
OK so i have install my rom without data2whatever wipe all data

But i don't know what is the command in adb.

c:\Android\Android SDK\platform-tools>adb shell fdisk /dev/block/mmcblk0 -ul

Disk /dev/block/mmcblk0: 8166 MB, 8166309888 bytes

4 heads, 16 sectors/track, 249216 cylinders, total 15949824 sectors

Units = sectors of 1 * 512 = 512 bytes

Device Boot Start End Blocks Id System

/dev/block/mmcblk0p1 1 13949218 6974609 c Win95 FAT32 (LB

A)

Partition 1 does not end on cylinder boundary

/dev/block/mmcblk0p2 13950976 15949823 999424 83 Linux

c:\Android\Android SDK\platform-tools>

How to remove and format a new ?

Edit in "command (m for help)" i can't write a letter :(
[Desire Android Development] Orka82:
But you could use the USB-storage-mount option present in Clockwork too? ;)

Mounts and storage -> mount USB storage
[Desire Android Development] melethron:
Hmm. Did you try "adb shell" and then "fdisk /dev/block/mmcblk0" (separate - not one line). Not sure about letters not working ... i'm on ubuntu and shell works fine there ....

First of all you know that your will be empty if you repartition the whole card?! If so read on ;)

If the letter works you need to (fat text is buttons to press)"

d

elete partition

2

+

d

elete Partition

1

+

n

ew

p

rimary partition

1

+

enter

+

enter

(for default values) and after that you can

w

rite the parttable.

After that you need to format it as FAT. This is done with "busybox mkfs.vfat /dev/block/mmcblk0p1".

That only mounts mmcblck0p1 ... i already asked IEF to implement usb of other partition.... when this feature is in i go back for cwr.
[Desire Android Development] Orka82:
I see! Of course. I now know why i switched to amonra's.. but i really want clockwork's recovery..
[Desire Android Development] frozeus:
Ok, thanks works fine when it's not on the same line

But to format i have use windows because it says mkfs.vfat aplet not found
[Desire Android Development] melethron:
Hmm amon ra busybox has mkfs.vfat included.... well windows works also...
[Desire Android Development] JeremyLeroy96:
Ugh, i would hate to do this to you :D where can i find this mod, I searched through the thread and you mentioned flashing a new boot.img, where can I get a mosified one that will work with cyanogen? Or is it an easy .zip ( I never saw it)

Well I dont use that..... But I saw it say "Restoring SD-Ext"
[Desire Android Development] hajen78:
If i DONT use life-on-edge i get write 0 (0) in tap bench, and my phone is very slow. Does anybody know why ? I use MIUI 12.31.R2 and it is the same with Defrost, but with life-on-edge it works great, and is very smooth :confused:
[Desire Android Development] moebius83:
mmm no you're mixing my posts :) the boot.img mod is in order to enable init.d, but if you're using cyanogen you already have a correctly working init.d, the other mod I'm referring to is in this post
[Desire Android Development] moebius83:
show us the output of: "adb shell mount"
[Desire Android Development] melethron:
I think this depends on the sd-card. Sd-cards are in general not made for stuff like a database but for large files like pictures mp3s etc. They can be fast at writing a 2mb image file but slow on a 2kb file.

It also impossible to get infos on how a sd-card works exactly. For the same reason it is hard for filesystem developers to optimize a filesystem for ssd.

Here is some info about this: http://lwn.net/Articles/353411/ http://en.wikipedia.org/wiki/Ssd
[Desire Android Development] hunterd13:
gotta say this mod is fantastic. using a crappy class 2 card and my phone is way smoother.
[Desire Android Development] JeremyLeroy96:
Alright first of all thank you for continuing to help me

One last question, i put that code in 01data2whatever and placed it at the last "else" assuming that "else" accounted for the sd card not being found......

Can i flash the "new" data2whatever over the old, or do i need to restart from scratch?

Also, it doesn't necessarily matter but i have to ask. Why didn't a nandroid restore make a difference? I couldn't comprehend that!

Change in subject:

Is it okay to use mass storage or is it not recommended? I noticed it worked

I noticed that somebody likes easter eggs....... :D
[Desire Android Development] JeremyLeroy96:
Woah! Sorry, double posted :o
[Desire Android Development] moebius83:
actually you could have edited the /system/etc/init.d/01data2whatever script directly on your phone in recovery mode (if your phone is not S-OFF), but you can also edit the file on your computer and then upload it to /system/etc/init.d/01data2whatever overwriting the existing one, just make sure you use a correct editor if you're doing this on Windows (aka, don't use notepad, use wordpad or something else), and after you upload it, change the ownership to root.shell and the permissions to 755.

I suppose you could also edit the file inside the zip file and reflash the update.zip, but I won't suggest it.

Back to the editing part, to be clearer, if the original script ends like this:

else
echo " ERROR : No second Partition on microSD found: the ROM will most likely not work or only use app2sd";
fi;

sync;

you need to change it to this, so replace the existing "else":

else
echo " ERROR : No second Partition on microSD found";
echo "-- BEGIN" >> /data/forced_reboot.txt;
date >> /data/forced_reboot.txt;
echo "Forcing system reboot because the ext partition wasnt found!" >> /data
echo "-- END" >> /data/forced_reboot.txt;
echo >> /data/forced_reboot.txt;
sync;
/system/xbin/reboot -f;
fi;

sync;
[Desire Android Development] woti23:
as i said before, the phone will continously reboot until the battery is empty, i don't get what is gained with that?
[Desire Android Development] moebius83:
that's my personal mod, it happens to me that the microSD isn't ready when the phone boots up the first time or sometime when the phone crashes, forcing a phone reboot when it can't find the ext partition solves the problem to me, I really don't want my phone to boot using the internal data partition because it screws a lot of settings.

Of course if you boot the phone without microSD or without an ext partition the phone will reboot continuously, but that's not the purpose of the script, it's quite easy to change that /system/xbin/reboot -f with a /system/xbin/shutdown that will shutdown the phone instead of rebooting it, but again, it's not the purpose of my mod.

Probably the best generic thing to do is, as melethron said, reboot 3 times, then shutdown the phone.

Again this was my personal mod for a problem that me, and a couple of other users, are having
[Desire Android Development] Billys_gr:
I flashed the data2whatever-v0.4d with oxygen 1.0.4, and i have some problems with lag..

I use a kingston 16gb class4, and i made the partitions with gparted, fat32 and ext4 1,4gb. After that, when i restored my backups, it delays more in the small files as you said in other post. But much more.

Also it lag when i start some apps, even at sms.

I looked at the data2whateverlog, and my partitions was already aligned, but i had some errors on Filesystem, if it is useful to upload the log, no prob.

Now in the Quadrant, i usually have 1350+ , sometimes 1600+. But when check it the I/O, concretely the "database writes" it stucks for a few minutes, 5-10'.

Are these normal? Is there anything that i can do, to improve speed and smoothness?

When i had ext3 512mb with rom manager, i does'nt have problems with transport of files, at mass storage. Now i had them, even before flashed the rom and data2w.

Thanks!
[Desire Android Development] peterme58:
i would like to share my experience with the data2 xxx first of all i had the pre rooted stock rom from tepic with richartrips kernel v5e

a) with the sibere data2sd everything was smooth, no missing setting, no reboots etc but when i updated the rom and used ironz ad or mount data2sd i had those missing setting after reboot or shutdown so...

b) i tried the data2whatever 2e with 1gb ext4 (made from gparted) everything seems to be ok but i experienced lags when i was trying etc to remove a widget, to see the photos from gallery so...

c) i tried to flash the data2whatever 4c (that leaves the dalvik i the internal memeory that would be more smooth) and... after three atempts with reformation of the sd each time ( 16gb class 6 new) with the ext4 1gb partition( with gparted) i waited about 1 hour each time and nothing happened, the telephoen stook in the logowith, so ...

d) i reverted back to sibere for smoothnes... with all the risk

I wanted to ask why when i use the data2wathever 2e works (lagy from my opinion) and when i flash the 4c nothing happens, becouse i want to go to something safer than the data2sd, and to be able to make nandroid backup but i dont want to leave smoothnes...

thank all for your great effort and for the great work.
[Desire Android Development] enzoscotch:
sorry,works with opendesire?
[Desire Android Development] enzoscotch:
on oxygen RC5 doesn't work
[Desire Android Development] melethron:
If you want more safety than use a direct loopmount instead of a loop file. There is only one flush from cache then. Smoothness is same.
[Desire Android Development] peterme58:
Thank you for your answer so the best solution is to flash the data2whatever 2e (because the 4c doesn't work for me) and then the addon you made...and I will have the benefit of taking a nandroid backup, and no lost settings anymore!
[Desire Android Development] Kashban:
Well, I encountered a problem too (LeeDroid 2.3c a2sd, data2whatever 0.4c): I partitioned my SD card with a data/a2sd partition of 3GiByte. It is mounted successfully, all apps are working, but I'm not able to update or install any apps even though there are Gigabytes of space free.

Quick System Info pro shows both internal storage and a2sd storage have 3 GiByte free space (seems to be same partition, though).

Probably better to use the non a2sd version, since there is already enough space on /data to install apps en masse?