yashsingh1/xdaforums huggingface dataset:
[Magisk] TechnoSparks:
:( Please try again with a newer version: https://drive.google.com/uc?id=0ByQKilNkFEpAcmVxbkhsaUhSRHM&export=download
[Magisk] ogisha:
Still not working. :crying:
[Magisk] the gladiator:
I agree, don't feel guilty, we have always to thank you !
[Magisk] TechnoSparks:
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

Of course, can be updated via Magisk

GitHub Changelog

XTRA verbose changes

____________________________________

[MENTION=3330854]the gladiator[/MENTION] [MENTION=4074798]zenaufa[/MENTION] 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.

____________________________________

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

____________________________________

Thank you so much! :D
[Magisk] the gladiator:
I'm still VERY MUCH interested. Unfortunately the smartphone doesn't belong to me and the owner will be away for sometime :crying:

I'll continue the test ASAP
[Magisk] Gr0m03eka:
v1.1 doesn't work on my Lineage 15.1: I've deleted /data/ts-binds, then updated. After reboot all target directories became empty.

tsbinds reinit - nothing changes

tsbinds update - causes reboot and bootloop

Reverted back to v. 1.0.9
[Magisk] Herbie_2005:
It is exactly the same issue here (Lineage OS 14.1)
[Magisk] TechnoSparks:
Hello. Thank you for reporting. I think this is an error on my part.

Please try removing the module, and /data/ts-binds, reboot (in order to reset mountspace) then install the newest version. Let me know if it fixes things. Also, take a scr shot/copy of the installation output. Thank you so much for your time :)
[Magisk] zenaufa:
Hi TS,

Thank you so much for the update and your hardwork on this module :o

However unfortunately the module is still not working on my phone, it gave me an "Bind remount failed" error on the logs.

Tried to remove the module > delete data/tsbinds > and reinstall and it's still happen :( also tried to change the binds mode, it mark as successful but when i check the file manager the file isn't there

Kindly let me know if you need logs or anything from my phone to help your investigation, please don't feel guilty for the delay or anything, take your time :D

and once again, thank you for developing and supporting this module :)
[Magisk] duromx:
Hi, I've been trying to use your module, but after downloading and installing it, I reboot my phone, and the first thing I do is to search for the ts-binds-folderlist.txt but there is no file in internal memory, (only folders , whatsap among them) I searched for it in root too, and I found many files but not the ts-binds-folderlist.txt, There is no /data/ts-bind too. So I think something I'm doing wrong.

Magisk 17.1

ts-binds 1.1

AOSPX v5.8 Oreo 8.1

Galaxy s5 g900m
[Magisk] wstephen:
Unable to Bind after Reboot

Thank you for this new module. It seems working fine with both with Hidden Source (folderbind Download "$sd/.Download" "$int/Download") and Shown Source (folderbind Download "$sd/Download" "$int/Download"). The only drawback is not being able to auto-bind all upon reboot, say, if I make another "su → tsbinds bind all" at each reboot then I can still use this folderbind module. I guess by delaying binding sequences (service.sh) until the device has fully booted might work, but I am just a noob.

My device information

Samsung Galaxy Note 3 lte (SM-N9005)

Rom: Aspire.C9.v5.0 (Android 6.0.1) with Phantom Kernel v12o

Magisk: 17.1 with Busybox for Android NDK v1.29.3 (osmOsis); DeviceSpoolingTool4Magisk v1.0.1 (Dreamer)

ts-binds v1.1

Installation & Binding of ts-binds v1.1

ts-binds-folderlist.txt was created manually with Notepad++ and inserted into /storage/emulated/0

Terminal Command Used: su → tsbinds f → tsbinds bind all; and tsbinds pairs (to check)

Verfied the binding results using Root Explorer. The result is encouraging on both hidden sources and shown sources as expected.

Used su → tsbinds enable (just to make sure)

Failed to Auto Bind on Reboot

tsbinds.log shows: No update made to cached list. 20 retries (total of 60 seconds) but SD Card do not found.

/proc/mounts:

/data/sdext2/Link2SD/bind/obb/com.atentertainment.learningenglishbyparagraph /mnt/runtime/write/emulated/0/Android/obb/com.atentertainment.learningenglishbyparagraph sdcardfs rw,seclabel,noatime,low_uid=1023,low_gid=1023,gid=9997 0 0
/dev/block/vold/public:179,65 /mnt/media_rw/5996-87E1 exfat rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=utf8,namecase=0,errors=remount-ro 0 0

Documents Attached

ts-binds-folderlist.txt (sources shown)

ts-binds(shown_source).log

mounts.txt (copied from /proc/mounts)

My device's Rom with Magisk Version and CTS Spool is not compatible with Apps2SD, and ts-binds is the only viable option to me. Really hope [MENTION=5765352]TechnoSparks[/MENTION] may hunt down this Rebooting Problem. :p
[Magisk] benlm72:
Reporting a pb with Pie

Hi TechnoSparks,

I've changed my rom, I'm now on [JDCTeam] Optimized LineageOS 16.0 and Magisk 17.3. I know that you don't support beta versions of Magisk, but as ts-binds previously ran fine with LineageOS 15.1, this post is just to let you know that ts-binds don't work for me with 16.0 with the same binding than 15.1. /data/tsbinds doesn't exist after installation, although this install reports no error. And the binding is considered OK after reboot according to the log. But my whatsapp folder on SD card remains empty and my files are stored in internal storage. Let me know if you want me to make some tests for you.

Regards.
[Magisk] TechnoSparks:
[MENTION=1591755]benlm72[/MENTION] [MENTION=1893948]wstephen[/MENTION] [MENTION=7971827]duromx[/MENTION] [MENTION=4074798]zenaufa[/MENTION]

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.
[Magisk] TrippyEngine:
It works on moto g 2014 on android pie, thank you very much for this module! The only bug is that after a reboot I have to manually type tsbinds reinit in a terminal. But this is no important bug for me, since I can finally take full advantage of my sd card on an old phone with a really small internal memory. Thank you again!
[Magisk] otyg:
[MENTION=5765352]TechnoSparks[/MENTION]

Hi I have android pie, I used to use fbind but since upgrading to Pie it freeze my system, so I have been messing around with ts-binds, first things I noticed was, it doesn't create /data/ts-binds which leads to complete failure since it cant add logs..etc, and it doesn't create the ts-binds-folderlist.txt on internal storage, so after manually creating the /data/ts-binds folder and ts-binds-folderlist.txt I have successfully got it to mount my sdcard dcim forlder to internal storage

folderbind dcim /mnt/media_rw/0000-0000/DCIM /data/media/0/DCIM/

however I am having trouble getting obb mounts to work I want to redirect sdcard obb to internal obb, also using the $sd and $int doesn't seem to work even with the above example.

folderbind obb $sd/Android/obb $obb

tsbind bind obb

Bind aborted: Path "$sd/Android/obb" as source doesn't exist.

any ideas would be great, I can mount the DCIM folder using full paths but something is not right with the $sd and $int
[Magisk] diimaan:
When I run su -c tsbinds reinit, I get the following error in the terminal!

dream2lte:/ $ su -c tsbinds reinit
Unbinding all entries
/system/xbin/tsbinds[378]: .: /data/ts-binds/cached-folderlist.sh: No such file or directory
/sbin/.core/img/ts-binds/service.sh[10]: can't create /data/ts-binds/ts-binds.log: No such file or directory
dream2lte:/ $

Attached my ts-binds-folderlist.txt

Edit: I ran su -c tsbinds update

Then all the folders are copied to /data

When I run su -c tsbinds reinit it unbinds. I had to run su -c tsbinds bind all to bind my folders!

But after restart, the bind persists.
[Magisk] otyg:
[MENTION=5765352]TechnoSparks[/MENTION]

Just some updates on the SDCardFS implementation, after hours (days), trying to figure out why the system was hardlocking I found out some interesting info, most of your research is correct however when remounting the directory's on my Android 9 system if you try to remount the "/mnt/runtime/default/*" or "/mnt/runtime/write/*" to fix permissions, my phone would hard lock and reboot, the only one I can safely remount is the "/mnt/runtime/read/*" which luckily is enough to fix all the file managers and allow access to the rebinded directory's

So to mount my sdcard obb to internal I got this command working (it also works for other folders too), perhaps you can check to see if it works on other systems too.

mount --rebind /mnt/runtime/default/0000-0000/Android/obb /mnt/runtime/default/emulated/0/Android/obb && mount -o remount,gid=9997,mask=6 /mnt/runtime/read/emulated/0/Android/obb

if anyone faces a similar problem here is a modified ts-binds I modified to handle this situation (flash in magisk), no guarantees it will work on your system , no guarantees at all, the License file said it was free to modify and distribute so hopefully Techno Sparks doesn't mind. this is just a temporary workaround until sdcardfs is understood some more.
[Magisk] wstephen:
Auto-Bind on Reboot

[MENTION=5765352]TechnoSparks[/MENTION]

This is to report that I've finally found a way to make my legacy Samsung Note 3 Lte auto-bind again on each reboot. I agreed there is a need for version 1.1 to avoid boot looping by instituting a no-bind barrier. However, I am of the opinion that 20 counts (60 seconds) is obviously too short for a legacy device to show a mounted ExtSDCard state which led to what have been a successful binding through terminal shell commands to failure to rebind by the auto-bind script "service.sh". And here, my experiments began. :highfive:

I tested extending from 20 counts (60 seconds) to 60 counts (180 seconds), my device just boots fine. So, I arbitrarily selected 40 counts (120 seconds), the booting just runs smooth and fast.

To make ts-binds more successful, I suggest you allow users to configure this parameter on the number of attempt counts in a section of the "ts-binds-folderlist.txt" to suite the speed of their devices. Needless to say and of course, when you have the time and leisure to do so.

_____________________________

To share with those who can't Auto-Bind folders on Reboot, here are my procedures:

1) The "service.sh" is located in "/sbin/.magisk/img/ts-binds";

2) I copied it and transferred it to my PC and amended the shell script using Notepad++;

3) In line 25, I changed "if [ $i -eq 20 ]" to "if [ $i -eq 40 ]";

4) In line 26, I changed "echo "20 retries (total of 60 seconds)...." to "echo "40 retries (total of 120 seconds)..."

5) Saved and replaced the original shell script with the mod script, and amended permission to 755 (rwx, r-x, r-x);

6) Reboot and I have all target folders auto-bound.

If you like to use my modded script, please change the attached "service.txt" into "service.sh" and deploy this modded auto-bind script accordingly.

[NB]

SM-N9005 can auto-bind on "30 retries". It looks like the device's actual boot time has no relationship to the setting of maximum retries to access ExtSDCard mounting status, as long as the status is found true then the re-binding process takes place immediately, and then exits the "service.sh" run time routines forthwith.
[Magisk] wstephen:
I've found a solution that you don't have to type in a terminal on every boot again. Just check #196 if you wish.
[Magisk] :
Hello everyone. Where can i download 1.0.9 version magisk zip?
[Magisk] Pip_X:
Where can I download 1.0.9? It's not in GitHub anymore.
[Magisk] wstephen:
Version 1.0.9

Yeah, there is no released copy left in GitHub, don't know why. So, I've compiled it from the source code for you.

Hopefully, this may help you guys, but don't ask me any question on it. Cos, I have no experience or knowledge deploying this version. ;)
[Magisk] Pip_X:
Not sure why, but your version doesn't work.

The ts-binds log doesn't even appear.

I'm very regret updating to v1.1 now and cant revert back to the original v1.0.9
[Magisk] wstephen:
If the installation is OK, I guess you may need to search here because there is no reason to suspect an error in the source code maintained in the GitHub. Any way, I hope someone has a copy may care to post it to this forum to help other members.

Again, I have no experience of it.

_______________________________

But wait, version 1.1 has significant mod mentioned in #182 . Are you sure, you have cleared all the remnants of version 1.1 before going back to version 1.0.9? I am just curious.
[Magisk] Goranius:
Hello everyone!

First of all thank you to the developer for this mod.

I have two problems first when i install the last version i get a bootloop, the solulution was change the binary file to the bin folder instead the xbin folder.

Second problem It doesnt work with my moto x4 and android pie and i dont know how to solve.

Thank you for everything
[Magisk] :
Thank you. Works like a charm! :highfive: :good:
[Magisk] the gladiator:
Very strange behavior: it seems that it doesn't install although installation doesn't give any error. It doesn't mirror files and folders but it also doesn't show-up in data/ts-bind. Is that possible?
[Magisk] wstephen:
Doesn't show-up in data/ts-bind

Version 1.1 was my first installation of ts-binds. Therefore, I can tell that "ts-binds-folderlist.txt" doesn't show-up in "data/ts-bind" is normal even in clean installation. ISO "ts-binds-folderlist.txt", "fresh-folderlist.txt" is inside "data/ts-bind" which is to be used as the basis to construct your own "ts-binds-folderlist.txt" and that, is to be placed inside "/storage/emulated/0". TS-Binds Update will use "/storage/emulated/0" as the default directory to look for user instructions in the "ts-binds-folderlist.txt".

I also have the following observations on Release 1.1 to share:

1) The module refers to "/mnt/media_rw" to detect ExtSDCard mount status. Devices that don't have "/mnt/media_rw" in their directories have to install "extsdcard access enabler" module as a prerequisite before auto-rebinding of this module may work;

2) It attempts to follow the recent Magisk Module Template which is very different from Release 1.0.9. Work file directories are quite different too. Migration from 1.0.9 to 1.1 requires users to a) reset mountspace, and b) remove all remnants of 1.0.9 before proceeding to upgrade. Direct upgrading from 1.0.9 to 1.1 via Magisk Manager not only would lead to failure, and if on earlier Magisk versions this direct upgrading attempt without clearing all remnants of 1.0.9 can also lead to boot-looping as well. Barely by removing remnants of previous version without rebooting before installing this new version (1.1) may bound to result in hidden problems making it more difficult for subsequent trouble shooting.

At present, I am not sure if the $obb binding functionality may meet our daily use yet. I hope someone may like to continue exploring and let everyone knows.

Hope these may help.
[Magisk] the gladiator:
Thanks for your reply, wstephen. Unfortunately my problem should be more serious and I believe is about your point 2 although I actually uninstalled 1.0.9 and rebooted before installing 1.1.

What I've found is that after having added ts-bind in magisk and rebooted I don't even find the directory data/ts-bind; I confirm to have the directory "/mnt/media_rw".

An additional question: how do I implement point 2.a) ?
[Magisk] wstephen:
Doesn't show-up in data/ts-bind

OK, mate. So, may I assume your sequence in uninstalling v1.0.9 was in the order of Magisk Manager → ts-binds (trash) → delete ("/data/ts-binds") → Reboot Device. Then, after installing v1.1 and rebooted the folder "/data/ts-binds" was not even there?

If this is the case, you must have busybox installed and there is/are still remnants of the previous installation. If so, after uninstalling v1.1 you will still be able to find the file "tsbinds" residing inside your busybox which may either be inside "/sbin/.core/busybox", or inside "/sbin/.core/img/busybox-ndk/system/xbin". You may have both. If you find it, you may or may not also find the file "disable" residing in the same directory as well. Delete them and, go to "/sbin/.magisk/img/" to see if you still any remnant script left by ts-binds. Do a reboot and then install v1.1 again. As long as the folder "/data/ts-binds" and remnants do not exist at time of installation, the installation itself will do a mountpoint reset in order to build the required folder on reboot. If the "/data/ts-binds" reappears again, you're done.

If not, your build.prop or system.prop might have changed/modified, and yet there are still a number of ways to force a mount namespace reset:

1) Change Magisk namespace and reboot, change back and reboot (no pain); or

2) Install Apps2SD and try its folder mounting just for the purpose of forcing a mountspace reset (a less harmful way); or

3) If you have a copy of build.prop.bak you may use it for a reset too, of course, you should check the backup date first; and

4) TWRP restore (after wiping system and data) is surely a fail saver if the above still not work for you.

Best of lucks for you. :)
[Magisk] TheMDJ:
to update I did as you mentioned but after reinstalling and I tryed to bind folder buy I got error that /data/ts-binds no such directory
[Magisk] wstephen:
You are too brief, mentioning too little as on your process, making me very difficult to set myself into the situation you are encountering.

Have you physically checked with Root Explorer or ES Explorer that the folder "ts-binds" actually exists under /data or not ? What are the names of the files that are inside the folder "ts-binds"? Or, do you mean when you enter the terminal shell command "tsbinds update" and then, you see the terminal response of "/data/ts-binds no such directory" but the folder does exit?

If the folder "ts-binds" with its full contents does exit in your device, then I suspect you are probably invoking v1.0.9 tsbinds runtime command on v1.1's parameters. That's why, the shell commands of "tsbinds update" or "tsbinds bind all" returned you with the "/data/ts-binds no such directory" feedback. If not, then is something else.

To save your effort in trouble shooting, if you have a clean TWRP backup without ts-binds installed, a clean installation of v1.1 should be more preferable to you.
[Magisk] TheMDJ:
I first deleted ts-binds folder then uninstalled ts-binds magisk module and rebooted device then I installed latest module and rebooted then added lines in ts-binds text file and rebooted device but binding didn't work so I ran su -c tsbinds reinit command and get no such directory error so I checked with file explorer and directory is not there
[Magisk] wstephen:
Doesn't show-up in data/ts-bind

The first thing you will do, IMO, is to make sure the installation have created a brand new "/data/ts-binds". If the installation fails to re-create that folder with its contents it's all going to be futile to run any meaningful terminal command.
[Magisk] TheMDJ:
installation didn't create that folder so what should I do to bind folders
[Magisk] wstephen:
Doesn't show-up in data/ts-bind

The key is try to install v1.1 as if in a clean installation, but unfortunately there is no uninstall zip to just do that.

If you don't have TWRP backup without any trace of the previous installation. You will have to try to 1) remove all of remnants and 2) to force a mountpoint reset, and this is going to painstaking as mentioned in #208.
[Magisk] TheMDJ:
ohh this means I can't use this right now I will use this when I will flash rom I should not have reinstalled this module to update it you should include notice in magisk module that don't update it if all is working fine
[Magisk] zukers:
how could I move my whatsapp to sdcard, I use magisk 18 an this module 1.1, but have a error:

2|star2lte:/ # su -c tsbinds reinit
Unbinding all entries
/system/xbin/tsbinds[378]: .: /data/ts-binds/cached-folderlist.sh: No such file or directory
/sbin/.core/img/ts-binds/service.sh[10]: can't create /data/ts-binds/ts-binds.log: No such file or directory
star2lte:/ #

after installation of this module file "ts-binds-folderlist.txt" didn't created, so I created it with entry:

folderbind WhatsApp "$sd/WhatsApp" "$int/WhatsApp"