[Q] Apps, DalvikCache AND app data to SD on Stock ROM? - Galaxy Ace S5830 Q&A, Help & Troubleshooting

On the stock GB ROM, Link2SD requires a FAT32 partition to move the App and DalvikCache to the SD.
EDIT: Actually requires FAT32 OR EXT2 for stock...
Titanium backup requires an ext2/3/4 partition to use the Data2SD feature.
Is it possible to do both of these on a stock rom? Or use some other method to get the App, DalvikCache and app data to the SD without flashing another ROM?
I will be doing this for 3 of my family's phones and would much prefer to not have to flash ROMS and them have to put in extra effort afterwards.
I promise I've searched so apologies if this has been answered elsewhere, the closest I could find was http://forum.xda-developers.com/showthread.php?t=1605006 which didn't answer the question...
Thanks in advance!
Tim

I have created two partitions, one FAT32 and one EXT2 using MiniTool Partition Wizard
Link2SD is correctly setup and working.
Titanium Backup has this to say:
The supported mount points for the ext2/3/4 partition are:
/system/sd/ (“classic” sd-ext)
/sd-ext/ (“Cyanogen” sd-ext)
/data/sd/ (“MIUI” sd-ext)
However none of these mount points are present (it appears to mount under /data/sdext2/) so I'm unable to use the Data2SD functionality as yet.
So the question now becomes, can I create multiple mount points for a single EXT2 partition on a Stock ROM (ideally easily!).

Install a custom kernel with init.d support.
Cf-root is the most common since it's based on stock, and preserves baseband.
After that, there's many choices:
-link2sd as you've beeb using
-cronmod or amarullz scripts (int2ext+) which mount sd partition as extention to internal memory (every app on internal gets installed to the partition).
-s2e has the option to also move data to the partition.
Keep in mind that having data on the partition will lower performance and smoothness as compared to having data on internal.

dxppxd said:
Install a custom kernel with init.d support.
...
...
Keep in mind that having data on the partition will lower performance and smoothness as compared to having data on internal.
Click to expand...
Click to collapse
Thanks for the advice.
I have a class 10 card that I was hoping would help mitigate the problem, am I just being naive?
I was hoping I'd be able to avoid a custom Kernel (haven't researched them enough yet)
I will try and find an S5830 Stock + init.d kernel tomorrow and see how that goes, I'm still planning on Titanium Backup to do the Data2SD.
Does this init.d script mount the partition somewhere that Titanium Backup can get hold of it then?

KingTimus said:
Does this init.d script mount the partition somewhere that Titanium Backup can get hold of it then?
Click to expand...
Click to collapse
I really can't say about titanium backups' data2sd function since i've never used it before.
The init.d script (i found cronmods' int2ext to be the most convenient) mounts the sd partition as part of /data. When making backups of apps+data titanium backup had 0 problems finding and backing up all apps. The problem might arise if the data2sd function tries to move /data (in which the partition is already mounted) to the partition.
Someone in the forum might know more details. You can always make a nandroid backup and see what happens. Good luk.

Related

[MOD] data and dalvik to SD (ext partition)

OK, I'm going to stop polluting other threads with my stuff.
This should help make sure I can keep up on the discussions and provide support for people trying to use my ZIPs and/or scripts.
NOTE: This version requires JACs kernel and init.d mods. Flash his stuff, then flash mine. All this will be integrated at some point and any other dev is welcome to integrate my stuff with theirs.
In addition to the JAC kernel, you need an ext partition on the EXTERNAL SD card. DO NOT USE ROM MANAGER TO PARTITION. You will get into a boot loop and will have to Odin back to stock. For partitioning, you may use "adb shell" in clockwork recovery, an old G1/Mytouch with Amon-Ra/Clockwork, a computer with a card reader and GPartd, Paragon, etc.. If you do it with fdisk, don't forget to format the partitions, here are some sample commands.
This will format an ext2 partition.
Code:
/system/bin/mke2fs /dev/block/mmcblk1p2
Convert from ext2 to ext3
Code:
/system/bin/tune2fs -j /dev/block/mmcblk1p2
Convert ext3 to ext4
Code:
/system/bin/tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk1p2
fsck, any ext version. Do this when you are done converting between types.
Code:
/system/bin/e2fsck -fpDC0 /dev/block/mmcblk1p2
For all of the above, make sure the partition isn't mounted with "mount". You also have to have already flashed either this ZIP, or my e2fsprogs-ext4 ZIP for the files to be installed in /system/bin.
This version will clean up older versions that I know about. It will remove any use of the playlogos hack, and the older version of my script that JAC included in his kernel.
Quadrant - 1722. I have also not seen any lag from this change. I've tried some apps that make heavy use of the database, and so far it's performing quite well. If you do see problems, I suggest fsck on the ext partition, and perhaps formatting it, to ensure it's nice and clean.
Please note that benchmark results will vary based on a large number of factors beyond my control. Try with a clean phone, no background apps. A faster SD card will help as well. I am using an older Transcend 8GB Class 6 that I used to use on my G1. It doesn't help that the free Quadrant tests lots of stuff, not just activity on /data/data and such.
To see if it's working, open a shell and type "mount". You should see entries like this:
Code:
/dev/block/mmcblk1p2 on /sd-ext type ext4 (rw,noatime,nodiratime,barrier=1,data=ordered)
/dev/block/mmcblk1p2 on /data/dalvik-cache type ext4 (rw,noatime,nodiratime,barrier=1,data=ordered)
/dev/block/mmcblk1p2 on /data/data type ext4 (rw,noatime,nodiratime,barrier=1,data=ordered)
Added data-only ZIP and the disable/revert ZIP.
Added auto-partition ZIP to create 1GB ext3 partition automatically. Note that this will delete ALL SD contents.
Added old-style enable-dc2sd for users of the auto-partition script. Do not use for JAC kernels, use the current dc2sd instead.
Changelog:
8/9/2010: Added loopback style version, should find prior versions and remove them, copying your data from the /sd-ext partition.
v2.
Compatibility fix for JAC -6 kernel.
v1.
Added e2fsprogs w/ext4 support to the ZIP
Better integration with init.d layout
On boot fsck to ensure that the ext partition is kept clean
Automatically copy files if /data has larger directories than /sd-ext
Test versions that should fix busybox to work with the newer JAC kernels. -loop uses the loopback filesystem method (RyanZA style). The other one is for an ext partition on the external SD card.
Feel free to post direct links or links to the kernel thread.
For some reason, the convetr to ext4 command isnt working for me.
Just says "Tune2fs 1.41.6" then back at # prompt
GREAT RESOURCE - Deserves a sticky just for the conversion syntax
EDIT: Maybe not, it said mounted as an ext3 before, now it says ext4
EDIT2: SUCCESS!!!!! EXT4 gives a major boost to the Quadrant score - 1531. WAY better than the~1100 i was getting before. Stupid G1 didnt actually convert ext3 to ext4, even though it said it did. Thanks!
Not that I'm stressin over Quadrant scores, but I just dropped ~100 (previous was 1497) after flashing this. Ah well.
Hmmm, before applying this script, I was just using JAC's v5 kernel, which worked fine, but after applying the OP's script, I cant backup in Clockwork (again lol).
It doesnt seem to mount /data and /datadata, as it only backs up /system and errors out on the other two. Any idea why?
EDIT: The error is really random, Ive now had 2 successful backups, 2-3 that failed due to mount issues, and 2-3 that failed due to MD5 issues. I would like to narrow down the possibilities, and I attempted a restore to stock, rooted, and then used JAC's kernel, same issue occurs (did not use your newest script). That being said, I dont think its your script. (stumped)
When converting to ext4 it said "please run e2fsck on the filesystem"
EDIT: Ran "mount" and it shows same messages you do. So it worked
LovellKid said:
When converting to ext4 it said "please run e2fsck on the filesystem"
EDIT: Ran "mount" and it shows same messages you do. So it worked
Click to expand...
Click to collapse
It's supposed to say that. Do it.
Glad it's working for some of you. As for nandroid, no idea. I'll install jac latest and check it out. Can't think of much I could have done to it though, I can't mod the ramdisk this way.
+1 on the nandroid, I went back and tried and couldnt. Also, tried to flash anamolous deodexed ROM and wouldnt. Gave errors e: cant mount /dev/block etc and failed. Could this be related?
LovellKid said:
+1 on the nandroid, I went back and tried and couldnt. Also, tried to flash anamolous deodexed ROM and wouldnt. Gave errors e: cant mount /dev/block etc and failed. Could this be related?
Click to expand...
Click to collapse
I doubt it, my stuff doesn't run in recovery, at least I don't think it will. I've never seen it run. I'll look into it, but it sounds like the jac mod might have an issue with nandroid right now.
There was a similar issue on the g1 with cm6. I wonder if that fix will work here...
Could you also post the Just DATA, and revert scripts in this thread please
Also, what would be the proper flashing order for just data?
1. JAC init.d
2. reverse
3. Just data
Or do I have to flash init.d, apply kernel, then reboot and flash reverse then just data?
The_Chrome_Coyote said:
Could you also post the Just DATA, and revert scripts in this thread please
Also, what would be the proper flashing order for just data?
1. JAC init.d
2. reverse
3. Just data
Or do I have to flash init.d, apply kernel, then reboot and flash reverse then just data?
Click to expand...
Click to collapse
Added revert and data-only to the OP.
If you don't have any sd-ext hack installed right now:
1. JAC init.d
2. data-only ZIP
3. reboot to download mode and flash the JAC kernel
If you already have dc2sd installed:
1. Revert ZIP
2. JAC init.d ZIP
3. Data-only ZIP
4. reboot to download mode and flash the JAC kernel
If you already have the kernel and the JAC init.d:
1. Revert ZIP
2. Data-only ZIP
I am trying to revert this fix, so I can try the new hack involving a virtual EXT2 partition. I tried the revert, and I manually deleted the a2sd and dc2sd files in init.d, but it rebuilds data when I reboot. ANy ideas?
zimphishmonger said:
I am trying to revert this fix, so I can try the new hack involving a virtual EXT2 partition. I tried the revert, and I manually deleted the a2sd and dc2sd files in init.d, but it rebuilds data when I reboot. ANy ideas?
Click to expand...
Click to collapse
You likely have a script in /system/etc/init.d doing it, or you didn't clean the old playlogos stuff up.
FWIW, I'm working on a similar way of doing it, but with ext4 and a proper init script. I don't like using ext2 for this stuff, too easy to corrupt it.
Does your new loop script require an sdcard with ext 4 partition or does it use the internal sd card?
ttabbal said:
You likely have a script in /system/etc/init.d doing it, or you didn't clean the old playlogos stuff up.
FWIW, I'm working on a similar way of doing it, but with ext4 and a proper init script. I don't like using ext2 for this stuff, too easy to corrupt it.
Click to expand...
Click to collapse
Thanks for your work! I found your dc2-loop-v1 script. Will play w/ that until you come out w/ something better. Is EXT2 really that fragile in terms of corruption when it is virtualized within a journaled file system (which I believe RFS is)
frank707 said:
Does your new loop script require an sdcard with ext 4 partition or does it use the internal sd card?
Click to expand...
Click to collapse
This loop version doesn't use an ext partition. Just the loopback mount. It will copy the files from an ext partition if you have applied that hack.
zimphishmonger said:
Thanks for your work! I found your dc2-loop-v1 script. Will play w/ that until you come out w/ something better. Is EXT2 really that fragile in terms of corruption when it is virtualized within a journaled file system (which I believe RFS is)
Click to expand...
Click to collapse
Most file system journals don't help with the data just the structure. Rfs rides on vfat, so I doubt it's worth much that way.
Gave the dc2-loop script a shot, to convert from the /SD-EXT method to this new ext4 container method. It creates the container correctly, but never seems to copy everything over. All my apps act as if i've never started them up, so Data isnt getting copied over correctly.
EDIT: Tried again, the dc2-loop script def doesnt work, and I have no idea why. It looks perfect (code-wise), but for whatever reason doesnt end up working properly
can't get your loop script working. every other one i have been able to run flawlessly. i just flashed the oc kernel by jac. any further instructions or pre reqs?

[Q] a2sd darktremor and Enomther's ROM

Does a2sd Darktremor work with Enomther's ROM?
I've installed a2sd darktremor via the zip file in recovery.
the sd card has an ext3 partition.
When in terminal emulator, typing /system/bin/a2sd check comes back with "not found"
Thanks
Enomther's ROM contains built-in support for A2SD. Absolutely no need to install anything else, just to look in the thread and in Spare Parts.
You can simply check app2sd related options(including dalvik cache moving) in spare parts. However, since you flashed Darktremor's over, I don't know if it will work well. If not, you need to wipe all, then flash the ROM again.
Thank you for the replies.
I've made a clockworkmod backup before I started tinkering, so everything is backed up.
The only changes i made, was to change my micro sd card from the standard 4gb FAT32 partition to a 8gb one (7gb FAT32, 1gb ext3)
In spare parts i then enabled oldstyle-extfs-apps2sd.
I noticed the free space on the internal storage increased from ~20mb to 60mb.
The a2sd storage 120mb has currently been used. My question is what exactly is in the ext3 partition and how do i move apps there ? (is it possible to individually move them)
Finally a bit OT, but a when doing a titanium backup i'm assuming this will still back up all system/user data?
If you check A2SD option - ALL your apps will move to EXT. Their data and Dalvik cache will remain on the phone.
If you check Cache2SD - Dalvik cache will also move to EXT.
You can't move the apps data to SD, unless you do it manually.
TB will backup everything.
All the rest you can read about in DarkTremor's thread.

[Q] A2SD & Flashing New ROM

Hi Guys,
I've posted in a couple of threads but didn't let loose for fear of hijacking it, so putting my question here for the good fellows to respond to if possible.
Basically put I have a ROM installed (Kang-o-rama SP1) and have a 1GB A2SD partition courtesy of DarkTremor.
What I want to know is what process should I go through to flash a new ROM but retain that Ext partition? I'm not sure if this is even possible? Should the wipe wipe absolutely everything and then after flashing the ROM I should rebuild the EXT partition and then use Titanium Backup (or something similar) to restore my apps to that A2SD partition?
Can somebody please just tell me what the best process is (even if that means wipe everything, and recreate from scratch each time you flash.
I was under the impression you see that I could wipe everything but retain the actual partition (albeit wiped) to restore apps to after a new Flash?
Thanks in advance
Probably your best bet is to use Titanium. When you restore, look for the setting in the app that mentions something to the effect of attempting to integrate your backup into a different ROM (Sorry don't have app in front of me).
You can also use ADB to pull your sd-ext to your computer. Push it back when you have the new ROM set up with ext
adb pull /sd-ext c:\whateveryouwanttocallit
I use Amon Ra's Recovery but I think Clockwork Mod has an option to backup just your sd-ext.

[Q] ext4 problems when changing ROM's

So I like to switch ROM's quite frequently, the only problem is that I seem to have to format my sdcard and set up the partitions each time I switch. I feel like nandroid either doesn't restore data to the ext4 properly or messes up the partition when I do a factory reset, since it formats the ext4 partition. Whatever the case, I am unable to move apps to the ext4 after a flash.
Whenever I want to switch to another ROM I have to backup my sdcard to my computer, format the card using diskpart, create the partition again in recovery mode, restore sdcard contents, and then finally flash the ROM I want. This can take forever and makes trying new ROM's out a huge hassle.
If I don't restore a nandroid and flash a ROM from scratch, I'll install s2e, reboot, and navigate to /sd-ext using root explorer and there will be no files.
I mainly use s2e with CM7, but I have tried a2sd with similar results. As far as I know though, they both use the same technique to move apps so it shouldn't matter.
Am I doing something wrong? I use nandroid and everything, but once I do a factory reset it refuses to restore the ext4 backup, and I get an error relating to space limitations.
Thanks a lot.
I've changed ROMs a few times, and everytime I've done so, the ext4 partition has remained fine. Although, it is seriously recommended that you flash the latest darktremor a2sd script as the incorporated ones don't seem to work well.
Flash darktremors, then enter the command line emulator on your phone and type:
su
a2sd reinstall (your phone will reboot)
su
a2sd cachesd (your phone will reboot)
su
a2sd zipalign
This should always be done after a ROM switch.
Alright, I will try that out.
Just wondering, will this restore all the apps I have on the ext4 partition? For example, if I flash MIUI for the first time, then commands the commands you gave me, will all my apps be restored? I assume no since clockworkmod wipes the ext4 partition when doing a factory reset.
The S2E and DarkTremor's a2sd apps actually use different ways of utilizing the ext partition, so the two are incompatible (although, S2E includes a way to convert from DT's to its own).
And as long as you didn't wipe the ext partition (which a Factory Reset does), using those commands should restore your apps.
But with what you are doing, it may be easier to use Titanium Backup to restore your apps back rather than nandroid. This will allow you to keep all your app settings and saved info as well. Just be careful to not back up system data. Restoring those on the same ROM can cause issues, and it would probably cause a lot more if it is between two different ROMs.
Switch your Ext 4 Partition to Ext 3 and you'll notice a lot more stability when switching roms.
Some roms don't have the correct Apps2SD or Kernel installed to support ext 4 but most, if not all, support ext 3.
I recommend using AmonRa Recovery as CWM always corrupts the ext partitions.
Re-partition your SD-Card and start again.
If This Helped please Hit THANKS

HELP!!! Link2Sd not working after recovery

I had a lot of CWM backups on my phone.
so I thought Ill do one nandroid backup of my current phone and then recover each of the previous nandroid backups to see what they actually are.
Then when I recovered my latest backub (done two hours ago) Link to SD doesnt seem to work. Before I was doing this whole CWM backup check everything was fine.
All the settings are as they should be too. only the apps linked are not theyre anymore. The apps only moved to SD are still available.
When I open Link2Sd and choose FAT partition (cause thats what my 2nd partition is) it says:
"Mount script error. Mount scipt cannot be created.
mount: mounting /dev/block/vold/179:2 on /data/sdext2 failed: Device or resource busy."
Can someone pls help me. I really need my phone to be properly working again when I go to work tomorrow.
You can see more details about my phone in the signature, if thats of any help.
Flash other Rom and Wipe all
Robbang said:
I had a lot of CWM backups on my phone.
so I thought Ill do one nandroid backup of my current phone and then recover each of the previous nandroid backups to see what they actually are.
Then when I recovered my latest backub (done two hours ago) Link to SD doesnt seem to work. Before I was doing this whole CWM backup check everything was fine.
All the settings are as they should be too. only the apps linked are not theyre anymore. The apps only moved to SD are still available.
When I open Link2Sd and choose FAT partition (cause thats what my 2nd partition is) it says:
"Mount script error. Mount scipt cannot be created.
mount: mounting /dev/block/vold/179:2 on /data/sdext2 failed: Device or resource busy."
Can someone pls help me. I really need my phone to be properly working again when I go to work tomorrow.
You can see more details about my phone in the signature, if thats of any help.
Click to expand...
Click to collapse
FAT32 won't work.
You need an ext partition
Sent from my GT-S5830 using XDA App
I guess u do this on stock? Stock cant backup ext-sd....
regards,
•ƒγяύs ργяσ™• eBuddy XMS pin: A24D43B9
[menulis dari xda app yg cilabi pakop]
MegaGalan said:
Flash other Rom and Wipe all
Click to expand...
Click to collapse
I flashed another rom, it still didnt work. now im back on my cyanogenmod frozen ace team. it still shows the same error when im trying to use link2sd
thanks for the reply
pyronia said:
I guess u do this on stock? Stock cant backup ext-sd....
thx, no i used it on the infinity rom. is theyre a chance of me bringing back my aps and files on my ext???
or should i just create new partitions and loose it all. this would really suck...
Click to expand...
Click to collapse
Your second partition has to be EXT. Try using a terminal with the following command:
Code:
tune2fs -l /dev/block/mmcblk0p1
It should tell you bad magic number as it doesn't understand FAT32
Code:
tune2fs -l /dev/block/mmcblk0p2
Should work as mmcblk0p2 is the second mountpoint for the EXT partition used by A2SD, S2E and Link2SD.
Your nandroid backups are on your FAT32 partition -- back that up to your computer (copy all files or make a disk image). Then repartition the SD card using CWM, turn off phone, now copy your files back to the new FAT32 (which will now be partition 1). Now reinstall SD card, boot in CWM and restore
iandol said:
Your second partition has to be EXT. Try using a terminal with the following command:
Code:
tune2fs -l /dev/block/mmcblk0p1
It should tell you bad magic number as it doesn't understand FAT32
Code:
tune2fs -l /dev/block/mmcblk0p2
Should work as mmcblk0p2 is the second mountpoint for the EXT partition used by A2SD, S2E and Link2SD.
Your nandroid backups are on your FAT32 partition -- back that up to your computer (copy all files or make a disk image). Then repartition the SD card using CWM, turn off phone, now copy your files back to the new FAT32 (which will now be partition 1). Now reinstall SD card, boot in CWM and restore
Click to expand...
Click to collapse
Thx man.I will try this a soon I got time.
Sent from my GT-S5830 using XDA App
Robbang said:
I had a lot of CWM backups on my phone.
so I thought Ill do one nandroid backup of my current phone and then recover each of the previous nandroid backups to see what they actually are.
Then when I recovered my latest backub (done two hours ago) Link to SD doesnt seem to work. Before I was doing this whole CWM backup check everything was fine.
All the settings are as they should be too. only the apps linked are not theyre anymore. The apps only moved to SD are still available.
When I open Link2Sd and choose FAT partition (cause thats what my 2nd partition is) it says:
"Mount script error. Mount scipt cannot be created.
mount: mounting /dev/block/vold/179:2 on /data/sdext2 failed: Device or resource busy."
Can someone pls help me. I really need my phone to be properly working again when I go to work tomorrow.
You can see more details about my phone in the signature, if thats of any help.
Click to expand...
Click to collapse
I've had the same problem. I noticed that CMW restore has formatted the sd-ext in ext4, and stock kernel does not support EXT4.
Solutions:
_ flash CF-root
or
_ take your sd, put it in a pc with an adapter, backup sd-ext, format it in ext2, restore the content
link2sd not installed
why link2sd cant installed in my phone after reboot?:crying:
tmz83 said:
I've had the same problem. I noticed that CMW restore has formatted the sd-ext in ext4, and stock kernel does not support EXT4.
Solutions:
_ flash CF-root
or
_ take your sd, put it in a pc with an adapter, backup sd-ext, format it in ext2, restore the content
Click to expand...
Click to collapse
Is this real ?
1) Why CWM restore formats sd-ext? Why is it not limited to work on internal memory? -> If this is true should be a good thing to remove always SD when using CWm... oh... no... this is not possible... If I remove it how can a restore be done from an sd ?
2) Reformatting sd-ext to original ext2 (compatible with stock ROMs) and restoring content (copu\paste) is s working solution to fix this problemi? Anybody can confirm this ?
thank...
I had the same problem, link2sd could not recognize the partition after a nandroid backup.
I'm using a HTC Explorer and made a backup on the stock rom, I'm new to this whole rooting business and I was hoping someone could help me get things back to the way it was before the backup.
Thanks in advance
K55V said:
I had the same problem, link2sd could not recognize the partition after a nandroid backup.
I'm using a HTC Explorer and made a backup on the stock rom, I'm new to this whole rooting business and I was hoping someone could help me get things back to the way it was before the backup.
Thanks in advance
Click to expand...
Click to collapse
On CM7 the 05mountsd script in the init.d folder caused this problem for me. Simply delete it and reboot.
Sent from my GT-S5830
I had that problem. I deleted the file /dev/block/vold/179:2 , rebooted & recreated mount script ....it's fixed. Plz take a backup before trying this.
ramoer said:
I had that problem. I deleted the file /dev/block/vold/179:2 , rebooted & recreated mount script ....it's fixed. Plz take a backup before trying this.
Click to expand...
Click to collapse
Working great. Thanks for the tricks...

Categories

Resources