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

AppControl incorrectly reports size of Termux #2166

Closed
Mihara opened this Issue Dec 3, 2018 · 6 comments

Comments

2 participants
@Mihara

Mihara commented Dec 3, 2018

On my particular phone (OnePlus 5) SDMaid's AppControl incorrectly reports the size of Termux app (com.termux) as equal to the size of every file in /storage/emulated/0/ combined -- resulting in an obviously bogus app size of 45 gigabytes, and probably a lot of needlessly lost data if I were to try deleting it with AppControl. Which I'm not anxious to attempt for obvious reasons.

Termux builds a linux chroot-style environment inside its own data directory, and one of the options for accessing the rest of your data is to symlink your storage from inside this environment, which is probably why this happens -- but maybe this case deserves some special handling? Termux is quite a popular app.

@Mihara

This comment has been minimized.

Mihara commented Dec 3, 2018

screenshot_20181203-224223

For the record, this is what it looks like.

@d4rken

This comment has been minimized.

Owner

d4rken commented Dec 4, 2018

Which SD Maid version and Android version, Magisk or SuperSU?

@d4rken

This comment has been minimized.

Owner

d4rken commented Dec 4, 2018

Termux builds a linux chroot-style environment inside its own data directory, and one of the options for accessing the rest of your data is to symlink your storage from inside this environment, which is probably why this happens -- but maybe this case deserves some special handling?

I agree with your evaluation, it's likely symlink related.

resulting in an obviously bogus app size of 45 gigabytes, and probably a lot of needlessly lost data if I were to try deleting it with AppControl

I don't think it would lead to data loss, but you don't have to try. SD Maid will delete the owner folders by their top level path and not traverse them to delete everything individually, so I think only the symlinks would be deleted.

SD Maid determines the path sizes using du though and I think it currently follows symlinks. So the question is in which scenarios do we need du to follow symlinks for accurate sizes. I'll check my commit history to see if I added the flag for a reason or if it was just the default.

The default install of Termux doesn't seem to create this chroot environment, can you post a guide on how to set this up such that I can reproduce this?

@d4rken d4rken added this to the Next Tasks milestone Dec 4, 2018

@Mihara

This comment has been minimized.

Mihara commented Dec 4, 2018

Which SD Maid version and Android version, Magisk or SuperSU?

SD Maid 4.11.10 Pro, Magisk 17.1, Android 8.1

The default install of Termux doesn't seem to create this chroot environment, can you post a guide on how to set this up such that I can reproduce this?

It always creates the environment, but it doesn't symlink your storage until you execute the command from inside it. The procedure is detailed in Termux wiki.

@d4rken

This comment has been minimized.

Owner

d4rken commented Dec 4, 2018

Can reproduce, looking into it.

@d4rken d4rken modified the milestones: Next Tasks, v4.12.4 Dec 4, 2018

@d4rken

This comment has been minimized.

Owner

d4rken commented Dec 10, 2018

Seems to work for me now.
If you'd like to try a test version send me a short mail 😉

@d4rken d4rken closed this Dec 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment