yashsingh1/xdaforums huggingface dataset:
[Magisk] VR25:
[MENTION=4237286]白い熊[/MENTION], yup, that's exactly it. You have to play with mount namespace mode in Magisk settings till everything works. [MENTION=5174730]Sgt.7Eleven[/MENTION], that may also be the solution you were waiting for. Give it a try! ;)
[Magisk] VR25:
[MENTION=4970217]pat357[/MENTION], nice observation. You're right. I forgot about that. The new zip has/does everything you need, including the "ready-to-go" fbind_list.txt, placing fbind somewhere else and setting permissions. The new path for the command line tool is /sdcard/fbind/fbind. Run it as follows:

su
cd /sdcard/fbind
./fbind -OPTION(S) ARGUMENT(S)

Check post 3 for more info.
[Magisk] pat357:
Thanks VR25 !

However I can't let the fbind script to run like you showed above : it always returns "sh ./fbind permission denied". (I try to run it whitout options)

I run it in Termux, which has root permission. It seems that the shell "sh" process doesn't get root permission.

I tried to play with the name-spaces in Magisk and according to earlier postings "global name-space" seems a good pick, but also didn't work.

Is there a way to let "sh" ask for root ?
[Magisk] VR25:
[MENTION=4970217]pat357[/MENTION], try

su
cd /sdcard/fbind
source fbind -OPTION(S) ARGUMENT(S)

Notice "source" in place of "./"

If that fails, set permissions again (only needed once)

chmod 777 fbind

Then run fbind -l to test
[Magisk] VR25:
[MENTION=4970217]pat357[/MENTION], the permission errors may have to do with SELinux context in this case. Try placing fbind in /data/local, set 777 permissions and test. I'll also test that myself later. It might be required to set the appropriate context manually. I'll look into that too.

To output a full terminal log to a file, run "exec &> /path/to/logfile" prior to executing fbind.

Now, about the files not showing up where you want them... change your paths back to the default values:

internal_storage_path /data/media/0

obb_path /data/media/obb

(You only change these if you actually have bind issues. Otherwise, you create these issues yourself)

If after that, the problem still persists, play with namespace mode in Magisk Manager settings.

Samsung... oh dear Samsung... why tf do you do this to us? ;)
[Magisk] pat357:
You mean the whole fbind directory or just the fbind script file ?

Yeah, they really got us by the "b . . s" !

Nice phones for sure, but hard to get something done on it.
[Magisk] cantenna:
Hi VR, Hope all is well! Don't know if this is related, but after a recent update from my kernel maintainer, this module no longer works. He did mention something about selinux changes, do you know what I am talking about? :confused:

EDIT; Found out the cause, module not compatible witj Magisk 13.4
[Magisk] VR25:
Just the script.

A new version already? Man, I'm really at the end of the world! I'll look into that as soon as I get at least a "stable" download speed of 20Kb/s. :eek:
[Magisk] Captain_Throwback:
There's no official 13.4 release yet. The current testing version has some issues, so I wouldn't change anything just yet...
[Magisk] pat357:
It might have found a bug...

It seems fbind -mb has problems with some long file-names with underscores in it.

My setup :

###FBIND SETUP###
internal_storage_path /data/media/0
obb_path /data/media/obb
from_to _testje .fbind/_testje

The directory _testje on sdcard contains 5 files and a subdir.

One of these files is "DROID INFO RAPPORT___TOESTEL_Model_.txt"

After fbind -mb , there was only one file visible on extSD/.fbind/_testje/ :

"﻿DROID INFO RAPPORT.txt"

I got a message "TOESTEL . ." not found

It seems like the file name was split in 2 parts and it tried to move those those 2 parts as 2 separated files.

If you try it on your system, it should show the same.
[Magisk] ch3mn3y:
Have similar problem like path, but my device is not Samsung, but Moto X Play running Resurrection Remix 5.7.4. Files are moved, but directories are empty...

Will try with moving the fbind script. Thought about changing paths, but here I'm sure that /data/media/0 is right one...
[Magisk] choi-roni:
ask delete file on internal memory

thank for make this module, I have succes doing this on my device, I bind /storage/emulated/0/pictures directory to /storage/SDcard/.fbind/pictures it was succes, but when I deleted file on /storage/emulated/0/pictures my file on /storage/SDcard/.fbind/pictures is deleted too, is this normal?
[Magisk] p50kombi:
Are you being serious or is this a wind up :)

This is the whole point of this module.

Maybe you should not be messing with your device so much if you don't know what you're doing :)
[Magisk] choi-roni:
Thanks bro for your answer, I think it's like XinternalSD module on Xposed
[Magisk] VR25:
When you bind two folders, "they become one." Any file deleted from one side also desappears from the other.
[Magisk] VR25:
That seems more like a shell issue/limitation. What happens when you try to move these files manually with mv extSD/.fbind/_testje/* NewFilesLocation or mv extSD/.fbind/_testje NewDirPath?
[Magisk] Pipsname:
Where can I find older versions of this. I updated and now it is not working. The problem is I updated a few things including the ROM and I need an older version to rule things out before blaming the update.

Update: Found it in a folder I didn't move over before the bind...

Reverting to 2017.7.4 made everything work again.

I do not know what information is needed but I am using a Lux device on the LineageOS nightly builds. Both stock and the new Squid kernel both had the same results with the new MFB build.
[Magisk] vikasb32:
[MENTION=225651]op[/MENTION] is there anyway to use this module without disabling sdacrdfs?
[Magisk] VR25:
[MENTION=7136072]Pipsname[/MENTION], v2017.7.4 is too far behind the current version, thus the compatibility issue. Do the following: copy your setup from fbind_list.txt (or fbind_setup.txt) to config.txt (located at $intsd/fbind folder). Notice that the configuration file has changed to config.txt along with its location.

The current sdcardfs version has issues with "mount -o bind." Therefore, it can't be enabled while the module is in use.
[Magisk] Youms:
Magisk manager reports "Module will be updated on next reboot"

I can't uninstall the module(latest)

I just can deactivate it

Please provide an uninstaller zip ?
[Magisk] pat357:
[MENTION=2904245]yaou[/MENTION]ndé : do you have a Samsung ?

There is a general way to remove modules in TWRP recovery : look in the module thread for a module "Mount-Magisk.zip" (it's one of the first modules mentioned).

After flashing this zip in TWRP, goto Advanced -> File manager, it has mounted your Magisk image to a folder /magisk in the root of your system.

Once you see that directory , open it and remove only the fbind directory and everything in it and reboot your phone.

Module is removed and your phone will boot again !
[Magisk] pat357:
[MENTION=5228676]VR25[/MENTION]

Can you post a link to your latest version ? (05.08.2017)

I've looked in MM in the download list, but I can't find your module in this list.

Thanks !

BTW : do we still need 2 folders for the installation ? I've an fbind and fbind_ folder in the root from int. sd.
[Magisk] Didgeridoohan:
It's there: "Magic Folder Binder". If you can't see it, clear the repo cache in the Manager settings and reload the Downloads list (pull down).
[Magisk] pat357:
I couldn't find "Magic folder bind" in the list for the obvious reason that an older version of the module 2017.7.29 was installed.. :laugh:

Anyway, I first manually removed the existing 2017.7.29 install and then try to install the new 2017.8.5 in MM.

This did not work : MM gave the well known message "module will be updated on next boot".

Removed the module again and installed using TWRP : this time I (in fact you, cause it's your creation ! ) got the jackpot !

Now I can call fbind from everywhere instead of have do to "cd /data/local" and using "./fbind -mb"

Is the fbind in /system/xbin now hidden by Magisk ?

Thank you so much for this excellent module !!

2 small questions :

1. will this module get updates if I installed it using TWRP ?

I ask because before when 2017.7.29 was installed, I never saw a notice or anything about the available update.

(maybe because it was based on your "fbind-test2.zip", a kind of a forced install only possible in TWRP ... ? )

2. Does "target data" not cause any slowdowns for you ?

As I understand it, the whole /data/data directory is moved /data on the the ext. SD.

The apps itself and especially Google seems to like reading/writing to the lots of relative small SQL databases, what means lot's of searching -> open -> write -> close operations.

Because FAT32/exFAT are much slower then EXT4 + the extSD is always slower then the internal sdcard, I would expect some performance hit.

The biggest advantage for me would be that I never have to worry about losing my data with a wipe data in TWRP or with a factory reset.

I would appreciate to hear your experience/thoughts about this.

Thanks again for guiding me, making special builds and for keeping going on until you got a working solution for Samsung S8+ and probably all other phones as well !
[Magisk] VR25:
First of all, you're welcome!

Now, to the answers, shall we?! ;)

-- xbin is not as monitored by security mechanics as the bin directory.

-- If I understood what you meant, the latest version worked for you (2017.8.5). If so, you'll get regular updates from Magisk Manager as everyone else, regardless of how the module was/is installed. As for the "debugging (test) versions, I will still offer as much support as possible (that's one of my hobbies after all). Bugs be bashed and happyness for all... yay!

-- "target data" is not meant for /data/data. That would be a "crime," literally. fbind functions are intended to work for $intsd and $extsd folders only. The "target" function is for those folders that do not contain any media files & whose optimal locations are the same on both storages. That "data" folder is where apps like Titanium Backup and Nova Launcher store settings/config backups ($intsd/data). "target" is specially good for folders in the "$intsd/Android/data" directory. You shouldn't really move these folders to somewhere else. They're better suited in the original locations (i.e., $intsd/data -- $extsd/data, $intsd/Android/data -- $extsd/Android/data).
[Magisk] 白い熊:
I have a general question regarding apps on MM. Why is in that some apps are able to see the bindmounts and some not—only seeing empty unmounted dirs? It's gonna be something with individual app permissions right?

Where should I look if I want to “fix” some problem app and make it able to read the bindmounts?
[Magisk] VR25:
v2017.8.14

* Added "autokill stubborn files" (in addition to the "autokill stubborn folders" feature). Check README.txt for more info.

* Major optimizations

* Improved debugging support. Check README.txt.

Couldn't updated the repo nor the thread due to my limited internet connection (such a pain in the ass!).
[Magisk] VR25:
[MENTION=4237286]白い熊[/MENTION], this may be due to "mount namespace mode." Change it in Magisk Manager settings and test. There are 3 options to choose from.
[Magisk] 白い熊:
I have the namespace set to global - now I've found an Xposed module - Marshmallow SD fix - it fixes this, you can select apps that see removable storage there and then they see the bindmounts. It works now...

---------- Post added at 11:55 AM ---------- Previous post was at 11:05 AM ----------

@VR25, could you add an option to specify in the config.txt an alternate path where the SD card is mounted?

The reason for this: I'd like to use an ext4 formatted SD. It doesn't mount automatically in MM, but can be mounted via a boot mount script by Apps2SD. Apps2SD mounts the card to /data/extsd2 this however is not identified as the extSD card by the system and your script, so then no bindmounts work.
[Magisk] VR25:
Here you have it!

v2017.8.15

* Added support for alternate sdcard path (i.e., /data/extsd2). Check README.txt for more info.

* Minor optimizations

Now, I want to implement a way to mount that partition automatically without Apps2SD. Could you send me the scripts/binaries (all) used by Apps2SD to mount it to /data/extsd2? I can't download the app due to my limited internet connection.
[Magisk] 白い熊:
It works on stable, i.e. 13.3. Beta—13.5 I don't know.

Tapatalk を使用して私の SM-N9200 から送信
[Magisk] VR25:
[MENTION=5458305]user2k10[/MENTION], it's for 13.1+. The latest stable is 13.3. I don't recommend hanging on the beta branch. Have you tried installing from TWRP?

Attached is the latest module version.

[MENTION=4237286]白い熊[/MENTION], I optimized this one even more for your usage scenario.
[Magisk] 白い熊:
[MENTION=5228676]VR25[/MENTION] I'm gonna get the full Apps2SD scripts in a bit—it messes up Xposed somehow, had to remove it, but I'll mess with it some so we can figure out how it mounts the SD—it would be a god-send to just mount the card with this module…

Tapatalk を使用して私の SM-N9200 から送信
[Magisk] VR25:
Yup, that'd be really nice.
[Magisk] 白い熊:
[MENTION=5228676]VR25[/MENTION], you're gonne have to help me a bit find the scripts - I've recreated the mount script through Apps2SD, the ext4 card is mounted on boot. It modifies the system partition using su.d / Magisk's su. I'm looking now in /system/ so far haven't found a trace of where it created the script. Any idea?
[Magisk] VR25:
As far as I know, the scripts may reside somewhere in /data/Apps2SD (or similar folder -- check /data/local too). Some might be in /magisk/.core/post-fs-data.d (or service.d). Another possible location is /system/init.d. Not sure about the setup under SuperSU (su.d).
[Magisk] 白い熊:
Think I found it - wasn't looking in /magisk/.core

Give me a sec...
[Magisk] 白い熊:
Here you go brother. It's the full /magisk/.core - all put there by Apps2SD. This mounts mmcblk1p1 which is ext4 to /data/sdext2
[Magisk] 白い熊:
It's just one script - now that I look - the apps2sd is the binary, unnecessary - only noticed after posting, but you can figure it out: it's all in the 000000apps2sd-main.sh
[Magisk] 白い熊:
Just the script here.
[Magisk] VR25:
I'll take a look. Nice job!
[Magisk] 白い熊:
The script works on its own in Magisk, I've tested it now, after removing Apps2SD completely.

You should modify the hardcoded /data/sdext2 - make it configurable, where you wanna mount the card. This now though will give you the ability to also bindmount apps from /data/data/ since when you'll have the full card ext4 - it'll still be readable as storage, but you can move full apps - just like Apps2SD but without the unnecessary baggage - might want to introduce from_datadata_to or what have you too... :eek:)

The card mount for ext4 is a killer though!
[Magisk] pat357:
Yes, this version works great for my Samsung !

That's the spirit we like !

My bad, I was confusing /data/data with /sdcard/data :eek:

I do however have another issue, might have nothing to do with fbind.

When I use ADB to connect PC -> phone, I have the following :

adb shell
su

On my phone, I get a request for root for from one of the following apps :

1. com.samsung.android.voc (Samsung Members) or

2. GR VR Shell

Sometimes nr1, otherwise nr2 (never nr1 and nr2 together !)

Anyway, I feel very uncomfortable to give one of those 2 apps root access, because I don't know what they are for.

This is only since recently, before it used to be com.android.shell IIRC

Is there a way to configure or set what app on my phone should open when I do "adb shell" ?
[Magisk] VR25:
NICE IDEA! I'll look into that. :D

By the way, here's some goodness...

v2017.8.16

* Massive optimizations

* [TEST] Added option to auto-mount an alternate partition to "$extsd_path." Check README.

* Updated reference.

* Now you can exclude fbind command line tool from installation, by running "touch /data/_f". This is for those who want just the core functionality of the module. On the other hand, it may prevent bootloop in problematic, security freak systems.
[Magisk] VR25:
That's strange... ?

Perhaps you installed something (another module) and it made some undesirable changes to your system...?

Not sure what was changed nor how to revert/edit it. See if you can debug that. If I find something related, I'll let ya know.
[Magisk] VR25:
*Duplicate*
[Magisk] 白い熊:
Some problems, it seems—it mounts the card, but not the directories then. Access issues maybe:

config.txt

———

intsd_path /storage/emulated/0

extsd_path /mnt/sdb1 ext4 /dev/block/mmcblk1p1

from_to download/test test

Error log

———

###BEGIN FBIND LOG###

>>> Checking for configuration updates...

- Configuration updated.

SD Card Path: [/mnt/sdb1]

>>> Running fbind Engine...

Binding [/storage/emulated/0/download/test] to [/mnt/sdb1/test]...

mount: No such file or directory

---------- Post added at 10:38 AM ---------- Previous post was at 10:04 AM ----------

mount -o bind /mnt/sdb1/test /storage/emulated/0/download/test

^^^

This works in the terminal, so no access issues there...

---------- Post added at 10:50 AM ---------- Previous post was at 10:38 AM ----------

OK - figured it out. You need to implement some timeout, after mounting the ext4 partition, because apparently the script mounts the dirs too fast - they're still non-existent.

If I fbind -u and fbind -b in the terminal after boot - it mounts the dirs fine now, as no errors.
[Magisk] pat357:
The only 2 things I installed is Helium from CWM (https://play.google.com/store/apps/details?id=com.koushikdutta.backup) and your fbind 2017.5.8.

Because Helium did not detect root (MagiskSU instead of SuperSU), I needed to follow the procedure to install a component on my PC.

It installed an ADB driver (I had already installed one) and an older version of ADB 1.0.30, while I already had 1.0.36 installed.

It could certainly be the cause of the issues I have, BUT . . . .

When I first freeze the Samsung Members app in Titanium Backup, and then set up a connection over ADB( adb shell ; su )

Magisk still reports the "Samsung Members" app as asking for root !

Can a frozen app still ask for root ?? I've never seen this before !

Maybe Magisk is just reporting the wrong app ?
[Magisk] VR25:
Awesome! I'm glad the auto-mount works. By the way, when you use the 2nd sdcard partition, there's no need to specify it (that's the default). You only need to pass "mount path" and "file system." arguments to the extsd_path function. ;)

The next version will include "mount check & timeout" for alternate partition.
[Magisk] VR25:
Magisk might be reporting the wrong app, or your installed ADB is nuts. Anyway, try the attached module and see if it sheds some light into this.
[Magisk] 白い熊:
[MENTION=5228676]VR25[/MENTION], I'd also propose adding—via a config switch, the option of running “fsck -fy” on the specified ext4 partition before mount.

This is handy after an improper unmount, so you don't compound the damage to the file system upon further mount. I'd definitely use it…
[Magisk] khnoizer:
Working nicely now mate, this is now the most important magisk module to me. Thank you for this awesomeness. :svetius:
[Magisk] TopperBG:
Should we disable or uninstall fmount module before use that one?

Изпратено от моят HUAWEI GRA-L09 с помощта на Tapatalk
[Magisk] TopperBG:
Don't work for me, same as fmount module :-\

Is it there requirements and dependancies?

I'm on stock ROM MM Huawei P8, TWRP+Magisk

Изпратено от моят HUAWEI GRA-L09 с помощта на Tapatalk
[Magisk] koko115:
For me dont work too. Any one work on samsung phones like S7 S8 on Nougat ?

FOLDER BINDER DEBUG LOG, Sat Jun 17 13:49:54 CEST 2017

#####################

Searching for SD card...

SD card found! Proceeding...

SD card name is 745B-B380.

Searching for configuration updates...

Configuration updated.

Starting Folder Binder Engine...

Checking current status...

Binding folders...

mount: '/mnt/media_rw/745B-B380/.fbind/Download'->'/data/media/0/Download': No such file or directory

All done!

#####################

http://cloud.tapatalk.com/s/59451820df475/Screenshot_20170617-135218.png?

http://cloud.tapatalk.com/s/5945182a1e7f6/Screenshot_20170617-135202.png?
[Magisk] TopperBG:
You have missing folder, double check destination and source.

My log is more than fine:

FOLDER BINDER DEBUG LOG, Sat Jun 17 09:34:09 UTC 2017

#####################

Searching for SD card...

SD card found! Proceeding...

SD card name is EBAB-73A0.

Searching for configuration updates...

Configuration updated.

Starting Folder Binder Engine...

Checking current status...

Binding folders...

All done!

#####################

Изпратено от моят HUAWEI GRA-L09 с помощта на Tapatalk
[Magisk] koko115:
I attach screen. I have folder Download in booth memory.
[Magisk] TopperBG:
As I told you - double check!

From your log I've read on ext SD right path is /ext SD/.fbind/Download/. You made it in /ext SD/Download/

Изпратено от моят HUAWEI GRA-L09 с помощта на Tapatalk
[Magisk] VR25:
Glad it fulfills your needs now. That's an extra motivation for me. :)

If you want to, yes. Keeping it won't cause any issue though.

You're missing /mnt/media_rw/745B-B380/.fbind. Create that folder and move your Download directory into it.

You have an issue with "Mount Namespace Separation." Your ROM must have some restrictions on that. Magisk v13 Beta has different options to choose from regarding namespace separation. That could solve your problem. I'll dive deeper into this issue after taking a good rest.
[Magisk] TopperBG:
But I've used to use FolderMount for a long time with SuperSu. After latest ROM upgrade I can't get root and jump back to Magisk (been there with v7)

And now name space problem ?!

Изпратено от моят HUAWEI GRA-L09 с помощта на Tapatalk
[Magisk] VR25:
The next version will create target folders automatically, so you don't have to. Also, I can make it move files. There's a risk of data loss involved in doing that though, especially when dealing with large files. Moving files with a shell script is not always funny, unfortunately. A workaround is making the shell copy the files instead and adding a "key" that can be activated in the log file to cleanup the source files in case the copy was successful. Another improvement -- the bind list syntax will be WAY simpler and more compact. Stay tuned!
[Magisk] VR25:
SuperSu has better compatibility with namespace separation. Magisk just started improving on this recently.
[Magisk] koko115:
Works great. Thanks. I forgot create .fbind folder.

But now in esxplore i have three card. How fix this ?
[Magisk] VR25:
Ok, that's weird. Send me your fbind_list.txt file and a separate regular written text with all the folders you want to bind.
[Magisk] vikasb32:
Not working for me no error in log file i can access my mount folders in /data/media/0 but when i access mount folder in internal memory via any file explorer all mount folder appear to be like file and toast msg comes can't access folder also can't download any media in brolwer or whatsapp and can't take screenshot as well.
[Magisk] cantenna:
Sound simular to my issue, S8?
[Magisk] vikasb32:
No i am using yureka
[Magisk] VR25:
Ok, I see what you guys are talking about. Something similar happened with OBB binding at first. It may also be an issue with busybox.

We'll discuss that in another moment though.

And, hey... I just finished building a new version of the module with massive improvements and awesome new features. It's ready to be released, but I'm currently busy with other things.

Stay tuned!
[Magisk] cantenna:
sounds great! Yes, i did think it may be a busybox issue as well, i tried disabling the magisk busybox module so that the roms version my kickin but no dice of coures.. I also tried all 3 versions of mountname space seperation in settings, no dice.

very apprecitaive of you efforts.
[Magisk] koko115:
Me too. Acces danied in apps to binded download folder.