FORUMS

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

270 posts
Thanks Meter: 325
 
By Phoenix Wright, Senior Member on 21st December 2018, 05:04 PM
Post Reply Email Thread
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:
Magisk-v18.1-extrafs.zip
Sultan-kernel-wahoo_20190113.zip-exFAT.zip
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/andro...l_google_wahoo
sultanexfat.7z
The Following 8 Users Say Thank You to Phoenix Wright For This Useful Post: [ View ] Gift Phoenix Wright Ad-Free
26th January 2019, 03:40 PM |#2  
Senior Member
Flag Lyon
Thanks Meter: 54
 
More
Does it work for pixel 3 ?
27th January 2019, 08:23 PM |#3  
Phoenix Wright's Avatar
OP Senior Member
Thanks Meter: 325
 
More
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)
27th January 2019, 10:42 PM |#4  
Just curious as to why you would want this and what would it be for?
28th January 2019, 12:40 AM |#5  
Phoenix Wright's Avatar
OP Senior Member
Thanks Meter: 325
 
More
Quote:
Originally Posted by djcrystals

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.
The Following 2 Users Say Thank You to Phoenix Wright For This Useful Post: [ View ] Gift Phoenix Wright Ad-Free
28th January 2019, 02:05 AM |#6  
Quote:
Originally Posted by Phoenix Wright

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
5th February 2019, 10:39 PM |#7  
Senior Member
Thanks Meter: 19
 
More
Quote:
Originally Posted by Phoenix Wright

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
7th February 2019, 12:24 AM |#8  
Phoenix Wright's Avatar
OP Senior Member
Thanks Meter: 325
 
More
Quote:
Originally Posted by iu1nguoi

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
3rd April 2019, 02:15 AM |#9  
Junior Member
Thanks Meter: 0
 
More
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!
1st July 2019, 10:19 AM |#10  
Junior Member
Thanks Meter: 0
 
More
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!
7th July 2019, 08:15 PM |#11  
Member
Thanks Meter: 7
 
More
This modo is only google pixel? Other divice is compatible?
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes