Skip to content
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

[Custom] Enhancement for modules #2225

Open
1q23lyc45 opened this issue Nov 20, 2024 · 4 comments
Open

[Custom] Enhancement for modules #2225

1q23lyc45 opened this issue Nov 20, 2024 · 4 comments

Comments

@1q23lyc45
Copy link

1q23lyc45 commented Nov 20, 2024

Describe your problem.

Is it possible to make the module function without img?
This 1tb sparse file img brings a lot of serious bugs.
When some modules are installed, the system storage space will become 2TB or bigger(I'd like to specifically note that the bug is present on other devices besides Samsung devices. known to reproduce are oppo, Xiaomi, and lineageos, all of which show 2TB of storage.). This causes the automatic cleaning of many junk cleaning apps to fail.
Using a single img file seems very rigid and greatly reduces compatibility, leading to problems with many devices and modules that don't work, especially modules that require files to be downloaded during installation or large modules.
It even causes trim to not work at all.
Even, it has become a kernelsu fingerprint, which can be used to detect kernelsu directly.
APatch has already deprecated img, I think KernelSU should follow suit.

@backslashxx
Copy link
Contributor

backslashxx commented Nov 22, 2024

Maybe they will update it eventually now that modules.img mount detection method is public

See: https://github.com/reveny/Android-Native-Root-Detector/releases/tag/v6.5.3

@1q23lyc45
Copy link
Author

1q23lyc45 commented Nov 25, 2024

Maybe they will update it eventually now that modules.img mount detection method is public

See: https://github.com/reveny/Android-Native-Root-Detector/releases/tag/v6.5.3

Without installing modules, it will not be detected, but as long as any module is installed, it will be detected. When KSU is detected, the phone storage space will also become 2TB(fake space).

@backslashxx
Copy link
Contributor

backslashxx commented Nov 25, 2024

Without installing modules, it will not be detected, but as long as any module is installed, it will be detected. When KSU is detected, the phone storage space will also become 2TB(fake space).

basically the logic is

for device in $(ls -d /proc/fs/jbd2/loop*8 | sed 's|/proc/fs/jbd2/||; s|-8||'); do ls -d /proc/fs/ext4/${device} && echo suspicious loopdev! ; done

from

grep "/block/" /proc/mounts | cut -f4 -d "/" | sort -u | grep -v by-name | sed 's/ //' > 1
ls -Ld /proc/fs/*/* | cut -f5 -d "/" | sort -u > 2
grep -Fxvf 1 2

basically it sees a journaled loop device due to the mount

the phone storage space will also become 2TB(fake space).

yeah I guess sparseness can also be used as another detection point

@1q23lyc45
Copy link
Author

bmax121/APatch@b843480

It is able to refer to this commit from APatch for repair. However, some method names and variables have significant differences and need to be noted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants