[MODULE] [7.x.x] Enable sdcardfs - 7/13/2017

nathanchance

Senior Recognized Developer / Recognized Contribut
Jul 22, 2015
13,748
49,943
263
25
Mesa, AZ
Introduction

Hello everyone! This is an incredibly simple module to enable sdcardfs on any Nougat 7.x ROM (SDK 24 or higher). sdcardfs is a replacement file system for FUSE, used to mount the /sdcard partition; you can read about this change here.


Some notes

  1. sdcardfs is in constant development (at least two to three patches per week on average), meaning it could become unstable at any point. Certain apps do not play with sdcardfs, which can lead to crashes and corruption. Enable it at your own risk!
  2. Your kernel MUST have sdcardfs support for this to work. Please ask your kernel/ROM developer if they have included all of the proper support commits for it to work. They can be found in AOSP's kernel/common repo (or a quick search of the AOSP Gerrit).
  3. You MUST have this system/core commit. There is no reason that every 7.x ROM should not have this commit as it comes straight from Google but you never know.


Frequently Asked Questions

1.1 Q: How do I use this?
1.1 A: Flash it in recovery or add it in Magisk Manager > Modules.

1.2 Q: How do I check if the module works?
1.2 A: Go into a terminal emulator and type the following:
Code:
su
df -t sdcardfs
If you see something like the following, the module worked! If not, it is most likely because you either don't have sdcardfs support in your kernel OR you do not have the system/core commit I mentioned above.


1.3 Q: I'm having xyz issue.
1.3 A: Great! Please give me a logcat, dmesg, and Magisk log and I'll be happy to assist.


Changelog

Version 3.0:
  • Update template to v4 and use system.prop instead of post-fs-data.sh

Version 2.1:
  • Improve print_modname so it looks right while flashing in recovery
  • Don't install on anything less than Nougat (thanks @veez21)

Version 2.0:
  • Add logging to Magisk log
  • v13 snapshot support

Version 1.0:
  • Initial support

Downloads

Primary | Mirror

Source
 

Attachments

Last edited:

justjr

Senior Member
Mar 24, 2013
984
485
0
37
Cuiaba
@The Flash U just broke my MM installation cause I was tested blind, I don't know what happende I just didn't read it was only for sdk24 +
I seem it after I flashed it, I didn't restarted and was going to uninstall on magisk, but then magisk lost root (wasn't happened before on the stock rom), I had to restart, I deleted it from magisk.img using the magisk mount module, and now it stays on Android is starting forever, and does not start up. :/
You can blame me xD But, can help me?
What files I have to edit/delte so I can completely disable it?
 

nathanchance

Senior Recognized Developer / Recognized Contribut
Jul 22, 2015
13,748
49,943
263
25
Mesa, AZ
@The Flash U just broke my MM installation cause I was tested blind, I don't know what happende I just didn't read it was only for sdk24 +
I seem it after I flashed it, I didn't restarted and was going to uninstall on magisk, but then magisk lost root (wasn't happened before on the stock rom), I had to restart, I deleted it from magisk.img using the magisk mount module, and now it stays on Android is starting forever, and does not start up. :/
You can blame me xD But, can help me?
What files I have to edit/delte so I can completely disable it?
The script doesn't actually fire if you are on Marshmallow: https://github.com/nathanchance/magisk-modules/blob/sdcardfs/common/post-fs-data.sh#L32

Even then, that prop doesn't actually do anything on Marshmallow or below. Your issue is unrelated to this. Dirty flashing your ROM should fix it.
 
  • Like
Reactions: justjr

veez21

Senior Member
Feb 22, 2016
2,172
2,704
183
Guess Where
  • Like
Reactions: nathanchance

franciscofranco

Recognized Developer
Dec 9, 2010
24,725
136,397
0
Carcavelos
I strongly suggest you to remove this. sdcardfs is still in development by the Android Kernel team and it's not ready for production. sdcardfs's only advantage is reduced overhead compared to FUSE when there's system calls to & from the sdcards. Users will think they know better (they don't) and they'll spam everyone and everything about sdcardfs without knowing what it is or what it does.
 

i42o

Senior Member
Dec 5, 2013
708
260
0
Riverside
I strongly suggest you to remove this. sdcardfs is still in development by the Android Kernel team and it's not ready for production. sdcardfs's only advantage is reduced overhead compared to FUSE when there's system calls to & from the sdcards. Users will think they know better (they don't) and they'll spam everyone and everything about sdcardfs without knowing what it is or what it does.
Why does my dog do back flips?
 

nathanchance

Senior Recognized Developer / Recognized Contribut
Jul 22, 2015
13,748
49,943
263
25
Mesa, AZ
I strongly suggest you to remove this. sdcardfs is still in development by the Android Kernel team and it's not ready for production. sdcardfs's only advantage is reduced overhead compared to FUSE when there's system calls to & from the sdcards. Users will think they know better (they don't) and they'll spam everyone and everything about sdcardfs without knowing what it is or what it does.
While I agree that users tend to be less informed than developers are, I have made it fairly clear in the OP that this is experimental and to enable at their own peril. I like bleeding edge and many other users do as well, knowing fully the risk of it. I'll take to heart the concern though, thank you.

To any kernel developer (and users): If your users start complaining about crashes and such, please let me know and I'll remove the module.
 

justjr

Senior Member
Mar 24, 2013
984
485
0
37
Cuiaba
Hey, I complained but stated that was my fault. Now I installed DU after my data partition gone to hell, and found out the same prop was already set to true on that ROM. And nobody gone there to ask them to take the ROM down. Pocketcasts complained a little but I managed to make it work. No problems.
 

II_DiE_4

Senior Member
Dec 12, 2007
613
259
63
I strongly suggest you to remove this. sdcardfs is still in development by the Android Kernel team and it's not ready for production. sdcardfs's only advantage is reduced overhead compared to FUSE when there's system calls to & from the sdcards. Users will think they know better (they don't) and they'll spam everyone and everything about sdcardfs without knowing what it is or what it does.
WTF franco.. .I thought this was a development friendly forum..

Bleeding edge and experimentation should be applaud, not criticize.

PS I know that this forum turn into anything else but developer friendly, but still, you should've known better than asking another developer that.
 
Last edited: