yashsingh1/xdaforums huggingface dataset:
[Magisk] VR25:
For Those Who Can't Wait...

- Enhanced platform.xml patching engine & "perms" feature

- [EXPERIMENTAL] Ability to mount multiple partitions, loop devices (.img files) & open multiple LUKS volumes

- Fixed extsd_path() "slee" typo

- Minor optimizations

- Updated documentation (pro tips included)

You seem to be talking about the F2FS bug. I built a module specifically for "fixing" that. Search for "F2FS Bug Workaround".

bind_mnt /data/media/0/DCIM /data/media/0/Pictures -- that's what you want.
[Magisk] santo_007:
Can anyone please give me the link of fbind v 2017.12.4. because latest version is not working with magisk v 14.5
[Magisk] RokCruz:
Clean flash after some issues with other rom, now reinstalled on oreo 8.1 after reboot(without doing anything) all folder was binded(int_extf command) and working but i have duplicated SDcard in file manager.
[Magisk] RokCruz:
Try this it work for me (is the only i have)
[Magisk] santo_007:
I too have v 2018.1.2 . It was not working with older magisk version. I tried to install it with magisk 14.5 after install and reboot it was again showing me a message"to activate module please reboot". But v 2017.12.4 is working good and somehow lost it.

Magisk v15.2 is worst. When I tried to activate xposed mod , bootloop occurs. So the only way I can use xposed is to install older version of magisk but latest modules are not working with it.

So if you somehow retained v 2017.12.4 can you please share it
[Magisk] RokCruz:
Im on Magisk 15.2 with no issues, 1 hour ago i was on AOSP Extended 7.1.2 with Xposed and all was working fine, now im on Validus 8.1.0 and everything is fine (But without xposed:crying:)
[Magisk] santo_007:
Xposed is heart of android(without it I cannot live:silly:)
[Magisk] RokCruz:
i only use xposed for the module XInternal, but with magic folder binder i can upgrade to oreo
[Magisk] Killer7Mod:
[MENTION=5228676]VR25[/MENTION] , You used "sestatus" to check the status of SELinux but it does not have this binary on my cell phone. Only the "getenforce"
[Magisk] sjevtic:
Version 2017.12.4

Here you go.
[Magisk] JohnDoe93:
When I type "fbind -mb" in Termux i get "system/bin/fbind[24]: sestatus not found"

.fbind/Whatsapp folder is on external SD, but it's empty, any help would be appreciated. I'm using a Galaxy S5.
[Magisk] pat357:
Would you mind telling us/me more about the changes related to permissions to R/W external SDcard ?

Do you (still ?) use something like :

pm grant com.whatsapp android.permission.READ_EXTERNAL_STORAGE
pm grant com.whatsapp android.permission.WRITE_EXTERNAL_STORAGE

Any other methods you use in this release ?

I guess there's no chance to use SAF for apps that don't have it implemented in their own code ?

Another question

I noticed you recently start putting the fbind file in /system/bin instead of /system/xbin : any advantages to do so ?
[Magisk] VR25:
I forgot to mention -- there's an issue in the update-binary. Once it's fixed, those who downgraded from Magisk 15+ must manually remove all Magisk files and/or folders from /data/adb if the target version is older than 14.6 -- only then, they'll be able to install fbind. If you don't want to wait for the fix, follow the given instructions and install the module from TWRP.

Regarding very old Magisk versions (i.e., 11.6), I'm working on adding support for these.

About "sestatus not found" & other issues -- a new release is imminent. Stay tuned.

1. Yes, with the addition of media storage permissions

2. The other method is the default -- /system/etc/permissions/platform.xml patching -- groups allowed to write media & external storages: media_rw & sdcard_rw. Regarding SAF -- that's right. The default (aforementioned) method *might* bypass that limitation, though.

3. Well, in the early days, the path was already /system/bin. Later on, I changed it to /system/xbin & added a manual switch to /system/bin. The reasoning was -- some devices befriended bootloops, while the majority didn't have such an issue. With recent Magisk versions, /system/bin seems to trigger bootloops the least. As expected, there's now a manual switch to /system/xbin -- touch /data/.xfbind
[Magisk] santo_007:
Thanks pal
[Magisk] zdoe:
i'm just being ironic. what if i repartition my F2FS data partition to EXT4 and restore the data. what will break? what's the F2FS there for, when EXT4 has worked good for as long as we can remember?

but of course your F2FS bug workaround seems fab as well, i just don't know if it will solve my problem and not brick the phone. some posts on the thread make me a bit wary.
[Magisk] VR25:
**2018.1.7 (201801070)**
- Enhanced platform.xml patching engine & "perms" feature
- [EXPERIMENTAL] Ability to mount multiple partitions, loop devices (.img files) & open multiple LUKS volumes
- Fixed extsd_path() "slee" typo, "sestatus not found" & other issues
- Improved compatibility with older Magisk versions (entirely new installer)
- Major optimizations
- Updated documentation (pro tips included)

If you format your data partiton to EXT4, your device may fail to boot.

Here are a few words on F2FS (Flash-Friendly File System).

The workaround is packed into a module, and it does not mess with anything that would brick target devices.
[Magisk] VR25:
Perhaps your device did indeed come with EXT4. I think TWRP supports both file systems just fine -- and the phone, probably even more so.

Assuming you won't lose any important data, you actually end up wining if that works.

In my case, switching from F2FS to EXT4 prevents the device (Moto Z Play) from booting -- but that's not like a bootloop -- it has to do with encryption only working with F2FS. For some reason EXT4 makes the encryption key unusable. Even when data is unencrypted, the phone asks for a key. Although the key is correct, it refuses to accept it. Reverting back to F2FS is the only way to get things working again.

I have to warn you in regards to backup, though...

You may not be able to restore TWRP EXT4 partition backup to F2FS-formatted storage and vice-versa. At least for me, that didn't work.
[Magisk] khnoizer:
Mr, [MENTION=5228676]VR25[/MENTION], I previously use this to bind a folder which its name separated by space:

from_to "Twitter Videos" .fbind/"Twitter Videos"

Which is successfully bind that folder at previous versions of fbind. But now it doesn't. So how the syntax should be to bind this folder now? Thank you.

EDIT:

Here's what debug.log says when it failed:

mkdir: can't create directory '/mnt/media_rw/D02A-9DE7/Videos"': Invalid argument [intsd/"Twitter] <--> [extsd/Videos"] mount: mounting /mnt/media_rw/D02A-9DE7/Videos" on /data/media/0/"Twitter failed: No such file or directory
[Magisk] ainurrofiq:
Sir [MENTION=5228676]VR25[/MENTION] on 4 January version I successfully bind this

from_to Download .fbind/Download

from_to WhatsApp .fbind/WhatsApp

from_to Pictures .fbind/Pictures

from_to DCIM .fbind/DCIM

from_to Android/data/com.xda.labs .fbind/XDALabsFiles

from_to MagiskManager .fbind/MagiskManager

from_to TitaniumBackup .fbind/TitaniumBackup

from_to SwiftBackup .fbind/SwiftBackup

from_to GBInstagram .fbind/GBInstagram

To my fbind folder on my external sdcard, but after flashing 7 January version, magisk manager , titanium, swiftbackup GBInstagram is not binded, can you explain it, and how to make it bind again
[Magisk] VR25:
I'm still looking for the cause. Meanwhile you have to scape the spaces like so:

from_to Twitter\ Videos .fbind/Twitter\ Videos

/data/media/fbind/debug.log could have something to say about that...

You could try removing /sbin/.core/img/fbind/system/etc folder (or /magisk/fbind/system/etc) then rebooting.

Before that, though, I would like to see the log.
[Magisk] ainurrofiq:
Okay here is the log

Thu Dec 3 18:04:23 GMT 1970

<SD Card Information>

/dev/block/vold/public:179_65 /mnt/media_rw/09C6-101A vfat rw,dirsync,nosuid,nodev,noexec,noatime,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/09C6-101A fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0

/dev/fuse /storage/09C6-101A fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0

/dev/fuse /mnt/runtime/read/09C6-101A fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0

/dev/fuse /mnt/runtime/write/09C6-101A fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0

<Bind Folders>

[intsd/Download] <--> [extsd/.fbind/Download]

[intsd/WhatsApp] <--> [extsd/.fbind/WhatsApp]

[intsd/Pictures] <--> [extsd/.fbind/Pictures]

[intsd/DCIM] <--> [extsd/.fbind/DCIM]

[intsd/Android/data/com.xda.labs] <--> [extsd/.fbind/XDALabsFiles]

[intsd/MagiskManager] <--> [extsd/.fbind/MagiskManager]

[intsd/TitaniumBackup] <--> [extsd/.fbind/TitaniumBackup]

[intsd/SwiftBackup] <--> [extsd/.fbind/SwiftBackup]

[intsd/GBInstagram] <--> [extsd/.fbind/GBInstagram]

- Done.

<Cleanup>

- Done.
[Magisk] VR25:
Everything seems fine there... :rolleyes:

Go ahead and remove the aforementioned folder, then reboot.
[Magisk] ainurrofiq:
Found it. Sorry,

Now it works

Thanks sir
[Magisk] khnoizer:
"from_to Twitter\ Videos .fbind/Twitter\ Videos" still didn't work. Below is the debug.log.
[Magisk] protechtedd:
I have this issue too, but glad to hear you are working on it! :D
[Magisk] pat357:
It seems a bit against all odds that Samsung would not have used their own development (F2FS) in their 2017 flagship smartphone (S8+), but who knows...

Ough! That sounds like a bad experience, thanks for the warning !

This kind of surprises me : the data backup in TWRP should be file based, ie not stored in raw format unlike boot, recovery, modem.

Restoring data from TWRP is very similar to unTAR the previous backup files. (TWRP from data can be manually untarred to PC too)

But thanks for the warning here too !

Maybe the best moment to try the convert is to do it just before putting a full stock FW to the phone (using ODIN) as everything on the phone will be overwritten anyway.

For restoring data via TitaniumBackup it should matter if data is ext4 or fs2fs formatted, I guess.
[Magisk] bnwg:
Just want to report that after updating to v.1.7 files can't be binded. From the debug file it said both int and ext storage are read-only. mkdir can't be executed.

After reverted back to v.1.2 it just work fine.

No such problem with and before v.1.2.

Only v.1.7 has such issue for me.
[Magisk] Shikhs:
I'm installing this for the first time. I installed the module.

Now i just have to add following lines to config.txt?

from_to ABC .fbind/ABC

Thats it?

Do i have to manually move data first to extsd? Any chances of data loss?

Ps- btw im on android 8.1 and extsd is vfat formatted.

Edit: I moved the data manually and then see screenshot. But it doesn't work folder is empty in internal storage. Cleanup works but folder remain empty.
[Magisk] HPS7041:
can u send me that version v1.2 pls
[Magisk] sjevtic:
Version 2018.1.2

Here you go.
[Magisk] HPS7041:
huge thx
[Magisk] sjevtic:
Issues seen in version 2018.1.7

I've really been enjoying this module on my 32 GB Galaxy S7 running Android N (SuperMan-Rom V2.8.0)--it has allowed me to offload a lot of data from the small internal storage to my SD card. However, I am seeing some odd behavior in version 2018.1.7.

Every time I invoke fbind I see this:

ls: /dev/magisk/bin: No such file or directory

In addition, in /data/media/fbind/debug.log, there are quite a few errors:

touch: /data/media/fbind/.config/storage_perms: No such file or directory
<Grant Storage Perms>
grep: /data/media/fbind/.config/storage_perms: No such file or directory
/sbin/.core/img/fbind/service.sh[85]: can't create /data/media/fbind/.config/storage_perms: No such file or directory
- com.mobeam.barcodeService
// Lots more of these...
grep: /data/media/fbind/.config/storage_perms: No such file or directory
/sbin/.core/img/fbind/service.sh[85]: can't create /data/media/fbind/.config/storage_perms: No such file or directory
- com.samsung.android.video
Done.
/sbin/.core/img/fbind/service.sh[85]: cat: /data/media/fbind/.config/storage_perms: No such file or directory
bionic/libc/upstream-netbsd/lib/libc/regex/regerror.c:175: regerror: assertion "errbuf != NULL" failed
Aborted
mv: can't rename '/data/media/fbind/.config/storage_perms_': No such file or directory

Folder binding functionality, however, seems to be working normally. Any thoughts?

Thanks.
[Magisk] VR25:
**2018.1.13-1 (201801131)**
- Fixed `-m` not creating source/destinations paths & `-mb` not binding folders

**2018.1.13 (201801130)**
- General optimizations
- Updated reference

**2018.1.10 (201801100)**
- General bug fixes & optimizations
- Quoted paths containing spaces are now handled as expected
- Removed storage permissions fixes -- will come back only if a new implementation (WIP) ends up being fully functional and universal
- Redesigned `-as` command line option

A note on "intsd_path /storage/emulated/0"

- As stated in the README, that line serves a very specific purpose. ONLY try it if you actually have mount issues; otherwise, you end up causing problems yourself -- and most likely, misreporting fbind as "not working".
[Magisk] android_smater:
Cant understand how to use it...
[Magisk] VR25:
Tell me exactly what you want and I'll guide you.
[Magisk] zdoe:
ok - now i'm on magisk 15.3 and magisk manager 5.5.5. still no jive. at least this time error-message is a bit more descriptive. "magisk mount point not found." what to do?
[Magisk] VR25:
Same Magisk & Manager versions, no such issue for me. Are you sure Magisk is working properly? Is magisk.img actually mounted? Did you try installing from TWRP? Also, a log would be great. ;)
[Magisk] klinox:
same error

same error here, fresh install of lineageos 7.1 on motog5
[Magisk] VR25:
Moto G5... bingo!

That's the so called "F2FS Bug" affecting a bunch of Moto devices -- not related to fbind in any way.

Yes, I removed both methods. The one I'm working on consists on directly granting storage permission to all apps at once by "strategically" modifying /data/system/packages.xml. The process is a bit tricky, but if it works, that will be it.

Regarding FUSE and sdcardfs, I'm yet to test new versions of the latter to see whether it still doesn't allow proper bind mounts. If you're​ running a relatively recent Oreo ROM, removing/renaming "$fbind_dir/system.prop" could give you the answer.

EDIT:

If the aforementioned storage permission fix ends up working, fbind might as well function flawlessly under sdcardfs.
[Magisk] zdoe:
so is this the problem that your "F2FS loopback bug workaround" should fix? that module doesn't install either... anything else i could do?
[Magisk] VR25:
It doesn't install because your TWRP has the f2fs bug too. Have you tried the NOMOUNT variant of the f2fs workaround module (page 8, January 1st)? If so and it didn't work, then you need a patched kernel.
[Magisk] zdoe:
no, i hadn't tried it. now i did. magic folder binder finally installed, and stays on through reboot. i can't say i'd understand what i did, just followed your instructions. get permission denied on the command line, but manually copying the make_magisk_merge.sh file succeeded. permissions are rwxrwxrwx - don't know if it's chmod 750 or not. the command line on altering permissions also fails. su at the ADBshell gives a Permission denied as well.

nonetheless, i'm further ahead than i've ever been, and assume now that i can actually try your module, it'll work.

oddly - [MENTION=3783716]showlyshah[/MENTION] has the same moto G5 but how it behaves is not the same...
[Magisk] showlyshah:
Bro.. from what i experienced so far. Your method of mounting the image to cache works perfectly.. and everything works as intended in moto g5.. but the problem is.. the script wont stick after reboot.. it is automatically deleted from magisk script folder after reboot.

I think it is something to do with magisk.
[Magisk] zdoe:
testing it - get camcard card images onto extSD. on ADB:

su
cedric:/ #

cedric:/ # fbind -mb
fbind -mb

Moving data...
- Done.

Binding folders...

': Invalid argument directory '/mnt/media_rw/CC6E-7680/imgs
]intsd/bcr/imgs] <--> [extsd/imgs
on /data/media/0/bcr/imgs failed: No such file or directory

- Done.

cedric:/ #

config.txt:

from_to bcr/imgs imgs

or - do i have to use .fbind subfolder on extSD? or add paths to config.txt?
[Magisk] VR25:
Those errors are odd. What happens when you reboot -- does fbind get the job done? Could you upload /data/media/fbind/debug.log after that?
[Magisk] zdoe:
fbind persists through reboots. but i have yet to be able to actually bind a folder. there is no /data/media/fbind/debug.log generated.

from this thread's attachments i get:

#Default paths

internal_storage_path /data/media/0

is this correct syntax? i'm almost sure that 5G likes

internal_storage_path /storage/emulated/0

better. and after i've played with this, it seems fbind has created duplicate /MagiskManager folder (yes, exact same name!) and a /download -folder (source /Download) on /storage/emulated/0. however, the MagiskManager folders appear empty, and the file in /Download is not in /download.

EDIT: on 2nd thought - maybe fbind did not install correctly after all? there was no config.txt until i create one. i assume the module would install a sample one.

EDIT2: installed from recovery, not Magisk Manager, and now there IS a debug log. attached. still no bind, though.
[Magisk] pat357:
In ADB your mounts maybe different , depending whether you did run ADB with phone in recovery or not.

Try it again in a terminal window on your phone.
[Magisk] pat357:
[MENTION=5228676]VR25[/MENTION]

Should I expect any problems if I just update my very old module from 2017.09.10 to the current one ?

Any precautions I can take to prevent problems ? Should I manually delete some stuff before updating ?

I remember very well that, in the past, putting the fbind-script in "/system/bin" has always caused boot-loops on my Samsung S8+.

Don't know if something has changed in fbind setup in this regard ?

With the 2017.09.10 module, fbind is in "/system/xbin" and has always been working well.

My config consists only of a number "from_to/target/cleanup" commands, so this should still be valid.

PS . OT question : I want to change a property called "ro.config.tima=1 to ro.config.tima=0.

What is the easiest way to do this ?

I thought about resetprop

resetprop ro.config.tima 0

Is this the correct syntax ? Will it stick after rebooting ?

If no, how to make it permanent ?

Would Root Explorer and than directly editing the prop file work ? Involves mounting system rw and back to r.

Would this stick ?

Phone specs are in my sig.
[Magisk] VR25:
Since Moto devices run near stock Android, you don't need to specify internal storage path (intsd_path). The default (/data/media/0) is most likely the only that works.

The file config_samples.txt is for reference only. It's never automatically used in place of a missing config.txt file. You wouldn't want any defaults set, as such is likely to cause issues. Everyone has different setups.

Looking at your debug.log, the bind errors still look strange to me. Could you upload your config.txt file?

You should be fine.

Just a few important notes:

1. Make sure your config path is /data/media/fbind/config.txt or it won't be read by fbind. I don't remember what the path is in 2017.09.10 build.

2. If /system/bin/fbind causes a bootloop, run touch /data/.xfbind & reinstall the module from TWRP. This switches fbind location to /system/xbin -- and the setting is persistent across updates.
[Magisk] pat357:
It"s currently /data/media/0/fbind/config.txt and shows up as "fbind" directory in the root from int_sd.

Just copy/move the config.txt to /data/media/fbind/ is ok ?? This way it will not be visible in int_sd, right ?

OK, that's clear.

PS. I already had edited my previous post and added an OT question... please ?
[Magisk] VR25:
To make it permanent, without actually touching /system, simply create an empty file and add ro.config.tima=0 to it. Copy the file to /sbin/.core/img/.core/props (or /magisk/.core/props), set 755 permissions and reboot. Alternatively, you can append that line to ...fbind/system.prop and reboot.

Regarding config.txt, all you have to do is copy/move it to /data/media/fbind.
[Magisk] zdoe:
phone is booted to OS, not recovery. i've never done ADB on recovery so far. but that's just a line from config.txt - wouldn't the terminal command be different?

---------- Post added at 05:39 PM ---------- Previous post was at 05:26 PM ----------

my config.txt below (just the uncommented lines):

internal_storage_path /storage/emulated/0
from_to Download .fbind/download
from_to bcr/imgs imgs
target MagiskManager

i thought the module would still create some sort of (commented out) sample config.sys - if you say it doesn't, so be it.

1. it is. and yes, it is getting read as the debug log shows.

2. i have no bootloops. and currently have the module installed from TWRP. should i run touch /data/.fbind anyway, and reinstall?

3. i have since played around with apps2sd as well. it does succeed in creating working bounds. fbind, however, seems more robust / system friendly to me.
[Magisk] pat357:
Keep in mind that apps2sd may change something on your system partition, so if you don't want that, don't use this app.

The nice thing about Magisk modules is that they don't really change anything to your system partition.

No need to run "touch /data/.fbind", if you want, you can just delete the module via Magisk Manager.

Regarding your config.txt, I'd drop the first line and use this :

from_to Download .fbind/download
from_to bcr/imgs .fbind/imgs
target MagiskManager

Second line is changed to prevent that your recordings or shown double (on intern. SD and on externalSD)

Just for clarification : does fbind not work for you atm ?
[Magisk] zdoe:
fbind does not work ATM, but i have after the f2fs patch, also by [MENTION=5228676]VR25[/MENTION], gotten it to at least install and stay through reboots.

i don't mind changes to the system partition as long as i get things working. don't know whether apps2sd has already changed something.

config.sys - ok, thanks. duplicate images - can take care of that with a .nomedia -file. i like paths that are short and easy to remember (most of the time named the same on internal / external) in case i'm navigating the folder structure manually.
[Magisk] VR25:
Oddly, mkdir command refuses to work with fbind on your device.

Could you test whether manually running mkdir -p /mnt/media_rw/CC6E-7680/.fbind/download works?

Try creating all destination folders manually.

- Run fbind -b afterwards.
[Magisk] zdoe:
ok. the destination directories are there, created manually. but i tried deleting / mkdir'ing the download one - yes, mkdir works.

running fbind -b from ADB gives me the same errors as are on the debug.log. e.g.:

cedric:/ # mkdir -p /mnt/media_rw/CC6E-7680/.fbind/download
mkdir -p /mnt/media_rw/CC6E-7680/.fbind/download
cedric:/ # fbind -b
fbind -b

Binding folders...

': Invalid argument directory '/mnt/media_rw/CC6E-7680/.fbind/download
]intsd/Download] <--> [extsd/.fbind/download
on /data/media/0/Download failed: No such file or directory

': Invalid argument directory '/mnt/media_rw/CC6E-7680/imgs
]intsd/bcr/imgs] <--> [extsd/imgs
on /data/media/0/bcr/imgs failed: No such file or directory

': Invalid argument directory '/mnt/media_rw/CC6E-7680/MagiskManager
] <--> [extsd/MagiskManager
failed: No such file or directory-7680/MagiskManager

- Done.

cedric:/ #