In the past week or so I've been working on getting all useful filesystems (EXT4, NTFS, exFAT) to work on OTG drives natively with stock Pie on Pixel 2 XL. After a lot of headaches (mostly with SELinux stuff) I've been successful.
I want to preface it saying that this is mostly thanks to null4n's work on the Oreo Magisk vold-posix module, as I started off from there: https://github.com/null4n/vold-posix .
What you need:
- a slightly customized version of Magisk. This is required because the userland daemon which handles mounting filesystems on Android only supports exFAT/FAT32 and is started before Magisk processes its modules, as it has to do /data decryption. The modded magisk replaces vold (using an init.rc script addition made by null4n) with a modified one systemlessly before it starts. It also injects a custom split sepolicy file to make everything play nice with SELinux, taking advantage of the fact our devices have the possibility of generating a sepolicy from split .cil files (basically text files). Both vold and the custom .cil are hidden by MagiskHide.
- mkfs/fsck binaries for NTFS and exFAT, plus a mount binary for NTFS (plus libraries), built from LineageOS sources. These are provided as a magisk module.
- a kernel including an exFAT driver. I used Samsung's sdFAT (used in their recent devices with a 4.4 kernel) from this repo: https://github.com/cryptomilk/kernel-sdfat and compiled it in SultanXDA's kernel.
How to install:
Install "Sultan-kernel-wahoo_20181212-exFAT.zip" and "Magisk-v18.0-extrafs.zip" from recovery. Put "fsbinaries.zip" on the internal SD card and install it by going to Magisk Manager -> Modules.
Download:
View attachment Magisk-v18.1-extrafs.zip
View attachment Sultan-kernel-wahoo_20190113.zip-exFAT.zip
View attachment fsbinaries.zip
Source code:
https://github.com/AuroraWright/vold
https://github.com/AuroraWright/Magisk
https://github.com/LineageOS/android_external_ntfs-3g
https://github.com/LineageOS/android_external_exfat
https://github.com/kerneltoast/android_kernel_google_wahoo
View attachment sultanexfat.7z
I want to preface it saying that this is mostly thanks to null4n's work on the Oreo Magisk vold-posix module, as I started off from there: https://github.com/null4n/vold-posix .
What you need:
- a slightly customized version of Magisk. This is required because the userland daemon which handles mounting filesystems on Android only supports exFAT/FAT32 and is started before Magisk processes its modules, as it has to do /data decryption. The modded magisk replaces vold (using an init.rc script addition made by null4n) with a modified one systemlessly before it starts. It also injects a custom split sepolicy file to make everything play nice with SELinux, taking advantage of the fact our devices have the possibility of generating a sepolicy from split .cil files (basically text files). Both vold and the custom .cil are hidden by MagiskHide.
- mkfs/fsck binaries for NTFS and exFAT, plus a mount binary for NTFS (plus libraries), built from LineageOS sources. These are provided as a magisk module.
- a kernel including an exFAT driver. I used Samsung's sdFAT (used in their recent devices with a 4.4 kernel) from this repo: https://github.com/cryptomilk/kernel-sdfat and compiled it in SultanXDA's kernel.
How to install:
Install "Sultan-kernel-wahoo_20181212-exFAT.zip" and "Magisk-v18.0-extrafs.zip" from recovery. Put "fsbinaries.zip" on the internal SD card and install it by going to Magisk Manager -> Modules.
Download:
View attachment Magisk-v18.1-extrafs.zip
View attachment Sultan-kernel-wahoo_20190113.zip-exFAT.zip
View attachment fsbinaries.zip
Source code:
https://github.com/AuroraWright/vold
https://github.com/AuroraWright/Magisk
https://github.com/LineageOS/android_external_ntfs-3g
https://github.com/LineageOS/android_external_exfat
https://github.com/kerneltoast/android_kernel_google_wahoo
View attachment sultanexfat.7z
Last edited: