yashsingh1/xdaforums huggingface dataset:
[Magisk] robypal:
Hi,

I admit I am a bit of a noob, but I think I understand how this module works for the most part now, however I am having some difficulties. My main objective is to bind the Whatsapp folder to the sd card. I used to use Apps2sd for this but lately that app started to refuse to do that with said folder, so I moved on to this module, which just seems to be smoother.

Now to the real issue: I already have a 10+ gb Whatsapp folder on My SD card, and what basically is an empty Whatsapp folder on my internal memory. I went through the wizard, pressed option 2, and my config file therefore now reads

from_to "Whatsapp" ".fbind/Whatsapp"

I then moved the Whatsapp folder from the root of my SD card to the .fbind folder, unmounted Whatsapp and remounted it in the terminal emulator. I also tried moving the folder back to the root of the SD and editing the config file to from_to "Whatsapp" "Whatsapp", but regardless I always get the same result: not only will Whatsapp not find my old media, it also won't allow me to download any new audios, photos or videos.

I apologise if there is an obvious solution to this.

Thanks,

Roberto
[Magisk] handers1234:
I just want to simply mount folder from internal to external, so I use from_to somefolder somefolder in config, fbind --move then fbind --mount, it works.

My question is how to revert all of that?(unmount then move back the files to original folder)

EDIT

Has been answered on Telegram, must do it manually
[Magisk] Alonso_Quixana:
fbind folders disappearing after 3 days or so ?

Can anybody help me please?

I'm a Windows user, I don't really know much about Linux-based systems & thus am not able to interpret any logs or do Linux console commands and stuff...

I mounted a folder from my external SD card to my internal SD by adding the following line to the config.txt file:

from_to InternalFolder .externalfolder

This seems to _work_, my 'old' app (Maverick from Code Sector) now sees all map tile data that is actually on the external card within the internal folder & can access it.

However, after 3 days or so, when the app hasn't been used, the folder link suddenly seems to be 'gone' (internal folder shows as empty). Only solution is to reboot the phone, then all is back to normal again.

I already tried to turn off battery savings for the Magisk app and for Maverick, with had no effect.

Question: what could cause this 'disappearance' of an as it seems correctly bound folder? What could I do to keep such links 'alive' even when they are not used/accessed for a longer time? Is there an *easy way* to 'reset' fbind without rebooting the phone? Or did I forget an important command in the config.txt / should I add something beside the above line?

I'm running Android Marshmallow on a Samsung Galaxy S5 mini DuoS ...
[Magisk] barjani:
After update from ver. 2018.12.4 to ver. 2019.1.23, automount was not work, i had to do it manually with terminal.

Before update everything work normal without any trouble.

I'm running android 5.1.1 on hisense L697
[Magisk] ashvsmay00:
I met an error while tried to find obb. I put "obb" into config file AND run "fbind" command in terminal Then chose "obb_to_external". Then this error came out

What did I do wrong?

Edit: Attached the log

Edit2: Nevermind I solved this by running fbind --move and mount
[Magisk] VR25:
Apps cannot access external storage directly. Nevertheless, you can try mounting to /mnt/media_rw/sdName/someFolder or to /mnt/runtime/default/sdName/someFolder. Btw, a mount point doesn't take any space. Why are you concerned about this?

That's most likely an issue caused by SDcardFS restrictions. Try switching to FUSE by running fbind -f.

I think I answered this already on Telegram...

Are you the same person?

This is strange. Unless your system has been rebooting spontaneously and interrupting Magisk for some reason, this shouldn't happen. Try reinstalling Magisk. To remount folders without rebooting, run fbind -m.

This is a Magisk bug. A workaround is renaming /sbin/.magisk/img/fbind/service.sh to post-fs-data.sh
[Magisk] Alonso_Quixana:
fbind linked folder 'disappearance' ...

My system did not reboot. As I said, whenever I reboot my phone & System is started new, then everything is back to _normal_ (fbind-linked folders are all back again). The problem is that after the phone has run for some time (sometimes a day or so, sometimes more), the folder links are suddenly for no recognizable reason gone.

As you suggested, I uninstalled Magisk through the Magisk app, then installed the latest Magisk through TWRP, then downloaded the latest fbind with Magisk Manager. Problem is still there... first everything works ok, all folders are linked and accessible, but when I checked my phone this morning, the folders were gone again (physically still there, but internal folder no longer linked to external folder). In my example, I linked internal Maverick folder to external .maverick folder (without any .fbind parent folder). I'm running Android Marshmallow stock Rom on a Galaxy S5 Mini DuoS (G800H).

Besides, how can Magisk be the problem when at first fbind works ok & Magisk says it's correctly installed?

Also, a strange behavior... when I do 'fbind -u' in terminal, it says that all folders have been unmounted (and list all the folders I have in config), and when I do the same command again, no additional unmount happens (because all folders are already unmounted, of course). But then, when I start any app that uses bound folders, the content is still there (bind links still seem present, even though after unmounting those folders should now appear as empty, no?)

Can ANYBODY help me with this, PLEASE? I need a RELIABLE solution, not one where I have to reboot my phone every few days. Is there any way I could track down this error, anything I could log, or check, any suggestion what might be wrong on my phone? (if so, please explain in detail how to do this, I'm a WINDOWS user)

HEEELLLLPPPP!!!
[Magisk] Alonso_Quixana:
... could you maybe add an option to fbind that does an automatic re-mount of all folders after a given time? (quick & dirty solution for my problem at hand)
[Magisk] VR25:
Well, this is not fbind's fault to begin with. Once folders are bound, the kernel has control over these. Bonds are not broken unless you reboot the system. This is the first time someone reports such an issue -- and the problem is weird. In case you're wondering, after binding folders, fbind stops. In other words, there no need to keep it running.

I will keep an eye on this problem until the actual culprit is found. Meanwhile, you can open a terminal and run (while true; do fbind -m 1>/dev/null 2>&1; sleep 1800; done &) &. You can close the terminal. This will remount folders every 30 minutes.

You can automate that with a script (say, fbind_m.sh). Place the file in /data/adb/service.d/ and set 755 permissions (su -c chmod 0755 <file>).

#!/system/bin/sh
(while true; do
fbind -m 1>/dev/null 2>&1
sleep 1800
done &) &
[Magisk] Alonso_Quixana:
Thanks! So all I have to do is copy that script to said folder, set the permissions for the file, and then it will be executed whenever I reboot my phone, and 'does its magic'?

Something else I noticed, when I do fbind -u all folders from config get unlinked (list of folders that get unlinked appears), and when I do it again to test, no list appears (so all folders should be unmounted)... but after that, when I open an app that uses a linked directory, the content is still there (so binding still seems to be active)... is this normal? I type 'su' in terminal, and then 'fbind -u' ...

And you don't have the slightest guess what could cause such a behavior of 'bound folders suddenly being gone / no longer accessible'? Before Magisk, I had Xposed Framework (standalone) with another folder bind tool, but I completely uninstalled that (I guess). Then installed Magisk and I tried Xposed for Magisk, which I never got to work, always caused a bootloop, and I uninstalled that by re-flashing the .ZIP. Apart from that, I have "Disable Increasing Ringtone" app installed, which is permanently in foreground (in my notification bar)... apart from that, all other apps just 'sit there' doing 'nothing' (again, I guess). I usually don't use internet on my phone except in very rare cases (honest, that's why the Maverick app is so important for me).

Other Magisk Modules I have are

Cloudflare DNS for Magisk

ExSDCard Access Enabler

GPU Turbo Boost

LKT

Youtube Vanced

I've disabled all of them now in case those are causing problems... still, any helpful suggestions, from ANYONE, will be welcome.
[Magisk] VR25:
Exactly

ExSDCard Access Enabler may cause issues. Disabling that is not always enough to undo all the changes made by it. You have to also run cd /data/property; rm persist*fuse* *sdcardfs *esdfs as root, then reboot.

LKT could be a problem too, but I don't know whether it has leftovers as well.
[Magisk] Alonso_Quixana:
Thanks again.

What about:

Something else I noticed, when I do fbind -u all folders from config get unlinked (list of folders that get unlinked appears), and when I do it again to test, no list appears (so all folders should be unmounted)... but after that, when I open an app that uses a linked directory, the content is still there (so binding still seems to be active)... is this normal? I type 'su' in terminal, and then 'fbind -u' ...
[Magisk] VR25:
My previous answer targets this too. Both issues likely have a common root cause. Possibly, your kernel has a bug that's causing these problems or optimizations/changes made to kernel settings are to blame.
[Magisk] Alonso_Quixana:
So just to make sure, that folders are still accessible after fbind - u is NOT normal / correct behavior?

If I 'mount' a folder multiple times, do I also have to 'unmount' it multiple times, or just once? (sorry, I'm a single-account Windows-user...)
[Magisk] VR25:
Yes, that's not normal. Your system is refusing the unmount requests. Try that again (fbind -u) after running su -c setenforce 0.

No, since you cannot mount one folder to the same location more than once at a time. You can mount to multiple locations, though. In that case, you have to unmount it that many times. fbind -u handles all that in a single run. Also, fbind won't try to mount already mounted folders, nor will it attempt to unmount not mounted folders.
[Magisk] Alonso_Quixana:
Nothing changed with the setenforce 0 command before fbind -u ... folders seem to unmount correctly, and during a second fbind -u won't be listed anymore... but seem to be still accessible when I launch an app that uses the mounted folder paths, also in file browser it's all still there.

When I leave Termux and start it again, an then re-type the commands, the folder are again unmounted (list of folder unmounting once again appears). Maybe I'm using Termux wrong? I start it, then type su, which brings me to root@kmini3g: /data/data/com.termux/files/home # ... then I type fbind -u

Note: during the 2nd run, it now says umount: can't unmount /mnt/runtime/read/emulated/0/Maverick: Invalid Argument

I'm using Android Marshmallow 6.0.1 Stock Rom for Samsung Galaxy S5 mini DuoS ... how can that have a bug? Any idea how a system can refuse to unmount when a superuser command is issued?
[Magisk] Alonso_Quixana:
Quick addition:

Now I've wiped the whole phone, flashed Samsung Galaxy G800H Marshmallow Stock Rom + TWRP, re-installed Magisk & apps, and the 'fbind folders refuse to un-mount' problem is still there.

It seems like Android Marshmallow can't be set to 'permissive' with a console command (enforcing is hard-coded)? Could that be the problem?

Is anyone reading this who runs Samsung Marshmallow Stock Rom & could test this on his/her phone, so I know if it's just me or really a problem with that Rom??
[Magisk] aryaherro:
Yeah mine too,,

Samsung j5 fbind not found apply_config.. .then i use xinternasd

On redmi its work flawlessly..
[Magisk] outline941:
Segmentation fault

I can't write bind_mount folder.

It show Segmentation fault,when I run 'fbind -m'.

I try 'fbind -f' and reboot,it run successfully(maybe),but the case is still.

I try bind_mount two intsd folders,but I can't write,too.

terrible english.
[Magisk] 白い熊:
[MENTION=5228676]VR25[/MENTION] I've switched to Pie on my phone — now I have issues with umask I guess.

Basically, I can mount the encrypted ext4 partition on my card either via SDcardFS or Fuse — both work. However, each app that's writing to the mounted location saves the file with 600 permissions — which is a problem, as for instance in Titanium, such a file is automatically protected, in reader apps they're not accessible obviously, if saved by a file manager — different user…

Any ideas on this?

Under Oreo I think the perms were 666 I think…
[Magisk] VR25:
Well, fbind tries to forcibly unmount each folder twice.

You ROM seems to have several mount issues. I'll keep investigating this.

This seems to be a Magisk issue. Which version are you using?

This is a known issue and it's under investigation. It's caused by "too much security".

If your config has noWriteRemount, remove it, reboot, and see how things go.

The umask should be 0, but it seems hardcoded somewhere.

See whether adding noWriteRemount to config helps.
[Magisk] 白い熊:
Same behavior…
[Magisk] Alonso_Quixana:
This is the Samsung Marshmallow STOCK Rom... how can that have such severe issues?

Samsung Marshmallow Stock seems to be compiled with Enforcing (no way to change it to permissive). Could THAt be the reason why it refuses unmounts?

Is nobody else here who uses that Rom and can test if it's the same there, or just on my phone?
[Magisk] 白い熊:
I'm almost hundred percent positive your problems stem from using an enforcing kernel. I had the same issues being on Marshmallow enforcing in an earlier Galaxy Note I used.

You need to flash a permissive kernel — then I think your problems will be gone.

---------- Post added at 12:09 PM ---------- Previous post was at 12:06 PM ----------

[MENTION=5228676]VR25[/MENTION] I think the problem is not with fbind but with the way Pie manages permissions — it seems all programs run with a default umask of 600 when saving to linux FSes — I'm not sure if this behavior can be modified.
[Magisk] VR25:
When too much security gets on the way... :silly:

Now we have to figure out what's enforcing that umask.
[Magisk] Alonso_Quixana:
Whew. So at least it's not due to my own stupidity that I can't get it to work. But... I've been trying to find a 'permissive' kernel for Galaxy s5 mini G800H (kmini3g) since over a month now, and didn't find anything (or was not able to recognize useable findings as such).

Is *ANYBODY* reading this who has / can direct me to / can compile me a permissive Marshmallow kernel that works with the above device?? I really really need one to get rid of all this stupid Google security sh*t and give me control over my phone back as I was used to...

HELP!!
[Magisk] ArcherTanu:
how to set `intsd_path /storage/emulated/0' in fbind????
[Magisk] VR25:
Simply write that to /data/adb/fbind/config.txt.

...But why do you want to do this?
[Magisk] ArcherTanu:
bcoz in my stock rom all external sd card files mount on "data/media/0" but dats data dont show in my gallery or stock explorer or explorer defult internal sd folder. it resides "data/media/0" not in "storage/emulated/0".

---------- Post added at 09:58 AM ---------- Previous post was at 09:29 AM ----------

Still same all img n downlod n whatsapp folder cant find in "storage/emulated/0". it all resides "data/media/0". find defult moto explorer cant find anything..
[Magisk] ArcherTanu:
this is log file..plese lookinto my problem ... in in "storage/emulated/0" when tap into any mounted folder is shows " whatsapp does not exists"
[Magisk] VR25:
Ok, I see what's going on.

Remove "intsd_path /storage/emulated/0" from your config, run fbind -f, and reboot.
[Magisk] Crayvolt:
WOW, I tried it and it was awesome :)

the last time I used this was on year 2017.. I was having hard time to figure it out to work in terminal internal to ext binding.. just by committing error and didnt comback and for today as I remember your script. I did try again after I tried it was satisfying :)

BUT now it is only matter of options :) really awesome and doesnt screw my files

using Android Pie :)

working flawless hope will last in the future :)
[Magisk] czecx:
[MENTION=5228676]VR25[/MENTION]

Hi, can you help me please? I have one problem with fbind mounted path...

I have one tool installed on my phone, which uses folder named "cnlaunch". I have tried to mount it to extsd many times and always when trying to start a program, it crashes.

I have used this command on my config file:

from_to cnlaunch .fbind/cnlaunch

I try to use it on my Huawei p9 with stock rom and Magisk 18.1.

Here is my log file.

Can you help me to solve this problem please?
[Magisk] the gladiator:
I'm running Oreo with Magisk 18.1 and Magisk Manager 7.0.0 and...I'm becoming crazy!

I bind two folders without errors but I have a "write denial" if I copy (with any file manager) a file on the internal memory folder.

The command fbind -f or adding noWriteRemount to the config and rebooting, as suggested to fix the same issue some pages before, didn't fix anything.

Of course I'm willing to provide any log or output needed
[Magisk] DzikrRully:
Can I bind Folder with Spaces on Name?

Like "WhatsApp Business".
[Magisk] the gladiator:
yes, you can: just wrap the name as you did in your example

NB please avoid to quote a long post as the OP if not necessary
[Magisk] DzikrRully:
I put like this on config but didn't work,

from_to WhatsApp Business WhatsApp Business
[Magisk] the gladiator:
...and nothing changes if I downgrade to Magisk 18
[Magisk] the gladiator:
I'm sorry i didn't want to neglect you, write this:

from_to "WhatsApp Business" "WhatsApp Business"
[Magisk] room4two:
Hi, i've been reading a lot in this post. can this module set the default install location to sd card by binding the current install location to it? will google play store see the changes in size if bind is success? hope you can help me with this. samsung j2 prime is only 8gb and it always runs out of storage. this will greatly help the community of samsung j2p since we are relying on adoptable storage and it is sometimes buggy. thank you so much
[Magisk] JonnyX93:
I'm not sure, if my problem is related to fbind, but as it came up shortly after I updated to 2019.1.23 I think so.

I've been using fbind for a long time to move my whatsapp and camera folders to the external sd card. Since some days I can't record any whatsapp audio as I get the message "Internal storage required. PLease turn off USB storage and try again". Since today theres also an error, when I try to download pictures in whatsapp "Download failed. Can't download because no internal storage is available. Please unmount it as disk drive, and try again".

When I try to access my galerie pictures from the camera app, it doesn't work, but using the gallery app directly I have access to them.

My phone is a Redmi 4x with MIUI 10.3

Hopefully someone can help me...
[Magisk] SpiderSGS6:
Hello [MENTION=5228676]VR25[/MENTION]

I have Xiaomi Mi 8, rom Xiaomi.eu 9.3.7, Kernel Sphinx 2.6, magisk 18.1+modules (busybox for android ndk, ExSDCard Access Enabler, fbind, Sphinx tuning script, systemless hosts, YouTube vanced), and disk ADATA SSD SE730H. Disk encrypted by Linux. Disk encrypted by Linux. Android sees the disk but does not read anything. Any commands found fbind = no response.

Edit: Adds a log
[Magisk] VR25:
See whether fbind -f helps.

Note: fbind itself is not the problem; recent Android versions have additional storage security features which work against it.

Magisk is not the problem. Read the note above.

Replace "noWriteRemount" with "permissive" in config. Reboot and see whether it helps.

If it doesn't, try enabling FUSE (fbind -f) again, with "permissive" still in config.

Lastly, test with intsd_path /storage/emulated/0 and FUSE still enabled (fbind -f).

Note: "permissive" here refers to a SELinux mode.

This is a problematic mess, unfortunately. There are several issue with it. Currently, adoptable storage or link2sd are much better deals. The second requires a secondary SDcard partition with a proper filesystem (e.g., EXT4 without journaling, or EXT2). Look that up.

P.S., moving app data to the SDcard is possible with the current fbind version (search this thread). However, that's not much in comparison to moving the APKs, which is what would really benefit you -- since these take up the most storage space. If I ever implement something simpler to move APK's, I'll share it.

Did you upgrade your system too?

See whether fbind -f helps.

How's your SDcard set up?

Did you encrypt it entirely?

What's the filesystem?
[Magisk] the gladiator:
just to thank VERY MUCH [MENTION=5228676]VR25[/MENTION] and to give the solution for everyone's benefit: replacing "noWriteRemount" with "permissive" in config.txt and rebooting solved my problem
[Magisk] maresprod:
I'm trying to run fbind on my Umidigi A1 Pro, but I don't manage to run it.

In other phone (MiA1, Android Pie), which runs a custom rom, works pefectly fine, but not on the Umidigi phone. It doesn't matter if I edit the script (config.txt) manually, it won't work. I don't know what I'm doing wrong, please help me. :crying:
[Magisk] SpiderSGS6:
I have the same name as you.
[Magisk] bnwg:
Hello [MENTION=5228676]VR25[/MENTION]

I would like to seek your help.

I have multi-users setup (ie. /data/media/0/ and /data/media/11/) co-exist and run simultaneously. I want to mount the app data in user 11 to secondary partition. To do that I understand I need EXT4 first and mount EXT4.img as below.

/sbin/imgtool create /mnt/media*/*/appdata.img 128

loop $extsd/appdata.img /data/data/packageName

I have few questions.

My SDCard has a path /mnt/media_rw/xxxx-xxxx/ and has /mnt/runtime/default, read and write. Do I need to specific the SDCard path when creating EXT4 image? Or the code above works just fine? Could I revert this EXT4 image partition back?

If I want to unmount the EXT4.img what command should I use?

Really appreicated
[Magisk] ArcherTanu:
fbind didn't work well. it mount my internal to external..but whtsaap didn't download anything.. how can i link this mount with right access .i hv running stock 7.1.1 .
[Magisk] dotrar:
how to mount internal to external what the command
[Magisk] VR25:
Hi,

The commands provided will work regardless of your SDcard name.

To revert the changes,

1) Copy the contents of the EXT4 image to a temporary location in internal storage (cp -a source /data/someFolder). Note: it's important to use cp -a (or rsync -a) to preserve attributes.

2) Unmount the EXT4 image (fbind -u pattern), and remove it.

3) Remove or hastag the target config line.

4) Cleanup the original location (rm -rf /data/data/pkgName/*).

5) Move the data to the original location (mv /data/someFolder/* /data/data/pkgName/), and remove the temporary location (rm -rf /data/someFolder).

P.S., If the demand keeps increasing, I'll eventually implement a command that does all of the above.
[Magisk] VR25:
Try fbind -f.

If it doesn't help, add permissive to config, and reboot.
[Magisk] VR25:
The documentation includes a sample config (/data/adb/fbind/info/).

You should be more specific. What exactly do you want to achieve?
[Magisk] ledd988:
Hi. Unfortunately I have another noob question here. Can this module be used to completely change path for Android system from internal to external sd card? Like when I download something to be download to storage/****-****/download instead of storage/emulated/0/download. Or like camera pics, or screenshots... Or downlads from msg apps like telegram, WhatsApp etc. Like I could do with XintetnalSD Xposed framework module. Thanks.
[Magisk] urmitnick:
Hello everyone

Sorry for my noob question, but this is my 1st time using fbind. Can someone please help me using fbind to mount whatsapp folder to my external sd card?

Regards
[Magisk] VR25:
Add int_extf to /data/adb/fbind/config.txt, move all stuff to the SDcard .fbind folder, and run fbind --mount.

Add from_to WhatsApp .fbind/WhatsApp to /data/adb/fbind/config.txt, move the WhatsApp folder to the SDcard .fbind folder, and run fbind --mount.