Related
99% of the problems users are having with Apps2SD are caused by the unclean shutdown of the ext2 filesystem, because Android does not unmount it when rebooting or shutting down the system, and there are no tools on the device to fsck the filesystem on boot. Ext3 is journaled and this isn't an issue because the journal will simply replay on boot.
I'd like to put an end to this.
Attached is e2fsprogs (tune2fs, e2fsck, resize2fs, and mke2fs) built for Android/ARM. You should also use the "-t auto" mount option so that it's still backwards compatible with ext2.
To convert your ext2 to ext3, you can simply run "tune2fs -j /dev/block/mmcblk0p2" after you have these tools on your device, and reboot (assuming your ramdisk allows for mounting as "auto"). You should unmount and e2fsck the partition first, if it's not been checked for errors.
Step by step by neoobs
can we have a noob-friendly guide to this preferably through terminal.
cyanogen said:
99% of the problems users are having with Apps2SD are caused by the unclean shutdown of the ext2 filesystem, because Android does not unmount it when rebooting or shutting down the system, and there are no tools on the device to fsck the filesystem on boot. Ext3 is journaled and this isn't an issue because the journal will simply replay on boot.
I'd like to put an end to this.
Attached is e2fsprogs (tune2fs, e2fsck, resize2fs, and mke2fs) built for Android/ARM. You should also use the "-t auto" mount option so that it's still backwards compatible with ext2.
To convert your ext2 to ext3, you can simply run "tune2fs -j /dev/block/mmcblk0p2" after you have these tools on your device, and reboot (assuming your ramdisk allows for mounting as "auto"). You should unmount and e2fsck the partition first, if it's not been checked for errors.
Click to expand...
Click to collapse
Will this work with ADP JF1.5?
Before I try it, let me get a few things straing. I have to put these files in the corresponding folders, reflash, then type type the commands from terminal on the phone? Or does this have to be done with adb?
Beast84 said:
Will this work with ADP JF1.5?
Before I try it, let me get a few things straing. I have to put these files in the corresponding folders, reflash, then type type the commands from terminal on the phone? Or does this have to be done with adb?
Click to expand...
Click to collapse
its already working for ADP. I have both my phones running on EXT3 and I havent found a problem. Its more reliable and I have gotten a Force Close or Wait screen with all the speed his build has.
cyanogen said:
To convert your ext2 to ext3, you can simply run "tune2fs -j /dev/block/mmcblk0p2" after you have these tools on your device, and reboot (assuming your ramdisk allows for mounting as "auto"). You should unmount and e2fsck the partition first, if it's not been checked for errors.
Click to expand...
Click to collapse
Huh?
Can you explain this in English please?
Henchman said:
Huh?
Can you explain this in English please?
Click to expand...
Click to collapse
I mainly intended this for other ROM makers, so they can incorporate these features into cooked ROMs.
So this basically means all of us with ext2 partitions will have to get a new card or is there anyways for us to convert to ext3?
djdeviance said:
So this basically means all of us with ext2 partitions will have to get a new card or is there anyways for us to convert to ext3?
Click to expand...
Click to collapse
please re-read the first post.
"To convert your ext2 to ext3, you can simply run "tune2fs -j /dev/block/mmcblk0p2" ....
pershoot said:
please re-read the first post.
"To convert your ext2 to ext3, you can simply run "tune2fs -j /dev/block/mmcblk0p2" ....
Click to expand...
Click to collapse
Yes I did read that and tried as well. Was unsuccessful that why I asked.
Premature SD failure from frequent journal commits?
I wondered why this solution wasn't inplemented from the beginning. However, In one of the threads on A2SD, I read that moving /DATA/DATA to SD would negatively affect the longevity of the SD cards because of the frequent write/re-write cycles of files in that directory, particularly sqlite database commits . One contributor suggested that a using a journalled filesystem in this context would have a similar effect in that there would be repeated writes to the specific area of the SD where the journal is stored.
Any thoughts on this?
Once we run the commands in terminal, will that wipe everything off the ext partition? Or will it just convert the ext2 to ext3 & leave all my apps intact?
sir*mez said:
its already working for ADP. I have both my phones running on EXT3 and I havent found a problem. Its more reliable and I have gotten a Force Close or Wait screen with all the speed his build has.
Click to expand...
Click to collapse
I am not on his build. I am on ADP JF1.5
Which is why I asked if it will work on JF's build & not his build. I know it works on his. He's the one who brought it up
arqueware said:
I wondered why this solution wasn't inplemented from the beginning. However, In one of the threads on A2SD, I read that moving /DATA/DATA to SD would negatively affect the longevity of the SD cards because of the frequent write/re-write cycles of files in that directory, particularly sqlite database commits . One contributor suggested that a using a journalled filesystem in this context would have a similar effect in that there would be repeated writes to the specific area of the SD where the journal is stored.
Any thoughts on this?
Click to expand...
Click to collapse
Most Class 6 cards support wear leveling these days.
Beast84 said:
I am not on his build. I am on ADP JF1.5
Which is why I asked if it will work on JF's build & not his build. I know it works on his. He's the one who brought it up
Click to expand...
Click to collapse
aaahhhh... ;p no i dont think jf has made his EXT3 compatable which is why cyangen is asking every dev to use EXT3.
Cyanogen
Can I put these files in my ADP JF1.5 update.zip & flash that? Or does something else need to be done to have it see the ext3 partition? Also your boot.img with the noatime change, can I put that in also? Or could you possibly take the boot.img from JF1.5 & change it for me?
ext3 is built in ;P
Code:
$ adb shell cat /proc/filesystems
nodev sysfs
nodev rootfs
nodev bdev
nodev proc
nodev debugfs
nodev sockfs
nodev pipefs
nodev anon_inodefs
nodev tmpfs
nodev inotifyfs
nodev devpts
ext3
ext2
nodev ramfs
vfat
yaffs
yaffs2
Your ramdisk needs to mount the partition with "-t auto" (or "-t ext3" if you don't want backwards compatibility) instead of "-t ext2" for it to be effective. My build is the only one that does this so far AFAIK. In the JF builds, you need to change the "runme.sh" script.
cyanogen said:
Your ramdisk needs to mount the partition with "-t auto" (or "-t ext3" if you don't want backwards compatibility) instead of "-t ext2" for it to be effective. My build is the only one that does this so AFAIK.
Click to expand...
Click to collapse
I'm guessing that wouldn't be an easy change to do? Well I guess I will have to try one of the new roms which supports this since JF doesn't update his releases like the other guys do
Beast84 said:
I'm guessing that wouldn't be an easy change to do? Well I guess I will have to try one of the new roms which supports this since JF doesn't update his releases like the other guys do
Click to expand...
Click to collapse
It requires a little bit of hacking.
http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
cyanogen said:
It requires a little bit of hacking.
http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
Click to expand...
Click to collapse
Wow all I see is matrix code! Thanks anyway I will read up, see what I can make of it. Thanks for pointing me in the right direction at least
HI all.
I know it has been already done but I didn't find any detailed tutorial for the hTc Desire so I wrote one for you
Howto for a HTC desire with clockworkmod recovery:
I did this with a stock HTC sense 2.2 froyo rooted rom with init.d support and my own kernel, forked from richardtrip sense kernel v5e. I don't know for other ROMs or Kernels. Your ROM must support init.d boot scripts.
What you need is:
* Fast µSD card (Class 4 or 6 recommended. Lots of issues reported with class 10 on the Desire)
* busybox (http://www.busybox.net/downloads/binaries/) on c:\
* Kernel with EXT4 support. The kernel in original ROM does not provide ext4 support!!
* Rom with init.d script support (StarBurst (Froyo) or Supernova (Gingerbread) have a native DATA2SD support)
* If you already have app2sd+ or a similar script, don't do the following hack (or at your own risks) !!
* If you still want to try it, backup your A2SD scripts and roll-back to a pre-A2SD state. Don't ask me why it's not working, I never used APPs2SD so I can't help.
* To help you with ADB, you can use the GUI
If you feel a bit lazy or you're scared to make any mistake and want to skip all the manual installation, then go straight to the bottom of this post and download the flashable script made by droidzone. Many thanks to him!! You can also flash Supernova (Stock HTC gingerbread release) and you'll be good to go within no time.
If you already have this running but you flashed another rom, have a look here. droidzone posted another script to just update the rom you just flashed to get DATA2SD work properly
[size=+1]1/Get yourself prepared[/size]
A/ backup everything (nandroid).
B/ Make sure everything is backed-up
C/ Copy the content of you SD to your computer and keep it handy for a roll-back.
D/ make a copy !!!! (I think know that you've been warned )
[size=+1]2/ Make 2 primary Mb aligned partitions on your SD[/size]
Primary partition 1 will be your usual storage, must be FAT32.
To optimize it, I really recommend to have a look here
Primary partition 2 will be your new storage (/data).
You can use gparted or fdisk (I do prefer fdisk and wrote a guide here ) to partition your SD; but it's up to you and Gparted is working great too.
Use the MB align option of gparted to align your partitions. This helps big time to get a better R/W speed.
With the latest busybox, you can do that on your phone in recovery mode.
You will need also e2fs progs. They're all attached at the bottom of this howto.
[size=+1]3/ Boot your phone in recovery and get it prepared[/size]
Connect to your phone with "adb shell"
You should get a ~# prompt now.
mount /system
mount /data
mount /sdcard
exit
if mount /sdcard fails, try mount /dev/block/mmcblk0p1 /sdcard
You should get this as a result of a "mount" command:
Code:
~ # mount
mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
/dev/block/mtdblock4 on /cache type yaffs2 (rw,nodev,noatime,nodiratime)
/dev/block/mmcblk0p1 on /sdcard type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,s
hortname=mixed,errors=remount-ro)
/dev/block/mtdblock3 on /system type yaffs2 (rw,relatime)
/dev/block/mtdblock5 on /data type yaffs2 (rw,relatime)
Replace you old busybox exec with the new one. It's located in /system/xbin/
adb push c:\busybox-armv6l /system/xbin/busybox
Add the script to init.d folder:
adb push c:\01data.txt /system/etc/init.d/01data
Add the fstab to /system/etc/
adb push c:\fstab.txt /system/etc/fstab
Extract e2fsprogs-arm.zip to c:\
Push all e2fs progs you've extracted from the zip to /system/bin/ the same way:
adb push c:\e2fsprogs\system\bin\e2fsck /system/bin/
adb push c:\e2fsprogs\system\bin\mke2fs /system/bin/
(etc.... for all apps)
Push all e2fs libs you've extracted from the zip to /system/lib/ the same way:
adb push c:\e2fsprogs\system\lib\libext2_blkid.so /system/lib/
adb push c:\e2fsprogs\system\lib\libext2_com_err.so /system/lib/
(etc... for all libs)
adb shell
cd /system/bin
chmod 755 e2fsck
chown 0.2000 e2fsck
(Do the same for all pushed apps.)
cd /system/lib
chmod 644 libext2*
chmod 755 /system/xbin/busybox
chown 0.0 /system/xbin/busybox
chmod 755 /system/etc/init.d/01data
chown 0.0 /system/etc/init.d/01data
Finally type this:
:> /system/etc/mtab
[size=+1]4/ Instant of creation[/size]
cd /
For a non-journaled version:
/system/bin/mke2fs -T ext4 -b 4096 -E stride=64,stripe-width=64 -O ^has_journal,extent,^huge_file -m 0 -L userdata /dev/block/mmcblk0p2
For a journaled version (safety/AOSP ROMs):
/system/bin/mke2fs -T ext4 -b 4096 -E stride=64,stripe-width=64 -O extent,^huge_file -m 0 -L userdata /dev/block/mmcblk0p2
stride and stripe-width are RAID options but they are used here to align the filesystem to the max erase block size of an SD card. In conjunction with EXT4 extents feature (not present in ext3), it gives a bit of extra performance thanks to block allocation. It's used and recommended for SSDs, so it should help our poor little cheap (SSDs) SD cards
I use 64 because 64x4 (4kb block size)=256Kb. 256Kb is the max erase block size per the SD standards.
Your card may have a smaller erase block size but 256K is at least compatible with every card.
If you want to change the block allocation size, change the "64" parameter.
Just change it to - say - 32 (32x4=128kb) etc ...
Tune this to your actual erase block size if you know it.
If you want journaling (better data integrity) at the cost of performance and probably sd card wear, use the journaled option when you format the ext4 partition. Journal will also use some space on your EXT partition.
Read this article or my tutorial for more details on aligning partition and file system on linux.
I'd like to mention at this stage that fortunately, HTC has implemented a nice and clean unmount of /data at shutdown. Unless you remove your phone battery while it is running or android completely crashes and the cache hasn't been flushed to the sd card, you shouldn't suffer from data loss. In that case though, I've implemented a forced check of the data partition to try to recover any errors on the ext4 partition before booting the phone. You can expect to have a fair amount of safety without journal as long as you turn off your phone with standard HTC menu on sense ROMs
Anyway, if you want to try DATA2SD on a AOSP ROM, you *must* use a journal!
[size=+1]5/ verbatim[/size]
type this:
mkdir /sd
/system/xbin/busybox mount -t ext4 /dev/block/mmcblk0p2 /sd
cd /data
cp -a * /sd
cd /
sync
All you data should copied now.
check with a "ls -l /sd" that you have a least the directory structure.
"df" should report the space used on the new filesystem and should be close to your /data.
/system/xbin/busybox umount /sd
[size=+1]6/ Reboot[/size]
Reboot.
Move all you apps (if you have used the Froyo AP2SD) back to the phone, which is now the SD.
Reboot to get a clean and stable phone
Make sure that you don't install any app in the future to the SD. Some apps are installed automatically to SD, move them back to the phone if it is so.
[size=+1]7/ Comments[/size]
IMHO, a readahead of 128kb could be a bit excessive and can penalise read speed when reading small amounts of data. I've reduced it on my phone to 64kb and noticed a slight improvement when for instance the phone reads data to show apps, icons and size when you open the application list in the settings/applications/manage applications menu. Some kernels have a default value of 4K. This is really bad for performance and it must be changed to get good read performance.
To change it, type this while android is running:
echo 64 > /sys/block/mmcblk0/queue/read_ahead_kb
This setting will be lost on reboot. Just add this line to the script if you want to keep it on reboot.
ownhere did a fantastic job at hacking the libsqlite.so library. I patched the original sense lib and I strongly recommend to replace it with the one attached below.
To do so, just boot into recovery mode, mount /system and backup your /system/lib/libsqlite.so file to your sdcard. Then push the patched lib to /system/lib/ and do a chmod 644 on the pushed file.
Reboot and VOILA!
Updates of the flashable ZIP are available here
If you're coming from previous version (2 FAT32 partitions, ext2 file and loop mount) and want to move to this new one, have a look at this post. You don't have to do everything from start and loose your data. You should get there all the needed info to backup your data and restore it to the new EXT4 partition.
ownhere posted a very interesting option to play with in this post. Apparently nodelalloc mount option is giving better score than delalloc on flash memories. I recently tested it and I had better Quadrant and TAP scores so check-it out!
If you want to impress your friends with Quadrant score, just add "noauto_da_alloc" in the mount option of the script or do this manually with adb shell : busybox mount -o remount,noauto_da_alloc /data
The effect is pretty similar on the final score than nodelalloc (at least on my phone/sdcard )
To get back to normal: busybox mount -o remount,auto_da_alloc /data
(Got this setting from here).
It is simply making the system (thus Quadrant) working in cache (RAM) instead of the SD card.
I'm not sure that this settings improves that much real life usage, but at least you'll get what you're looking for: A super (fake) Quadrand I/O score
I may add this setting in future release of DATA2SD. I'm testing it ATM on my phone.
Many thanks to ownhere and melethron for all their thinkings at bringing issues, help and updates to get to this new version.
Many thanks to too droidzone for his great work on a flashable ZIP and integrating DATA2SD in his ROM to make your life easier you flash maniacs
I hope that I didn't forget something. It's working for me so it should work for you.
Read the thread before asking a question !
This sounds really great ... 2 things :
1. your links are broken
2. Can't we generate the file for /data on the first fat32 partition ... would be a lot easier to format the sdcard with only one partition ...
thank you very much for this great information ...
fogbav said:
This sounds really great ... 2 things :
1. your links are broken
2. Can't we generate the file for /data on the first fat32 partition ... would be a lot easier to format the sdcard with only one partition ...
thank you very much for this great information ...
Click to expand...
Click to collapse
No because you won't be able to use your SD as an external drive when connected to USB.
Just checked the links and they're OK
i vouch for sibere's script... i'm one of first "live testers" for his script and it works great and very, very stable
and from what have been tested by several testers , it can work in these roms :
without a2sd+ :
- rooted stock
- leedroid no-a2sd
with a2sd+ :
- auraxtsense
- defrost
- leedroid
- alex-v
Sibere, allow me to add notes from AndroHero on using the script with a2sd+ rom :
- remove the data2sd (or in auraxt, stuff2sd) from system/etc/init.d in the rom zipfile, or if you have install the rom, just remove from system/etc/init.d
- do the sibere script
Regards
BL
I have follow this easyest tutorial and i'm ok.
All credits to AndroHero for tutorial and to sibere for the hack! I'm only copy and paste from the previous thread!
This tutorial is for all app2sd sense rom so you can follow this tutorial not onfly for lee droid.
As attachment the file that tutorial need.
I have made a 2gb partition for data and is an awesome to see 1.80gb internal memory at first boot!!!!
WOOOOW
Now let's start with tutorial!
------TUTORIAL BEGIN-------
WHAT YOU NEED:
1)Root
2)Android SDK
3)15minutes of time
ALWAYS MAKE A NANDROID BACKUP AND SD BACKUP!!!
LET'S START NOW!
1) download leedroid 2.2f (apps2sd version)
2) unzip the .zip file, open the folder, open the system folder, and then inside that open the folder called etc, you will see a folder called init.d, open that and delete the file called 40a2sd, now just navigate back to the root of the rom and re-zip it.
3) now you need to partition your sd card, use gparted to make 2 fat partitions, a large primary partition and a secondary one about 1gb in size.
4) once you have done that copy the leedroid.zip to the sd card, boot into recovery, do all your wipes and flash the rom, one fashed boot it up and set it up as normal.
5) once set up, hold the power button and choose the option to reboot into recovery.
6) once in recovery connect your phone to your pc, open a command prompt and navigate to the tools folder inside the android SDK.
7) now in the command prompt type the following one at a time:
adb shell
mount /system
mount /data
mount /sdcard
exit
8) now leave the command prompt open and download the file at the bottom of the screen, (i have had to zip it, just open the .zip and the 01data file is inside) and copy it to the root of the c:\ drive on your pc.
9) in the command prompt type (one at a time and always wait for the # to appear again before entering a new command)
adb push c:\01data /system/etc/init.d
adb shell
chmod 755 /system/etc/init.d/01data
cd /
mount /dev/block/mmcblk0p2 /sd-ext
dd if=/dev/zero of=/sd-ext/ext2 bs=1048576
/system/xbin/busybox mke2fs -F -L userdata /sd-ext/ext2
mkdir /sd
/system/xbin/busybox mount -o loop /sd-ext/ext2 /sd
cd /data
cp -a * /sd
cd /
/system/xbin/busybox umount /sd
exit
adb reboot
10) your phone will now reboot with a much bigger /data/ partition.
------TUTORIAL END-------
I suggest to activate the boost!
type in adb shell window with android running:
busybox mount -o remount,noatime,nodiratime /mnt/asec/ext/ext2 /data
sibere said:
No because you won't be able to use your SD as an external drive when connected to USB.
Just checked the links and they're OK
Click to expand...
Click to collapse
Sounds real logical ...8) ... Ups ... shortcut in brain ...8)
bluelavender said:
i vouch for sibere's script... i'm one of first "live testers" for his script and it works great and very, very stable
and from what have been tested by several testers , it can work in these roms :
without a2sd+ :
- rooted stock
- leedroid no-a2sd
with a2sd+ :
- auraxtsense
- defrost
- leedroid
- alex-v
Sibere, allow me to add notes from AndroHero on using the script with a2sd+ rom :
- remove the data2sd (or in auraxt, stuff2sd) from system/etc/init.d in the rom zipfile, or if you have install the rom, just remove from system/etc/init.d
- do the sibere script
Regards
BL
Click to expand...
Click to collapse
Year sure, you're free to add notes mate
will this increase the battery usage?
kakit526 said:
will this increase the battery usage?
Click to expand...
Click to collapse
No effect at all on the battery usage. the usage is around the same .
BL
only one question:
is it better than using a2sd+?
what is the difference?
i had a lot of memory issues with a2sd+ (internal memory decrease very quickly compared to a2sd storage until i get the 'low memory' error message), does this solve my problem?
thanks
bye
Alessandro
Does this really increase IO speed? Can anyone who managed to set this up please post ur Quadrant benchmark.
alessandro_xda said:
only one question:
is it better than using a2sd+?
what is the difference?
i had a lot of memory issues with a2sd+ (internal memory decrease very quickly compared to a2sd storage until i get the 'low memory' error message), does this solve my problem?
thanks
bye
Alessandro
Click to expand...
Click to collapse
Yes, it will solve the problem
The reason why internal memory still decreases with a2sd+ is because not every part of the apps are moved to sd-card . Some of the data parts are still in the internal memory.
This script moves entire data folder to sd card, so nothing in internal memory get decreased
It can be any size you want. So far, the maximum tested size is 2 gb i think was tested by mattiadj & androhero.
BL
I tried once, i got 1956 score (CPU at 998Mhz)
Does this preserve the data on the card? Or do you have to copy everything back on?
Of course I'll have backups, but just asking
coutts99 said:
Does this preserve the data on the card? Or do you have to copy everything back on?
Of course I'll have backups, but just asking
Click to expand...
Click to collapse
it will survive the boot... of course, if you wipe factory data, everything will be gone...but it is safe and survive normal reboot or recovery reboot
BL
This is what is on clean flash of leedroid and after this hack!
I have made a 2gb partition....
Image talks alone....one word: THANKS!
Great job!
Now I expect seeing this bundled into all ROMs around here...
Any improvements are welcome but beside the space can you feel the I/O at some points or is it just a number?
Dude you are legen........ wait for it........... DeRY =D
hope to find a little time to test this awesome tutorial =]
what would happen if the SD card failed? does this render the phone unuseable until a new rom is flashed?
Hello,
In this guide I will show you how to enable Darktremor's a2sd (i.e. extending your internal memory using SD card, so you can install more applications easily).
This method has been tested on a rooted Galaxy ACE running Android 2.2.1. It might work on other devices, but I don't guarantee.
This guide assumes that your phone is rooted, and you have a basic knowledge in adb shell.
Please note that this script sleeps for 8 seconds at boot time to make sure that the SD card is loaded before mounting (thanks devetle and KoGi77GR).
REMEMBER: The steps below will not extend your phone's internal memory, you still have to install a2sd (link provided below) to complete the job.
1- Backup all data, both on your phone and your SD card.
Click to expand...
Click to collapse
2- Partition your SD card as following: 1st partition FAT32, 2nd partition ext2. I'm not sure about the optimal partition size of ext2, but you can start with 1-2 GB. Make sure that you use ext2 only, as ext3 and ext4 are not supported by the kernel (by default. See Bonus section below). Here's a good guide to help you out.
Click to expand...
Click to collapse
3- Insert your SD card and make sure that your phone recognizes it correctly.
Click to expand...
Click to collapse
4- Connect your phone in Mass Storage mode, then extract the attached script file to your SD card root directory.
Click to expand...
Click to collapse
5- Disconnect mass storage and login to ADB shell as root:
Code:
adb shell
su
Click to expand...
Click to collapse
6- Type in the following commands (try copy-paste each line then hit enter):
Code:
cp /sdcard/a2sd_enabler.sh /data/local/tmp/
chmod 755 /data/local/tmp/a2sd_enabler.sh
/data/local/tmp/a2sd_enabler.sh
If you got any error messages (starting with "ERROR") please post them here. Otherwise, continue to step 7.
Click to expand...
Click to collapse
7- To double check everything, reboot your phone and login again as root through adb, then run the following command, and find a line similar to the highlighted line in the output below:
Code:
su
df
Output
Code:
/dev: 142220K total, 12K used, 142208K available (block size 4096)
/mnt/asec: 142220K total, 0K used, 142220K available (block size 4096)
/cache: 25656K total, 12K used, 25644K available (block size 4096)
/data: 185240K total, 36768K used, 148472K available (block size 4096)
/system: 213376K total, 211520K used, 1856K available (block size 4096)
[B][COLOR="Red"]/system/sd: 1032088K total, 38512K used, 993576K available (block size 4096)[/COLOR][/B]
/mnt/sdcard: 6783016K total, 190356K used, 6592660K available (block size 4096)
/mnt/secure/asec: 6783016K total, 190356K used, 6592660K available (block size 4096)
Click to expand...
Click to collapse
8- Now you're good to go. Follow the directions as described in Darktremor's thread here:
http://forum.xda-developers.com/showthread.php?t=715116
Click to expand...
Click to collapse
Bonus for the experts
Now you can mount ext3 and ext4 partitions too using kernel mods. You can find them here: http://forum.xda-developers.com/showpost.php?p=12845360&postcount=17
I managed to setup a2sd on ext3 successfully, and planning to test ext4.
Thanks peeter123
Click to expand...
Click to collapse
Hi,
the link to script is broken. please upload it again! thanx!
harrythescorpion said:
Hi,
the link to script is broken. please upload it again! thanx!
Click to expand...
Click to collapse
You seem to have trouble downloading files from the forum. Here you go:
http://www.4shared.com/file/zn2vNQrH/a2sd_enablersh.html
Hi majedev,
thank you. I rooted the phone and followed the way in this thread.
I can mount ext2 (2nd partition of sdcard), but my S5830 seems not running install-recovery.sh at start up. I don't know why... Please helppppppppp
Here's what "cat /system/etc/install-recovery.sh" shows:
#!/system/bin/sh
/system/bin/mount -t ext2 /dev/block/mmcblk0p2 /system/sd
/system/bin/sh /system/etc/init.d/dtapp
/system/bin/sh /system/etc/init.d/99complete
I'm wondering is that any issue that can prevent the install-recovery.sh from running at start up...
devetle said:
Hi majedev,
thank you. I rooted the phone and followed the way in this thread.
I can mount ext2 (2nd partition of sdcard), but my S5830 seems not running install-recovery.sh at start up. I don't know why... Please helppppppppp
Here's what "cat /system/etc/install-recovery.sh" shows:
#!/system/bin/sh
/system/bin/mount -t ext2 /dev/block/mmcblk0p2 /system/sd
/system/bin/sh /system/etc/init.d/dtapp
/system/bin/sh /system/etc/init.d/99complete
I'm wondering is that any issue that can prevent the install-recovery.sh from running at start up...
Click to expand...
Click to collapse
It might be permissions issue? Try "chmod 755 /system/etc/install-recovery.sh"
If that didn't help, please run this command as root to copy "init.rc" to your sd card, then post the file here:
Code:
cp /init.rc /sdcard/
majedev said:
It might be permissions issue? Try "chmod 755 /system/etc/install-recovery.sh"
If that didn't help, please run this command as root to copy "init.rc" to your sd card, then post the file here:
Code:
cp /init.rc /sdcard/
Click to expand...
Click to collapse
thanks~
I checked the permission, it is 755 rwxr-xr-x.
the init.rc is attached herewith.
devetle said:
thanks~
I checked the permission, it is 755 rwxr-xr-x.
the init.rc is attached herewith.
Click to expand...
Click to collapse
Hmm, your init.rc seems fine, it executes install-recovery.sh at boot:
Code:
service flash_recovery /system/etc/install-recovery.sh
oneshot
Could you please type "mount" after mounting your ext2 partition and post the output?
By the way I noticed some differences on your init.rc wlan configuration, what's your firmware?
mount says: /dev/block/mmcblk0p2 /system/sd ext2 rw,relatime,errors=continue 0 0
I saw another thread. It adds "sleep 10" before mounting ext2 so that the sdcard is "ready". And someone said that is not necessary.
I'm really confused.
BTW, my firmware is:
Android version
2.2.1
Baseband version
S5830ZCKC1
Kernel version
2.6.32.9-perf
[email protected] #1
Wed Mar 16 19:45:24 KST 2011
Build number
FROYO.ZCKC1
devetle said:
mount says: /dev/block/mmcblk0p2 /system/sd ext2 rw,relatime,errors=continue 0 0
I saw another thread. It adds "sleep 10" before mounting ext2 so that the sdcard is "ready". And someone said that is not necessary.
I'm really confused.
BTW, my firmware is:
Android version
2.2.1
Baseband version
S5830ZCKC1
Kernel version
2.6.32.9-perf
[email protected] #1
Wed Mar 16 19:45:24 KST 2011
Build number
FROYO.ZCKC1
Click to expand...
Click to collapse
Okay, let's check if install-recovery is actually run at boot. Execute the attached script which will add some checks on boot time, and reboot your phone. Then check if the following files exist and post their contents:
/data/local/tmp/test1
/data/local/tmp/test2
Sent from my HTC HD2 using XDA App. Yvyg hggvhbhggbgggggvb vgghbhvggvbvv556r5rrdvvby6t
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
devetle said:
From the test script, the install-recovery.sh is running!
However, in the install-recovery.sh, the mount says: mount: No such file or directory.
It really looks like I need to add a sleep 10 here...I'll try.
Click to expand...
Click to collapse
Oh, it seems that I have the same thing "mount: No such file or directory" but it works just fine.
I'll consider adding sleep to my script. Thank you for your feedback
Thank you for your help!
Hi majedev,
i have tried running your script and it just runs fine. but still i am not able to see system/sd after rebooting the phone. i have installed darktremors a2sd(by booting into recovey and running update.zip) and the installation went just fine. but still my phone internal memory is showing the same. so what should i try now? i have tried installing recovery.sh that u posted. still doesnt works. i have tried rooting and unrooting the phone and then again tried all the steps but no go.
so please guide me what should i do next? may be flash the firmware? factory reset?
harrythescorpion said:
Hi majedev,
i have tried running your script and it just runs fine. but still i am not able to see system/sd after rebooting the phone. i have installed darktremors a2sd(by booting into recovey and running update.zip) and the installation went just fine. but still my phone internal memory is showing the same. so what should i try now? i have tried installing recovery.sh that u posted. still doesnt works. i have tried rooting and unrooting the phone and then again tried all the steps but no go.
so please guide me what should i do next? may be flash the firmware? factory reset?
Click to expand...
Click to collapse
If you were following the discussion then you most probably have the same problem as devetle did. I've updated the script so it sleeps for 5 seconds after mounting. You may want to redo the guide once again and download the updated script file.
I hope that helps.
I've made the kernel modules for ext3 and ext4. Kernel: 2.6.32.9-perf.
install-recovery.sh:
Code:
#!/system/bin/sh
insmod /system/lib/modules/jbd.ko
insmod /system/lib/modules/jbd2.ko
insmod /system/lib/modules/ext3.ko
insmod /system/lib/modules/ext4.ko
mount -t ext2 /dev/block/mmcblk0p2 /system/sd
/system/bin/sh /system/etc/init.d/dtapp
/system/bin/sh /system/etc/init.d/99complete
Haven't tested it yet, but the modules insmod just fine. And a2sd says ext3 and ext4 are supported.
Maybe someone with knowledge and guts can test it by converting the partition to ext4, so install-recovery.sh becomes:
Code:
#!/system/bin/sh
insmod /system/lib/modules/jbd.ko
insmod /system/lib/modules/jbd2.ko
insmod /system/lib/modules/ext3.ko
insmod /system/lib/modules/ext4.ko
mount -t ext4 /dev/block/mmcblk0p2 /system/sd
/system/bin/sh /system/etc/init.d/dtapp
/system/bin/sh /system/etc/init.d/99complete
Pls don't test it if you have the dalvik cache on your sd. You can end up with an bootloop if it doesn't work.
Hi majedev,
now that worked! now if i run the df command i can see the system/sd that shows me a capacity of approx 964.1123mega bytes, which is the ext2 partition that i created. now the issue is that i cannot see my phone's internal memory increased.
its still the same.
when i run the diskcheck command in a2sd (a2sd discheck) , it says me that:: displaying disc space statistics on sd card :
-h: no such file or directory
/dev/block/mmcblk0p2: 144220k total, 12k used.
and in another of your posts, u have said that if the phone ,memory doesn't increases, try command: a2sd install, which i have also tried and gives me the following output: mv: cant rename ' data/app-private/*' no such file or directory and then it says, time, date, test, expr echo: applet not found etc..
i tried to move the delvik cache to sd card by using the command : a2sd cachesd, and it was successful, the free space increased by like 10mb's. then i ran a2sd check and it also verified the same that the cache is running from sd card. i also trying moving it back to phone, it also worked fine as well.
so where is the glitch? the card is mounted. i am able to see system/sd, i am able to move cache to sd, but still internal memory is showing as 91 mb free??
and moreover my apps and market etc have disappeared? (i have backed then up using titanium bacup, i think ill be able to recover them from there) so what should i do next?
PS: BTW i am using latest beta 4 version 2.7.5.3 of a2sd
harrythescorpion said:
Hi majedev,
now that worked! now if i run the df command i can see the system/sd that shows me a capacity of approx 964.1123mega bytes, which is the ext2 partition that i created. now the issue is that i cannot see my phone's internal memory increased.
its still the same.
when i run the diskcheck command in a2sd (a2sd discheck) , it says me that:: displaying disc space statistics on sd card :
-h: no such file or directory
/dev/block/mmcblk0p2: 144220k total, 12k used.
and in another of your posts, u have said that if the phone ,memory doesn't increases, try command: a2sd install, which i have also tried and gives me the following output: mv: cant rename ' data/app-private/*' no such file or directory and then it says, time, date, test, expr echo: applet not found etc..
i tried to move the delvik cache to sd card by using the command : a2sd cachesd, and it was successful, the free space increased by like 10mb's. then i ran a2sd check and it also verified the same that the cache is running from sd card. i also trying moving it back to phone, it also worked fine as well.
so where is the glitch? the card is mounted. i am able to see system/sd, i am able to move cache to sd, but still internal memory is showing as 91 mb free??
and moreover my apps and market etc have disappeared? (i have backed then up using titanium bacup, i think ill be able to recover them from there) so what should i do next?
PS: BTW i am using latest beta 4 version 2.7.5.3 of a2sd
Click to expand...
Click to collapse
Do you have BusyBox installed?
peeter123 said:
I've made the kernel modules for ext3 and ext4. Kernel: 2.6.32.9-perf.
install-recovery.sh:
Code:
#!/system/bin/sh
insmod /system/lib/modules/jbd.ko
insmod /system/lib/modules/jbd2.ko
insmod /system/lib/modules/ext3.ko
insmod /system/lib/modules/ext4.ko
mount -t ext2 /dev/block/mmcblk0p2 /system/sd
/system/bin/sh /system/etc/init.d/dtapp
/system/bin/sh /system/etc/init.d/99complete
Haven't tested it yet, but the modules insmod just fine. And a2sd says ext3 and ext4 are supported.
Maybe someone with knowledge and guts can test it by converting the partition to ext4, so install-recovery.sh becomes:
Code:
#!/system/bin/sh
insmod /system/lib/modules/jbd.ko
insmod /system/lib/modules/jbd2.ko
insmod /system/lib/modules/ext3.ko
insmod /system/lib/modules/ext4.ko
mount -t ext4 /dev/block/mmcblk0p2 /system/sd
/system/bin/sh /system/etc/init.d/dtapp
/system/bin/sh /system/etc/init.d/99complete
Pls don't test it if you have the dalvik cache on your sd. You can end up with an bootloop.
Click to expand...
Click to collapse
Dude these are hot stuff, I'll give it a shot after finishing my homeworks :'(
But don't you think ext3/4 journaling is too much I/O for sd cards?
I'm currently using multirom to test android L and use Kitkat, I want to use the same Whatsapp account.
Is it possible if I have the same emei and android id on both roms and I use Helium to sync Chatlogs?
I don't use multirom so I'm not familiar with the data structure but in the 2nd ROM, can you not symlink from the original /data/data/WhatsAppDir to the new one?
Sent from my Nexus 5 using Tapatalk
Do you mean ln -s /data/data/Whatsappfolder /2Rom/data/data/whatsappfolder?
That's a symlink, yes.
Sent from my Nexus 5 using Tapatalk
When trying with download folder I got a error that this function is not implemented (I have root and busybox)
You're maybe doing it the wrong way round. Also I'm not sure if it will work because I don't know the folder structure.
Sent from my Nexus 5 using Tapatalk
dav20011 said:
When trying with download folder I got a error that this function is not implemented (I have root and busybox)
Click to expand...
Click to collapse
I have never linked a data folder on android, but if "ln -s ..." doesn't work, maybe you should try "busybox ln -s ..." ?
keiwop said:
I have never linked a data folder on android, but if "ln -s ..." doesn't work, maybe you should try "busybox ln -s ..." ?
Click to expand...
Click to collapse
Just realised he tried to link the download folder. He cannot link that as it's on /sdcard. You can only link ext4 partitions, not FAT, exFAT, NTFS etc /system and /data are the only linkable directories
rootSU said:
Just realised he tried to link the download folder. He cannot link that as it's on /sdcard. You can only link ext4 partitions, not FAT, exFAT, NTFS etc /system and /data are the only linkable directories
Click to expand...
Click to collapse
Isn't the Nexus 5 /sdcard formatted as ext4 since it's just a FUSE virtual file system of part of the /data partition?
raptir said:
Isn't the Nexus 5 /sdcard formatted as ext4 since it's just a FUSE virtual file system of part of the /data partition?
Click to expand...
Click to collapse
No. /data is ext4 (or f2fs for some of us). /sdcard itself is not ext4. FUSE doesn't support symlinking
You can test it yourself
Code:
su
mkdir /data/data/test
ln -s /data/data/test /sdcard/test
function not implemented
ln -s /data/data/test /data/media/0/test
successful
You can see in /data/media/0/test that symlinking is working. Add a file and it appears in /data/data/test. However, /sdcard/test as it is a symlink, not directory, is not visible or accessible
Is the root dir also use able for symlink? I got a read only error but I changed everything rwx
Edit: Use terminal emulator chmod and not es file explorer
Last question: does anybody know where multirom saves the roms?
i know im late...
But: multirom stores the roms at /data/media/0/multirom/roms
Were you successful using whatsapp on 2 roms?
I have a Galaxy GIO, which is a fairly old low-end phone. On factory reset, I have about 100MB memory free for apps, and the phone seems to start complaining as soon as I hit the 50MB mark; that's about one or 2 installed applications.
Because I would like to actually be able to, well, use my phone for anything else than calling, I want to move the /data partition to my SD card. I know this'll be slow, but slow still is better than not working at all.
I have done a bit of research, and came around plenty of scripts which claim to mount the second partition of the sd card as /data; none of these scripts work. I have tried 'INT2EXT', 'D2EXT', and I've heard about something called 'A2SD' but I have yet to find a copy of it . To install these scripts I've extracted them, and copied the scripts to '/system/etc/init.d/', after mounting '/system', using ADB.
I for an instant thought maybe my second partition isn't formatted properly, but using adb I am able to successfully mount the ext2 partition as /sd-ext, so I don't see why mounting them as /data should be a problem.
I have also tried to symbollicly link /data to /sd-ext/data and automatically mount my /sd-ext on boot. Obviously this didn't work, because the symbolic link isn't actually saved to disk.
How would I go about moving my data partition to my sd card? I am not affraid of doing some dirty work manually. I am running Cyanogenmod 11.
Binero said:
I have a Galaxy GIO, which is a fairly old low-end phone. On factory reset, I have about 100MB memory free for apps, and the phone seems to start complaining as soon as I hit the 50MB mark; that's about one or 2 installed applications.
Because I would like to actually be able to, well, use my phone for anything else than calling, I want to move the /data partition to my SD card. I know this'll be slow, but slow still is better than not working at all.
I have done a bit of research, and came around plenty of scripts which claim to mount the second partition of the sd card as /data; none of these scripts work. I have tried 'INT2EXT', 'D2EXT', and I've heard about something called 'A2SD' but I have yet to find a copy of it . To install these scripts I've extracted them, and copied the scripts to '/system/etc/init.d/', after mounting '/system', using ADB.
I for an instant thought maybe my second partition isn't formatted properly, but using adb I am able to successfully mount the ext2 partition as /sd-ext, so I don't see why mounting them as /data should be a problem.
I have also tried to symbollicly link /data to /sd-ext/data and automatically mount my /sd-ext on boot. Obviously this didn't work, because the symbolic link isn't actually saved to disk.
How would I go about moving my data partition to my sd card? I am not affraid of doing some dirty work manually. I am running Cyanogenmod 11.
Click to expand...
Click to collapse
I will introduce how to COPY(NOT MOVING) /data partition to /sdcard.
1. You should ROOT First.
2. Use Rootexplorer to Copy /data to /sdcard (WARNING:If your sdcard emulated with /data, Data WON'T copy to SDCARD --You need external Sdcard!)
2-1. if you don't want to use RootExplorer, you can use Android Debugging Bridge(adb)
(Youshould download Android sdks from developer.android.com)
--Command : adb shell su -C cp /data /sdcard/data
3. That's all.
Jason Hyunwoo said:
I will introduce how to COPY(NOT MOVING) /data partition to /sdcard.
1. You should ROOT First.
2. Use Rootexplorer to Copy /data to /sdcard (WARNING:If your sdcard emulated with /data, Data WON'T copy to SDCARD --You need external Sdcard!)
2-1. if you don't want to use RootExplorer, you can use Android Debugging Bridge(adb)
(Youshould download Android sdks from developer.android.com)
--Command : adb shell su -C cp /data /sdcard/data
3. That's all.
Click to expand...
Click to collapse
Thanks, but that's not entirely what I meant. I can manage to move my data to the SD card no problem, but I want my phone to actually use my second partition on my sd card, as the /data partition.
Binero said:
Thanks, but that's not entirely what I meant. I can manage to move my data to the SD card no problem, but I want my phone to actually use my second partition on my sd card, as the /data partition.
Click to expand...
Click to collapse
Oops.. Sorry about that!
First, I am not sure that will work or not, maybe you should try to edit init.*.rc. Which is from boot.mg. I think, maybe mounting sdcard as data is impossible, but you may try editing init.rc(or init.*.rc, * is manufacture). You could unpack your boot img, and you could edit mounting point which is from init.rc!
I hope this thing will help you..
Jason Hyunwoo said:
Oops.. Sorry about that!
First, I am not sure that will work or not, maybe you should try to edit init.*.rc. Which is from boot.mg. I think, maybe mounting sdcard as data is impossible, but you may try editing init.rc(or init.*.rc, * is manufacture). You could unpack your boot img, and you could edit mounting point which is from init.rc!
I hope this thing will help you..
Click to expand...
Click to collapse
I have looked into init.rc, but that only seemed to create the /data mountpoint, but not actually mount to it. I've no idea how to edit the boot image, or what that even is. Is that the filesystem that is built into the kernel?
Binero said:
I have looked into init.rc, but that only seemed to create the /data mountpoint, but not actually mount to it. I've no idea how to edit the boot image, or what that even is. Is that the filesystem that is built into the kernel?
Click to expand...
Click to collapse
Umm.. You should download unpackbootimg or dsixda's Android Kitchen to edit boot.mg. You cannot edit init.rc on Root explore. Use unpack boot.img menu which is from Android Kitchen!
Jason Hyunwoo said:
Umm.. You should download unpackbootimg or dsixda's Android Kitchen to edit boot.mg. You cannot edit init.rc on Root explore. Use unpack boot.img menu which is from Android Kitchen!
Click to expand...
Click to collapse
I'll try that out. Still not sure where to look though. As I said, init.rc does not contain any commands mounting /data.
Binero said:
I'll try that out. Still not sure where to look though. As I said, init.rc does not contain any commands mounting /data.
Click to expand...
Click to collapse
or you could edit look at other *.rc files!
Isn't this what you're looking for?
http://forum.xda-developers.com/galaxy-s2/themes-apps/tool-directorybind-data-to-externalsd-t1410262
sndsnd said:
Isn't this what you're looking for?
http://forum.xda-developers.com/galaxy-s2/themes-apps/tool-directorybind-data-to-externalsd-t1410262
Click to expand...
Click to collapse
I want to mount my sd card to my /data. That simply creates a symbolic link.
Jason Hyunwoo said:
or you could edit look at other *.rc files!
Click to expand...
Click to collapse
There is only 2 rc files, and one of them is specific to my recovery image.