Mounting of ext4 formated sd card
This is a (relatively) simple method how to enable ext4 mounting on P5210
with stock, rooted
ROM. It should work with any non-stock ROM as well, but it looks like stock is only available for now.
There are two options, fast & easy one and long one.
Fast & easy method
This method involves replacing vold binary with precompiled one. That's usually bad idea as I tested it only on my machines and althought it shouldn't cause any problems in theory, there is no guarantee
it will not kill you while sleeping. But, it fast and should work.
So, what to do:
- Do backup
- Do another backup
- Grab vold.ext4support.tar.gz and extract it somewhere
- Copy extracted vold binary to device (you can use ADB - adb push vold /storage/sdcard0/)
- Open adb shell and mount /system for writing. That's :
$ adb shell
# mount -o remount,rw none /system/
- Create backup of your current vold binary - # cp /system/bin/vold /system/bin/vold.bak
- Replace vold binary with one from tarball - # rm /system/bin/vold && cp /storage/sdcard0/vold /system/bin/vold
- Make it executable - # chmod 755 /system/bin/vold
- Reboot your device.
Now, if everything went fine, you should be able to insert ext4-formated sdcard and get it mounted normaly. Note that sdcardfs will be used to emulate "android-compatibile" filesystem, so user rights are going to be ignored. If you need filesystem with unix rights (for linux in chroot for example), ext4 is mounted to /mnt/obb/extsdcard
If you'r device fails to start (gets stuck on boot screen), just use adb shell to mount /system for writing once again and replace /system/bin/vold with backup you have created in step 6. Or use backups from steps 1-2.
... invoves compiling android from the source. For real. Because... Why not
Ok, this is for anyone who want's to know what is he putting on his machine or just doesn't believe in random binaries from random guy from internet (and that's actually good way of thinking)
- Follow AOSP manual to download Android source code
- Follow next part of AOSP manual to build source code, BUT:
- Use full_x86 as target
- Apply this patch to get vold with ext4 support compilled. Or port your own, from this Cyanogen mod changeset
- Compile everything or just vold
- Copy your own vold binary from out/target/product/generic_x86/system/bin using Fast method
You can debug everything important here using logcat| grep Vold
from Android or, better, adb logcat|egrep "(Vold|DirectVolume|MountService)"
Good luck and as usual, I'm not responsible for anything and good at hiding