yashsingh1/xdaforums huggingface dataset:
[Magisk] VR25:
So far, I managed to successfully mount the internal storage as external storage!

The sdcard is currently not working (not showing up anywhere). That's a nice progress though. :)

Yup, that's exactly what I do. Others simply prefer a more aggressive approach. About app cache, there is no noticeable drop in performance at all, unless your sdcard is as old as a dinosaur. ;)

If you were to replace the data partition by the sdcard, THEN yes -- your device's performance would suffer dramatically.
[Magisk] mattiadj:
Which sdcard is not showed? Internal or external?

Inviato dal mio SM-G935F utilizzando Tapatalk
[Magisk] VR25:
Whenever I say "sdcard," I mean the real sdcard.

So, I mounted the internal storage in place of the sdcard and not the other way around (yet). While this shows progress, it's useless and a drawback functionality-wise.
[Magisk] mattiadj:
Can u post the command that u have tried?

Inviato dal mio SM-G935F utilizzando Tapatalk
[Magisk] VR25:
It's too much text. I wrote several scripts. I'll post all versions here once I have access to my computer.
[Magisk] mattiadj:
Ok but I haven't understand. Have u placed external as internal and lost access to internal?

Inviato dal mio SM-G935F utilizzando Tapatalk
[Magisk] rehanraza:
great module. is it possible to convert it into GUI file for easier handling specially for noobs :S
[Magisk] VR25:
No, no... it's the complete opposite -- internal as external and couldn't mount external as internal (lost access to external)

I'm looking into that. :p
[Magisk] koko115:
Hi..

I want bind folder from /mnt/media_rw/extcard/DCIM/Private to /storage/Private. How do this ? Any one help.
[Magisk] VR25:
Does the path /storage/Private exist on your device already?

Edit: I forgot to mention, if what you want is hiding that folder, this won't work. A working solution is renaming "Private" to ".Private", so that you end up having the path "DCIM/.Private".

Alternatively, you can put an empty file named ".nomedia" in "DCIM/Private" and all media in that folder will me hidden.
[Magisk] koko115:
Yes. But when i turn on private mode option in this folder /storage/Private files appear and i want see this files in externalSd/DCIM/Private when i turn on private mode. Maybe You have some solution ?
[Magisk] VR25:
I see. Put the attached script in /magisk/.core/service.d folder and verify that the file has 755 or 777 permissions (usually set automatically). That script will bind your Private folder on boot. Now, I assume you also want that folder to be hidden from media scan. If so, put an empty file named ".nomedia" in it. Alternatively you can copy that file from Android/data folder to DCIM/Private.
[Magisk] koko115:
Ohhh. Sorry my friend. I mistake.. when i reboot phone folder /storage/Private gone. I check after off private mode and refresh and folder it was. But after reboot phone no this folder in /storage

After reboot i make this folder in /storage then put Your two last line code with write extsdcard name, then work. But when i turn on Private Mode i dont see images in /external/dcim/Private. I think because this folder after turn on private mode It was replaced by the right folder and it was unmounted. But after turn on private mode i put Your last line code for mount and to no visible files in /storage/Private..
[Magisk] VR25:
[MENTION=4715235]koko115[/MENTION], do the following:

1. Enable Private Mode

2. Run the command "realpath /storage/Private" (run it as root just to be sure there are no permission errors)

3. Post the output
[Magisk] rehanraza:
Superb. I'll wait once is done.
[Magisk] mattiadj:
Any progress mate?

Inviato dal mio SM-G935F utilizzando Tapatalk
[Magisk] VR25:
Couldn't test anything new. I've been too busy lately.
[Magisk] der_Kief:
[MENTION=5228676]VR25[/MENTION]

could you please update your module to the latest magisk template ?
[Magisk] wakaranay:
how can i save may photos using google camera to save to sdcard using this module? what are the things or app that i should have? maybe a step-by-step tutorial for a newbie like me :) thanks a lot
[Magisk] VR25:
I will as soon as I get a good internet connection (could be tomorrow). Currently, I have extremely limited internet access.
[Magisk] VR25:
Run the following commands in sequence on terminal emulator:

su

fbind -a from_to DCIM .fbind/DCIM

fbind -mb
[Magisk] wakaranay:
q​

i already run the command. and it says its successful. but when i take photos it save on internal.
[Magisk] wakaranay:
here's the screenshot
[Magisk] meistr91:
Because you need to used target function instead of from_to

As i understood target function will save data to exact same folder just on sd card. So that what u need.

And From_to function will transfer data from one folder to another. Hope it helped
[Magisk] wakaranay:
so my code must be target instead of from_to? see screenshot
[Magisk] meistr91:
Yes, "target DCIM/Camera" without quotes
[Magisk] wakaranay:
still the same error
[Magisk] meistr91:
What version on magisk u are using?
[Magisk] wakaranay:
im using latest 13.2
[Magisk] VR25:
Ok, which folder are your pictures saved to?
[Magisk] wakaranay:
google camera saved my photos in internal storage which is DCIM/Camera. and i want my photos directly save to sd card. DCIM/Camera
[Magisk] VR25:
You messed up! "target" is not intended for media folders. You end up with duplicates. Locate the file "fbind_list.txt" in your internal storage and edit it manually. Remove that line you just added (target DCIM .fbind/DCIM).

Edit: Are you sure it's not working? Files are saved in the sdcard but you're supposed to see them in your internal storage as well, as if they were saved there instead. That's how it works. Check to see whether the same files are present in .fbind/DCIM folder located in the sdcard.
[Magisk] wakaranay:
thanks now its working! photos are now save to sd card. meaning photos and videos will not eat my internal storage?
[Magisk] VR25:
That line should be from_to "DCIM" ".fbind/DCIM".

If files are not saved to .fbind/DCIM, then your Magisk version is the problem. Read the Debugging information in fbind_list.txt.

Update: you just edited you post! :p

Yes, your internal storage won't be eaten up.
[Magisk] wakaranay:
yup i did. sorry for late edit on my post :). thank you so much. i taught it will save on my external dcim folder thats why i said its not working. but when you said it will save on .fbind/dcim i checked again and now its working.

---------- Post added at 11:59 AM ---------- Previous post was at 11:31 AM ----------

i have 1 question. what if i want to flash new rom on my device. and need to clean flash. do i need to backup my internal dcim folder? coz everytime i delete photos or files on that folder same thong happen on .fbind/dcim folder.
[Magisk] VR25:
You don't need to. Files are stored in the sdcard. Deleting files from the internal storage doesn't remove them from the sdcard in recovery mode.

Also, your settings are kept across module updates and reinstalls unless you wipe the internal storage. If you do so, you must backup fbind_list.txt to preserve your settings.
[Magisk] wakaranay:
i usually clean install. wipe everything except for external. is there any magisk module that can save photos directly on sdcard?i mean not just copy o link the file. anyways thank you
[Magisk] VR25:
I updated the answer. Check it out.
[Magisk] VR25:
Yes, it is. You're welcome.
[Magisk] wakaranay:
what if i accidentally deleted the whole folder of dcim on internal?external folder will alao be deleted. is there anyway to recover it?
[Magisk] VR25:
Yes it will also desappear, but only in boot mode. It won't be touched when you do that from recovery.

You use a computer with a data recovery program to get you data back. Data recovery is not always 100% guaranteed though, specially from flash drives.
[Magisk] der_Kief:
any news about updating to new magisk v4 template ?
[Magisk] VR25:
Still facing major connectivity issues. Couldn't update the thread nor the download page.

CHANGELOG

* Updated to Magisk module template v4

* A separate v2017.7.21-Magisk-v12 is also available, but will no longer be updated if the latest Magisk has no major issues.

* Major optimizations.

* Updated reference.

* Minor cosmetic changes
[Magisk] fhLan:
it's giving error 1 in twrp

edit: everythings fine when install it using magisk app
[Magisk] Captain_Throwback:
You try flashing in Magisk Manager?
[Magisk] fhLan:
I've edited my post already, it works, but thanks btw. also can you give me example how to use this as i didn't find the functions mentioned in op when i type fbind in terminal
[Magisk] Captain_Throwback:
Did you reboot after installing? Once you do that the fbind command should work fine.
[Magisk] fhLan:
nvm, i didn't read post 3. sorry for that
[Magisk] fhLan:
I'm sorry I have another question, should I use -a to use from_to ?
[Magisk] VR25:
The short answer is yes.

"fbind -a" means add line to fbind_setup.txt.

"fbind -a from_to foo bar" means add line "from_to foo bar" to fbind_setup.txt.
[Magisk] fhLan:
and should I add "fbind -mb" after?
[Magisk] exodius48:
Bind succeded, but why obb in internal storage does not move to external storage?
[Magisk] VR25:
Indeed, there's something odd going on between the new template and TWRP.

If you didn't move files manually, yes. Did you read all the information from the OP and post #3? :confused:

fbind won't move files automatically for obvious reasons. You have to do that manually either with a file explorer or by running "fbind -m" as root.
[Magisk] exodius48:
I already did "fbind -mb" , but obb file still there inside internal storage. :confused:
[Magisk] teddy0209:
Anyone, if I want to bind a certain sub folder under Android/data, how/what should I add in the fbind_setup? Thanks!!!
[Magisk] p50kombi:
How are you checking if the files are actually there?

You do know this module moves the files to external, but 'simulates' them (in layman terms) to still be on the internal.

So you're fooling you're device they are still on internal, hence if you look in any android file explorer, it would look as if they are still in internal.

That's how this puppy works ;)
[Magisk] VR25:
Add

target Android/data/FolderName

You can also do that from terminal emulator:

su
fbind -a target Android/data/FolderName
[Magisk] teddy0209:
Thank you!!! ???

Edit: It works like a charm... Thanks again!!!
[Magisk] VR25:
At this point, the module is ready to jump out of Beta.

Unfortunately, due to connectivity issues, I can't update the changes on GitHub & ask topjohnwu to add fbind to the official Magisk repo.

I'm currently waiting for local ISPs to solve the nationwide internet problem (I'm at the end of the world).
[Magisk] solifice:
How to bind obb folder of com.rockstargames.gtasa

I use from_to for obb did not work whereas for data folder it works
[Magisk] p50kombi:
because it's in obb, you can just use obbf com.rockstargames.gtasa

then move it to your sd card's obb gtasa folder.

That's how I bound all the gta's ;)
[Magisk] VR25:
[MENTION=8048556]sakshamgupta2427[/MENTION], [MENTION=271041]p50kombi[/MENTION], why don't you guys use "obb" function to bind the entire obb folder instead of "obbf FolderName?". Isn't that even easier? ;)
[Magisk] p50kombi:
Because I install games and apps on and of so often, it doesn't make sense to bind the whole folder for me..

I only have 2 or 3 biggies in there, so I just bind those per folder instead of the whole obb..

That's why.. :)
[Magisk] solifice:
Actually I tried but did not worked
[Magisk] Z0DY:
Installed latest version and after a bit I totally understood what I had to do :laugh:

Now it works flawless ;)

Now I can remove FolderMount app

Ty :svetius:
[Magisk] pat357:
I really would like to have this module up & running, but it fails to install on my stock Samsung S8+ with Magisk 13.3 installed.

Here's what happens :

- If I install via the Magisk Manager, I get "Module will be updated on next restart" (translated from Dutch)

There are no errors shown during installation.

No matter how often I restart, the same message stays there and nothing happens.

- If I install with TWRP, I come in a boot-loop. On startup phone goes directly to TWRP.

Also here, there are no errors shown during installation.

Never had an issue before with installing modules : I have 5 other modules installed without any problem.

(app systemizer, audio mod library, Busybox system-less (osmOsis), Universal deep buffer remover, VIPER4AndroidFX all these are working nicely together )

I also tried to disable all other modules (except Busybox), rebooting and then installing this module, but the result was the same.

I'm really running out of ideas as I went to the whole thread and didn't find anyone with similar problems.

I tested besides the 2017/7/24 version also the 2017/7/21 version and more versions that I found in this thread.

Would be prepared to give up all other modules, if its needed to make Magic Folder Binder v2017.07.xx work ! Please !

Some more info :

getprop | grep sdcardfs returns emty

mount | grep sdcardfs shows that my SD is using sdcardfs (Sammy's seem have this by default)

Attached are the 2 logs I found in /cache/magisk right after install via manager and a restart.

There is certainly a problem shown in the first file :

<a lot of lines snipped>
I( 3137: 3370) ** late_start service mode running
I( 3137: 3370) * Running service.d scripts
I( 3137: 3370) * Running module service scripts
I( 3137: 3265) proc_monitor: zygote ns=mnt:[4026533594] zygote64 ns=mnt:[4026533595]
I( 3137: 3265) proc_monitor: com.google.android.gms.unstable (PID=7872 ns=mnt:[4026533879])
I( 7878: 7878) hide_utils: Re-linking /sbin
I( 3137: 3265) proc_monitor: com.google.android.gms.unstable (PID=14387 ns=mnt:[4026533786])
I(16026:16026) Create /data/magisk_merge.img with size 64M
E(16027:16027) execv failed with 13: Permission denied

Does the reconstruction from the final magisk.img always happen *after* re-linking /sbin ??
[Magisk] fhLan:
so should I just flash over or delete it first then install the update?
[Magisk] sonsonju:
request

Can you make it like xinternalsd, so it's easier to use
[Magisk] VR25:
@ pat357, sorry for the time! Have you tried installing another module AFTER updating Magisk to v13.3? Your logs suggest that the problem is in Magisk itself. I use the same version -- had no issues installing fbind through MagiskManager/TWRP.
[Magisk] VR25:
Deleting is unnecessary. Flash over, always.

That's on the to-do list already. There's no defined date to start working on it at this point though -- tight schedule & very bad internet connection. :(
[Magisk] fhLan:
Any plan to support system mode for non magisk user?
[Magisk] pat357:
Yes, I installed the "Audio mod library" and "Universal deep buffer remover" on Magisk 13.3 with Manager 5.1.1.

Are there maybe known issues with Module-updates on Magic 13.3/Manager 5.1.1. ? (5.1 had issues with that IIRC).

What other info could shed some more info on this ? A logcat ?

I tried to make a logcat like this:

1. logcat -c (clear buffers)

2. Installing module via Manager

3. Reboot as requested

4. logcat -f mylog.txt

I could be wrong, but it seems that I loose the part from the logcat before the boot this way.

Is the pre-reboot info thrown away after rebooting ?
[Magisk] VR25:
[MENTION=4970217]pat357[/MENTION], this scenario still looks very odd. Before going deep into the issue, lets test a possible cause -- re-download the module from here and see if it installs.
[Magisk] VR25:
I would do that if init.d worked on Nougat.
[Magisk] VR25:
Great News

The module is now available for download from Magisk Manager.
[Magisk] pat357:
After installing in MM and restarting phone the message "Module will be updated on next restart" is there again.

When I look in /Magic/fbind/ , I only see 2 files : update and module.prop.

Should services not be there too ?

Exactly the same output :

** late_start service mode running
* Running service.d scripts
* Running module service scripts
proc_monitor: zygote ns=mnt:[4026533594] zygote64 ns=mnt:[4026533595]
proc_monitor: com.google.android.gms.unstable (PID=7872 ns=mnt:[4026533879])
hide_utils: Re-linking /sbin
proc_monitor: com.google.android.gms.unstable (PID=14387 ns=mnt:[4026533786])
Create /data/magisk_merge.img with size 64M
execv failed with 13: Permission denied
[Magisk] Didgeridoohan:
It's a bug in the current module template, mainly experienced on Samsung devices. Flash in recovery instead until fixed.
[Magisk] pat357:
Thank you for your helping hand !

Unfortunately after flashing in TRWP, the phone doesn't boot anymore, always goes back tom recovery mode.

How can I go deeper in this ?
[Magisk] Didgeridoohan:
Use the Mount Magisk zip and then use the File manager in TWRP to delete the module. See if it boots up then.

Then, flash the module in recovery again, save the recovery log (Advanced - Copy log) and if it doesn't work post the log file.
[Magisk] pat357:
Here we go:
[Magisk] ogisha:
Hi [MENTION=5228676]VR25[/MENTION]!

Thank you for this module I was waiting for long time.

I have one problem. I did "from_to Download Download" and "su" followed by "fbind -mb".

Files were copied and I rebooted.

When I download files from any application, they are saved to internal instead to external sdcard.

What am I doing wrong?

Thank you.
[Magisk] Didgeridoohan:
I'm guessing the phone doesn't boot then... Your log doesn't really show anything.

Does the same happen with other modules?
[Magisk] pat357:
[MENTION=5228676]VR25[/MENTION] & Didgeridoohan :

I noticed something in the posted recovery.log ( https://xdaforums.com/attachment.php?attachmentid=4227149&d=1501357787 ) :

It seems that my extSDcard is exFAT formatted (it came pre-formatted).

Could this be the reason for not even being able to boot after installing though TWRP ?

Or would it just let it install, but simply not being able to do any bindings ?

What of the 2 above would be your best guess ? ;)

If only could knew beforehand formatting FAT32 would solve all problems with this module, I would already have started the exFAT - FAT32 conversion. :(

Thanks in advance for sharing your knowledge !
[Magisk] Sgt.7Eleven:
Samsung Galaxy S5 G901F, Stock Touchwiz MM 6.0, stock Kernel, MagiskSU MagiskXposed

I can't get it to mount properly. Wanna mount my Downloads folder, so did this:

from_to Download Download

I've got the images hidden in other apps where it doesn't bother me.

Using MTP to connect to my computer, I see the mounting properly, as it should be: intsd and extsd both have Download folder with content

But MiXplorer and any other file explorer sees nothing in intsd's Download.

If I browse root, the mount works on mnt/sdcard (internal storage) with download and its contents properly symlinked.

Overall:

Mounted properly in:

MTP (i.e. computer)

mnt/sdcard

Not mounted on:

storage/emulated/0

if I use chrome to download it goes to the empty Download folder instead of the extsd Download folder

any help?
[Magisk] VR25:
[MENTION=4970217]pat357[/MENTION], no, no, no, your sdcard filesystem has nothing to do with the issue!

Try the attached alternative installer.
[Magisk] VR25:
[MENTION=5174730]Sgt.7Eleven[/MENTION], open fbind_setup.txt, locate "internal_storage_path" and change the value /data/media/0 to /storage/emulated/0.
[Magisk] Sgt.7Eleven:
Sorry forgot to mention earlier, already did that first thing after reading through the first post :(
[Magisk] pat357:
Not at all. I've 5 other modules installed over time and without any problems.

(app systemizer, audio mod library, Busybox system-less (osmOsis), Universal deep buffer remover, VIPER4AndroidFX all these are working nicely together )

When I start thinking on what Magisk version I was at the time I installed these modules, I guess the audio mod library and Universal deep buffer remover are installed with Magisk 13.3, MM 5.1.1.

What's your idea about my extSDcard in exFAT instead of FAT32 : could be the cause that module break the boot process in such way that the phone can no longer boot ??

About the bug you've told me about in the v4 template that affects mostly Samsung Phones, how is it going to be solved ?

Every module maker has to update with a new template v5 -or- a work around in Magisk is implemented to prevent that all modules need to be updated again ?

---------- Post added at 11:04 PM ---------- Previous post was at 10:22 PM ----------

Hi VR25 !

Thanks for this dedicated test version !

MM said "not a Magisk Module", but TWRP flashed it without problems.

Unfortunately, same result : bootloop and phone goes to recovery.

I guess you directly copied the files to their destination as this time there were more files then before.

Mount Magisk -> delete fbind folder -> reboot -> OK
[Magisk] VR25:
Things are getting even more interesting and you're not giving up. I like that!

Try the two zips attached (TWRP only) and see if you still get a bootloop after each installation.
[Magisk] VR25:
The classic Samsung vs Magisk fight... ?

Should a verdict surface, I'll let you know right away. Meanwhile, see if there's anything else (i.e., tests) you can perform.
[Magisk] edomiredo:
i have a problem, first time i using this work good. (i bind data folder of Real Racing 3).

but now every time i open RR3 it now downloading the addition data again.

i checked the log but nothing wrong.

i want to upload the screenshot but i don't know how to. i'm using my phone to post this.

*sorry for my bad english
[Magisk] Didgeridoohan:
Try installing a couple of other modules, just in case...

Honestly... No idea. [MENTION=5228676]VR25[/MENTION] is much better suited for those kind of questions. :D I'm gonna follow this situation though. It'll be interesting to see if you can figure it out.

There's a possibility that all modules have to be updated again...
[Magisk] ogisha:
No answer!? :(

Any idea what should I do? :eek:

Thank you!
[Magisk] p50kombi:
https://xdaforums.com/showpost.php?p=73146913&postcount=284

Have you checked this :)
[Magisk] teddy0209:
The .fbind maybe?(from the op)... I'm not sure as I don't use from_to...[emoji28]
[Magisk] pat357:
Thank you !

Yeah ! I think you nailed it !

nr2 installs fine, no bootloop.

Do you also want me to test nr3 ?

PS: there is no fbind in neither off these archives !

What was the culprit ?
[Magisk] VR25:
No, if #2 installed fine, leave #3 alone. The culprit was Samsung security system.

fbind is not allowed to reside in /system/bin. For now, you have to run it from another directory when/if needed. Note: it is not needed for the core functions of the module to work. If you're fine with moving your data manually and editing fbind_setup.txt on a regular text editor, then you don't need the command line tool.

Otherwise, you can put fbind in your internal storage and execute it from there.

# Set permissions 777 or 755 (only needed once)
su
chmod 777 /sdcard/fbind

# Run (notice "./")
su
.//sdcard/fbind
[Magisk] 白い熊:
Just posting this in case it helps someone – Samsung Marshmallow device: I was getting first the folders mounted as zero–size files – than the mounts wouldn't bindmount etc.

This is what I had to do to fix it:

– set Global namespace in Magisk root mount options

– install and run SDFix from the Play Store – there's more of them – they all should do the same thing

– reboot

Now the module works fine, mounts everything, all's good.

Even though some apps don't see the mounts – some do, like Total Commander, but for instance Ghost Commander doesn't – so it is with other apps too. Most of them see the mounts, but some only see the empty dirs – something to do with the namespace probably...
[Magisk] pat357:
Thanks, this a more then workable solution for for me.

Just to make sure I get this right : you mean putting just the fbind script in the root from sdcard and leaving all other files in the directory /fbind on sdcard ?

Can you have a file and a directory with the same name (file fbind and directory fbind ?)

Observation : setting permission to 777 doesn't work on sdcard (things like ' chmod 777 /sdcard/fbind ' don't work for files on sdcard)

I probably can remove the find_ directory from sdcard, right ?

Can you also please post the "ready to go" fbind_setup.txt with the most common things already in ?

Thank you in advance !