Mounting a ext4 formatted sdcard on Android Marshmallow I trying to mount an ext4 sdcard on a Samsung Galaxy Tab a6 (sm-t580) running Android 6.0.1. It has the original ROM, but is rooted and has TWRP installed.

I've tried the following commands on adb:

mkdir /mnt/media_rw/0000-FFFF
mount -t ext4 /dev/block/mmcblk1p1 /mnt/media_rw/0000-FFFF


This sucessfully mounts the volume and the volume can be viewed on the command line but is invisible to the gui. I follow with this command.

/system/bin/sdcard -u 1023 -g 1023 -U -1 /mnt/media_rw/0000-FFFF 0000-FFFF


But this spawns the following error:

E sdcard  : cannot mount sdcardfs filesystem in default (error 2)


When I run the last the sdcard command as an ordinary user I get

E sdcard  : Error setting RLIMIT_NOFILE, errno = 1
E sdcard  : installd fs upgrade not yet complete. Waiting...


The second line of which repeats indefinitely.

I also tried running vold but that just prints out Aborted on the standard output. Running the following command triggers a mount

/system/bin/vold --blkid_context=u:r:blkid:s0 --blkid_untrusted_context=u:r:blkid_untrusted:s0 --fsck_context=u:r:fsck:s0 --fsck_untrusted_context=u:r:fsck_untrusted:s0


but just results in the following on logcat

no match partition type(131) -&gt; change table to kUnknown
disk:179,32 has unknown partition table; trying entire device
...
Failed to pclose /system/bin/blkid -c /dev/null -s TYPE -s UUID -s LABEL 
/dev/block/vold/disk:179,32 : File exists
[WARNING] blkid failed to identify /dev/block/vold/disk:179,32
disk:179,32 failed to identify, giving up


Which is the same as when you insert the sdcard in to the device.

Any takers?
UPDATE an better solution https://android.stackexchange.com/a/204616/119381

First steps:

I could mount and use my pen usb with ext4 after install [1] but still bery tricky (need root) I need first do 

   adb shell
   su -
   mount -t ext4 /dev/block/sda1 /mnt/sdcard/usbStorage/sda1/


and after umount and mount sda1 with stickmount.
For some reason stickmount (when works alone) says that device is mount but it is not , I need mount it as root ... , after I mount it , stickmount do the rest of the work ... 

[1]
https://play.google.com/store/apps/details?id=eu.chainfire.stickmount&amp;hl=en

Update 2017-12-26:
After read: 
https://android.stackexchange.com/a/131839/119381

https://source.android.com/devices/storage/config.html
and 
https://stackoverflow.com/a/28018008/778517

I did is and works on kodi and other apps , 

adb root
adb connect 192.168.1.160
adb shell mount -o rw,remount /;

adb shell


(edit) /fstab.hardware and change vfat to ext4

vi fstab.rk30board 
/devices/30040000.otg*     auto ext4 defaults      voldmanaged=usb:auto

mkdir /data/media/0/usb1
mount -t ext4 /dev/block/sda1 /data/media/0/usb1/
mount -t ext4 /dev/block/sda1 /storage/emulated/0/usb1/


I also used [root] adb wireless from google play https://play.google.com/store/apps/details?id=com.dshylai.adbwifiwidget&amp;hl=en but now I see that I have more options 

More info:
https://forums.lenovo.com/t5/Moto-X-Play/Android-ext4-support/td-p/3262765