yashsingh1/xdaforums huggingface dataset:
[Magisk] VR25:
[MENTION=1162986]Captain_Throwback[/MENTION], I see what you got there. I performed similar tests but couldn't find a culprit. "SELinux contexts" is in my head, but just being there is not very helpful. I looked into "mount" file context but couldn't wrap my head around that just yet. About sdcardfs, not sure... I've tested FUSE and the actual sdcardfs, noticed no difference in the way bind mount works.

My device also has toybox and mount works without "-o bind" too. "mount" does exactly the same as "mount -o bind" in this case.

Moving on...

In a previous discussion it was suggested that Apps2SD folder binding mechanism works with the same commands we're trying to use here and the same busybox that is failing to give the results we want. My wild guess is that instead of calling busybox from the standard location, Apps2SD copies it to its house and calls it from there.

To test that possibility, I'm about to start working on implementing a standalone busybox into the module and see if SELinux contexts still apply. Perhaps a different busybox location will do the trick.
[Magisk] VR25:
v2017.6.20 is up!
[Magisk] p50kombi:
Oops.. That version causes my device to be stuck on boot.

Flashing previous version fixed it...fixed getting stuck at boot that is.
[Magisk] pat357:
That can be bad news, but not 100% sure.

All I can say is there were reports about Magisk 15.4 not working, and after downgrading to 15.3, fbind was working fine.

See previous page : https://xdaforums.com/apps/magisk/module-magic-folder-binder-t3621814/page97

Because Magisk 15.4/16.0 is relative new, there were too few reports to make the final conclusion that Magisk 15.4/16.0 is really the cause of your problem.

What I'm worried about is what you did before you came here :" fbind -mb took 2 min to run" you mentioned; it may have moved more then you think.

Is your WhatApp directory including content still intact on the internal memory ?

To check if there for some hidden content, try running the following in a terminal :

su
find -H /mnt /storage -type d -iname "*WhatsApp"

It should show you at least your WhatsApp directory on your internal memory and maybe it will find more.
[Magisk] MrMmmkay:
Hi,

thanks again for your support. It looks like there is no more WhatsApp "trash" around there.

So I have to hope that fbind goes magisk 16 compatible some times ;).
[Magisk] pat357:
There is another thing you can try :

- manually re-create the needed directories (.fbind/WhatsApp/) on your extSD card using a file-manager.

- move the content from the WhatsApp directory (do not delete/move the WhatsApp dir) from internal memory to the above created folder on extSD.

config.txt

from_to WhatsApp .fbind/WhatsApp

Then run

su -mm
fbind -b

Check the content in internal memory the WhatApp directory using a file-manager

Attach the created log from fbind. (rename *.log to *.log.txt )

In this case, even it didn't work, even not after rebooting, there is no harm done.

Just move the data back from extSD to internal.
[Magisk] kishd:
Had some problem getting my folders to mount.

Found that I had to change

from_to WhatsApp .fbind/WhatsApp

to

from_to WhatsApp \.fbind/WhatsApp

Had to add the \ for each entry.

In the config.txt to get everything working again.
[Magisk] Shon22:
Hi,

I got confused how to configure this module.

My requirement is to make my SDcard as my Internal(read and write permission)

Could anyone give any video tutorials on configuring this module???
[Magisk] pat357:
This a strange ; can you post the log from without the \ and with the \ ?

BTW what phone and version from Magisk ?
[Magisk] kishd:
Phone Oppo r7plusf, OS lineageOS 14.1

Magisk 16

I don't have the previous log but it just said cannot mount xxxx no such file or directory or something similar.

I have attached the current log.
[Magisk] pat357:
The log looks great, no problems.

Were you using this tool already when you were on a previous Magisk ?

Magisk 15.3 or which one ?

Did you have to use this \ at that time too ?
[Magisk] kishd:
I have been upgrading regularly both fbind and Magisk and the nightly LineageOS builds. Noticed some time ago that if I added new paths to the config file they just did not take. It did not bother me till after the last lineageOS nightly I ran find -mb and everything stopped working. Had to troubleshoot and this solution worked for me.
[Magisk] VR25:
**2018.3.6 (201803060)**

- -ad, -b, -m, -mb, restore, -u and -umb, now work with PATTERN and 'PATTERN1|PATTERN2|PATTERNn' arguments as well -- check the `PRO TIPS` section in config_samples.txt for more info

- Disable ESDFS and SDCARDFS & enable FUSE

- "fbind" (no args) command now displays a quick on-terminal reference

- Fixed root check issue with certain Magisk versions

- Log additional storage info

- Major optimizations

- Optional SELinux mode handling (config lines: setenforce auto, setenforce 0)

- [TEST] Universal full external SD card read-write access (new platform.xml workaround) -- some [or all] users may need to set SELinux mode to permissive to actually benefit from this (config line: setenforce 0)

- The `-l` (list config lines) option now displays corresponding mount statuses too

- Updated cryptsetup binary -- LUKS2 support (untested, possibly kernel module needed)

- Updated documentation

----------------------

I've been very busy lately. The worst: accessing the internet has just become much more difficult and expensive in my current location. As a result, my online presence is greatly restricted, but I'll still keep pushing updates and providing support whenever possible.
[Magisk] wynadii:
I have do the command, the status was already mounted, but files in Download folder are still there.

How to fix it?

Sorry for my bad eng
[Magisk] manos78:
Hi,

I'm working on configure this tool to move APK+DATA to one loop file in the external-sdcard.

Why also move the APK? Because then if something fails and the fbind fails, then the APP doesn't run in Android. So, no problem at all. Your data is safe, and you don't end with two configurations. I don't like to move only the DATA. I found it unsecure!

However, I found a problem: The command "app_data" at time is available. But the command "app_apk" isn't. Futhermore, the problem is that in the command "from_to" all the time the "$intsd" is prepend.

So, can you please support to move also APKs?

Thank you!

---------- Post added at 07:06 PM ---------- Previous post was at 06:37 PM ----------

Hi,

An another "simple" suggestion: Please can you print the used "config.txt" file when doing a "fbind -l" ?

I like to see the full path of this file, as sometimes I edit it with "nano" (installed with Magisk).

And one bug found: When using "LOOP" mounts, the "fbind -l" shows them as "N/A" even if it's mounted.

Thank you for this!
[Magisk] anonymvs_xda:
Hi everyone,

... I am on Samsung J5 (2015) with Serenity v5.6 ROM and over flashed Quasar v2.0 Kernel, Magisk 16.0 ... with fbind_31.01.2018 was everything fine, but since I updated to fbind_06.03.2018, folders in extsd/.fbind is all empty.

Steps I made :

... downloaded fbind_06.03.2018, copied the config.txt to safe place, in terminal executed fbind --rollback (to uninstall old fbind, and move back all the data), rebooted the phone (to apply changes), deleted .fbind and .fbind_bkp folders on extsd, rebooted in recovery and flashed new fbind, copied back the config.txt to /data/media/fbind, in terminal executed fbind -mb, rebooted ... now I have all the folders in extsd/.fbind, but all is empty. Not moved all the data. Even tried to put setenforce 0 to 1st line in config.txt. What I done wrong ?
[Magisk] manos78:
Hi,

More bugs with LOOP mounts: When using "fbind -u" the loop mount isn't unmounted. However, when you execute "fbind -b" AFTER, then you found a NEW mount of the loop device. So, each time you do and redo, you finally end with a huge number of loops devices (with the same file).

Please, fix it!

Thank you.
[Magisk] pat357:
The --rollback command is probably not needed for an update.

Also, deleting all the stuff on your exSD card was also not needed : you could loose some data if the rollback was not 100% successful !

I assume that all your data is back on the internal memory from your phone ?

Check this first before doing anything else.

Then check that the correct config.txt is in /data/media/fbind/

What is the output from fbind -l ?

If you have tried fbind -mb, make sure you reboot before checking the folders on extSD.

Make sure that the "Namespace" in Magisk Manager is set to "global namespace" and reboot to apply.

(Magisk manager -> settings ; look for "superuser" and then "namespace".)

As latest, try following run in a terminal :

su -mm
fbind -u
fbind -mb
reboot

Please also include the logs from fbind !

If still only empty folders on extSD card, we need to go to do some debugging.

For this I need some info.

Could you post the following :

1. Your config.txt

2. Output from following run in a terminal :

su
mount | grep -E -e '[0-9A-F]{4}-[0-9A-F]{4}'

and

getprop persist.sys.sdcardfs

Once you got all this, post it here.
[Magisk] anonymvs_xda:
... I wanted a clean install.

... just in case, I have everything on a safe place.

.... don't check it, after fbind --rollback I was deleted all the folders which I had in config.txt from the intsd and copied back them from that safe place.

... I check it and it was there, with correct sentences.

... gcmmdy (pastebin).

... yes, I rebooted.

... it was Inherit Namespace, changed to Global Namespace.

... I ran that ... without changes ... every folder was empty (on a second attempt with clean install).

... 6vv1bv

1. ... config.txt ... xm9kk

2. ... mount I grep ... 55vgkh

3. ... getprop ... dlzza7

... all that above is done after upgrading fbind from v01.31 to v03.06 ... just flashed in TWRP a new version over a old one. Folders were filled with correct data.

... after that, I tried a clean install ... executed fbind -mb ... all the folders were empty, without data in them (all the folder structure were preserved, but everyone were empty). Like moving is not done completely. All logs was the same, I check it twice (strange !).

... one more thing. When I run in terminal fbind rollback with new version of fbind, the output from terminal is : ... g429qb ? Then I checked in /system/xbin/, and there is a fbind file with this in it : ... b8hfnw.
[Magisk] pat357:
.

I can't find anything wrong with your setup : everything seems OK, including the logs. :confused:

Personally I would recommend you to go back to v2018.1.31

Have you seen the OP and the title from this thread ?

I cloud have sworn it was updated to v2018-3-6, but now everything seems to be reverted back to 2018.1.31 .....

I could be wrong, but the 2018.3.6 is also not longer available via the OP.
[Magisk] manos78:
Hi [MENTION=5228676]VR25[/MENTION],

After a lot of more testing, I continue describing issues and providing suggestions:

- Command "app_apk": This is impossible. Please, forget this idea.

- When mounting a LOOP image, is impossible to update/install any new Magisk module. The problem seems to be related to loop devices. I suggest to mount loop devices (entries with LOOP in "config.txt") using "free loop device +1". That is, if Magisk uses loop0 and loop1, then use loop3 (free+1) in this module. I feel with this workaround the problem will be fixed.

- Always print the path of the "config.txt" file each time you call "fbind", "fbind -h", "fbind -l" etc. This will be easy when different pathes can be used, and to point the user to the correct file (when using tools like "nano" to edit the file).

- Improve output of the command "fbind -l". Discard commented lines (starting with '#') and fix [N/A] with mounts like LOOP, etc.

- When "moving" data, use the commands: 'cp', 'chown' and 'chcon' for setting the full correct environment. I'm using this module for moving Termux files to a loop file (with success, but only with several manual commands). To replicate the correct environment you need to: first copy the data (with 'cp'); second set the correct owner (with 'chown); and thrid set the correct SELinux environment access privileges (with 'chcon'). If you do in this order, then you can move with success any bind directory.

I try to continue helping doing more testing.

Regards.
[Magisk] der_Kief:
I posted that initally in magisk support thread but this issue is related to fbind

So hopefully i find help here

i recently switched to a new device and since then something happend to MagiskManager.
Everything is working so far but MagiskManager always show this changes windows at start of MagiskManager.
And i also try to disable show popup when app request root but at every restart of MagiskManager this setting is active again.
I tried to clear cache of MM and reinstalled MM but everytime same problem.
As long as MM stays in background everything is OK but when MM is closed then problems reappear.
Any ideas ?
Im on Redmi Note 4 (Mido) with LOS 14.1

i'm not sure but i think it has to do with the following lines
W/SharedPreferencesImpl( 9451): java.io.FileNotFoundException: /data/user/0/com.topjohnwu.magisk/shared_prefs/com.topjohnwu.magisk_preferences.xml (Permission denied)
W/pool-1-thread-1( 9525): type=1400 audit(0.0:146): avc: denied { rename } for name="com.topjohnwu.magisk_preferences.xml" dev="mmcblk0p49" ino=1664194 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=ubject_r:app_data_file:s0 tclass=file permissive=0

there is a line inside com.topjohnwu.magisk_preferences.xml which has correct value
<string name="su_notification">0</string>

but it seems this value isnt readout correctly

i played a little with permissions but no go

renaming Magisk Manager is working without any problem. Bus as soon as I reinstall original Manager problem reappears.
So is it a problem to use Manager just renamed ?
Any disadvantages ?

Today i tried Omnirom Oreo 8.1 and exact the same problems.
This has something with the device i bet. Is there something special to pay attetion with Redmi Note 4 (mido) ?

after testing a bit more i found out that the problems start as soon as i install fbind module
All the other moduules are OK.
[Magisk] pat357:
Manos,

Use cp -a instead of just cp.

All stuff like ownership, SELunix context will also be copied to the destination.
[Magisk] LinoX:
Not working on Oreo...

Samsung Galaxy S8.

My fbind config:

bind_mnt $extsd/._memoria_interna $intsd
obb

Past

working

setup:

Stock Nougat rom.

Magisk 15.3 (1531).

Magic Folder Binder v2017.10.1

then I updated the OS and wiped data (factory reset).

Current not-working setup tested:

Magisk 16.0 & Magic Folder Binder v2018.3.6

Magisk 16.1 & Magic Folder Binder v2018.3.6

Magisk 16.0 & Magic Folder Binder v2017.10.1

Actually when I try to boot the phone sometimes it "freezes" at the splash screen (before bootanimation) and I have to force it off (Power+VolDown)

When I turn it on something different happens according to which combination of magisk and fbind I'm using.

it seems that when fbind module is active in magisk manager, magisk stops "activating" other modules. (as if fbind module hangs somehow and the following modules activation doesn't go on).

Currently I rolled back magisk to 15.3 and fbind to v2017.10.1.

it still has problems at boot (freezes) when fbind module is active but when I boot it back on it seems to work...
[Magisk] firmanhadiii:
What this lates version support for oreo 8.1 mcaosp?

Sory my bad english
[Magisk] praks_khemlani:
Duplicate SD card in ES file Manager

Hi,

I finally managed to get fbind working to bind my WhatsApp folder on SD card, but now when I open ES file Explorer I see Internal SD and 2 External SD (Duplicate SD cards). Is this normal or something I need to worry about? I'm not sure what I did wrong and I'm hoping that I don't have to repeat the steps again coz I'm not sure whether it would work again.

I would appreciate any feedback regarding this issue.
[Magisk] Unagi:
Greetings.

How can I move Anghami downloads from

/storage/emulated/0/Android/data/com.anghami/files/downloads

to

/storage/89DE-14F9/Android/data/com.anghami/files/downloads

Basically remove it from internal storage to the SD card?

I have Samsung Galaxy J5 2016 running stock TW with Magisk.
[Magisk] manos78:
Hi,

I put the info because using "cp -a" in the Android shell... this is false: the ownership and the privileges aren't copied. Futhermore, the "cp" tool in Android doesn't have any support for SELinux contexts. So, if you use the shell and the cp command, then you need to execute "chown", "chmod" and "chcon" for 100% replicate the source.

In any case, thank you for you comment! :)

Regards.

---------- Post added at 09:18 AM ---------- Previous post was at 09:14 AM ----------

Hi,

I repeat this message because

if you use this module and a LOOP mount, then it's completlyl impossible to update Magisk or any module, or install new one!

The only solution is: disable this module, reboot, do the update/install, reboot and re-enable the module and reboot.

Please, note that this is a pain and a very ugly bug! :(
[Magisk] Jaymin.0.1910:
Hi,

Please note that -a means --archive which means files will be copied over in archive manner, so properties will most likely be preserved

And also [MENTION=5228676]VR25[/MENTION] seems to have not used the traditional loop mounting method ( mknod, losetup, mount -o loop ), so the bug appears, you can fix this by implementing the method yourself as the dev seems to be inactive this days
[Magisk] manos78:
The problem is which version of "cp" binary is used. In my Android 7.0 it not preserve the properties.

Oh! :crying:
[Magisk] arunsai123:
With latest magisk update, fbind module prevents other modules (like youtube vanced, fonts) from working.

Eventhough Fbind module works. :confused:

Please fix it.
[Magisk] bnwg:
Yes it does. But when I updated Magisk to 16.1 beta this problem solved. Not sure 16.2 (latest beta) though as I just keep 16.1 at the moment.
[Magisk] arunsai123:
After few reboots it stops working in 16.1 beta.
[Magisk] wynadii:
I want to move my vainglory data obb game to my sdcard, i try with obbf [folder name] the status was mounted, but when i need to update my vainglory, it seems take my internal memory space, because theres a warning message that my internal was insufficient when try to update via playstore

Any fix?
[Magisk] bnwg:
It works fine for me and no issues.
[Magisk] Zer0x00:
On my device everything seemed OK, Logs were OK but mount didn't work.

Device: Galaxy S7 Edge

OS: Android 7.0

Magisk Version: 16.0

Fbind: 2018.1.31

The solution was to mount the SDCard writable with the help of this Magisk Module: https://xdaforums.com/apps/magisk/module-exsdcard-write-access-enabler-t3670428

Here's the config:

extsd_path /mnt/media_rw/07CA-79D0
from_to WhatsApp .fbind/WhatsApp

Thanks to both devs (VR25 & Rom), great job!
[Magisk] njascgil:
I can confirm the exact same problem on my phone (also a Redmi Note 4 "mido" with LOS 14.1). However, the problem isn't limited to this phone/OS. It also appears on a Redmi 4A running MIUI 9 (Android 6.0 based).
[Magisk] der_Kief:
did you found a solution to this ?
[Magisk] njascgil:
Unfortunately, no.

But I did find a way to somewhat mitigate the problem: clearing the cache+data of Magisk Manager keeps most of the settings (at least su authorizations, active modules, hide status and systemless hosts status) and then Magisk Manager seems to behave properly until the next reboot...

It's kind of a workaround, I know... :o
[Magisk] der_Kief:
or you do it the way like i do.

Inside MagiskManager you can hide MM in settings. Then a new MM package with a random name is compiled.
[Magisk] zelleb:
Same problem on the Redmi Note 3 on any ROM. I also noticed that once I install this module and an app asks for any permission by those popups, and is granted, it just closes.
[Magisk] zdoe:
could we troubleshoot again, @VR25? moto G5 stock

config.txt

from_to Download .fbind/download
#camcard card jpgs
from_to bcr/imgs imgs
target MagiskManager

debug.log

Wed Mar 28 08:38:06 GMT 2018

<Storage Information>

/dev/block/vold/public:179,65 /mnt/media_rw/CC6E-7680 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/fuse /mnt/runtime/default/CC6E-7680 fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/CC6E-7680 fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /mnt/runtime/read/CC6E-7680 fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /mnt/runtime/write/CC6E-7680 fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0

Filesystem Size Used Available Use% Mounted on
/dev/block/vold/public:179,65
56.4G 39.8G 16.7G 70% /mnt/media_rw/CC6E-7680

Filesystem Size Used Available Use% Mounted on
/dev/block/bootdevice/by-name/userdata
10.0G 5.1G 4.9G 51% /data

<Bind-mount>
mkdir: can't create directory '/mnt/media_rw/CC6E-7680/.fbind/download
': Invalid argument
[/data/media/0/Download] <--> [/mnt/media_rw/CC6E-7680/.fbind/download
]
mount: mounting /mnt/media_rw/CC6E-7680/.fbind/download
on /data/media/0/Download failed: No such file or directory
mkdir: can't create directory '/mnt/media_rw/CC6E-7680/imgs
': Invalid argument
[/data/media/0/bcr/imgs] <--> [/mnt/media_rw/CC6E-7680/imgs
]
mount: mounting /mnt/media_rw/CC6E-7680/imgs
on /data/media/0/bcr/imgs failed: No such file or directory
mkdir: can't create directory '/mnt/media_rw/CC6E-7680/MagiskManager
': Invalid argument
[/data/media/0/MagiskManager
] <--> [/mnt/media_rw/CC6E-7680/MagiskManager
]
mount: mounting /mnt/media_rw/CC6E-7680/MagiskManager
on /data/media/0/MagiskManager
failed: No such file or directory
- Done.

<Cleanup>
- Nothing to clean

moto G5, stock - we tried to sort this out few months ago, but no jive. i've been on app2sd for this since, but it's unreliable, and i would like the phone to just work.
[Magisk] 白い熊:
[MENTION=5228676]VR25[/MENTION] I'd like to be able to have the SD card automounted on boot, as it's working—and then mount a USB that's encrypted, ext4 whatever—mount it manually when I plug it in.

Could you add this please?
[Magisk] pat357:
Have you tried to create all needed directories on your extSD by hand, before running fbind ?

If this also does not work, you have to look carefully at the logs :

mkdir: can't create directory '/mnt/media_rw/CC6E-7680/.fbind/download
': Invalid argument

It seems that somehow a single quote makes the mkdir command fail.

We can try to hide the single quote by quoting it away with the backslash.

Therefore adapt your config.txt like this :

from_to Download \.fbind/download
#camcard card jpgs
from_to bcr/imgs \imgs
# target MagiskManager
from_to MagiskManager \MagiskManager

This way the unwanted ' should be quoted away.

Not sure what to do with target, but you can always replace it by from_to MagiskManager \MagiskManager

See this post https://xdaforums.com/showpost.php?p=75746809&postcount=984 for a success story using the same method !

Please let me know how it works out : it "should" work like this.