Search This thread

VR25

Senior Member
Apr 20, 2013
2,008
4,890
github.com
Last edited:

VR25

Senior Member
Apr 20, 2013
2,008
4,890
github.com
Archive
 

Attachments

  • fbind-2018.1.13.zip
    416.2 KB · Views: 1,363
  • fbind-2018.1.13-1.zip
    416.1 KB · Views: 331
  • fbind-2018.1.27.zip
    416 KB · Views: 141
  • fbind-2018.1.29.zip
    416.7 KB · Views: 102
  • fbind-2018.1.29-1.zip
    416.7 KB · Views: 87
  • fbind-2018.1.30.zip
    416.7 KB · Views: 117
  • fbind-2018.1.31.zip
    416.7 KB · Views: 1,080
  • Magic_Folder_Binder_(fbind)-2018.3.6.zip
    774.5 KB · Views: 679
  • fbind-2018.7.24.zip
    1.4 MB · Views: 250
  • fbind-2018.8.1.zip
    1.4 MB · Views: 188
  • fbind-2018.8.10.zip
    1.4 MB · Views: 151
  • fbind-2018.8.10-1.zip
    1.4 MB · Views: 768
  • fbind-2018.8.29.zip
    2.1 MB · Views: 125
  • fbind-2018.10.30.zip
    2.1 MB · Views: 168
  • fbind-2018.11.2.zip
    2.1 MB · Views: 401
  • fbind-2018.12.3.zip
    1.4 MB · Views: 188
  • fbind-2018.12.4.zip
    1.4 MB · Views: 939
  • fbind-2019.1.23.zip
    1.4 MB · Views: 5,201
Last edited:

khnoizer

Senior Member
Sep 14, 2016
436
131
Malang
Sweet, so this one will start binding automatically on reboot huh? Gonna try. :)

UPDATE:
Doesn't work mate, i tried "$bind $extsd/mangabird $intsd/mangabird", but it says "/mangabird: not found". The log said "sdcard not found".
 
Last edited:

koko115

Senior Member
Jul 1, 2012
1,826
334
For me to no working. Log says all ok. But when i copy some to internal Download, i dont see this file in external Download.

$bind $extsd/.fbind/Download $intsd/Download

Lig:
>>> FOLDER BINDER DEBUG LOG > Thu Jun 15 01:51:22 CEST 2017
Configuration updated. Reboot to apply changes. > Thu Jun 15 01:51:22 CEST 2017

I reboot twice.
 
  • Like
Reactions: androidfreak007

VR25

Senior Member
Apr 20, 2013
2,008
4,890
github.com
Sweet, so this one will start binding automatically on reboot huh? Gonna try. :)

UPDATE:
Doesn't work mate, i tried "$bind $extsd/mangabird $intsd/mangabird", but it says "/mangabird: not found". The log said "sdcard not found".
Ok, your issue is simple, mate. If the log says, "SD card not found! Aborting..." try a higher number of seconds. That means your device just takes a little bit longer to mount the external SD card. I've added several zips, each with a different number of seconds to the Downloads page. Try the 15 seconds variant. As you may have noticed, the sooner the bind is performed, the better. I'm currently working on a way to automate that and have only one variant for all devices, regardless of mounting time.

For me to no working. Log says all ok. But when i copy some to internal Download, i dont see this file in external Download.

$bind $extsd/.fbind/Download $intsd/Download

Log:
>>> FOLDER BINDER DEBUG LOG > Thu Jun 15 01:51:22 CEST 2017
Configuration updated. Reboot to apply changes. > Thu Jun 15 01:51:22 CEST 2017

I reboot twice.
Hmm... have you created the target folders manually in the external SD card? @khnoizer, see here? In his case, the SD card is mounted within the 10 seconds mark. Thanks both of you for the reports.
 
Last edited:
  • Like
Reactions: khnoizer

khnoizer

Senior Member
Sep 14, 2016
436
131
Malang
I got permission denied or write error when saving my edited fbind_list.txt on various text editor. Any suggestions?
 

VR25

Senior Member
Apr 20, 2013
2,008
4,890
github.com
I got permission denied or write error when saving my edited fbind_list.txt on various text editor. Any suggestions?
You can copy the file to another location, edit it, then replace the old one. Alternatively, running chmod 777 /data/media/0/fbind_list.txt in a terminal emulator before edition the file should also help. The next version will fix fbind_list.txt permissions automatically upon installation.

Edit: @khnoizer, I use QuickEdit. It asks for root permission in your case to work properly.

Edit 2: sorry, the link is fixed now.
 
Last edited:
  • Like
Reactions: khnoizer

vikasb32

Recognized Themer
May 9, 2011
2,057
1,999
Hardwar
OnePlus 6
@op can you tell me if I bind my download folder(size 5gb) then my internal memory in storage settings will show less then 5gb size or stroage setting still include 5gb in total used memory?
 

khnoizer

Senior Member
Sep 14, 2016
436
131
Malang
The new version are great, thank you. However, when I tried to bind my android/obb folder, it does got mounted at data/media/0/android/obb, but It's empty at mnt/storage/emulated/0/android/obb. And when I tried to play some games they asked me to download their obb files.
 
  • Like
Reactions: VR25

VR25

Senior Member
Apr 20, 2013
2,008
4,890
github.com
The new version are great, thank you. However, when I tried to bind my android/obb folder, it does got mounted at data/media/0/android/obb, but It's empty at mnt/storage/emulated/0/android/obb. And when I tried to play some games they asked me to download their obb files.
Here's what you need to do to bind OBB:

1. Install the OBB fix update

2. You don't need to copy your setup to the newer fbind_list.txt this time. Just delete that file and rename your previous_fbind_list.txt back to fbind_list.txt (there are no changes in the template. I just forgot to disable the auto backup/renaming)

3. Add the following lines to fbind_list.txt:
Code:
$bind $extd/Android/obb/YourAppOrGameOBBFolder $obb/YourAppOrGameOBBFolder
$bind $extd/Android/obb/YourAppOrGameOBBFolder $intsd/Android/obb/YourAppOrGameOBBFolder
Or, if you want to bind the entire OBB folder, the following lines are already present in the template (fbind_list.txt) by default:
Code:
$bind $extd/Android/obb $obb
$bind $extd/Android/obb $intsd/Android/obb
4. Reboot


That's a lot of text, I know. Everything will be much simpler in the next version. Stay tuned!
 
Last edited:

VR25

Senior Member
Apr 20, 2013
2,008
4,890
github.com
@op can you tell me if I bind my download folder(size 5gb) then my internal memory in storage settings will show less then 5gb size or storage setting still include 5gb in total used memory?
That's still an ongoing issue, unfortunately. However, it has nothing to do with the module. Rather, that's a system problem, since other apps don't misreport storage space. I'll look for a workaround.

Edit: I forgot to say that you mentioned the wrong person. "op" shouldn't be there! :p
 
Last edited:
  • Like
Reactions: vikasb32

cantenna

Senior Member
Aug 5, 2012
2,349
566
Newcastle
Add this line to fbind_list.txt:

Or, if you want to bind the entire OBB folder, add this one instead:

Thank you for the help :)

i tried your fix, for pairing entire obb, internal pairs to extsd but /sdcard/Android/obb appears to have vanished but I believe it is there because trying to re-create directory results in an error. if I start up a game however, it aplears to be aware of the game data existence but the game freezes. strange?

let me know is you need any specific files, perhaps fstab?
 
  • Like
Reactions: VR25

VR25

Senior Member
Apr 20, 2013
2,008
4,890
github.com
Thank you for the help :)

i tried your fix, for pairing entire obb, internal pairs to extsd but /sdcard/Android/obb appears to have vanished but I believe it is there because trying to re-create directory results in an error. if I start up a game however, it aplears to be aware of the game data existence but the game freezes. strange?

let me know is you need any specific files, perhaps fstab?
I PM'ed you. Check post #15 for more info. Should I need fstab, I'll ask here. Thanks for the report!
 
Last edited:

vikasb32

Recognized Themer
May 9, 2011
2,057
1,999
Hardwar
OnePlus 6
That's still an ongoing issue, unfortunately. However, it has nothing to do with the module. Rather, that's a system problem, since other apps don't misreport storage space. I'll look for a workaround.

Edit: I forgot to say that you mentioned the wrong person. "op" shouldn't be there! :p
Can you tell me any app which show me my exact free space of internal memory not including bind folders?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 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 :)