Magisk/native/jni/include
topjohnwu b278d07b05 Switch to Zygote ptrace-ing
No matter if we use the old, buggy, error prone am_proc_start monitoring,
or the new APK inotify method, both methods rely on MagiskHide 'reacting'
fast enough to hijack the process before any detection has been done.

However, this is not reliable and practical. There are apps that utilize
native libraries to start detects and register SIGCONT signal handlers
to mitigate all existing MagiskHide process monitoring mechanism. So
our only solution is to hijack an app BEFORE it is started.

All Android apps' process is forked from zygote, so it is easily the
target to be monitored. All forks will be notified, and subsequent
thread spawning (Android apps are heaviliy multithreaded) from children
are also closely monitored to find the earliest possible point to
identify what the process will eventually be (before am_proc_bound).

ptrace is extremely complicated and very difficult to get right. The
current code is heaviliy tested on a stock Android 9.0 Pixel system,
so in theory it should work fine on most devices, but more tests and
potentially fixes are expected to follow this commit.
2019-03-05 20:23:27 -05:00
..
daemon.h Switch to Zygote ptrace-ing 2019-03-05 20:23:27 -05:00
db.h Fix bug in DB query wrapper 2018-11-20 02:20:49 -05:00
flags.h Refactor build flags 2019-02-12 05:17:02 -05:00
magisk.h Add zygote server notifier 2019-03-05 20:23:27 -05:00
resetprop.h Get API level from build.prop 2019-01-20 15:20:34 -05:00