[Module] ts-binds (Abandoned)

Search This thread

TechnoSparks

Senior Member
Mar 9, 2014
1,434
820
24
Selangor
www.technosparks.net
ts-binds
ts-binds basically make use of “bind” parameter of the “mount” available in your Android environment

Development Abandoned!
This project has been abandoned. This is because I personally do not require ts-binds anymore. Refer announcement post here: https://forum.xda-developers.com/showpost.php?p=79150883&postcount=237

What does it do
Essentially, this "binding" method is widely used to save space on internal storage!

Derived from a very long-living trick for users who are struggling with the internal storage space available on their phones, while at the same time has the benefit of inserting an SD card, ts-binds will make use of already available functions on your device, to mirror a path to another path, effectively making both paths indistinguishable.

For example, if you mirror the `Download` folder on Internal with the `Stuff from Internet` folder on your SD Card, the same list of cat pictures will be shown on both directories when navigated via a file manager, and any changes will take effect on both paths but only the folder in the external path is physically modified.

This saves space because the files physically reside on the external storage instead of internal storage.

Further read
To maintain a similar "Description" of the module, I had to trim down the OP of the thread. There are a total of 3 places where I host the module's description :eek: To read documentation, please go to my website :)

Alternative modules with the same purpose

Links
 
Last edited:

ogisha

Senior Member
May 24, 2012
493
308
Hi @TechnoSparks!
I have the following problem:

I had set folder list line like this:

folderbind ogi "$sd/Ogi" "$int/Ogi"

and after reboot my log file looks like this:

Log initialised at: Sat Aug 12 19:50:30 CEST 2017


2017-08-12 19:50:30:
Difference found between cached and original user list

2017-08-12 19:50:30:
Updated cached list

2017-08-12 19:50:30:
sdcard 7788-9789 mounted

2017-08-12 19:50:30:
Binding all entries

2017-08-12 19:50:31:
Bind aborted: Folder '/mnt/media_rw/7788-9789/Ogi' as source doesn't exist!

2017-08-12 19:50:31:
All entries were processed

2017-08-12 19:50:31:
Script execution completed

What could be wrong?

Thank you. :eek:

---------- Post added at 06:58 PM ---------- Previous post was at 06:57 PM ----------

Hi @TechnoSparks!
I have the following problem:

I had set folder list line like this:

folderbind ogi "$sd/Ogi" "$int/Ogi"

and after reboot my log file looks like this:

Log initialised at: Sat Aug 12 19:50:30 CEST 2017


2017-08-12 19:50:30:
Difference found between cached and original user list

2017-08-12 19:50:30:
Updated cached list

2017-08-12 19:50:30:
sdcard 7788-9789 mounted

2017-08-12 19:50:30:
Binding all entries

2017-08-12 19:50:31:
Bind aborted: Folder '/mnt/media_rw/7788-9789/Ogi' as source doesn't exist!

2017-08-12 19:50:31:
All entries were processed

2017-08-12 19:50:31:
Script execution completed

What could be wrong?

Thank you. :eek:

BTW, both folders exist.
 
  • Like
Reactions: TechnoSparks

TechnoSparks

Senior Member
Mar 9, 2014
1,434
820
24
Selangor
www.technosparks.net
Hi @TechnoSparks!
I have the following problem:

I had set folder list line like this:

folderbind ogi "$sd/Ogi" "$int/Ogi"

and after reboot my log file looks like this:

Log initialised at: Sat Aug 12 19:50:30 CEST 2017


2017-08-12 19:50:30:
Difference found between cached and original user list

2017-08-12 19:50:30:
Updated cached list

2017-08-12 19:50:30:
sdcard 7788-9789 mounted

2017-08-12 19:50:30:
Binding all entries

2017-08-12 19:50:31:
Bind aborted: Folder '/mnt/media_rw/7788-9789/Ogi' as source doesn't exist!

2017-08-12 19:50:31:
All entries were processed

2017-08-12 19:50:31:
Script execution completed

What could be wrong?

Thank you. :eek:

---------- Post added at 06:58 PM ---------- Previous post was at 06:57 PM ----------



BTW, both folders exist.

Hello

This seems to be a very odd issue, but it could be that ts-binds cannot access the folder via the hardcoded address of "/mnt/media_rw/". this is a perfect opportunity for me to troubleshoot this. Thank you for the report.

It would be great if you could run these commands (without the hashtags) on your terminal emulator and report back with the output (whether text or screenshots, your choice):
Code:
# if [ -d "/storage/7788-9789/Ogi" ]; then echo Exists; else echo Nope; fi
# ls -a1 /mnt

it would also be a great addition if you could copy the file "/proc/mounts" and attach it here.

And may I know what device are you using and the respective ROM version?
 
  • Like
Reactions: ogisha

ogisha

Senior Member
May 24, 2012
493
308
Hello

This seems to be a very odd issue, but it could be that ts-binds cannot access the folder via the hardcoded address of "/mnt/media_rw/". this is a perfect opportunity for me to troubleshoot this. Thank you for the report.

It would be great if you could run these commands (without the hashtags) on your terminal emulator and report back with the output (whether text or screenshots, your choice):


it would also be a great addition if you could copy the file "/proc/mounts" and attach it here.

And may I know what device are you using and the respective ROM version?

Commands' output:

HWEVA:/ $ su
HWEVA:/ # if [ -d "/storage/7788-9789/Ogi" ]; then echo Exisge/7788-9789/Ogi" ]; then echo Exists; else echo Nope ; fi <
Nope
HWEVA:/ # ls -a1 /mnt
.
..
appfuse
asec
expand
ext_sdcard
media_rw
obb
runtime
sdcard
secure
user
HWEVA:/ #

mounts file attached:

https://mega.nz/#!VF8wHIAb!hVPzmAVoBEWhLUehostkfb7kXOAELVA4iSsqMiooY3E

Device's information:

BOARD
EVA-L09
BOOTLOADER
unknown
BRAND
HUAWEI
CPU_ABI
arm64-v8a
DEVICE
HWEVA
DISPLAY
EVA-L09C432B386
FINGERPRINT
HUAWEI/EVA-L09/HWEVA:7.0/HUAWEIEVA-L09/C432B386:user/release-keys
HARDWARE
hi3650
HOST
wuhjk0154cna
ID
HUAWEIEVA-L09
MANUFACTURER
HUAWEI
MODEL
EVA-L09
PRODUCT
EVA-L09
SERIAL
MWS7N17104001072
TAGS
release-keys
TYPE
user
UNKNOWN
unknown
USER
test
CODENAME
REL
INCREMENTAL
C432B386
RELEASE
7.0
SDK_INT
24
RADIO
21.258.05.00.030

Root Access:
Access Granted
SU:
su found
UID/GID:
uid=0(root)
gid=0(root)
groups=0(root)
context=u:r:su:s0
Utils:
busybox
toybox
toolbox
Path:
/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin:/system/vendor/bin:/vendor/xbin:/system/vendor/xbin:/product/bin:/product/xbin

Path:
/sbin/
Version:
13.3:MAGISKSU (topjohnwu)
Permissions:
rwxrwxrwx
Owner:
root:root
SELinux:
Enforcing

Path:
[/system/xbin/]
Permissions:
r-xr-xr-x
Owner:
root:shell

Thank you!
 

TechnoSparks

Senior Member
Mar 9, 2014
1,434
820
24
Selangor
www.technosparks.net
Commands' output:

HWEVA:/ $ su
HWEVA:/ # if [ -d "/storage/7788-9789/Ogi" ]; then echo Exisge/7788-9789/Ogi" ]; then echo Exists; else echo Nope ; fi <
Nope
HWEVA:/ # ls -a1 /mnt
.
..
appfuse
asec
expand
ext_sdcard
media_rw
obb
runtime
sdcard
secure
user
HWEVA:/ #

mounts file attached:

https://mega.nz/#!VF8wHIAb!hVPzmAVoBEWhLUehostkfb7kXOAELVA4iSsqMiooY3E

Device's information:

BOARD
EVA-L09
BOOTLOADER
unknown
BRAND
HUAWEI
CPU_ABI
arm64-v8a
DEVICE
HWEVA
DISPLAY
EVA-L09C432B386
FINGERPRINT
HUAWEI/EVA-L09/HWEVA:7.0/HUAWEIEVA-L09/C432B386:user/release-keys
HARDWARE
hi3650
HOST
wuhjk0154cna
ID
HUAWEIEVA-L09
MANUFACTURER
HUAWEI
MODEL
EVA-L09
PRODUCT
EVA-L09
SERIAL
MWS7N17104001072
TAGS
release-keys
TYPE
user
UNKNOWN
unknown
USER
test
CODENAME
REL
INCREMENTAL
C432B386
RELEASE
7.0
SDK_INT
24
RADIO
21.258.05.00.030

Root Access:
Access Granted
SU:
su found
UID/GID:
uid=0(root)
gid=0(root)
groups=0(root)
context=u:r:su:s0
Utils:
busybox
toybox
toolbox
Path:
/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin:/system/vendor/bin:/vendor/xbin:/system/vendor/xbin:/product/bin:/product/xbin

Path:
/sbin/
Version:
13.3:MAGISKSU (topjohnwu)
Permissions:
rwxrwxrwx
Owner:
root:root
SELinux:
Enforcing

Path:
[/system/xbin/]
Permissions:
r-xr-xr-x
Owner:
root:shell

Thank you!

EDIT: never mind, when i return from work today i will create an exclusive simple troubleshooting script for you! ;) This is to ease the troubleshooting.

----

I have to say something weird is happening. The terminal should say the directory exists on the location i mentioned.

From the way you present your things, it seemed that you know what you are doing and is good with terminal. Could you report if you can "ls Ogi" when you changed the working directory to "/mnt/media_rw/7788-9789", "/storage/7788-9789" and "/mnt/ext_sdcard"?

Out of curiosity, I have seen issues in regards to sdcardfs with Magic Folder Binder module, and is wondering if your issue also has to do with it. Please run "grep sdcardfs /system/build.prop" and return me the output. Just some extra for fun note: My module isn't really ready to handle issues with sdcardfs and i may need to implement Magic Folder Binder's methods (persist off for build prop entry)

Also make sure the Ogi folder still exists tho lel ?

Sorry for having the commands not enclosed in the code tags. I am replying to this on the go
 
Last edited:
  • Like
Reactions: ogisha

ogisha

Senior Member
May 24, 2012
493
308
EDIT: never mind, when i return from work today i will create an exclusive simple troubleshooting script for you! ;) This is to ease the troubleshooting.

Thanks. ?

--

I have to say something weird is happening. The terminal should say the directory exists on the location i mentioned. From the way you present your things, it seemed that you know what you are doing and is good with terminal. Could you report if you can "ls Ogi" when you changed the working directory to "/mnt/media_rw/7788-9789", "/storage/7788-9789" and "/mnt/ext_sdcard"?

--

Here comes the output:

HWEVA:/ $ su
HWEVA:/ # cd /mnt/media_rw/7788-9789
sh: cd: /mnt/media_rw/7788-9789: No such file or directory
2|HWEVA:/ # cd /storage/7788-9789
sh: cd: /storage/7788-9789: No such file or directory
2|HWEVA:/ # cd /mnt/ext_sdcard
HWEVA:/mnt/ext_sdcard # ls Ogi
HWEVA:/mnt/ext_sdcard #

BTW, both Ogi folders are empty.

--

Out of curiosity, I have seen issues in regards to sdcardfs with Magic Folder Binder module, and is wondering if your issue also has to do with it.

--

Magic Folder Binder did not work for me.
The developer was not interested in investigating the problem. ?

--

Please run "grep sdcardfs /system/build.prop" and return me the output. Just some extra for fun note: My module isn't really ready to handle issues with sdcardfs and i may need to implement Magic Folder Binder's methods (persist off for build prop entry)

--

Here comes the output:

HWEVA:/ $ su
HWEVA:/ # grep sdcardfs /system/build.prop
1|HWEVA:/ #

--

Also make sure the Ogi folder still exists tho lel ?

--

Yeah, both do and both are empty. ?

--

Sorry for having the commands not enclosed in the code tags. I am replying to this on the go

--

No problem at all. ?

Thank you. ?
 
Last edited:
  • Like
Reactions: TechnoSparks

TechnoSparks

Senior Member
Mar 9, 2014
1,434
820
24
Selangor
www.technosparks.net
Thanks.

--

I have to say something weird is happening. The terminal should say the directory exists on the location i mentioned. From the way you present your things, it seemed that you know what you are doing and is good with terminal. Could you report if you can "ls Ogi" when you changed the working directory to "/mnt/media_rw/7788-9789", "/storage/7788-9789" and "/mnt/ext_sdcard"?

--

Here comes the output:

HWEVA:/ $ su
HWEVA:/ # cd /mnt/media_rw/7788-9789
sh: cd: /mnt/media_rw/7788-9789: No such file or directory
2|HWEVA:/ # cd /storage/7788-9789
sh: cd: /storage/7788-9789: No such file or directory
2|HWEVA:/ # cd /mnt/ext_sdcard
HWEVA:/mnt/ext_sdcard # ls Ogi
HWEVA:/mnt/ext_sdcard #

BTW, both Ogi folders are empty.

--

Out of curiosity, I have seen issues in regards to sdcardfs with Magic Folder Binder module, and is wondering if your issue also has to do with it.

--

Magic Folder Binder did not work for me.
The developer was not interested in investigating the problem.

--

Please run "grep sdcardfs /system/build.prop" and return me the output. Just some extra for fun note: My module isn't really ready to handle issues with sdcardfs and i may need to implement Magic Folder Binder's methods (persist off for build prop entry)

--

Here comes the output:

HWEVA:/ $ su
HWEVA:/ # grep sdcardfs /system/build.prop
1|HWEVA:/ #

--

Also make sure the Ogi folder still exists tho lel

--

Yeah, both do and both are empty.

--

Sorry for having the commands not enclosed in the code tags. I am replying to this on the go

--

No problem at all.

Thank you.

Thank you for the output. It seemed that I may have found the issue. My script unreliably pulled the wrong sdcard serial ID when the "grep"ing was run. In your mounts the line:
Code:
/dev/block/bootdevice/by-name/system /dev/magisk/dummy/system/bin/79b77788-9789-4a7a-a2be-b60155eef5f4.sec ext4 ro,seclabel,relatime,data=ordered 0 0
came first before the sdcard mounting line:
Code:
/dev/block/vold/public:179:193 /mnt/media_rw/7EB2-43FD vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0

The first line contains sequences of which matches my regular expression here:
Code:
sdname=$(grep -m 1 -Eo "[0-9A-F]{4}-[0-9A-F]{4}" /proc/mounts)

Possible fix: Reliably get the whole "media_rw" line before extracting SD card's serial

Please test the following pre-release: https://drive.google.com/file/d/0ByQKilNkFEpAaW02RGJoRUZGcUU/view?usp=sharing
 
  • Like
Reactions: ogisha

ogisha

Senior Member
May 24, 2012
493
308
Thank you for the output. It seemed that I may have found the issue. My script unreliably pulled the wrong sdcard serial ID when the "grep"ing was run. In your mounts the line:

came first before the sdcard mounting line:


The first line contains sequences of which matches my regular expression here:


Possible fix: Reliably get the whole "media_rw" line before extracting SD card's serial

Please test the following pre-release: https://drive.google.com/file/d/0ByQKilNkFEpAaW02RGJoRUZGcUU/view?usp=sharing

Thank you. I have tested it. Log file now looks like this:

-----
Log initialised at: Tue Aug 15 19:30:54 CEST 2017


2017-08-15 19:30:55:
Cached the user list
-----

Anything I copy to internal Ogi folder does not show up in external Ogi folder. ?

Thank you again. ??
 

TechnoSparks

Senior Member
Mar 9, 2014
1,434
820
24
Selangor
www.technosparks.net
Thank you. I have tested it. Log file now looks like this:

-----
Log initialised at: Tue Aug 15 19:30:54 CEST 2017


2017-08-15 19:30:55:
Cached the user list
-----

Anything I copy to internal Ogi folder does not show up in external Ogi folder.

Thank you again.

Thank you for the report again and apologies for the new issue. I have able to pinpoint the issue and it seems to be a grammar error for bash.

I have corrected the issue and this is another test package for you to test: https://drive.google.com/open?id=0ByQKilNkFEpAaW02RGJoRUZGcUU

The reason why the content didn't show up was because no binding process were made. As you can see in the log, there is no "Binding all entries". Hopefully this one will finally squash the issue!

As you may notice, the "beta" also contains some changes, mainly just some cleanup and a new description.
 
Last edited:
  • Like
Reactions: ogisha

ogisha

Senior Member
May 24, 2012
493
308
Thank you for the report again and apologies for the new issue. I have able to pinpoint the issue and it seems to be a grammar error for bash.

I have corrected the issue and this is another test package for you to test: https://drive.google.com/open?id=0ByQKilNkFEpAaW02RGJoRUZGcUU

The reason why the content didn't show up was because no binding process were made. As you can see in the log, there is no "Binding all entries". Hopefully this one will finally squash the issue!

As you may notice, the "beta" also contains some changes, mainly just some cleanup and a new description.

Everything went fine according to log file.

Now Ogi folder on internal sdcard has disappeared and file 0 bytes long named Ogi appeared.

Folder Ogi on external sdcard stayed untouched.

Thanks again. ?
 
  • Like
Reactions: 300

TechnoSparks

Senior Member
Mar 9, 2014
1,434
820
24
Selangor
www.technosparks.net
Everything went fine according to log file.

Now Ogi folder on internal sdcard has disappeared and file 0 bytes long named Ogi appeared.

Folder Ogi on external sdcard stayed untouched.

Thanks again.

This is abnormal. :( For the first patch, I could blame myself for not testing it myself before publishing it to you. The reason was because i did a simple test on the terminal on nested command substitution ( $() ) and it worked, so I called it a job done. However I didn't expect it to not work if the nested command substitution is placed as a conditional, hence the past issue. The second revision fixed this by well, not using nested command substitution. The second version is personally tested and my folders are now binded correctly and working as expected like 1.0.4

Also, please tell me what file manager are you using.

I think this must have to do with the ROM or the kernel, since the modifications that I did to try to fix your previous issues was just related to how SD card serial ID is pulled. Let's check if the system recognises the folder via terminal.
Code:
cd /storage/emulated/0
ls -al | grep Ogi

check if the output is similar to this:
Code:
drwxrwx--x  1 root sdcard_rw 131072 2017-08-17 04:25 Ogi

Emphasis on the "drwxr-xr-x". If yours is similar, then continue below. Otherwise please report that it didnt.

Great! It seems that most probably it has something to do with the ROM, but not with the kernel. Next, I'd like for you to "cd" into it, then create a text file by running this simple line:
Code:
echo date > text.txt
Now, check if the text file exists on SD Card folder, by using a file manager.
 
Last edited:

ogisha

Senior Member
May 24, 2012
493
308
This is abnormal. :( For the first patch, I could blame myself for not testing it myself before publishing it to you. The reason was because i did a simple test on the terminal on nested command substitution ( $() ) and it worked, so I called it a job done. However I didn't expect it to not work if the nested command substitution is placed as a conditional, hence the past issue. The second revision fixed this by well, not using nested command substitution. The second version is personally tested and my folders are now binded correctly and working as expected like 1.0.4

Also, please tell me what file manager are you using.

I think this must have to do with the ROM or the kernel, since the modifications that I did to try to fix your previous issues was just related to how SD card serial ID is pulled. Let's check if the system recognises the folder via terminal.


check if the output is similar to this:


Emphasis on the "drwxr-xr-x". If yours is similar, then continue below. Otherwise please report that it didnt.

I am using MiXplorer file manager. I had tried Total Commander, but results are the same.

Here is the output:

HWEVA:/ $ cd /storage/emulated/0
HWEVA:/storage/emulated/0 $ ls -al | grep Ogi
ls: ./Ogi: Cross-device link
1|HWEVA:/storage/emulated/0 $

Obviously, there is no text file. ?

BTW, when I delete Ogi file on internal sdcard, put folderbind line in folder list under comment and reboot, Ogi folder on internal sdcard reappears.



Great! It seems that most probably it has something to do with the ROM, but not with the kernel. Next, I'd like for you to "cd" into it, then create a text file by running this simple line:

Now, check if the text file exists on SD Card folder, by using a file manager.

Output:

1|HWEVA:/storage/emulated/0 $ cd Ogi
/system/bin/sh: cd: /storage/emulated/0/Ogi: Cross-device link
2|HWEVA:/storage/emulated/0 $ cd ./Ogi
/system/bin/sh: cd: /storage/emulated/0/Ogi: Cross-device link
2|HWEVA:/storage/emulated/0 $

Thank you for your patience.
 

TechnoSparks

Senior Member
Mar 9, 2014
1,434
820
24
Selangor
www.technosparks.net
I am using MiXplorer file manager. I had tried Total Commander, but results are the same.

Here is the output:

HWEVA:/ $ cd /storage/emulated/0
HWEVA:/storage/emulated/0 $ ls -al | grep Ogi
ls: ./Ogi: Cross-device link
1|HWEVA:/storage/emulated/0 $

Obviously, there is no text file.

BTW, when I delete Ogi file on internal sdcard, put folderbind line in folder list under comment and reboot, Ogi folder on internal sdcard reappears.





Output:

1|HWEVA:/storage/emulated/0 $ cd Ogi
/system/bin/sh: cd: /storage/emulated/0/Ogi: Cross-device link
2|HWEVA:/storage/emulated/0 $ cd ./Ogi
/system/bin/sh: cd: /storage/emulated/0/Ogi: Cross-device link
2|HWEVA:/storage/emulated/0 $

Thank you for your patience.

Sorry for the length of time i took to reply. I have been busy

Hmm.. This is not a bug, but rather an incompatibility. Huge chances that your kernel may contain modifications different from the norm. But let's see if I can workaround from the current method, since the terminal says it's a cross-device link. For this, I need a single file /proc/mounts to be inspected. Can you hand me that file, please?

I am also assuming that your kernel does support binding folders (default and expected behaviour across linux kernels).
 

ogisha

Senior Member
May 24, 2012
493
308
Sorry for the length of time i took to reply. I have been busy

Hmm.. This is not a bug, but rather an incompatibility. Huge chances that your kernel may contain modifications different from the norm. But let's see if I can workaround from the current method, since the terminal says it's a cross-device link. For this, I need a single file /proc/mounts to be inspected. Can you hand me that file, please?

I am also assuming that your kernel does support binding folders (default and expected behaviour across linux kernels).

Please see what you can do.

Mounts attached.

Thank you.
 

Attachments

  • mounts.zip
    3.7 KB · Views: 21

TechnoSparks

Senior Member
Mar 9, 2014
1,434
820
24
Selangor
www.technosparks.net
Last edited:
  • Like
Reactions: ogisha

Top Liked Posts

  • There are no posts matching your filters.
  • 16
    ts-binds
    ts-binds basically make use of “bind” parameter of the “mount” available in your Android environment

    Development Abandoned!
    This project has been abandoned. This is because I personally do not require ts-binds anymore. Refer announcement post here: https://forum.xda-developers.com/showpost.php?p=79150883&postcount=237

    What does it do
    Essentially, this "binding" method is widely used to save space on internal storage!

    Derived from a very long-living trick for users who are struggling with the internal storage space available on their phones, while at the same time has the benefit of inserting an SD card, ts-binds will make use of already available functions on your device, to mirror a path to another path, effectively making both paths indistinguishable.

    For example, if you mirror the `Download` folder on Internal with the `Stuff from Internet` folder on your SD Card, the same list of cat pictures will be shown on both directories when navigated via a file manager, and any changes will take effect on both paths but only the folder in the external path is physically modified.

    This saves space because the files physically reside on the external storage instead of internal storage.

    Further read
    To maintain a similar "Description" of the module, I had to trim down the OP of the thread. There are a total of 3 places where I host the module's description :eek: To read documentation, please go to my website :)

    Alternative modules with the same purpose

    Links
    5
    @benlm72 @wstephen @duromx @zenaufa

    Hello everyone, and thank you for reporting on the issues!

    This is overwhelming, because the module actually worked for me, except for one minor bug where `tsbinds unbind all` fails. Maybe this is by extreme luck, or another strange scenario of "welp it worked!" on tech things. I dont know how to react to these, unfortunately :eek:

    As of now, I am busy and cannot do extensive troubleshooting and questions of the reports, hence my silence for the past few days. Once I have the time I will certainly post a new post here quoting respective reports. Before i do that though, i will audit my code line-by-line again first. I do not have an exact timespan for this period of "busy-ness"

    If 1.0.9 is the last working version for you (and you are not on Pie), I recommend using it for the time being.

    Thank you again and have a great day.
    3
    v1.1 Released

    Updgrade Notice

    Please delete `/data/ts-binds` before updating.

    Regressions

    - Magisk version <17 is no longer supported due to template change

    Additions

    - New binding algorithm to support sdcardfs!
    --- SDCardFS seems to rely on `/mnt/runtime` mountpoints. The key is to set the bind paths from there, but the binded mount needs to be remounted with proper `gid=9997` and `mask=6`, thus making legacy `/storage/emulated/0` play nice with the permission of the binded folder
    --- It is assumed that as of Oreo, SDCardFS implementation is already mature. Hopefully this algorithm persists for long!
    --- Binding algorithm will also mount other runtimes if Android do not do it automatically
    - New `$obb` variable to ease things in folderlist
    --- OBB binding is dealt with the new algorithm
    - Detection algorithm if legacy mode (for FUSE) should be applied on your device
    --- Behaviour can be altered by using the new `mode` parameter for tsbinds. Run `tsbinds help` in terminal for more info
    - ts-binds is now licensed with ... Unlicensed! Read LICENSE file for info

    Modifications

    - Update minmagisk to version 17.0
    - Rename `disable.txt` to `disable`
    - No longer output to log file if ts-binds invoked from terminal. Parent process needs to manually pipe to a file
    --- `service.sh` output is redirected to the original log file
    --- This means that the log only represent the automated process of bind mounting when the system boots.
    - `service.sh` will finish if SD Card not found in 60 seconds.
    --- Previously the script will infinitely loop
    - Code refactor

    1. Of course, can be updated via Magisk
    2. GitHub Changelog
    3. XTRA verbose changes

    ____________________________________

    @the gladiator @zenaufa This is the intended release to check if your problem may be solved. Hopefully both of you could check it out if you are still interested in the module :) Very sorry for the days of delays. I had problems in accessing my workspace.

    ____________________________________

    Don't worry too much about this, man. Take your time and relax. This is not a paying job nor an emergency rescue robot after all. This is a hobby. Treat it as such. I'm sure most people understand that you have a life too. Forget those who don't. :rolleyes:

    Thank you for the motivation. It is just that I made promises to them and I failed to deliver. Sometimes, sh** happened, and that sh** for the past week is I lost access to my workspace (this is the day after the emergency project thingy!). Now I have reinstalled Linux and Windows on my new PC, I have been able to continue development. :fingers-crossed: :D

    ____________________________________

    I agree, don't feel guilty, we have always to thank you !

    Thank you so much! :D
    3
    Breakthrough Announcement

    After 5 hours trying to (pseudo-?)reverse-engineer how the SDCardFS work, I have managed to make `mount --bind` work under SDCardFS! The task was not simple and my Nokia 6 suffered many, many reboots throughout my attempts. I met with frustration near the holy solution, but who knows by doing crap for absolute "meh" suddenly turns out the solution to my final hurdle! Yay!?

    That is not without another 7 hours of fiddling and personal QA tests with `tsbinds` fakebin in order to implement the new algorithm while preserving legacy (FUSE) support!

    So, calling sdcardfs users! Especially Android Pie, I would like to invite for you to test if ts-binds work on your device!

    [ Get ts-binds-bleeding v1.1 ]

    NOTE to existing stable users upgrading to bleeding:
    Please remove the stable version of the module, reboot, then install the bleeding version. This is to make sure ts-binds select the correct algorithm for the binding procedure. Reason: ts-binds pre v1.1 forces FUSE using prop values.

    Changelog:

    Upgrade Notice
    Please delete `/data/ts-binds` before updating.

    Regressions
    - Magisk version <17 is no longer supported due to template change

    Additions
    - New binding algorithm to support sdcardfs!
    - SDCardFS seems to rely on `/mnt/runtime` mountpoints. The key is to set the bind paths from there, but the binded mount needs to be remounted with proper `gid=9997` and `mask=6`, thus making legacy `/storage/emulated/0` play nice with the permission of the binded folder
    - It is assumed that as of Oreo, SDCardFS implementation is already mature. Hopefully this algorithm persists for long!
    - New `$obb` variable to ease things in folderlist
    - OBB binding is dealt with the new algorithm
    - Detection algorithm if legacy mode (for FUSE) should be applied on your device
    - Behaviour can be altered by using the new `mode` parameter for tsbinds. Run `tsbinds help` in terminal for more info
    - ts-binds is now licensed with ... Unlicensed! Read LICENSE file for info

    Modifications
    - Update minmagisk to version 17.0
    - Rename `disable.txt` to `disable`
    - No longer output to log file. Parent process needs to manually pipe to a file
    - `service.sh` calls `tsbinds bind all` piped to the logfile in internal storage
    - This means that the log only represent the automated process of bind mounting when the system boots.
    - `service.sh` will finish if SD Card not found in 60 seconds.
    - Previously the script will infinite loop
    - Code refactor



    __________________

    Thanks a lot @TechnoSparks! I just installed your ts-binds module and it's working great on my LG V30 H932 running stock Oreo rooted with Magisk v17. My motivation for finding a way to mount bind an internal storage folder to an external SD card folder is I started using Google Camera ported from the Pixel phones instead of the stock camera app. The problem is GCam can only save photos to internal storage (because Pixel phones don't have an SD card slot). With your ts-binds module, GCam is now saving photos to the /DCIM/Camera folder on my SD card! I hope it's OK I posted about your Magisk module on the ported GCam thread here:
    https://forum.xda-developers.com/showpost.php?p=77820701&postcount=1563

    Thank you, I am really happy to share your excitement! Certainly it is okay to post about my module anywhere you like :D It may help others too. It is one of my goals to make sure ext sdcard is useful for our device. Adoptable storage seems like a good idea at first, but little did people know once adopted, the storage is only applicable for app data (in /data/data). In other words, the emulated /data/media/0 remains the place you store your files like media. This is counter-intuitive and is quite misleading, since most want to have their media stored on the SD more than apps do.

    Also I am also creating a module that will mount an ext4 sdcard. Such a module would allow you to do many many great things using what Linux has to offer. Such as softlinking/binding app folder like games, automatically rsync app data (insta backup!), without the need of adoptable storage and Android intervention :)
    2
    I'm afraid I'm not that experienced :/ Besides, I'm kinda drowning due to many assignments at university that are due too soon :p However, I'm willing to try any builds you make and report back whenever I find some free time!

    Unfortunately, I only have 1 person that reports ts-binds not working. I managed to find out why, but I don't know if it is a random occurrence or if it really is ts-binds at fault. In essence, the more users with problems, the better I could trace the issue. Since I am kind of in need of the debug files, I think I will create a simple debug script for you (and for the public later). I will mention your username when I have done so.

    Of course, you can always take your time too. I am busy as well as it is a test and quizzes season right now so there is no urgency here :good: