5

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 microsd 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 accross all my PCs and thumb drives. Any non-painful way to achieve that?

3

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?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.