[MOD] EXT4/EXFAT/NTFS support for stock Pie on Pixel 2 (XL)

Phoenix Wright

Senior Member
Feb 19, 2009
270
319
103
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
 
Last edited:

Phoenix Wright

Senior Member
Feb 19, 2009
270
319
103
The modded magisk build and fs binaries should (they won't give you ExFAT support on their own, for that you should compile sdFAT into your Pixel 3 kernel of choice)
 
Last edited:

Phoenix Wright

Senior Member
Feb 19, 2009
270
319
103
Just curious as to why you would want this and what would it be for?
I have my external HDD formatted to NTFS because I use both macOS and Windows, so it's useful for that personally. FAT32 is the only natively supported filesystem for USB storage on the pixel, and while it might be enough to occasionally transfer files with, FAT32 isn't really reliable for any storage that's more permanent (due to the lack of a journal etc). Plus it doesn't support files over 4 GB if you need to transfer one of those for some reason.
 

djcrystals

Senior Member
Nov 29, 2011
376
134
73
40
City Of Tonawanda
I have my external HDD formatted to NTFS because I use both macOS and Windows, so it's useful for that personally. FAT32 is the only natively supported filesystem for USB storage on the pixel, and while it might be enough to occasionally transfer files with, FAT32 isn't really reliable for any storage that's more permanent (due to the lack of a journal etc). Plus it doesn't support files over 4 GB if you need to transfer one of those for some reason.
Gotcha ?
Thank you
 

iu1nguoi

Senior Member
Jan 24, 2009
191
19
0
I have my external HDD formatted to NTFS because I use both macOS and Windows, so it's useful for that personally. FAT32 is the only natively supported filesystem for USB storage on the pixel, and while it might be enough to occasionally transfer files with, FAT32 isn't really reliable for any storage that's more permanent (due to the lack of a journal etc). Plus it doesn't support files over 4 GB if you need to transfer one of those for some reason.
1. will this break in non-stock Pie?
2. if my hard drive is already in exFat, and I don't care about NTFS, do I still need this mod?

thank you
 

Phoenix Wright

Senior Member
Feb 19, 2009
270
319
103
1. will this break in non-stock Pie?
2. if my hard drive is already in exFat, and I don't care about NTFS, do I still need this mod?

thank you
1) no idea, it is possible. however most custom roms would already have this feature built-in I believe, so no need for this.
2) assuming the rom you use is like stock, you'd at least need the custom kernel and the fs binaries. The custom magisk (and custom vold within it) are only required for ntfs/ext4 support

Also, I updated the kernel (which has the February security patches from Google as a bonus) and the magisk build
 

kno333

New member
Apr 3, 2019
2
0
0
Thank you!

Just wanted to show my appreciation of this mod. Got it running no problems and it works seamlessly.

I find it incredibly irritating that Pixel devices support no other format than FAT32. It seems pretty unacceptable to me. I can maybe see that exFAT/NTFS support would be tricky with Microsoft (others have managed, so I doubt that is actually the reason) but ext4? Come on!

Anyway, this MOD works around the problem.

Thanks Phoenix!
 

kno333

New member
Apr 3, 2019
2
0
0
Is there any chance of getting an update for this? It's just that this version of Magisk breaks Google Pay, and I believe from 19 that is fixed.

Thanks!
 

JeepFreak

Senior Member
May 17, 2008
759
223
73
Are the patched/modified versions of the kernel and Magisk supposed to be flashed IN PLACE of the originals? Or over the top? And does this functionality persist if we update Magisk or the kernel or apply a monthly security patch?
Thanks!
 

smartRu

New member
Sep 24, 2017
1
0
0
The modded magisk build and fs binaries should (they won't give you ExFAT support on their own, for that you should compile sdFAT into your Pixel 3 kernel of choice)

This module is super great ,but the modify magisk it offered is based magisk V18. Can u share the newest magisk package?
Thx
 

rbeze

New member
Jan 17, 2020
4
0
0
It bricked my device!!!

Now I'm unable to access my Internal Storage. Phone is booting but File Explorers show blank. How do I fix it??? Can't even browse or anything. I lost my magisk also. I had flashed my stock recovery after installing magisk now I'm unable to do anything with the phone which will require me to access the internal memory