[MOD] data and dalvik to SD (ext partition) - Vibrant Android Development

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?

Related

new vision and apps2sd?

just wondering if im doing something wrong? got NV installed with all 3 partitions and I had 77mb of internal mem. when I install new apps it takes away mem, am I doing something wrong, did I not config something right? I have read that apps2sd are automatic and to do nothing or it will break the system. dont mind the 77mb but would like to have my apps on my sd. any help would be great.
Do you have ext3? Drizzy expressly says you need it. So I assume if you only have ext2 there might be probs with your a2sd.
If that's not it. Did you follow all of these steps before flashing?...
This is how I installed without any problems:
: rename to update.zip
: place in the root of sd card
: shut off device
: boot into recovery
: wipe
: go to console and hit enter
(enter)
# mount -o rw /dev/block/mmcblk0p2 /system/sd
# cd /system/sd
# rm -rf /system/sd/*
# reboot recovery
: now wipe again
: repair ext system
: flash
Enjoy!!
"DO NOT RUN ANY OTHER APPS TO SD IT WILL BREAK YOUR SYSTEM"
JUST EXT3 & LINUX-SWAP 32MB
kree said:
just wondering if im doing something wrong? got NV installed with all 3 partitions and I had 77mb of internal mem. when I install new apps it takes away mem, am I doing something wrong, did I not config something right? I have read that apps2sd are automatic and to do nothing or it will break the system. dont mind the 77mb but would like to have my apps on my sd. any help would be great.
Click to expand...
Click to collapse
your apps are going to the sd..your dalvik-cache is not
yup. checked thru the the console that in fact I do have an ext3 partition. I went thru an infinate loop with out it, also followed all the steps as best as an old newb could, I mean Im not new to flashing roms coming from the herald and wing, but concidering ow these android roms are becoming like full linux distro installs its getting a little hard to keep up, but still willing to try. gonna look up the dav thing to see where that leads me. definately an adventure! thanks!

Amon_RA style Recovery for Incredible Fully Working & New Features

Everything Should Be Functioning Properly & Some Extra Features Have Been Added.
I love Amon_RA's recovery images and decided to make one using his source code for the Incredible to give us another option other than clockwork. This is my 2nd recovery I've made since switching to android from windows mobile about two weeks ago. Lg ally was the other Link here . This one I built with an ext-4 kernel I compiled so you can partition apps2sd with ext4 in recovery but remember your rom's kernel must support ext-4 too.
Link to Amon_RA's nexus one recovery thread as it has a good description of what all the features are Link here
To use if you have s-off download the PB31IMG_RA-inc-v1.7.0.6_GNM.zip and unzip it to get the PB31IMG.zip and copy that to the root of your sdcard. Boot phone holding down vol down and select yes to update.
To use with unrevoked recovery reflasher download the recovery-RA-v1.7.0.5.img and in recovery reflasher select file and custom recovery and navigate to where you downloaded the file.
Special Thanks:
Amon_RA for his source code Buy him a redbull
Team Unrevoked for the Recovery Reflasher and the S-off Link
Koush source code
worstenbrood source code for modded desire recovery
changelog v1.7.0.2 :
fixed data wiping and cache wiping as they are ext3 partitions not yaffs2
currently wiping cache can only be done with wipe cache not wipe data/factory reset
Thanks koush for the help
fixed flashing update.zips
changelog V1.7.0.3:
fixed small error in sd partitioning script
changelog V1.7.0.4 see attached pics
Added usb mount of phone's internal storage
Added toggle of signature verification on update.zips
Added gui mount umount menu
changelog V1.7.0.5
Changed nandroid-mobile.sh script to correctly backup and restore /data/data and backup and restore .android_secure on /emmc if selected.
Changelog V1.7.0.6
Fixed typo that caused nandroid to always restore most current backup.
Changes v1.8.1
Supports both Amoled and SLCD
Now supports Flashing from Emmc or Sdcard!!!
Has zip directory browsing from clockwork so zips are no longer needed in root of sdcard (thanks Koush & Amon-Ra)
Wipe Menu no longer uses scripts
Fix error in script for sd-ext upgrading
Fixed The sd-ext issues??
Updated the PB31IMG to be compatible with 3.26.605.1 and prior
Also in rom manager too!!!
Changes 2.2.1
Updated UI
Fixed zip progress menu in flashing
Fixed .android_secure backup back to sdcard from /emmc (was changed in the 11/10 htc update)
Expanded the UI for fuller listing of sdcard zips & dirs. (Thanks Amon_RA)
Still recommend making a folder called Custom_Roms on sd and placing update.zip's there
Selectable nandroid partitons gui for backup (Thanks Amon_Ra)
Now backs up sd-ext partiton as a whole if that option is selected in nandroid.
Downloadable from rom manager!!!
Fully working with gingerbread/cm7 and wipes all partitons correctly.
Added menu option to format /data partiton to ext4 and is able to reformat back to ext3 too. (See notes below)
Above option for ext4 requires a kernel with ext4 support and changing the mount line in init.inc.rc in boot.img/ramdisk from ext3 to ext4. This will enable mounting of the ext4 /data as ext4 instead of having the ext4 partition mounted as ext3. This formatting will persist through rom flashing and /data wiping but can be reverted via ext3 reformat option. Warning a non ext4 enabled kernel will not be able to mount an ext4 /data partition. If a ext3 data nandroid is restored to an ext4 formatted data partiton all the old files will work as ext3 and anything newly added will be in ext4 (best to start /data fresh to get full benefit of ext4 fs).
Example for changing init.inc.rc line in boot.img for cm7 (similar for stock rom on froyo too)
Code:
mount ext3 /dev/block/mmcblk0p1 /data wait nosuid noatime nodiratime
change to
Code:
mount ext4 /dev/block/mmcblk0p1 /data wait nosuid noatime nodiratime
Then repack boot.img and reflash.
Change log 3.02:
Nandroid now has the option to backup & restore .android_secure on /sdcard or /emmc (stock GB has .android_secure on /emmc)
Added busybox symlinks for mount & umount (now sense 3.0 roms that use busybox to mount in updater script work)
Added script to (re)format /emmc as ext3, ext4 or fat32 (run "partemmc help" from adb shell for use)
Added options in wipe menu to wipe /sdcard & /emmc
Wiping all or wipe .android_secure wipes it on both /sdcard and /emmc
Changed ui back to cyan colors.
Updated /data as ext4 to wipe /datadata also.
Nandroid now suppressed backup of /datadata also when selecting to not backup /data partition
File system type for /cache, /data, /sd-ext and /emmc are auto detected so you can use alternate filesystems (rom kernel & boot.img permitting)
As always properly wipes and you can use update-script or updater-script (amend or edify)
Added flash_eraseall binary this can be used to fix a corrupted nand mtd(not emmc) by erasing it then you can reflash it. Use is "adb shell flash_eraseall /dev/mtd/mtdX" where X is the number of the mtd you wish to erase.
Changelog: 3.06
Added ability to restore CWM backups.
Compiled for armv7a-neon so its faster.
Rewrote the ext3|4 menu to use C not scripts
Added a developer menu:
Developer menu:
Make and flash boot from zimage : This makes a mkboot folder on sdcard and mounts sdcard as mass storage then you copy a zImage and kernel modules into this folder and it will create a new boot like anykernel and flash it.
Toggle full ext wipe : This toggles between doing a quick wipe (default) of ext partitions or a full wipe which reformats them.
Install su & superuser: Installs or fixes su & superuser install (removes old if exists)
Install eng (unguarded) su: Installs engineering su that doesn't use superuser (removes old su & superuser if exists)
Reboot to bootloader: reboots to bootloader/hboot
Reboot recovery : reboots phone back into recovery
Downloads:
Source
recovery-ra-dinc-3.06-gnm.img
MD5 : c280fc5cfacf1018211f9ed4ffd42d87 recovery-ra-dinc-3.06-gnm.img
Old PB31IMG_RA-inc-v1.7.0.3_GNM.zip
MD5= d8aae2598c6f7b3f441bbea2ba35beb1
Old PB31IMG_RA-inc-v1.7.0.4_GNM.zip
MD5= 92d187e7b4bc6553e6daa369af8e55ce
Old PB31IMG_RA-inc-v1.7.0.5_GNM.zip
MD5= 832a1980c30a7dd7dd7751020bf2fb45
Old recovery-RA-v1.7.0.5_GNM.img for recovery reflasher
MD5=30a78ffca87de656a6a77246af6ff6e8
Old PB31IMG_RA_inc_1.7.0.6.zip
MD5= 2f0210ee1ede2bfd0f80af5f07c6da5c
Old PB31IMG_RA_inc_1.8.1_GNM.zip
MD5 9d6da2a06219651eb9be82872570b510
Old PB31IMG_RA_inc_v2.2.1_GNM.zip
MD5 84b5bae5c5adc4936e3a48c742cc03e4
PB31IMG-RA-3.02-GNM.zip
MD5 3efae04dc59bdaf4ea7bb18aea5b208d PB31IMG-RA-3.02-GNM.zip
Buy me a energy drink Follow me on twitter @getitnowmarket
Has anyone tested??
• Sent from my Droid Incredible running Sky Raider 2.5.2 •
thatdudebutch said:
Has anyone tested??
• Sent from my Droid Incredible running Sky Raider 2.5.2 •
Click to expand...
Click to collapse
I just tired it and it works perfectly, i just flashed the img via 3.1
Amazing work! Finally! I hate clockwork but love amon ra. Nice work!
what's the difference between this and clockwork? i'm not trying to instigate anything. clockwork is the only recovery that i've used but from reading that linked thread it looks like maybe it has a few more features? i'm not sure. the UI between the two seem somewhat similar too.
Awesome. If Clockwork ever fails me, I have another option. Thank you.
Dude, this is awesome. Finally! Source?
Haven't tried it, but it's always nice to have options. Thanks for taking the time to put this together!
update keeps failing for me and a couple other in the IRC.
borgey420 said:
update keeps failing for me and a couple other in the IRC.
Click to expand...
Click to collapse
same here. tried to flash using reflash, pb31img, and flash_image. all fail.
scuccia said:
same here. tried to flash using reflash, pb31img, and flash_image. all fail.
Click to expand...
Click to collapse
I was able to download, but md5sum didn't match
Looking into it think I uploaded the wrong binary version. Fixed and am going to re-upload
Is there a way to go back to clockwork if we don't like this.
Sent from my Incredible using XDA App
Ruben1123 said:
Is there a way to go back to clockwork if we don't like this.
Sent from my Incredible using XDA App
Click to expand...
Click to collapse
http://unrevoked.com/rootwiki/doku.php/public/forever
under the reinstall factory recovery there is a link to the clockwork pb31img... almost at the bottom of the page... its there so you can do it after you load an official update with s-off
Thanks for this. You helped me with my Ally already (which works great now), and now the Incredible. Thanks again!
Very well done, sir! I was missing my Amon_RA from my G1 days and this has hit the spot. I checked the md5 sums, applied your image file with flash_image... then powered off and manually booted into recovery from bootloader/hboot, to avoid boot mode 3, a little lesson also learned from my G1 days
Now all that's left is to put in a nice blue care bear for a background and remove the plug for your company and we'll be all set!
Sent from my Incredible using XDA App
am I stupid, or is the link not up?
Im having trouble with the wipe data command as "userdata" mtd on this phone is called "datadata" and is not wiping. Will re-release once fixed. Other than that its fully functional.
is the zip up??? If not can someone provide a mirror
As far a features go, what's the difference between this and clockwork?
-Sent from your mom's phone.

Data2ext CyanogenMOD - UPDATE 26/01/11

I am not responsible for anything you do to your phone. If this goes wrong, it's not my fault. Read the whole post, and the last few pages of the thread. This will get you up to speed. Backup everything! Twice. No, I'm not joking. Do a nandroid, then do a titanium backup.
Important note! Ext4 does NOT work with ClockworkMOD 2.5.x. Nandroid backups will not work unless you upgrade to CWM 3! (data2ext4)
Greetings, earthlings! I have got a new version for you! Almost. Read this: http://forum.xda-developers.com/showpost.php?p=11931210&postcount=341
Update 26/01/2011
Ok, so someone asked about continuing support for ext2. So I will. Ain't I nice. Both scripts are updated, and should have improved performance, as well as a bugfix With both you don't need to start over, just flash the zip and you're done. Backup anyway (of course).
EXT4 version:
Yes, ext4 is slower in benchmarks. No, it doesn't have a real world impact. Not that I can see anyway. As always feedback is welcomed. I really mean that, if your phone genuinely becomes slower, let me know.
The zip is named data2ext4-V4.zip
Instructions (new users):
Ensure that mmcblk0p2 isn't mounted anywhere. You can do this by running "mount|egrep mmcblk0p2". If that returns anything, the ext partition is mounted. Unmount it using "umount directory/that/mmcblk0p2/is/mounted/to". Most often it's mounted to /sd-ext; in this case run "umount /sd-ext"
Format the ext partition to ext4:
Code:
mke2fs -m0 -b4096 /dev/block/mmcblk0p2
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p2
e2fsck -yf /dev/block/mmcblk0p2
tune2fs -o journal_data_writeback /dev/block/mmcblk0p2
tune2fs -O ^has_journal /dev/block/mmcblk0p2
Flash the attached zip and reboot to normal mode
Open up a terminal or use ADB to execute "data2ext --enable"
Reboot
Click to expand...
Click to collapse
Intructions (upgrading from ext2):
This should keep all your existing data. Back it up anyway
Disable data2ext
Upgrade to ext4 thusly:
Code:
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p2
e2fsck -yf /dev/block/mmcblk0p2
tune2fs -o journal_data_writeback /dev/block/mmcblk0p2
tune2fs -O ^has_journal /dev/block/mmcblk0p2
Flash the attached zip
Enable data2ext
Click to expand...
Click to collapse
EXT2 version:
This is rather simpler to set up, but is not as safe. It is slightly faster though
The zip is named data2ext2-v7.zip
Flash the zip
ensure /dev/block/mmcblk0p2 isn't mounted anywhere
Format the ext partition to ext2 with a 4KB block size
Code:
mke2fs -m0 -b4096 /dev/block/mmcblk0p2
Run this:
Code:
data2ext --enable
Reboot and enjoy
Click to expand...
Click to collapse
1st boot will take a while, it's copying stuff across.
Java on my PC sucks (it won't work), and I still can't sign zips. You'll live, just toggle signature verification in CWM
Semi-disclaimer:
This is my first real foray into scripting. I am still learning, so this is not as good as it could be. I release this to you to give me an incentive to make it better. I still need to look into mount options and the like, I'm sure this can go faster. Once again, I would class this as beta quality.
What is data2ext?
The phones internal memory is divided into several partitions. The 3 key ones are /system, /data and /cache. The rest we don't need to worry about too much. /system is where the ROM lives. By default it's read only (regardless of S-ON or S-OFF). All the data on our phones (apps, app data, game progress and a few other bits and bobs) is stored on /data. We have a pitiful amount of storage on /data (about 190MB), so we quickly run out when installing apps. 1 solution is to move /data/app (this is where most of the apps are stored) to a partition on your SD card (formatted to ext). But the internal memory still fills up, as anything not in /data/app stays on internal (caches, data and shizz). Other solutions have arisen, like moving dalvik-cache there to the ext partition too. But with the advent of fast SD cards it became possible to move the whole data partition to the ext partition. So people did; this means that the internal memory is barely used (aside from a few bits here and there, they're symlinked back to their original location).
Click to expand...
Click to collapse
It ain't workin'!
Ok. Get a logcat, and use pastebin to paste it here. Then we might be able to work it out, ye?
To use logcat:
Download this and extract it to a known location. Navigate to that folder, and press SHIFT while right-clicking. In the menu there should be a "Open command window here" option. Click it. Now type "adb logcat". Press CTRL+C to end the output. Right click and press mark, then click and drag over all the text and hit ENTER. It's now copied to the clipboard. CTRL+V to paste it somewhere... To debug issues with this script I need the first 5-10 seconds of the boot process.
To make life easier, I need the bit between "--START OF SCRIPT, PASTE LOGCAT FROM HERE ON!--" and "I DON'T NEED ANY MORE OF THE LOGCAT!"
Click to expand...
Click to collapse
Changelog
Version 1
initial release
Versions 2 through 4 were internal testing ones
Version 5
Fixed dalvik-cache rebuild
Made more likely to work
EXT4(v3) version initial release
EXT4 V4
Improved performance
Bugfix (unmount /sd-ext if it exists)
EXT2 V7
Improved performance
Bugfix (unmount /sd-ext if it exists)
Hereafter I shall rename these to make managing this changelog easier
Click to expand...
Click to collapse
Credits:
BlaY0
Anyone who's ever made data2ext scripts. I looked at a few
Click to expand...
Click to collapse
signd version attached
edit: removed
nooob.
but could you also make just ap2sd for ext3 ?
Sent from my Legend using Tapatalk
Noob?! Meh, s'pose I am. What can you do, eh?
http://krikun.ru/2010/10/28/app2sd-for-cyanogenmod-6-x/
TheGrammarFreak said:
Noob?! Meh, s'pose I am. What can you do, eh?
http://krikun.ru/2010/10/28/app2sd-for-cyanogenmod-6-x/
Click to expand...
Click to collapse
i tried that one but doesn't work on gingerbread cm7
OlegKrikun :
"Now cm7 exp. builds not support run start up scripts from /etc/init.d =( when is fix, I publish app2sd for cm7"
noob=== my noob wish.
I don't like to ask questions, so I try to introduce myself into those new things. But I need a confirmation if my theories are correct
1. Google's app2sd is kinda stupid. It uses the normal fat partition on your SD, correct?
2. The a2sd linked here copies all the stuff from /data/app to /sd-ext/app and remounts /data/app to /sd-ext/app
So the Phone means the App is stored on the Phone Memory but in real its stored on the sd.
Do I have to wipe everything after flashing the script. What happens to apps that are currently moved to the SD (by Google Apps2SD). Can I just copy them "to phone" again and they are inside the sd-ext then?
3. Data2ext => Speedup because everything from /data is now on the extfs on SD. Apps are also included, as they are located in /data/app so its has a2sd integrated, right?
EDIT: Damn, now I have to ask a question...
What's stored inside the dalvik-cache? I don't know much about dalvik, thats my biggest problem with android ...
Is it good to move it also to sd-ext with the a2sd script?
fabi280 said:
I don't like to ask questions, so I try to introduce myself into those new things. But I need a confirmation if my theories are correct
1. Google's app2sd is kinda stupid. It uses the normal fat partition on your SD, correct?
2. The a2sd linked here copies all the stuff from /data/app to /sd-ext/app and remounts /data/app to /sd-ext/app
So the Phone means the App is stored on the Phone Memory but in real its stored on the sd.
Do I have to wipe everything after flashing the script. What happens to apps that are currently moved to the SD (by Google Apps2SD). Can I just copy them "to phone" again and they are inside the sd-ext then?
3. Data2ext => Speedup because everything from /data is now on the extfs on SD. Apps are also included, as they are located in /data/app so its has a2sd integrated, right?
EDIT: Damn, now I have to ask a question...
What's stored inside the dalvik-cache? I don't know much about dalvik, thats my biggest problem with android ...
Is it good to move it also to sd-ext with the a2sd script?
Click to expand...
Click to collapse
1. Correct
2. No wipe needed for a2sd or this data2ext. Any app on what the phone believes to be internal memory is in fact sd-ext
3. Correct
Dalvik-cache is a shedload of dex files, quite important. The bug with re-creating it on every boot isn't major enough for me to worry about for now, as I don't think it affects anything other than the startup time. I need to investigate this, so be careful if you use this mod. My worry is that it's due to data being lost somewhere
When I used a2sd I had dalvik-cache on the sd card, but then I have a fast SD card. It can slow things down.
Anyhoo, I would like this thread to be for testing data2ext, not asking questions about a2sd. I have made this to help me learn how these things work, so feedback is welcomed. If anyone has tested this on CM6 then please let me know. And can you also post feedback about the dalvik-cache issue.
gyroing said:
i tried that one but doesn't work on gingerbread cm7
OlegKrikun :
"Now cm7 exp. builds not support run start up scripts from /etc/init.d =( when is fix, I publish app2sd for cm7"
noob=== my noob wish.
Click to expand...
Click to collapse
/system/etc/init.d is where this is run from. It works on CM7
@Grammar,
thx for your work!!! it works very good on my phone. ext2(1 gb) partition as ext3 formatted. i have the "signed" zip from exicar(thx) installs....
lwiss
quadrant: 1686
card: 8gb class 6
rom-version: CM 7 | Gingerbread, 01/03
TheGrammarFreak said:
Anyhoo, I would like this thread to be for testing data2ext, not asking questions about a2sd. I have made this to help me learn how these things work, so feedback is welcomed. If anyone has tested this on CM6 then please let me know. And can you also post feedback about the dalvik-cache issue.
Click to expand...
Click to collapse
Sorry for my Off-Topic-Questions.
I'll try it for you on CM6.
How fast has it to be? I've got a 8GB Class 6 Card, is it enough?
EDIT: Note to myself, never read an article description on amazon on a second screen while writing a reply.
It's a class 4, I looked for a Class 6 on Amazon -_-
But I'll try it anyway..
lwiss said:
@Grammar,
thx for your work!!! it works very good on my phone. ext2(1 gb) partition as ext3 formatted. i have the "signed" zip from exicar(thx) installs....
lwiss
Click to expand...
Click to collapse
What version of CM? And it's not my work, it's BlaY0's. I just made his script work on CM
fabi280 said:
Sorry for my Off-Topic-Questions.
I'll try it for you on CM6.
How fast has it to be? I've got a 8GB Class 6 Card, is it enough?
Click to expand...
Click to collapse
It's not the most off-topic I've seen. Look at the CM experimental build thread . I also have 8GB class 6. I get 1600+
Stupid question. Where to enable data2ext in cyanogenmod settings?
What version of CM?
Click to expand...
Click to collapse
from ali ba (thx)
CM 7 | Gingerbread, 01/03 (with gapps)
lwiss
FUXAS said:
Stupid question. Where to enable data2ext in cyanogenmod settings?
Click to expand...
Click to collapse
If you don't even read the first post I'm not gonna help you. If I haven't made the point clear enough:
This is in testing. There is a major bug where dalvik-cache is re-built on every reboot. This is not a good thing. I would advise that you not use this unless you know what you're doing
fabi280 said:
Sorry for my Off-Topic-Questions.
I'll try it for you on CM6.
How fast has it to be? I've got a 8GB Class 6 Card, is it enough?
EDIT: Note to myself, never read an article description on amazon on a second screen while writing a reply.
It's a class 4, I looked for a Class 6 on Amazon -_-
But I'll try it anyway..
Click to expand...
Click to collapse
Class 4 is definitely too slow, at least on CM6.
I will not provide a Quadrant Benchmark because my Phone is waaay too slow now. It really lags everywhere.
First Start:
Code:
I//system/xbin/run-parts( 59): Initiating Data2EXT...
I//system/xbin/run-parts( 59): Waiting for SD card to settle...
I//system/xbin/run-parts( 59): Executing file system check...
I//system/xbin/run-parts( 59): /dev/block/mmcblk0p2: 11/65664 files (0.0% non-contiguous), 4451/262144 blocks
I//system/xbin/run-parts( 59): Mounting /dev/block/mmcblk0p2 to /data...
I//system/xbin/run-parts( 59): EXT partition /dev/block/mmcblk0p2 mounted on /data...
I//system/xbin/run-parts( 59): First time initiation, copying files to EXT partition...
I//system/xbin/run-parts( 59): Data2EXT enabled...
I//system/xbin/run-parts( 59): Setting read-write /system overlay...
I//system/xbin/run-parts( 59): Checking for kernel aufs support...
I//system/xbin/run-parts( 59): No aufs driver present in kernel, trying to load aufs module...
I//system/xbin/run-parts( 59): Can not load aufs module, aborting...
Second start:
Code:
I//system/xbin/run-parts( 59): Initiating Data2EXT...
I//system/xbin/run-parts( 59): Waiting for SD card to settle...
I//system/xbin/run-parts( 59): Executing file system check...
I//system/xbin/run-parts( 59): /dev/block/mmcblk0p2: Entry 'CheckinService.xml' in /data/com.google.android.gsf/shared_prefs (25081) has deleted/unused inode 25583. CLEARED.
I//system/xbin/run-parts( 59): /dev/block/mmcblk0p2: Entry 'EventLogService.xml' in /data/com.google.android.gsf/shared_prefs (25081) has deleted/unused inode 25074. CLEARED.
I//system/xbin/run-parts( 59): /dev/block/mmcblk0p2: Entry 'googlesettings.db-journal' in /data/com.google.android.gsf/databases (25087) has deleted/unused inode 25564. CLEARED.
I//system/xbin/run-parts( 59): /dev/block/mmcblk0p2: 1834/65664 files (0.4% non-contiguous), 46535/262144 blocks
I//system/xbin/run-parts( 59): /dev/block/mmcblk0p2: 1834/65664 files (0.4% non-contiguous), 46535/262144 blocks
I//system/xbin/run-parts( 59): Mounting /dev/block/mmcblk0p2 to /data...
I//system/xbin/run-parts( 59): EXT partition /dev/block/mmcblk0p2 mounted on /data...
I//system/xbin/run-parts( 59): Data2EXT enabled...
I//system/xbin/run-parts( 59): Setting read-write /system overlay...
I//system/xbin/run-parts( 59): Checking for kernel aufs support...
I//system/xbin/run-parts( 59): No aufs driver present in kernel, trying to load aufs module...
I//system/xbin/run-parts( 59): Can not load aufs module, aborting...
I can send you the complete outputs for both starts (got em till the UI was visible)
EDIT: But is the Class4 Card fast enough to handle a2sd (maybe with Dalvik Cache)?
There are several factors affecting read/write speed to/from SD card not just class:
partition alignment
partition type
format options
mount options
readahead settings
etc.
Not going to try and use it yet, but I'm curious now. When using this, you're automatically having all of your apps on your sd card and the app2sd feature isn't needed anymore, right? And your phone gets a speed boost when using it?
m1schi said:
Not going to try and use it yet, but I'm curious now. When using this, you're automatically having all of your apps on your sd card and the app2sd feature isn't needed anymore, right? And your phone gets a speed boost when using it?
Click to expand...
Click to collapse
Apps on sd-ext = yes
Speed Boost, sometimes yes, sometimes its laggy as hell
Sent from my HTC Legend using XDA App
Stupid question. How do you guys get 1600+ in Quadrant on CM7?
For me Quadrant is not finishing tests due to the 3D graphics not working. But even if it'll work, I don't think I'd get so much. On CM 6.1 oc'ed to 787, I'd hardly get 1150. Is it just due to overclocking or this data2ext is speeding it up?
Sent from my Legend using XDA App
Hi all, Oleg Krikun was published app2sd and app2sd-dalvik for CM 7 01/03
I re-uploaded patch here: cm7_app2sd
and cm7_app2sd_dalvik
ktullanux said:
Hi all, Oleg Krikun was published app2sd and app2sd-dalvik for CM 7 01/03
I re-uploaded patch here: cm7_app2sd
and cm7_app2sd_dalvik
Click to expand...
Click to collapse
This has got nothing to do with this thread.

[Q] Apps, DalvikCache AND app data to SD on Stock ROM?

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.

[Q] Internal Memory FUBAR? ADB help

Hi all,
Tearing my hair out here (and I have SFA left anyway)
My Father-in-law's SGS i9000 seems to have real issues. Initially problem I was having was that there was an app I could not uninstall- it would reappear on reboot. I initially suspected malware or such, but it appears to be a real problem with the internal memory. I had MIUI installed on it, but wanted to change to a more stock ROM.
First time I really started to worry was when I found that every time I put a new rom onto the internal sdcard, it disappeared at reboot (and thus wasn't there to install when rebooted into CWM)
Since then, haven't had a functioning phone.
adb push to sdcard still not persistent on reboot.
Cannot flash new ROM with ODIN either, although KERNEL changes, filesystem no longer mounts.
I think the version of MIUI I was using used an ext4 lagfix, as inside an adb shell, I can see the partitions:
parted /dev/block/mmcblk0
a "print" lists two partitions:
Number Start End Size Type File system Flags
1 32.8kB 14.4GB 14.4GB primary fat32 lba
2 14.4GB 16.4GB 2013MB primary ext4 lba
rm 1, rm 2
to try to delete the partitions and start again- doesn't work. Nothing happens
If I load partition 2 into parted:
parted /dev/block/mmcblk0p2
print
Model: Unknown (unknown)
Disk /dev/block/mmcblk0p2: 2013MB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Number Start End Size File system Flags
1 0.00B 2013MB 2013MB ext4
Can;t check any partitions as ext4 isn't supported by parted.
I cannot remove any partitions, reformat them or anything.
e2fsck errors as it cant read superblock flags on any of the partitions.
Any other ideas? Anyone?
I don't want to toss the phone out
http://forum.xda-developers.com/showthread.php?t=845708
i dont know if this will help u but u can try this guy instruction. See link above
compacity said:
http://forum.xda-developers.com/showthread.php?t=845708
i don't know if this will help u but u can try this guy instruction. See link above
Click to expand...
Click to collapse
If that worked, it would have been just what I was looking for
I googled the hell out of this problem, and that one never came up, but others I'd seen led me to try that same plan.
Where it fails on my device, is that deleting the partitions in "parted" fails- rm1 followed by rm 2 to delete the partitions. "Print" reveals they're still there.
Any other partition tools worth trying?
I got it back to square one:
Flashed kernel thru Odin with a version of CWM that worked.
reboot into recovery.
Flash update from SDcard- card contents still the same, so could re-flash MIUI.
reboot, bootloop. Re-enter CWM recovery and reflash.
Back to Square One - MIUI 1.12.16 (JVK)
Cannot install anything - nothing is persistent after reboot, even WIFI settings disappear
If it is any help to anyone who knows what they're talking about:
Now that MIUI boots I can look at the filesystem better.
Can anyone point me in the direction of what I should be looking for/trying to do to figure out what is wrong here?
try finding solution here, its PIT stop for i9000 problem
http://forum.xda-developers.com/showpost.php?p=30415128&postcount=1
Mine seems to be a bit tougher than these solutions can deal with.
Tried assorted ROMs over past day. No install works.
Cannot install anything from internal memory, as nothing dropped into that card will remain after a reboot.
Installing anything from an external card just throws up bootloops etc- as the only thing that seems to be able to retained between boots is the kernel/CWM.
If I install a new ROM, first flash says partition table is incompatible and /data will be overwritten (no problems, nothing on it). I accept the inevitable and re-select the ROM.
Reboot bootloops, as expected, reboot into CWM (now a new version with the Kernel), try reflashing the ROM image- Error 0 or 7. Try from External Memory- same. Try sideloading image. Same. All I can do is re-flash the MIUI image on internal SDcard (which works)
It looks like the internal memory refreshes itself from a recovery image at each boot? (I think).
Anyway- can't get anything to stick, except MIUI
edit:
http://forum.xda-developers.com/showthread.php?t=761537&page=3
http://forum.xda-developers.com/showthread.php?t=1230059&page=3
hav u try this 2 link as this is da only thread matches ur MBR problem
compacity said:
did u try any jb kernel out there? as its also ext4 n push it using adb. juz a suggestion though.
Click to expand...
Click to collapse
Good suggestion Logical
I'd thought that also- The JB kernels should support ext4.
No joy though
The version of CWM recovery that is stable with the MIUI install is 5.0.2.7, and it doesn't have any voodoo/lagfix options
When I flash a kernel with a CWM with lagfix, and try to use the CWM lagfix toggles, nothing changes.
Doesn't matter what I select inside CWM, it reads the status from memory as "Lagfix on, Debug off"
The reason I asked about ext4 tools in ADB is that running filesystem commands in a shell just throws up errors I can't seem to fix.
e2fsck just throws up superblock errors (on both /dev/block/mmcblk0 and the partition /dev/block/mmc0p2.
Defining one of the backup superblocks doesn't help- they're all bad.
"parted" doesn't work anymore (i note it isn't in /sbin, so I am picking this kernel doesn't install it), but even when I did have it, "parted" doesn't support ext4. Using "rm" to remove a partition did exactly nothing.
Starting to think the only way forward would possibly be flashing a custom .pit file to define partitions that move the data off an obviously bad block? Above my skill level however LOL
refresh browser see my post above again

Categories

Resources