• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

[Magisk][/system][2019.1.23] fbind

Search This thread

chevi7

Member
Apr 8, 2013
7
0
Hi. I have mounted to link my Whatsapp Vídeo folder to my SD.
My config.txt:
from_to "WhatsApp/Media/WhatsApp Video" ".fbind/WhatsApp/Media/WhatsApp Video"

Everything all rights but when I try to download a vídeo in Whatsapp, the file doesn't write on SD.

May be I have to give permissions in any folder?
Thanks
 
Dec 30, 2018
17
1
fbind / MediaScanner

Hi.

I own a Samsung Galaxy S2 mini with Marshmallow 6.0.1. Ever since I use fbind, i have severe problems with it. The mounted folders keep disappearing after a few days. Only a reboot brings them back.

Now I *think* I've found out the reason: one of my folders on the external card contains several Gigabyte of map tiles for navigation, and I mount that to an internal folder (because the app using those is incapable of dealing with the new security restrictions for the external SD enforced in Marshmallow and up). Whenever the MediaScanner / MediaProvider / whatever (I don't exactly know how Android works internally) comes along and tries to 'index' this folder, the mounts break, probably due to the huge amount of files (causes the used space of MediaProvider grow to over one Gigabyte, for which my internal memory is not enough, too).

QUESTION: to solve this, can ANYONE please tell me how to PREVENT MediaScanner / MediaProvider to access this directory? Note: putting .nomedia files in the folders (as it is suggested everywhere on the internet) does *NOT* *NOT* *NOT* seem to solve it, that only seems to prevent the images from appearing in the gallery, but indexing is still done). Does anyone maybe have a patched MediaScanner that really does completely ignore directories that the user does not want to be scanned/indexed, and can tell me how to replace the 'original' app?

When I disable MediaProvider, I also can't use my Ringtones etc. anymore, so that is alas not an option.

Thanks...
 

sieger007

Senior Member
Jul 4, 2008
221
18
Dublin
Hi. I have mounted to link my Whatsapp Vídeo folder to my SD.
My config.txt:
from_to "WhatsApp/Media/WhatsApp Video" ".fbind/WhatsApp/Media/WhatsApp Video"

Everything all rights but when I try to download a vídeo in Whatsapp, the file doesn't write on SD.

May be I have to give permissions in any folder?
Thanks

For reasons I am still seeking ( & anyone do chip in ! ) you have to
Code:
bind mount
entire Whatsapp folder and cant nit pick a subfolder . Most likely this maybe related to the location of temp space where the apps keeps video fragments before the entire file is D/L'ed
 

chevi7

Member
Apr 8, 2013
7
0
For reasons I am still seeking ( & anyone do chip in ! ) you have to
Code:
bind mount
entire Whatsapp folder and cant nit pick a subfolder . Most likely this maybe related to the location of temp space where the apps keeps video fragments before the entire file is D/L'ed

In my case it does not matter. I tried it with the entire WhatsApp folder and the result was the same. The new images or videos that enter the phone are not downloaded, and they are always blurred, because they have not been downloaded.

I'm sure I have to give some kind of permission to the SD folder for everything to work, but I don't know how to do it.

Do you mean that after doing the whole process I have to enter this command in the terminal?
bind mount
Is supposed fbind already mount the symbolic link right?
 

samhhmobil

Senior Member
May 25, 2017
344
179
Hamburg
Hi everybody,

I'm in trouble installing fbind to an XPERIA-XA2 (pioneer). When running LOS 16.0 the installation with magisk 20.1 was very easy, and it's up and running as it should. Even after the update to magisk 20.3 it worked as it should.

Now I try to migrate to LOS 17.1, and it's impossible to install fbind. Even I'm running it with magisk 20.1 (for safety reason). I tried to install fbind-2019.1.23.zip, then I changed it to _MAGISK__fbind-2019.1.23-fix2.zip from #1663 , neither the original one nor the fix2 does install the necessary files, even if it looks so in TWRP-install. But there is no folder fbind in /system/etc, there is no fbind in /system/xbin, and I cannot create fbind/. in /system/etc (yes, I am root in the shell).

Thanks for any suggestion,
samhhmobil

PS
So the main XA2 will stay in LOS16 until I got fbind working in LOS17.1...

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

EDIT: Problem solved!

It was my fault, to follow the "fix1" and "fix2" Versions above. There's something strange in it.

A clean new install of LOS 17.1, with nano Gapps, and Magisk 20.1(!!!) and at last the original fbind-2019.1.23, ... and -- TADAAA -- it works as it should.

My next step is now upgrading magisk at least to 20.3, better 20.4, and let's see again.

EDIT2:

Update to Magisk 20.3 and fbind even works flawlessly.
Great!

EDIT3;

Update to Magisk 20.4 (actual one)... and... fbind cannot mount any SDcard-folder. Grrrrrrr.....
If someone has any idea how to fix that, it would be great.

----------------------------------------------------------------------------------------------
EDIT4:
I downgraded Magisk to 20.3, and "fbind" is working again flawlessly.

So... my workaround is now to stay with Magisk 20.3 finally, as long as it will work with LOS17.1.
 
Last edited:
  • Like
Reactions: hurray

sieger007

Senior Member
Jul 4, 2008
221
18
Dublin
In my case it does not matter. I tried it with the entire WhatsApp folder and the result was the same. The new images or videos that enter the phone are not downloaded, and they are always blurred, because they have not been downloaded.



I'm sure I have to give some kind of permission to the SD folder for everything to work, but I don't know how to do it.



Do you mean that after doing the whole process I have to enter this command in the terminal?

bind mount

Is supposed fbind already mount the symbolic link right?
mount -t sdcardfs -o rw, nodev, nosuid, uid=1023,gid=1023,mask=7 /src-path /your-mount-pt



Sent from my Redmi 8A using Tapatalk
 

niask

New member
Oct 30, 2013
2
0
Hello. I've got a Xiaomi Redmi 6 Pro on a xiaomi.eu firmware (Android 8.1) and I can't make it work. Apps don't have write permissions on sdcard (exFat file system). I tried like this:
Code:
part -o nodev,noexec,nosuid,noatime /dev/block/mmcblk1p1 /mnt/sdcard_ext
intsd_path=/storage/emulated/0
extsd_path=/mnt/sdcard_ext
bind_mount $extsd/.DCIM $intsd/DCIM
bind_mount $extsd/.DCIM/Camera $intsd/DCIM/Camera
No luck.

And like this (EAD2-FAA6 is default mount name of my SD):
Code:
intsd_path=/storage/emulated/0
extsd_path=/storage/EAD2-FAA6 
bind_mount $extsd/.DCIM $intsd/DCIM
bind_mount $extsd/.DCIM/Camera $intsd/DCIM/Camera
Still no luck. What do I do wrong?
 

Spatry

Member
Hacky way to install on Magisk...

Fbind WILL NOT install on Magisk 20.4 and I CANNOT LIVE WITHOUT IT!

So I ended up wiping my tablet and reinstalling the stock rom with TWRP recovery.
No unlocked bootloader on my ONN 8". Just used SPFlash tools. Immediately afterwards, I
rebooted into recovery and flashed Magisk-v19.3.zip from their github page. After a restart
and going through the setup sequence WITHOUT internet connection, I opened the Magisk
software (left menu) and manually installed fbind-2019.1.23.zip once done, I ignored the reboot
message and THEN CONNECTED to the internet. On to the main magisk screen for updates to
the manager, then the main binary. Once done, reboot and SUCCESS! fbind appears to work
as expected.

I probably could have saved some trouble if there were a tutorial on installing magisk modules
without the manager or even instructions on repairing the zip files so they will load on new
magisk installations. Anyway... this procedure worked for me and so I thought I would share
my solve... If anyone knows an easier way, please feel free to shed some light on this. Cheers!
 

samhhmobil

Senior Member
May 25, 2017
344
179
Hamburg
Fbind WILL NOT install on Magisk 20.4 and I CANNOT LIVE WITHOUT IT!
fbind installs flawlessly with Magisk 20.1.
fbind.works(!) flawlessly with Magisk 20.3.

fbind does not work with Magisk 20.4 (even if it was installed with Magisk 20.1).

So your guide is;
(1) Install Magisk 20.1, reboot and check that it's working.
(2) Install fbind, reboot and check that it's working.
(3) Upgrade Magisk to 20.3, and you'll see that fbind is working flawlessly.

samhhmobil

PS
A fix for fbind to install/work with Magisk 20.4 or newer would be great, of course...
 

bnwg

Senior Member
Sep 2, 2010
425
62
fbind installs flawlessly with Magisk 20.1.
fbind.works(!) flawlessly with Magisk 20.3.

fbind does not work with Magisk 20.4 (even if it was installed with Magisk 20.1).

So your guide is;
(1) Install Magisk 20.1, reboot and check that it's working.
(2) Install fbind, reboot and check that it's working.
(3) Upgrade Magisk to 20.3, and you'll see that fbind is working flawlessly.

samhhmobil

PS
A fix for fbind to install/work with Magisk 20.4 or newer would be great, of course...

I think the sequence is

- install Magisk (v19 per his case) from recovery
- boot up the device after flashing Magisk
- after booted up goes to Magisk without network connection
- manual install fbind
- no reboot after manual install fbind
- connect internet and finish Magisk setup and upgrade
- reboot and profit
 

The_Walking_Playground

Senior Member
Nov 30, 2017
652
346
fbind installs flawlessly with Magisk 20.1.
fbind.works(!) flawlessly with Magisk 20.3.

fbind does not work with Magisk 20.4 (even if it was installed with Magisk 20.1).

So your guide is;
(1) Install Magisk 20.1, reboot and check that it's working.
(2) Install fbind, reboot and check that it's working.
(3) Upgrade Magisk to 20.3, and you'll see that fbind is working flawlessly.

samhhmobil

PS
A fix for fbind to install/work with Magisk 20.4 or newer would be great, of course...
Hi,

It should be trivial to put the latest fbind version from the thread into the newest Magisk module template format, and adjust any paths to wherever they may need to point in the latest version. I can try to do this later today, if no one else figures it out before then.

TWP
 

zdoe

Senior Member
Feb 11, 2011
282
20
does fbind work on android 10?

have come to rely on fbind.

maybe this has been answered already, but... does fbind work at all on android 10? somebody have experience on this? i have no problem with using magisk 20.1. if that's what it takes.
 

samhhmobil

Senior Member
May 25, 2017
344
179
Hamburg
have come to rely on fbind.

maybe this has been answered already, but... does fbind work at all on android 10? somebody have experience on this? i have no problem with using magisk 20.1. if that's what it takes.
Yes, it works with LineageOS 17.1 (Android 10). I have it running on two Sony Xperia XA2 (H3113 and H4113).

As I wrote before: (1.) install Magisk 20.1 in TWRP, (2.) install fbind in TWRP, (3.) upgrade to Magisk 20.3 in TWRP. If you do it in this order, it works.

samhhmobil
 
  • Like
Reactions: zdoe

theredbaron1834

Senior Member
Aug 1, 2015
265
71
Sony Xperia XA2
Google Pixel 5
Yes, it works with LineageOS 17.1 (Android 10). I have it running on two Sony Xperia XA2 (H3113 and H4113).

As I wrote before: (1.) install Magisk 20.1 in TWRP, (2.) install fbind in TWRP, (3.) upgrade to Magisk 20.3 in TWRP. If you do it in this order, it works.

samhhmobil


Looking into upgrading my xa2 to 10, but I "need" fbind. Not only do I get confirmation it works on 10, but on my device. Guess I'll start backing up to upgrade.

Also, I saw a post talking about an updated binary, were would I get it, and where would I place it? Will this let me update magisk to current, or stop at 20.3 still?
 

samhhmobil

Senior Member
May 25, 2017
344
179
Hamburg
Looking into upgrading my xa2 to 10, but I "need" fbind. Not only do I get confirmation it works on 10, but on my device. Guess I'll start backing up to upgrade.

Also, I saw a post talking about an updated binary, were would I get it, and where would I place it? Will this let me update magisk to current, or stop at 20.3 still?
You can use the original fbind 2019.1.23! It's working on my XA2.

With the "updated" binary I did run into trouble, I was unable to install it. I tried it unsuccessfully.

And, yes, install fbind with Magisk 20.1. After successful install you may upgrade Magisk to 20.3. But with 20.4 fbind did not work anymore.

samhhmobil
 

zdoe

Senior Member
Feb 11, 2011
282
20
fbind and android 10

Yes, it works with LineageOS 17.1 (Android 10). I have it running on two Sony Xperia XA2 (H3113 and H4113).

As I wrote before: (1.) install Magisk 20.1 in TWRP, (2.) install fbind in TWRP, (3.) upgrade to Magisk 20.3 in TWRP. If you do it in this order, it works.

samhhmobil

thanks, @samhhmobil. now i need to get my apps over to 10. i had trouble downgrading magisk. all the uninstall utilities result in a bootloop, and installing the old one over new results in nothing.
 

theredbaron1834

Senior Member
Aug 1, 2015
265
71
Sony Xperia XA2
Google Pixel 5
thanks, @samhhmobil. now i need to get my apps over to 10. i had trouble downgrading magisk. all the uninstall utilities result in a bootloop, and installing the old one over new results in nothing.
I had the same issue with bootloops. Nothing I could do fixed it, outside of the newest Magisk.l which for some reason let me boot.

Which meant no fbind. Yesterday was a hell of a day getting my phone back in working order, ended up having to write a script that runs at boot to do what fbind does. Not as pretty, but does work, and I am on the latest android now.
 
  • Like
Reactions: zdoe

zdoe

Senior Member
Feb 11, 2011
282
20
I had the same issue with bootloops. Nothing I could do fixed it, outside of the newest Magisk.l which for some reason let me boot.

Which meant no fbind. Yesterday was a hell of a day getting my phone back in working order, ended up having to write a script that runs at boot to do what fbind does. Not as pretty, but does work, and I am on the latest android now.

maybe you could share your script here, just in case...
 

Top Liked Posts

  • There are no posts matching your filters.
  • 56
    # fbind
    ## Copyright (C) 2017-2019, VR25 @ xda-developers
    ### License: GPL V3+
    #### README.md



    ---
    #### DISCLAIMER

    This software is provided as is, in the hope that it will be useful, but without any warranty. Always read/reread this reference prior to installing/upgrading. While no cats have been harmed, I assume no responsibility under anything which might go wrong due to the use/misuse of it.

    A copy of the GNU General Public License, version 3 or newer ships with every build. Please, study it prior to using, modifying and/or sharing any part of this work.

    To prevent fraud, DO NOT mirror any link associated with this project; DO NOT share ready-to-flash-builds (zips) on-line!



    ---
    #### DESCRIPTION

    This is an advanced mounting utility for folders, EXT4 images (loop devices), LUKS/LUKS2 encrypted volumes, regular partitions and more.



    ---
    #### PRE-REQUISITES

    - Any root solution, preferably Magisk 17.0+
    - App to run `/system/etc/fbind/autorun.sh` on boot if system doesn't support Magisk nor init.d
    - ARM/ARM64 CPU
    - Basic `mount` and terminal usage knowledge
    - Terminal Emulator (i.e., Termux)



    ---
    #### CONFIG SYNTAX

    - bind_mount <target> <mount point> Generic bind-mount
    - e.g., `bind_mount $extsd/loop_device/app_data/spotify /data/data/com.spotify.music`

    - extsd_path <path> Use <path> as extsd.
    - e.g., `extsd_path /mnt/mmcblk1p2`

    - from_to <source> <dest> Wrapper for `bind_mount <$extsd/[path]> <$intsd/[path]>`
    - e.g., `from_to WhatsApp .WhatsApp`

    - <fsck> <block device> Check/fix external partition before system gets a chance to mount it. This is great for EXT[2-4] filesystems (e2fsck -fy is stable and fast) and NOT recommend for F2FS (fsck.f2fs can be extremely slow and cause/worsen corruption).
    - e.g., `e2fsck -fy /dev/block/mmcblk1p1`

    - int_extf <path> Bind-mount the entire user 0 (internal) storage to `$extsd/<path>` (implies obb). If `<path>` is not supplied, `.fbind` is used.
    - e.g., `int_extf .external_storage`

    - intsd_path <path> Use <path> as intsd.
    - e.g., `intsd_path /storage/emulated/0`

    - loop <.img file> <mount point> Mount an EXT4 .img file (loop device). `e2fsck -fy <.img file>` is executed first.
    - e.g., `loop $extsd/loop.img $intsd/loop`

    - noAutoMount Disable on boot auto-mount.

    - noWriteRemount Read the SDcardFS note below.

    - obb Wrapper for `bind_mount $extobb $obb`

    - obbf <package name> Wrapper for `bind_mount $extobb/<package name> $obb/<package name>`
    - e.g., `obbf com.mygame.greatgame`

    - part <[block device] or [block device--L]> <mount point> <"fsck -OPTION(s)" (filesystem specific, optional)> Auto-mount a partition. The --L flag is for LUKS volume, opened manually by running any `fbind` command. Filesystem is automatically detected. The first two arguments can be `-o <mount options>`, respectively. In that case, positional parameters are shifted. The defaut mount options are `rw` and `noatime`.
    - e.g., `part /dev/block/mmcblk1p1 /mnt/_sdcard`
    - e.g., `part -o nodev,noexec,nosuid /dev/block/mmcblk1p1 /mnt/_sdcard`

    - permissive Set SELinux mode to permissive.

    - remove <target> Auto-remove stubborn/unwanted file/folder from $intsd & $extsd.
    - e.g, `remove Android/data/com.facebook.orca`, `remove DCIM/.8be0da06c44688f6.cfg`

    - target <path> Wrapper for `bind_mount <$extsd/[path]> <$intsd/[same path]>`
    - e.g., `target Android/data/com.google.android.youtube`



    ---
    #### TERMINAL

    `Usage: fbind or fbind <options(s)> <argument(s)>

    <no options> Launch the folder mounting wizard.

    -a|--auto-mount Toggle on boot auto-mount (default: enabled).

    -b|--bind-mount <target> <mount point> Bind-mount folders not listed in config.txt. Extra SDcarsFS paths are handled automatically. Missing directories are created accordingly.
    e.g., fbind -b /data/someFolder /data/mountHere

    -c|--config <editor [opts]> Open config.txt w/ <editor [opts]> (default: vim/vi).
    e.g., fbind -c nano -l

    -C|--cryptsetup <opt(s)> <arg(s)> Run $modPath/bin/cryptsetup <opt(s)> <arg(s)>.

    -f|--fuse Toggle force FUSE yes/no (default: no). This is automatically enabled during installation if /data/forcefuse exists or the zip name contains the word "fuse" (case insensitive) or PROPFILE=true in config.sh. The setting persists across upgrades.

    -h|--help List all commands.

    -i|--info Show debugging info.

    -l|--log <editor [opts]> Open fbind-boot-$deviceName.log w/ <editor [opts]> (default: vim/vi).
    e.g., fbind -l

    -m|--mount <pattern|pattern2|...> Bind-mount matched or all (no arg).
    e.g., fbind -m Whats|Downl|part

    -M|--move <pattern|pattern2|...> Move matched or all (no args) to external storage. Only unmounted folders are affected.
    e.g., fbind -M Download|obb

    -Mm <pattern|pattern2|...> Same as "fbind -M <arg> && fbind -m <arg>"
    e.g., fbind -Mm

    -r|--readme Open README.md w/ <editor [opts]> (default: vim/vi).

    -R|--remove <target> Remove stubborn/unwanted file/folder from $intsd and $extsd. <target> is optional. By default, all <remove> lines from config are included.
    e.g., fbind -R Android/data/com.facebook.orca

    -u|--unmount <pattern|pattern2|... or [mount point] > Unmount matched or all (no arg). This works for regular bind-mounts, SDcardFS bind-mounts, regular partitions, loop devices and LUKS/LUKS2 encrypted volumes. Unmounting all doesn't affect partitions nor loop devices. These must be unmounted with a pattern argument. For unmounting folders bound with the -b|--bind_mount option, <mount point> must be supplied, since these pairs aren't in config.txt.
    e.g., fbind -u loop|part|Downl

    -um|--remount <pattern|pattern2|...> Remount matched or all (no arg).
    e.g., fbind -um Download|obb`



    ---
    #### NOTES

    - Always enforce Unix line endings (LF) when editing config.txt with other tools. NEVER use Windows Notepad!

    - Available free space in internal storage may be misreported.

    - Busybox installation is unnecessary, unless fbind is installed into /system (legacy/Magisk-unsupported devices only).

    - Config survives factory resets if internal storage (data/media/) is not wiped.

    - Duplicate SDcard may show up in file managers.

    - [FUSE] Some users may need to set `intsd_path /storage/emulated/0` (default is /data/media/0).

    - If you stumble upon inaccessible folders or read-only access, try forcing FUSE mode (fbind -f). If your system doesn't support FUSE, it will bootloop, but fbind will notice and automatically revert the change.

    - Logs are stored at `/data/adb/fbind/logs/`.

    - [SDcardFS] Remounting /mnt/runtime/write/... may cause a system reboot. If this happens, fbind remembers to skip that next times. There's a catch, though! If your system reboots for a reason other than this, fbind will mistakenly add `noWriteRemount` to config. If you stumble across broken bind mounts, remove that line and remount all folders (fbind --remount).

    - There is a sample config in `$zipFile/common/` and `/data/adb/fbind/info/`.



    ---
    #### SETUP

    First time
    1. Install from Magisk Manager or custom recovery.
    2. Reboot.
    3. Configure (/data/adb/fbind/config.txt) -- recall that `fbind -c <editor [opts]>` opens config.txt w/ <editor [opts]> (default: vim/vi).
    4. Move data to the SDcard with a file manager or `fbind --move` then run `fbind --mount`.

    Upgrades
    1. Install from Magisk Manager or custom recovery.
    2. Reboot.

    After ROM updates
    - Unless `addon.d` feature is supported by the ROM, follow the upgrade steps above.

    Bootloop (Magisk only)
    - Flash the same version again to disable the module.

    Uninstall
    1. Magisk: use Magisk Manager or other tool; legacy: flashing the same version again removes all traces of fbind from /system.
    2. Reboot.



    ---
    #### LINKS

    - [Facebook page](https://facebook.com/VR25-at-xda-developers-258150974794782/)
    - [Git repository](https://github.com/Magisk-Modules-Repo/fbind/)
    - [Telegram channel](https://t.me/vr25_xda/)
    - [Telegram profile](https://t.me/vr25xda/)
    - [XDA thread](https://forum.xda-developers.com/apps/magisk/module-magic-folder-binder-t3621814/)



    ---
    #### LATEST CHANGES

    **2019.1.23 (201901230)**
    - General optimizations
    - More accurate SDcardFS and encrypted data detection
    - New command: fbind --remount
    - Note on SDcardFS: remounting /mnt/runtime/write/... may cause a system reboot. If this happens, fbind remembers to skip that next times. There's a catch, though! If your system reboots for a reason other than this, fbind will mistakenly add `noWriteRemount` to config. If you stumble across broken bind mounts, remove that line and remount all folders (fbind -um).

    **2019.1.5 (201901050)**
    - Fixed auto-mount toggle (fbind -a) inverted output.
    - Forcing FUSE mode (fbind -f) causes bootloop if the system doesn't support that. When this happens, changes are automatically reverted.
    - General optimizations
    - Under SDcardFS, remounting /mnt/runtime/write/... may cause a system reboot. If this happens, fbind remembers to skip that next times (noWriteRemount).
    - Updated building tools
    - Wizard has a "troubleshooting" option.

    **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


    XDA:DevDB Information
    [Magisk][/system] fbind, Tool/Utility for the XDA Community Apps

    Contributors
    VR25, Captain_Throwback, 白い熊, TechnoSparks
    Source Code: https://github.com/Magisk-Modules-Repo/fbind


    Version Information
    Status: Stable
    Current Stable Version: 2019.1.23
    Stable Release Date: 2019-01-23

    Created 2017-06-14
    Last Updated 2019-01-23
    41
    ### No, I'm Not Dead! ###

    I know, I know... it's been quite a while. Well, yeah, maybe longer than that...

    Not gonna write a book on this. Lets just say it's HARD to access the internet on a regular basis from my current location. Plus, I've been busy with general life matters.
    That said, my online presence will still remain limited for a while. It won't be that much limited anymore, though. So... yay!



    ### Latest Changes ###

    F2FS Loopback Bug Workaround
    Magic GApps
    Magisk Manager for Recovery Mode
    Moto Z Play Dual SIM Mode Enabler
    Sysconfig Patcher
    Systemless Camera NX Mod
    - Fixed modPath detection & bad PATH variable issues (Magisk V16.6).
    - Updated documentation

    Magic Charging Switch (mcs)
    - Enhanced debugging function.
    - Fixed "automation config still calling `cs` instead of `mcs`."
    - Fixed modPath detection & bad PATH variable issues (Magisk V16.6).
    - Updated charging switches database (more devices supported)
    - Reliability improvements
    - Updated documentation

    Magic Folder Binder (fbind)
    - Ability to unmount loop devices and partitions on demand (i.e., fbind -u 'pattern1|pattern2|pattern...').
    - Better loop device mounting logic ("ugly bugs" fixed)
    - Bind-mount folders automatically regardless of --L (LUKS) flag's usage.
    - Dedicated logs dir -- /data/media/fbind/logs (easier & advanced debugging)
    - Deprecated `fbind -l` in favor of `fbind -i` (outputs much more information)
    - Fixed "misleading [N/A] mount status".
    - Fixed modPath detection & bad PATH variable issues (Magisk V16.6).
    - Fixed "rm -rf not affecting hidden files/folders" in data moving functions.
    - Ignore `app_data` line whose target apk is missing (to avoid app data loss).
    - Option to mount app_data in ext4 .img file (loop device)
    - Shipping with a comprehensive, noob-friendly tutorial (tutorial.txt, /data/media/fbind/info/tutorial.txt)
    - Reliability improvements (better data loss protection algorithms)
    - Updated documentation
    - Using `rsync -a` for advanced copy operations, instead of `cp -a`.



    ### Last, but Far from Least ###

    Will update each project's thread and repository & answer queries at my earliest (uh... maybe a little late) convenience.
    Meanwhile, everything you need is in the attached zip. Yes, all modules are there, along with a md5sum.

    P.S., To everyone who donated and/or contributed in other ways,
    -- Thank you very much!
    19
    Is this project discontinued? Last update almost a year ago.

    Ok, I downloaded latest version (2019.1.23) and installed it on my Lineage OS 17.1 (Android 10) with Magisk v20.2, and... spent two days for manage it to work... Meh, it'd be better to not even start.

    Fist of, it simply hasn't been installed properly on my system (no binaries, no scripts, only info/config examples), so I downloaded latest update-binary, saved it as is (without modifications), and manually converted config.sh to install.sh (using aka "legacy script" logic) (fix1-fix2) customize.sh (fix3).

    Secondly, fstype binary doesn't detect FAT (vfat/exfat/sdfat) on my system, so I added extra check to part() function in core.sh: in case if fstype has not detected FS, let mount detect it automatically (omit -t).

    Next, grep /storage/emulated /proc/mounts | grep -Eiq ' sdcardfs | fuse ' || exit 1 line in wait_until_true() function instanly exit script on boot, I guess it's because it starts too early on my system. So I replaced "exit" with waiting loop.

    After all this modifications and countless hours of tries and errors I finally got what I wanted - move (bind) some internal folders to encrypted second partiton of my external SD card.

    /data/adb/fbind/config.txt:
    Code:
    part -o umask=0 /dev/block/mmcblk1p2--L,MyLoNgPaSsWoRd /mnt/sdcrypt
    extsd_path /mnt/sdcrypt
    target DCIM
    target Audio
    target TitaniumBackup

    I found using umask=0 on FAT is a most painless way to deal with apps permissions to use binded folders. Less secure though. I logically understand that fbind should take care of access to binded folders, but it looks like something changed lately in Android's storage "magic", which is not clear to me, so... umask=0. Tried other mountpoints like /mnt/media_rw/sdcrypt or /storage/sdcrypt, tried ext4 instead of exfat, but all that caused even more problems with permissions. I'd appreciate any advice about better mountpoint and options to use.
    Got an infinite bootloop when I used to use FUSE (which is happen automatically when I add something like "intsd_path /storage/emulated/0" in config.txt), thanks god we have TWRP.

    I attached modified zip-file in case if anyone interested (not sure If I had right to do this tho, I will remove it if OP or moderators ask), magisk-only.
    DISCLAIMER: I'm very new to module coding and coding in general, I'm just an experienced Linux user, so I can't guarantee that my modifications are 100% correct and universal, test it on your own risk.

    UPD: new "fix2" version with some fixes.
    UPD2: new "fix3" version: magisk 20.4 support and others changes.
    UPD3: new "fix4" version: small bugfixes and simplified code (info).
    17
    13
    Hi guys, I made new "fix3" version if anyone interested:
    - magisk 20.4 support (magisk 20.0+ is requied starting from this version)
    And some fixes for those who using partitions and/or images:
    - loop and part now support both EXT2/3/4 and FAT/exFAT file systems, and loop accepts mount options (loop -o ...) like part does
    - better detection file system of partitions and loop images (using blkid if fstype fails)
    - fixed problems with permissions when mounting (ex)FAT and EXTfs partitions/images (using better mount options, sdcardfs and more of android storage "views" black magic)
    You can part/loop directly to target folder (part /dev/block/mmcblk1p2 $intsd/Viber) or mount it aside (part /dev/block/mmcblk1p2 /mnt/flash), declare as $extsd (exstsd_path=/mnt/flash) and then bind/target folders (target Viber, from_to Viber .Viber, etc)

    Tested with Carbon 8.0 (Android 10, AOSP-based) on my ancient Xperia Z3 Compact
    zip-file attached to my original post

    JUST FOR INFO (UPDATED after "fix4" released in my next post below):
    Hardcoded mount options for initial mounting of partitions and loop images:
    for all FS: nosuid,nodev,noexec,context=u:eek:bject_r:sdcardfs:s0
    + for (ex)FAT: uid=0,gid=1023gid=9997,umask=0007
    + for EXT2/3/4: changing owner:group of root directory to 0:1023 0:9997 and perms to rwxrwxr-x - you should know this if you use mounted EXTfs-devices somewere else. This will allow you to create and delete newly created or empty folders in the root of mounted EXFfs storage, but for existed folders you need to do chown -R 0:9997 <mountpoint> and chmod -R 775 <mountpoint> by hand at least once.
    These changes should help with access to mounted storages in recent androids.
    And additional options when binding devices and folders: gid=9997,mask=6
    Also, here is another interesting tool for binding folders: https://bindfs.org (but see "known issues" at bottom). May be I'll try switch to it if encounter problems with permissions in next android updates. If I don't buy new phone with 128+ gigs of internal memory soon :)