Ext2 Support

Last Updated:

  1. happyface_0

    happyface_0 Active Member This Topic's Starter

    Nov 18, 2008
    Likes Received:
    I read that android support the ext2 filesystem. I would expect it to since its in linux.
    But, I can't get my G1 to read an ext2/3 formatted sdcard! I want this to work since ext2 is clearly superior to fat32.


  2. deathbyfreezeray

    deathbyfreezeray New Member

    Sep 24, 2014
    Likes Received:
    This took me a lot of time and research to do but I figured out how to completely replace Fat32 with ext2 on android devices which support ext filesystems.
    This guide was tested on a Alcatel OneTouch Fierce Running Android 3.4.5
    Edit: This guide has now also been tested on a Samsung Moment running android 2.2.2.

    To completely replace Fat, you will need:

    • A rooted Android phone with Ext support (not sure which version this was added in)

    • A method of formatting the sdcard as ext2 (an external Linux system is recommended)

    • Init.d Support on your Phone. **

    • Android Terminal and Busybox

    • A basic understanding of Linux File Permissions
    Once you have init.d support, the rest is very simple.

    After formatting the scard as ext2:

    First, mount /system as rewritable.
    You should be able to in the terminal like this:
    [HIGH]mount -o remount,rw -t auto /system[/HIGH]

    Now create a file (with no extension) and name it something (I named mine mountsd)
    Then simply enter in:

    [HIGH]mount -t ext2 /dev/block/mmcblk1p1 /storage/sdcard0
    chmod -R 777 /storage/sdcard0[/HIGH]

    Then save the file.

    This script mounts the sdcard then sets global read/write/execute permissions to all files inside of it.

    Now run chmod -R 777 /system/etc/init.d (or wherever you init.d is)
    and reboot.

    In Android, every app runs as its own user for some reason. Therefore, since ext2 supports file permissions, only an app that creates a file can access it.
    Therefore, everytime an app creates a file you want another app to access, you have to use chmod 777 on the file.

    The easiest way to do this is with the command:
    chmod -R 777 /sdcard[/HIGH]
    That will fix permissions for all files that exist on the card.

    This is the main drawback of ext2 on android is that you will have to fix permissions every time a new file is added. The init.d script is designed to do this at boot to help make that less annoying, but it doesn
  3. deathbyfreezeray

    deathbyfreezeray New Member

    Sep 24, 2014
    Likes Received:
    Quick Note, for systems which have multiple storage devices, the sdcard, can be identified and mounted as follows.

    fdisk -l /dev/block/mmcblkX

    where X is the card number

    once a card is found with a Linux type partition of the correct size, it can be mounted with this convention (make sure you edit the init.d script to refelect this)

    mount -t ext2 /dev/block/mmcblkXpY /storage/sdcard0

    where X is the card number and Y is the partition number

    Q:Why do I need to use init.d to mount the sdcard
    A:init.d allows you to mount the sdcard before Android System starts. This fixes a lot of bugs, such as your system saying you have a damaged sdcard.

Share This Page