yashsingh1/xdaforums huggingface dataset:
[Magisk] Captain_Throwback:
So I deleted system.prop and created a post-fs-data.sh with the following contents (just a slight adjustment to your update-binary syntax):

#!/system/bin/sh

sdfs=`getprop persist.sys.sdcardfs`
if [ "$sdfs" = "force_on" ]; then
sdfs=true
fi

if [ "$sdfs" = "true" ]; then
resetprop persist.sys.sdcardfs force_off
fi

This code sets the prop properly on my device that needs it, and sets nothing on my device that doesn't :).
[Magisk] VR25:
Weird...

Did you check whether system.prop is present in /magisk/fbind?

Edit: for some reason, the update-binary doesn't always do everything accordingly... it's as if some commands weren't recognized by the shell. Zip corruption has been reported a few times. It may be behind some of these strange issues.

Edit 2: Using post-fs-data.sh seems to be the way to go now. My only concern was the persistent prop, but then I tried setting it with system.prop method and it still persisted. It makes sense though, since the prop starts with "persist," which means it's stored locally at /data/property.
[Magisk] koko115:
Latest version vorks flawesly on S8... i test Android/data folder, obb, and others on internal sd to extsd.

Verry fast, smooth, and for now without bugs.

Thanks ??
[Magisk] cantenna:
Fyi, there is an option for apps2sd the enables/disable in app busybox, regardless of the option selected, it works but using app2sdd to mount entire obb directory fails similarly.

In the past the issue with foldermount working or not lay with the ramdisk and whether or not it was stock or modified.

Anyways, apps2sd pro isnt working for me that well either... while it works for a handful or pairs, trying to mount too many pairs crashes my device.
[Magisk] cantenna:
Mind sharing and example of a working bind for obb? Still having issues here on S8+, tried Magic-Folder-Binder-v2017.6.21-2.zip, same effect, anything that binds, the source vanishes without a trace.

Edit; Magic-Folder-Binder-v2017.6.21-1.zip works fine, latest does not for me.

Anyways, VR25, you ARE the MAN!!! Thank you to Captin Throwback :)
[Magisk] koko115:
After restart all is ok..

But after +- 2 houer in esexplore i see new disk binded after restart.

http://cloud.tapatalk.com/s/594bb76fac7bc/22%20czerwca%202017%20142604%20CEST.png?

http://cloud.tapatalk.com/s/594bb7c317c6f/fbind_list.txt

http://cloud.tapatalk.com/s/594bb7d619579/fbind.log.txt

Exit. Versiin -2 not work
[Magisk] Captain_Throwback:
Can both of you provide the output of

getprop | grep sdcardfs

with both the 6/21-1 and 6/21-2 versions?

There shouldn't be any difference in the output of the two, but if there is, then that might explain the issue.

[MENTION=5228676]VR25[/MENTION]

It might be useful to add some logging into the post-fs-data.sh to the fbind.log to confirm what props are being detected and which actions are being taken.
[Magisk] koko115:
I have for now -1 versiin inztalled.

dream2lte:/ $ su

dream2lte:/ # getprop | grep sdcardfs

[persist.sys.sdcardfs]: [force_off]

dream2lte:/ #
[Magisk] VR25:
v2017.6.22 is up!

Edit/report:

1. I have no issues running my games (data stored at $extsd/Android/obb)

2. I have no duplicated sdcard

3. The sdcardfs prop wasn't set on my device (it uses FUSE by default)
[Magisk] koko115:
Last version .22 no work on s8

dream2lte:/ $ su

dream2lte:/ # getprop | grep sdcardfs

1|dream2lte:/ #

Works only one ..21-1

On 21-1 i have this

dream2lte:/ $ su

dream2lte:/ # getprop | grep sdcardfs

[persist.sys.sdcardfs]: [force_off]

dream2lte:/ #

So maybe this is problem.
[Magisk] Captain_Throwback:
I'm not sure how that could be a problem when your device isn't using sdcardfs. Setting it to force_off only matters if it was set to force_on at some point and is actually enabled. It makes no sense that that could be the issue.

Though just like with my device, that prop doesn't appear to be persistent for you. Also, you don't need to su before running that command...
[Magisk] VR25:
Oh, Samsung... Sammy, Sammy, why do you always seem to do things a little bit "too" differently...? :confused:

Well, I guess we're back to searching for the string "sdcardfs" in addition to "persist.sys.sdcardfs." Version 2017.6.22-1 is up.

Edit:

Here's the new code:

# Disable sdcardfs

echo "Checking sdcardfs status..."
sdfs=
if getprop | grep sdcardfs; then
sdfs=true
fi

sdfs_status=`getprop persist.sys.sdcardfs`
if [ "$sdfs_status" = "force_off" ]; then
sdfs_status=off
fi

if [ "$sdfs" = "true" ] && [ ! "$sdfs_status" = "off" ]; then
setprop persist.sys.sdcardfs force_off
echo "sdcardfs is on! Disabling..."
echo "sdcardfs disabled."
else
echo "sdcardfs not found or already disabled."
fi
[Magisk] cantenna:
Sorry for the delay, via adb shell;

getprop | grep sdcardfs

Magic-Folder-Binder-v2017.6.21-1.zip:[persist.sys.sdcardfs]: [force_off] aka Works great on S8!

Magic-Folder-Binder-v2017.6.21-2.zip; null aka fail on S8

Magic-Folder-Binder-v2017.6.22-1.zip; null aka fail on S8

Magic-Folder-Binder-v2017.6.22.zip; null aka fail on S8

;)
[Magisk] VR25:
Just WTF Samsung... I SEE NOW! Lol

Your device has sdcardfs enabled by default, but no props to indicate that. Captain_Throwback, can we sink Sammy's ship now?!

Edit: The code to make it work must be very generic (that kind of drives me nuts... but... meh: Samsung :silly:

setprop persist.sys.sdcardfs force_off

I have to set a detection mechanism to look for the brand name. Otherwise, we'll be forced to have that prop on devices it doesn't apply to.

Edit 2: [MENTION=1162986]Captain_Throwback[/MENTION], is v2017.6.22 working for you?

Edit 3: I decided to set that prop by default on all devices just to be safe. There might be other devices out there with Samsung's approach on "sdcardfs without indicative props."
[Magisk] Captain_Throwback:
The original version of 6/22 works for me, yes (I didn't try any other versions).

You're right; it might just be safer/easier to always set the prop and call it a day. My OCD isn't that big a deal, lol. That should work for everyone.
[Magisk] VR25:
Just before reading this, I added that to the post. Lol

Guess we're done with this.
[Magisk] VR25:
[MENTION=4715235]koko115[/MENTION], [MENTION=4778658]cantenna[/MENTION], the classic bind issue is gone in v2017.6.22-2.

Now, what's left to test is obb and that duplicated sdcard phenomenon.
[Magisk] koko115:
22 -2 works on my s8. But i see folder binder in esexplore in my dysk.
[Magisk] MrMmmkay:
Thanks for that Christmas update. Got a new error message, but still the 11.2 version is the last working one for me, see attachments.
[Magisk] munted:
Heya, what version of Magisk are you running? I can't flash fbind 11.2, I might need to flash an older version of Magisk.
[Magisk] MrMmmkay:
I am on magisk 17.3 .
[Magisk] cbb77:
The new version has a weird issue for me. It seems previously both the logs and config files were located in /storage/emulated/0/fbind directory (logs under the logs folder). I see that with latest version you attempted to moved that to root/data/adb/fbind however, it appears that only the config file moved for me. My logs files are still being written to the prior path /storage/emulated/0/fbind/logs. Is there are way to change that so that they are both in the same place? Not sure how this happened as I did install this fresh, as I had wiped my tablet to upgrade the firmware, thus did an fresh install of fbind. In any case, suggestions on how to fix? Beyond this, the new version seems to be working fine.
[Magisk] 白い熊:
[MENTION=5228676]VR25[/MENTION] it seems this automount is the default behavior — I see in the log a long fail trace on boot — where it couldn't open the encrypted partition, logically as I want to do it manually — and then everything afterwards, also logically, fails.

Can you bring back the previous default behavior when not automounting encrypted stuff — so that it doesn't do any mounts on boot and waits for a manual initiation from the command prompt?

Edit 1:

Perhaps the previous version, 12.15, also isn't perfect in this respect — just checked the log and also tries to mount everything on boot. At least then though it'll let me mount everything from the command prompt.

The latest version gets stuck then at the command prompt — doesn't prompt for a pass — it waits for a while — then fails.

This is — even after the no-pass-prompting gets fixed — in need of a reintroduction of a disable-auto-mount option.

Edit 2:

BTW, it seems to me you've removed the "clean" directive some time - I didn't notice. Why? This was useful I think.
[Magisk] VR25:
**2018.12.28 (201812280)**

- Fixed LUKS opening|mounting issues

- Fixed wrong modData path

- General fixes and optimizations

- Toggle `noAutoMount` (fbind -a|--auto-mount)

- Updated documentation

- Wait until data is decrypted

[MENTION=4237286]白い熊[/MENTION], "cleanup" has been renamed to "remove" (e.g., remove Android/data/com.facebook.orca, remove DCIM/.8be0da06c44688f6.cfg). It still removes the rogue "Android" folders by default.
[Magisk] MrMmmkay:
Sorry, still the same problem, see logs attached.
[Magisk] VR25:
[MENTION=403684]MrMmmkay[/MENTION], the log suggests your config is null/empty.

You didn't supply the 2 required arguments to the fbind -b command.

What do you want to do?

There's a sample config you can refer to in /data/adb/fbind/info/.
[Magisk] MrMmmkay:
Hi.

Sorry, that was my fault, I didn't recognized that the config file moved to data/adb/fbind.

Now it works fine for me :).

Another question, is it possible to mount a folder "/data/data/com.bandainamcogames.dbzdokkanww" to the external SD card? What would be the right text fur the config file?

Thanks for your hard work!
[Magisk] pat357:
I can't make none of the december 2018 version (fbind 2018.12.xx) work on my Samsung S8+ running Android 7.0 stock.

It seems like after updating Magisk to v18, fbind completely stopped working.

Automount (automatic binding at boot time) does nothing : even I have a config.txt file at /data/adb/fbind/config.txt, nothing got "binded" after booting.

This was also the case with pre 2018.12.xx versions when I was on Magic v17.2, but using a tool called Smanager allowed me to write a script that was executed at boot

and successfully mounted all folders present in my config.txt.

The script was simply "su -Mc fbind -b".

This script also stopped working on some of the 2018.12.xx fbind versions.

Now I can't even make it work via a terminal app like Termux.

>su -M
>fbind -b
mkdir: can't create directory ' ' ; No such file or directory
mkdir: can't create directory ' ' ; No such file or directory

My very simple config.txt :

from_to _testje .fbind/_testje
from_to Download .fbind/Download
from_to MagiskManager .fbind/MagiskManager
from_to SHAREit .fbind/SHAREit
from_to WhatsApp .fbind/WhatsApp
from_to Pictures .fbind/Pictures
from backups .fbind/backups
from_to MEGA .fbind/MEGA
from_to Android/data/com.xda.labs .fbind/XDALabsFiles
# from_to MapsWithMe .fbind/MapsWithMe
target carbon
target com.alk.copilot.mapviewer
target oandbackups
target data
target OneSync
target DriveSync
target BoxSync
obb
# remove Podcasts
# remove Alarms
# remove Notifications
# remove Music
# remove Ringtones
# remove Android/obj
# remove Android/SLOWDNS_TEMP_DIR
# remove Android/TROID_TEMP_DIR
# remove Android/.playstor.srf
# remove Android/data/.um

It looks like fbind can somehow not access or read my config.txt located at /data/adb/fbind/config.txt or is looking at a different place for my config.txt.

Previous location /data/media/fbind doesn't exist anymore and was, I assume, deleted by the fbind install process.

My config.txt file has owner root and 644 as accesses and it has Unix line terminations.

fbind -a says automoumt is enabled

fbind -f says FUSE is forced (I always had sdcardfs disabled for fbind in the past)

I don't have any logs from fbind, because I don't know where these are created : IIRC they used to be at /data/media/fbind/ , but this location is no longer because fbind directory got deleted.

Any idea how to continue from here ?
[Magisk] 白い熊:
I see — it only runs the cleanup on initial bind though, right? I'd like to run it manually though — many of these programs now create and recreate unwanted dirs.

Can you bring back what you had the “-c” option do — I know, now it's for something else — but still, so we can call remove manually?
[Magisk] VR25:
[MENTION=403684]MrMmmkay[/MENTION], unless your Sdcard's filesystem is F2FS or EXT[2-4] , you may find this complicated.

If you have the right filesystem, all you have to do is add bind_mount $extsd/.data/com.bandainamcogames.dbzdokkanww data/data/com.bandainamcogames.dbzdokkanww to your config, close the game and run fbind -Mm (move & mount).

If your filesystem is FAT/FAT32/exFAT, you have to create an EXT4 image to store the game's data. Ideally, you should have one .img file per app/game. Why an .img file? Because FAT/FAT32/exFAT don't support Linux ownership, permissions nor symbolic links. Apps/games need these features.

To create an EXT4 image, run

/sbin/imgtool create /mnt/media_rw/*/.data/com.bandainamcogames.dbzdokkanww.img SIZE

SIZE is interpreted in Megabytes (e.g., 1024). You can change it later as needed (/sbin/imgtool resize <path> newSize).

Now that you have the image, add the following lines to your config, close the game then run fbind -Mm:

# mount image

loop $extsd/.data/com.bandainamcogames.dbzdokkanww.img /mnt/com.bandainamcogames.dbzdokkanww

# mount folder

bind_mount /mnt/com.bandainamcogames.dbzdokkanww /data/data/com.bandainamcogames.dbzdokkanww

[MENTION=4970217]pat357[/MENTION], logs are stored at /data/adb/fbind/logs/.

The fbind -b command has a different purpose and it expects two arguments. The command you want is fbind -m (mount). Run fbind to see details.

You no longer need su -M nor setting the mount namespace to global; fbind always passes mount through /sbin/su -Mc.

Magisk may be failing to execute /sbin/.magisk/fbind/service.sh. Try placing it into /data/adb/service.d/ with 755 permissions.

[MENTION=4237286]白い熊[/MENTION], sure, I'll bring that back.

By the way, are the automatic and manual LUKS decryptions working now?
[Magisk] MrMmmkay:
Thank you so much for your great support, that worked well (for fat system).
[Magisk] 白い熊:
[MENTION=5228676]VR25[/MENTION], The manual bind works fine now — i.e. mounting LUKS after boot by hand is working.

However — the disable-auto-mount is not full yet — I've set it, now in the log it shows no attempt to mount the LUKS partition on boot — good. However it still attempts to mount individual directories and fails, obviously, since these are available only post-mounting the LUKS partition. So when you disable auto even these shouldn't be attempted to be mounted on boot.
[Magisk] pat357:
That's what I thought too : in the Magic logfile, there is nothing about running service.sh ; IIRC there has always been a line when using older versions with earlier Magic versions.

Anyway, I did copy the services.sh from fbind to /data/adb/service.d/ with 755 permissions and rebooted.

Still no automounting and nothing mentioned in the Magic v18 log.

There are also no logs created in /data/adb/fbind/

fbind -m or fbind -Mm both seem to work for mounting everything in my config.txt.

So basically fbind works apart from the autobind on reboot.

Any further ideas to debug this ?

Would it make sense to let service.sh run on startup by Smanager or is this to late in the boot-process ?
[Magisk] reckfield:
Take it easy and live with it, it's not big deal
[Magisk] genuino80:
thanks for this fantastic work ...

i'm on motorola x4 with android one pie. After updating android 9 I can not get the module working. The binding works but the applications (whatsapp) can not write to extsd. I realized that I could not download media and send voice messages. In reading everything seems to work. my configuration is: from_to WhatsApp .WhatsApp

Magisk v18.0 - Manager v6.1.0
[Magisk] Rom:
Personaly i had to reboot my device to get it work again..

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

@VR25

I have changed my SD UID and now i get an issue when i want to run su -c fbind-b (even if i run su and fbind -b):

mkdir: can't create directory '': No such file or directory

mkdir: can't create directory '': No such file or directory
[Magisk] pat357:
The meaning of "fbind -b" has been changed. Look in the docs located at /data/adb/fbind/info/

Try "su -c fbind -m" instead ; this will bind all folders in your config.txt
[Magisk] Rom:
Ty, it works, but it have mount the corresponding folder of my sdcard in /mnt/media_rw/ with /data/media/0/.....

It's strange that it don't use the classic path /storage/, no ?
[Magisk] genuino80:
--------------------------------------------------------------------------------

the problem is not the link of the folders that works, I can see the media. The problem is that whatsapp does not download the media when the folders are connected. Can not download try later. It seems that after the bind the appa can not write in the mounted folders, but only read.

I attach the link of a video.

https://drive.google.com/open?id=1JbJyeO3RlZCq2sIWJRtUsKBPpVLUJxfA

happy new year to all!!!
[Magisk] Soumy1234:
Hello, I'm trying fbind for the first time and I'm not sure if I'm doing it right. There was no config.txt in the /data/adb/fbind folder so I made one in my internal then moved it to the folder. When I try to run "su" then "fbind -a", it says that the fbind not found. Am I doing something wrong?
[Magisk] VR25:
[MENTION=4970217]pat357[/MENTION], try renaming service.sh to post-fs-data.sh in /sbin/.magisk/img/fbind/. If that fails, place the file in /data/adb/post-fs-data.d/ with 755 permissions. The question still remains (and it has happened before) - why is Magisk not executing the script?

[MENTION=1689415]genuino80[/MENTION], you're not mistakenly using "intsd_path" or "extsd_path", are you? Is there anything similar in your config?

[MENTION=8489742]Soumy1234[/MENTION], try running /sbin/.magisk/fbind/system/*bin/fbind instead. Of course that wouldn't be a permanent solution. Try reinstalling the module and rebooting. By the way, did you actually reboot the system after installing?

[MENTION=5332893]Rom[/MENTION], using /storage/... as bind-mount paths doesn't work.

If you can't see your bond folders and respective files reflected under /storage, something is wrong.

...And it seems you're using FUSE instead of SDcardFS (not an issue). Otherwise, the paths would all start with "/mnt/runtime/".

___

To all,

Happy New Year!

Among many other changes, the next update will include a wizard. That's not as good as a graphical user interface, but you'll find it unbelievably easy to use! This will hopefully be a huge plus, especially for those who find it hard to run multiple commands on terminal. All you'll have to remember is one command, either "fbind --wizard" (or -w) or simply "fbind".
[Magisk] Rom:
Hi!

Happy new year to u too (and everyone of course) :o

I have checked the contents between files in my binded folders, they're same so it works.

About the wizard, it's a good idea!

I just have a problem that i don't have before installing Fbind, via the Camera application provided with the Resurection Remix ROM, it's no longer possible to take videos, the application crashes instantly.

On the Fbind side, i didn't establish a link between the folder where photos and videos are saved on internal storage and the same path on external storage. So i can't be sure if it's due to the module or not.

Have you had any same feedback ?

Additionaly i don't have logfile, it's my fault..
[Magisk] genuino80:
---------------

I'm not using it "intsd_path" or "extsd_path", I only configured the config.txt with the folders to bind.

Before update to the android 9 I was on oreo 8.1 and the module worked great whit same config.txt

thanks for your support, I'm sure we will can solve this problem.
[Magisk] maralexbar:
I'm trying to move some games to external storage without any success

The way I tried it was the following by editing the init.rc in boot.img

wait /dev/block/mmcblk0p40
mount ext4 /dev/block/mmcblk0p40 /data nosuid nodev noatime wait crypt discard,noauto_da_alloc,mblk_io_submit,data=ordered
#ADD this
wait /dev/block/mmcblk1p2
mount ext4 /dev/block/mmcblk1p2 /data-bind nosuid nodev noatime wait crypt discard,noauto_da_alloc,mblk_io_submit,data=ordered

With this successfully mount the second partition of the sdcard at boot in /data-bin, but the problem is that I can not link the following directories.

I've tried it with an init script and fbind.

/data-bind/klb.android.lovelive_en >> /data/data/klb.android.lovelive_en

Starting game and use the old original data directory.

When I browse with any root explorer the contents are different, but if I do "ls" with adb it shows the linked content, tired also disable SElinux from the kernel.

Any suggestions to make this possible?
[Magisk] Soumy1234:
I tried installing it and it seemed to work. After placing my config.txt I ran "fbind -a" after "su" then rebooted, though I don't see the obb in my SD. Ami doing something wrong?
[Magisk] VR25:
[MENTION=5332893]Rom[/MENTION], if you didn't mount the DCIM folder with fbind, you may want you search your ROM's thread for that issue.

[MENTION=1689415]genuino80[/MENTION], I'd like to take a look at your /proc/mounts file after fbind mounts the folders.

Meanwhile, you can try enabling FUSE (fbind -f) and rebooting. If you get into a bootloop after that, flash fbind from recovery to disable it, boot into system and run sh /sbin/.magisk/img/fbind/system/*bin/fbind -f to revert the changes.

[MENTION=7677086]maralexbar[/MENTION], try mounting the second partition with only "noatime" and "wait" options. Bind-mount (using fbind) with bind_mount /data-bind/klb.android.lovelive_en /data/data/klb.android.lovelive_en.

[MENTION=8489742]Soumy1234[/MENTION], why did you run fbind -a? That command enables/disables auto-mount (which is enabled by default). Run it again to revert the changes and you should see your obb folders mounted after running fbind -m.
[Magisk] VR25:
**2019.1.2 (201901020)**

- fbind -R|--remove <target>: remove stubborn/unwanted file/folder from $intsd and $extsd. <target> is optional. By default, all <remove> lines from config are included.

- fbind <no options>: launch the folder mounting wizard.

- fsck SDcard, refer to README.md (fbind -r) for details.

- Major fixes & optimizations

___

"noAutoMount" should be properly handled now.

Please, read the updated README.md shipping with the zip before Installing/upgrading! I made very significant changes. This is one of the major updates.

fbind should be much easier to understand and use. There's a dedicated wizard which turns configuring, moving data and mounting folders into a piece of cake. Try it out by running "fbind" (no options, no arguments).
[Magisk] genuino80:
[MENTION=1689415]genuino80[/MENTION], I'd like to take a look at your /proc/mounts file after fbind mounts the folders.

Meanwhile, you can try enabling FUSE (fbind -f) and rebooting. If you get into a bootloop after that, flash fbind from recovery to disable it, boot into system and run sh /sbin/.magisk/img/fbind/system/*bin/fbind -f to revert the changes.

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

I attach the link to the proc / mounts.txt file after mounting the folders.

https://drive.google.com/open?id=14maY9wH16CMUQ9_kYcmXDhPoz9LKEKOL

I have enabled fuse and restarted, I have not had bootloop, I have the same situation before, I still have the same problem.

I noticed that when the folders are linked Titanium Backup shows extsd, when the folders are unlinked it does not show exsd. I do not know if it's useful information.

https://drive.google.com/open?id=1M5yFmG_7w4rIQaUnGyxI9Q3rmicdC_mq

https://drive.google.com/open?id=1EUJj3UTpYRazYtjlXgZVPB7OQdJJQ9Eb

thanks for the support, if I can help you in any way are available.
[Magisk] 白い熊:
Both work properly. Many thanks! :@)