Giter Club home page Giter Club logo

fbind's People

Contributors

vr-25 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

fbind's Issues

Unable to bind Android/data

Trying to use target "Android/data", but it doesnt mount.
No errors, no crashes, just didnt want to mount it, what can i possibly do wrong(Android 11)
Thank you in advance.

[Request] KSU Support

I hope next update support for KSU

Logs:

Fri Oct 27 16:36:21 WIB 2023
versionCode=202112070
849: grep -iq noAutoMount /data/adb/vr25/fbind-data/config.txt
850: apply_config
23: typeset 'i='
25: '[' -f /data/adb/vr25/fbind-data/config.txt ']'
26: grep -iq ^permissive /data/adb/vr25/fbind-data/config.txt
29: grep -q '^extsd_path ' /data/adb/vr25/fbind-data/config.txt
29: default_extsd
122: typeset 'df='
123: typeset 'dir='
124: typeset 'size=0'
125: typeset 'newSize=0'
126: false
126: wait_until_true grep -q /mnt/media_rw/ /proc/mounts
692: typeset '_='
693: '[' -n grep ']'
0: seq 100
695: eval grep -q /mnt/media_rw/ /proc/mounts
695: grep -q /mnt/media_rw/ /proc/mounts
696: false
697: sleep 3
699: set +x
127: grep -q /mnt/media_rw/ /proc/mounts
33: is_mounted /mnt/user/0/emulated
213: 2>/dev/null 
213: mountpoint -q /mnt/user/0/emulated
33: prefix=/mnt/user/0 
33: break
35: '[' -n /mnt/user/0 ']'
35: intsd=/mnt/user/0/emulated/0 
36: is_mounted
213: 2>/dev/null 
213: mountpoint -q ''
36: extsd=/mnt/user/0/emulated/0 
37: obb=/mnt/user/0/emulated/0/Android/obb 
38: extobb=/mnt/user/0/emulated/0/Android/obb 
40: >/dev/.vr25/fbind/tmpf 
40: grep -E '^extsd_path |^intsd_path |^part |^loop ' /data/adb/vr25/fbind-data/config.txt
41: . /dev/.vr25/fbind/tmpf
42: rm /dev/.vr25/fbind/tmpf
851: grep -Eq '^int_extf|^bind_mount |^obb.*|^from_to |^target ' /data/adb/vr25/fbind-data/config.txt
851: bind_mount_wrapper
77: false
103: '[' -n '' ']'
106: >/dev/.vr25/fbind/tmpf 
106: grep -E '^int_extf|^bind_mount |^obb|^from_to |^target ' /data/adb/vr25/fbind-data/config.txt
109: . /dev/.vr25/fbind/tmpf
1: bind_mount /mnt/user/0/emulated/0/Android/data/ir.ilmili.telegraph/files/Telegram /mnt/user/0/emulated/0/Telegram
47: typeset 'i='
48: is_mounted /mnt/user/0/emulated/0/Telegram
213: 2>/dev/null 
213: mountpoint -q /mnt/user/0/emulated/0/Telegram
49: false
53: wait_storage /mnt/user/0/emulated/0/Android/data/ir.ilmili.telegraph/files/Telegram /mnt/user/0/emulated/0/Telegram
682: echo /mnt/user/0/emulated/0/Android/data/ir.ilmili.telegraph/files/Telegram /mnt/user/0/emulated/0/Telegram
682: grep -Eq '/data/media/|/storage/emulated/|/mnt/user/0/'
683: wait_until_true
692: typeset '_='
693: '[' -n '' ']'
693: set -- grep -Eq \'' /storage/emulated (fuse|sdcardfs) '\' /proc/mounts
0: seq 100
695: eval grep -Eq \'' /storage/emulated (fuse|sdcardfs) '\' /proc/mounts
695: grep -Eq ' /storage/emulated (fuse|sdcardfs) ' /proc/mounts
695: break
685: echo /mnt/user/0/emulated/0/Android/data/ir.ilmili.telegraph/files/Telegram /mnt/user/0/emulated/0/Telegram
685: grep -q /mnt/media_rw/
55: mkdir -p /mnt/user/0/emulated/0/Android/data/ir.ilmili.telegraph/files/Telegram /mnt/user/0/emulated/0/Telegram
56: >/dev/null 
56: which bindfs
57: su -Mc bindfs -o nosuid,nodev,noexec,noatime,nonempty -u 0 -g 9997 -p a-rwx,ug+rw,ugo+X '--create-with-perms=a-rwx,ug+rw,ugo+X' --xattr-none --chown-ignore --chgrp-ignore --chmod-ignore '"/mnt/user/0/emulated/0/Android/data/ir.ilmili.telegraph/files/Telegram"' '"/mnt/user/0/emulated/0/Telegram"'
Unrecognized option: 'o'
KernelSU

Usage: su [options] [-] [user [argument...]]

Options:
    -c, --command COMMAND
                        pass COMMAND to the invoked shell
    -h, --help          display this help message and exit
    -l, --login         pretend the shell to be a login shell
    -p, --preserve-environment 
                        preserve the entire environment
    -s, --shell         use SHELL instead of the default /system/bin/sh
    -v, --version       display version number and exit
    -V                  display version code and exit
    -M, --mount-master  force run in the global mount namespace
60: echo '(i) Trying "mount -o bind"...'
(i) Trying "mount -o bind"...
61: mount -o bind '"/mnt/user/0/emulated/0/Android/data/ir.ilmili.telegraph/files/Telegram"' '"/mnt/user/0/emulated/0/Telegram"'
259: su -Mc /system/bin/mount -o rw,noatime -o bind '"/mnt/user/0/emulated/0/Android/data/ir.ilmili.telegraph/files/Telegram"' '"/mnt/user/0/emulated/0/Telegram"'
Unrecognized option: 'o'
KernelSU

Usage: su [options] [-] [user [argument...]]

Options:
    -c, --command COMMAND
                        pass COMMAND to the invoked shell
    -h, --help          display this help message and exit
    -l, --login         pretend the shell to be a login shell
    -p, --preserve-environment 
                        preserve the entire environment
    -s, --shell         use SHELL instead of the default /system/bin/sh
    -v, --version       display version number and exit
    -V                  display version code and exit
    -M, --mount-master  force run in the global mount namespace
259: 2>/dev/null 
66: is_mounted /mnt/user/0/emulated/0/Telegram
213: 2>/dev/null 
213: mountpoint -q /mnt/user/0/emulated/0/Telegram
69: rmdir /mnt/user/0/emulated/0/Telegram
110: rm /dev/.vr25/fbind/tmpf
111: rescan_media
600: </dev/null 
600: >/dev/null 
600: 2>&1 
600: /system/bin/am broadcast -a android.intent.action.MEDIA_MOUNTED -d file:///sdcard/ -p com.android.providers.media
113: false
852: grep -q '^remove ' /data/adb/vr25/fbind-data/config.txt
853: break
864: exit 0
864: exxit
180: typeset 'exitCode=0'
181: echo

182: 2>/dev/null 
182: rm /data/adb/vr25/fbind-data/.FUSE.tmp
183: exit 0

Does fbind support LUKS-encrypted images (as loop devices)?

Hey there,

I was wondering whether fbind supports mounting LUKS-encrypted disk images. I have the following config, but it does not seem to do anything:

loop /path/to/file.iso /storage/enc

Adding an --L argument to the above makes it work even less (mkdir errors pop up).

(Yes, I have downloaded and placed the cryptsetup binary in the required place)

Support Android 5?

I am using stock galaxy note 3,
looks like the mount syntax is not compatible. so not mount is working

Script doesn't work, nothing happens, terminal just hangs.

The script was successfully installed with Magisk 22.1.

At the terminal when fbind is run:

fbind

fbind -h

nothing happens, no output the terminal just hangs.

No other terminal commands work and the service with a simple config doesn't work either. I see a new version was recently released so I don't think this is a dead project but many of the telegram links are broken.

LineageOS 17.1
Magisk 20.4
fbind v2021.3.4
river

Some Notes after playing around with fbind

Hello,

Here is what I found after playing around with fbind, feel free to correct it if there is any mistake:

** fbind wizard's behavior:
In fbind wizard, there are 3 kinds of binding: Media, Non-media and OBB
There is no difference between Media, Non-media and OBB except the way wizard generates config.txt

Example:

  • When choosing Media, the next prompting will generate the below line in config.txt for user's input "myDir":
    from_to "myDir" ".fbind/myDir"
  • When choosing Non-media, the next prompting will generate the below line in config.txt for user's input "myDir":
    target "myDir"
    It is equivalent to:
    from_to "myDir" "myDir"
  • When choosing OBB, the next prompting will generate the below line in config.txt for user's input "myDir"
    obbf "myDir"
    It is equivalent to:
    from_to "Android/obb/myDir" "Android/obb/myDir"

** Here is the fbind wizard's behavior in comparison with fbind -m (fbind mount command)

  • fbind wizard's behavior
    With config from_to "myDir" "myDir":
    If there's existing "myDir" in ExternalSD, that "myDir" is renamed to "myDir.old", and then fbind will move intSD-"myDir" to extSD, and mount extSD-"myDir" to intSD-"myDir"

  • fbind -m (fbind mount command):
    With config from_to "myDir" "myDir"
    If there's existing "myDir" in InternalSD, that "myDir" is ignored, and then fbind will mount extSD-"myDir" to intSD-"myDir"

fbind doesn't work properly when the directory name contains spaces

It will prevent the applications from creating new files (write-protected), but OK for new folders.

This only happens when using sdcardfs mode. In FUSE mode, there is no problem, but FUSE mode tends to be slow for me.

Config I use:

from_to "WhatsApp Business" ".fbind/WhatsApp Business"

Screenshot_20200123-133729

Thank you!

fbind media option from menu deleted all files in destination folder

Well I manually created the .fbin/WhatApp/Media folders and moved all files before running fbind, then I launched fbind menu and used the "media" option and I typed WhatsApp/Media then it asked this: Move data & bind folders now (y/N)?
and I selected "y" but that deleted all existing files in the destination folder instead of merging them.

Request?

Bind /storage/2116-31F4/ -> /mnt/sdcard/something

storage/2116-31F4/ -> /storage/0/something

This is possible ? Just like folder mount or similar ?

I need to bind/mount a root/ folder to -> storage

Support for Android 10

Thank you @VR-25 for these awesome scripts/plugins you made. The plugin "fbind" is one of my most needed tweaks but it doesn't work on Android 10/SDK 29 - SM-G975F ๐Ÿ˜”
Would be really happy if you could update "fbind". All your tweaks are very needed ๐Ÿ˜‰

Big thank you
Greetings

(Sorry for misuse of the bug section)

Support for a11

Please add support for a11. Its not working with a11 because of google new storage policy..

Auto-mount not working on Android 12

I'm using android 12, Awaken ROM and whe I restart, I have to mount the folder manually, I've checked Auto-mount option and it's enabled, if you need further information, please tell me.
Thank you!

[Question] - fbind unmount-mount behavior

Hello,
Thank you for your awesome software!
I have some question about Unmout-Mount behavior.
Here are my observations, I am not sure if the behaviors are correct or not.

I am on Android 12, LineageOS 19.1
Say if I have:

  • At first, fbind did NOT start, the folder was NOT mounted.
  • Config.txt: from_to "myDir" "myDir"
  • imyDir is short-name for "myDir" in Internal SD card. imyDir contains file intSD.txt
  • emyDir is short-name for "myDir" in external SD card. emyDir contains file extSD.txt

1> If I run fbind -m, both imyDir and emyDir now contains extSD.txt.
Question1: What happened to intSD.txt? Was it removed?

2> If then I run fbind -u + fbind -m or just fbind -um, I got error.

:/data/data/com.termux/files/home # fbind -u

Unmounting...

<...emulated/0/myDir>                             
- Done

:/data/data/com.termux/files/home # fbind -m

Bind-mounting...

</mnt/media_rw/430B-16F1/myDir> </mnt/user/0/emulated/0/myDir>
Failed to resolve mount point `/mnt/user/0/emulated/0/myDir': Transport endpoint is not connected
(i) Trying "mount -o bind"...
losetup: invalid option -- s
BusyBox v1.34.1-Magisk (2022-03-22 04:11:29 PDT) multi-call binary.

Usage: losetup [-rP] [-o OFS] {-f|LOOPDEV} FILE: associate loop devices
        losetup -c LOOPDEV: reread file size
        losetup -d LOOPDEV: disassociate
        losetup -a: show status
        losetup -f: show next free loop device

        -o OFS  Start OFS bytes into FILE
        -P      Scan for partitions
        -r      Read-only
        -f      Show/use next free loop device
mount: losetup failed 1

- Done

:/data/data/com.termux/files/home #

Question2: Is this the expected behavior?

3> I then went to "Internal SD card" and saw a file "myDir". Yes, it's a file, not a folder.

myDir

I deleted it. And after like 3 seconds , magic happened, the imyDir folder re-appeared out of nowhere with intSD.txt inside.
Apparently, the intSD.txt from question1 did not get removed, it was just hidden somewhere.
Question3: Is it the correct behavior?

Now, after deleted the file myDir, I am able to do fbind -m, and again intSD.txt was hidden somewhere (maybe?)

Support for FBE or FDE on external sd card ?

Some old devices have built-in feature to encrypt external sd card, but it seems devices shipped with FBE don't have this feature. I know I can add part /dev/block/mmcblk1p2--L,KEY /mnt/mmcblk1p2 to /data/adb/fbind/config.txt, but this file is is in device-encrypted (DE) storage, not CE, so it is not password-protected. I can read this file without password in twrp.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.