ROM Developers: Please switch to ext3 for a2sd!

Search This thread

cyanogen

Retired Recognized Developer
Jan 4, 2009
2,515
5,752
Seattle
cyanogenmod.com
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
 

Attachments

  • e2fsprogs.zip
    197.3 KB · Views: 4,086
Last edited by a moderator:
J

Joeriginal

Guest
can we have a noob-friendly guide to this preferably through terminal.
 

Beast84

Senior Member
Oct 28, 2007
1,126
41
Albuquerque
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.

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?
 

sir*mez

Senior Member
Nov 7, 2007
1,400
310
NYC
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?
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.
 

djdeviance

Senior Member
Sep 15, 2007
386
13
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?
 

arqueware

Member
Dec 13, 2008
26
0
Atlanta
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?
 

Beast84

Senior Member
Oct 28, 2007
1,126
41
Albuquerque
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?
 

Beast84

Senior Member
Oct 28, 2007
1,126
41
Albuquerque
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.

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
 

cyanogen

Retired Recognized Developer
Jan 4, 2009
2,515
5,752
Seattle
cyanogenmod.com
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?

Most Class 6 cards support wear leveling these days.
 

sir*mez

Senior Member
Nov 7, 2007
1,400
310
NYC
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
aaahhhh... ;p no i dont think jf has made his EXT3 compatable which is why cyangen is asking every dev to use EXT3.
 

Beast84

Senior Member
Oct 28, 2007
1,126
41
Albuquerque
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?
 

haykuro

Senior Member
Nov 21, 2008
616
19
Sunrise
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
 

cyanogen

Retired Recognized Developer
Jan 4, 2009
2,515
5,752
Seattle
cyanogenmod.com
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.
 

Beast84

Senior Member
Oct 28, 2007
1,126
41
Albuquerque
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.

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
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    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
    1
    Directions for what I did:

    1. unzip e2fsprogs
    2. type
    Code:
    adb remount
    3. Download lucids script (search it)
    4. type
    Code:
    adb shell
    5. type
    Code:
    adb push e2fsprogs/system /system
    6. type
    Code:
    lucid rem
    7. reboot into recovery
    8. type
    Code:
    adb shell
    9. type
    Code:
    mount system
    10. type
    Code:
    e2fsck /dev/block/mmcblk0p2
    11. type
    Code:
    tune2fs -j /dev/block/mmcblk0p2
    42. type
    Code:
    reboot

    All done
    1
    Do I do this BEFORE trying to install the Hero Rosie rom?

    Do it after so that when you flash the Hero ROM it won't overwrite the boot.img if you had flashed it before the ROM

    You need to do a 'busybox mount' instead of plain mount, because the built in mount command doesn't support the 'auto' type. Even if you're stuck at the boot you can run this command via adb shell and you'll see the phone will finish booting (once dalvik-cache becomes available again).

    Wow. Okay I will repack another boot.img with 'busybox mount' and post results later after work.

    It does makes sense but my phone was already able to use the ext3 partition without the modded boot.img. So it was pointless for me to flash that boot image?

    So what I think you're saying is that I didn't have to do anything since my phone had a fresh rom install, fresh ext3 partitioned sd card, and everything was mounted already? (I'm using symlinks to run my apps and dalvik-cache on sd).

    The phone has ext3 built in but some ROMs explicitly mount with an '-t ext2' command. So even if you formatted your card to ext3 and android supports it, it is still using ext2. Unless the ROM you are using already had the '-t auto' command in the boot.img. Type 'mount' in treminal or 'adb shell mount' from your computer and see what filesystem your /system/sd partitioin is using.