• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Ext2 Support

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
For the init.d support, follow the instructions at

xxxx://xxx.theandroidhow.xxx/2014/06/how-to-enable-initd-support-on-android.xxxx
Where xxxx = http/html and xxx = www/com
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.


Warnings:
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:
[HIGH]su
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
 
Upvote 0
Quick Note, for systems which have multiple storage devices, the sdcard, can be identified and mounted as follows.

su
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

FAQ:
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.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones