Completely rework MagiskHide

Previous MagiskHide detects new app launches via listening through logcat
and filtering launch info messages.

This is extremely inefficient and prone to cause multiple issues both
theoratically and practically.

Rework this by using inotify to detect open() syscalls to target APKs.

This also solves issues related to Zygote-forked caching mechanisms such as
OnePlus OxygenOS' embryo.

Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
This commit is contained in:
Park Ju Hyung
2019-02-12 23:12:03 +09:00
committed by John Wu
parent e5940168fe
commit 7384d2d330
8 changed files with 272 additions and 240 deletions

View File

@@ -110,9 +110,6 @@ int magiskhide_main(int argc, char *argv[]) {
switch (code) {
case DAEMON_SUCCESS:
break;
case LOGCAT_DISABLED:
fprintf(stderr, "Logcat is disabled, cannot start MagiskHide\n");
break;
case HIDE_NOT_ENABLED:
fprintf(stderr, "MagiskHide is not enabled\n");
break;