-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Ability to specify the emulated storage path prefix to use (details in readme > config syntax) - Android 11 testing kit in the flashable zip - General enhancements
- Loading branch information
Showing
9 changed files
with
166 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Android uses runtime "views" to manage storage access permissions. | ||
|
||
Android 11 introduced new paths and we need to test those. | ||
|
||
This directory contains a test config file for fbind and a standalone script to replicate what fbind does with that config. | ||
Pick one. | ||
|
||
The default prefix used by fbind and that script is /mnt/runtime/write. | ||
It works on Android 6.0.1-10. | ||
|
||
The standalone script should be placed in `/data/adb/service.d` with read and execute permissions. | ||
For now, a reboot is required after changing the prefix value. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# /data/adb/vr25/fbind-data/config.txt | ||
|
||
# do not modify the next 3 lines | ||
part /dev/block/mmcblk1p1 /mnt/extsd | ||
extsd_path /mnt/extsd | ||
bind_mount $extsd $intsd/.extsd | ||
|
||
# your customization goes below | ||
#prefix=/mnt/runtime/write | ||
prefix=/mnt/runtime/full | ||
#prefix=/mnt/pass_through/0 | ||
#from_to WhatsApp .fbind/WhatsApp | ||
#from_to Download .fbind/Download |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/system/bin/sh | ||
# this is a bind mount test script | ||
# vr25 | ||
|
||
: ${sd_partition:=/dev/block/mmcblk1p1} | ||
: ${mnt_opts_fat:=nosuid,nodev,noexec,noatime,context=u:object_r:sdcardfs:s0,uid=0,gid=9997,fmask=0117,dmask=0006} | ||
: ${prefix:=/mnt/runtime/write} | ||
#: ${prefix:=/mnt/runtime/full} | ||
#: ${prefix:=/mnt/pass_through/0} | ||
: ${internal:=$prefix/emulated/0} | ||
: ${external:=/mnt/extsd} | ||
|
||
# replace "each" space character with -- | ||
: ${bonds:=#$external/.WhatsApp==$internal/WhatsApp | ||
#$external/.random--dir==$internal/random--dir} | ||
|
||
bind() { | ||
mkdir -p "$@" | ||
mount -o bind "$@" | ||
} | ||
|
||
mount() { | ||
su -Mc /system/bin/mount "$@" | ||
} | ||
|
||
while [ ! -b $sd_partition ]; do sleep 2; done | ||
fs=$(blkid $sd_partition | sed 's/.*TYPE=\"\(.*\)\".*/\1/') | ||
echo "$fs" | grep -q 'fat$' || exit | ||
|
||
mkdir -p $external | ||
! mountpoint -q $external && mount -t $fs -o $mnt_opts_fat $sd_partition $external || exit | ||
|
||
bonds="$(echo "$bonds" | grep -Ev '^$|^#')" | ||
for i in $external==$internal/.extsd $bonds; do | ||
i1="$(echo $i | sed -e 's/==.*//' -e 's/--/ /g')" | ||
i2="$(echo $i | sed -e 's/.*==//' -e 's/--/ /g')" | ||
umount -f "$i2" 2>/dev/null | ||
bind "$i1" "$i2" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
id=vr25.fbind | ||
name=fbind | ||
version=v2021.11.11-beta | ||
versionCode=202111110 | ||
version=v2021.11.13-beta | ||
versionCode=202111130 | ||
author=VR25 @ xda-developers | ||
description=fbind is a versatile mounting utility for folders, disk images, LUKS/LUKS2 encrypted volumes, regular partitions and more. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
#!/usr/bin/env sh | ||
|
||
echo | ||
trap 'e=$?; echo; exit $e' EXIT | ||
cd "${0%/*}" 2>/dev/null | ||
zip -r9 fbind-$(date +%Y%m%d%H%M%S).zip * .git* -x \*.zip -x .git/\* -x _misc/\* | ||
|
||
sh -n system/bin/fbind && { | ||
filename=fbind-$(date +%Y.%m.%d.%H.%M.%S).zip | ||
echo $filename | ||
mkdir -p _builds | ||
zip -r9 _builds/$filename * .git* -x \*.zip -x .git/\* -x _misc/\* | ||
} |