-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inaccessible userdata after using chroot-distro #33
Comments
Thanks for the report and the extra information. I did notice your bug report a few days ago. Unfortunately, I have been really busy, so I haven't been able to react to your report. Just using chroot should not cause this kind of behavior. Also, as So, I would like to have more information about the situation so that I can try to reproduce the issue. First, what distribution did you use? Be as exact as possible. Second, while using the distribution, what did you do? If you can provide clear steps to reproduce the issue, then all the better. Third, after exiting the jail, did you just close the Termux, or did you issue some commands? Also, if you could provide the version of the |
And most importantly I forgot to add: |
Unfortunately I don't have any devices with KernelSU so I can't test this. @YasserNull, do you have any devices with KernelSU? |
No, I don't have any devices with KernelSU. |
|
it's not kernelSU problem i guess, i've been using tmoe with magisk for chroots, and there's same problem with unmount |
I have checked, and |
|
@defectly thanks, that was what I wanted to see @roninspin Using standalone version of |
Here you go P.S. After unmount:
|
Based on debug log, the script has worked as it should. I'm starting to think that there may be a problem with toybox implementation of umount in this particular situation, or something else which affects umount calls. @nickelberg, @roninspin and @defectly: Can you provide as much information about your device as possible? At least device model, android version, firmware version, twrp version (or if you didn't install twrp, then what did you install, or if you didn't install custom recovery at all), kernel version, busybox version (should not matter but does no harm). Also, can you guys run One more thing, can you run |
Xiaomi Redmi Note 10 Pro mount.txt this problem was even in stock miui rom with tmoe and magisk |
If somebody could also provide their device information if this is working properly, then that may help providing direction to where this bug may lay. Based on the mount data from @defectly, it should work without problems, but clearly it isn't. I checked toybox change logs from news page and the last time umount command was changed is for version 0.8.0, and the change was to ignore -c parameter. So, most likely toybox is not the cause for the bug unless it is a bug which has been there always/very long time. P.S. @nickelberg and @roninspin, I would still like to get the device information from you guys, so that we have more data available to help pinpoint where the problem lays. |
Nubia Red Magic 6 (NX669J) Turns out that the reason for the problem (at least for me) is the use of umount with -f (forced) for /storage/emulated. Without that parameter no problems at all. |
@roninspin Thanks, good catch. We will have to investigate this but it sounds like something has changed on kernel side which makes it unusable on newer kernels (my device is Asus Zenpad 10 (Z301M) with 3.18.35 kernel, and it works). Bind mounts should never affect their originator mounts but clearly this has been broken at some point. @YasserNull Do you happen to remember why -f flag has been added? I tried digging through the version control but |
Sorry for not much response from me, I'm kinda busy irl lately. Phone 1:
Phone 2:
|
@jjkola In fact, I don't remember, but what I do remember is that I used ChatGPT to learn how to use this command. |
I did a test on my raspi device where I did multiple successive bind mounts, and forced unmount (-lf) worked properly with kernel 6.6.47. I did the test with normal mount/umount as well as with toybox (0.8.9) mount/umount. I did use loopback device as the source so that is not the same as with block devices. |
Anyway, -f shouldn't be used all the time (by default). |
Fix released. |
I'll try to add more output to error message to make it easier to pinpoint the problem. Most likely I will have time for that next weekend. |
In the mean time, you can try following: If those don't help (and there is no running processes) then you will have to check for anonymous inodes and inotify watchers. |
can it be automatic? tmoe has feature to kill chroot, and it also kills chroot if you use unmount in it |
Sure, it can be added. But it can't be default action as it can leave the jail in inconsistent state as it will not bring it down in managed/consistent way. At least, I would prefer bringing my stuff down in a way that it will not cause problems for me in the future. Also, just to be clear the |
I can't be the only one, so it should be pretty self explanatory.
Happened on two my different phones - common features: Xiaomi, rooted, Android 14.
After exiting shell from distro's chroot and then exiting Termux, phone apps don't have access to phone storage.
Examples:
"java8.nio.file.FileSystemException: /storage/emulated/0: opendir: Transport endpoint is not connected"
Edit:
Important to add - a simple reboot fixes this, but it's cumbersome.
The text was updated successfully, but these errors were encountered: