9

Is there a workaround to use an ext4 formatted thumb drives on Android phones? Right now when I plug it (thumb drive has micro usb end and phone supports thumb drives) Android says it doesn't recognize the file system.

Android formats the micro SD cards to exFat by default so I guess that's all it supports for thumb drives too? But I would prefer to have the same (ext4) file system across all my PCs and thumb drives. Any non-painful way to achieve that?

1

1 Answer 1

7

External SD cards and USB OTG drives (since Android 6) are handled by vold which supports only FAT[N] (vfat) and exFAT (since Android 9 provided that OEM adds support to kernel) filesystems on stock Android. ext4 and f2fs are supported only for private volumes (Adoptable Storage). Public volume (secondary external storage) is not directly accessible to apps or readable as emulated filesystem. But it's writable only through Storage Access Framework APIs. For details see How to save files to external SD card?

With root access you can manually mount ext4 filesystem (on USB stick or SD card) with proper permissions (after vold fails) and read/write files there. Use sdcardfs or FUSE to emulate the filesystem for fixed permissions. But this way Android framework is unaware of mounted filesystem and Android apps won't be notified of new storage. Neither you can manage the mounted storage from device Settings.

Going Android-ish way, many custom ROMs include a patched vold which can handle NTFS, ext4 and f2fs filesystems, as well as Linux (0x83) partition type. GUID for that type was added in another patch in order to correctly identify ext4. This patched vold is also available as a Magisk module vold-posix, or you can build yourself from source code to manually add it to /system. Filesystem type might also needed to be changed in fstab if it's not auto (particularly on Android 5 and before).


Another way to access ext4 formatted USB stick on non-rooted devices is through USB host mass storage APIs. While it's theoretically possible and there exist solutions like open-source libaums (for FAT32) and closed-source like Paragon's (for exFAT/NTFS), I don't know of any stable working solution for ext4 at the moment. Related question is: How to read ext4 filesystem without mounting on a non-rooted device?

2
  • 1
    Rumors are that NTFS and ext4 support is now coming with Android 14
    – Lothar
    Dec 10, 2022 at 17:08
  • 1
    @Lothar yes there are some evidences too. And it's very likely to happen sooner or later because a much better and fully open-source NTFS driver with R/W capabilities is now part of the Linux kernel. Dec 10, 2022 at 18:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .