Magisk/native/jni
topjohnwu da723b207a Allow 3rd party code to load pre-specializing
Magisk's policy is to never allow 3rd party code to be loaded in the
zygote daemon process so we have 100% control over injection and hiding.
However, this makes it impossible for 3rd party modules to run anything
before process specialization, which includes the ability to modify the
arguments being sent to these original nativeForkAndXXX methods.

The trick here is to fork before calling the original nativeForkAndXXX
methods, and hook `fork` in libandroid_runtime.so to skip the next
invocation; basically, we're moving the responsibility of process
forking to our own hands.
2021-01-10 01:25:30 -08:00
..
core Add preliminary zygote code injection support 2021-01-06 22:21:17 -08:00
external Use xHook to hook functions in PLT 2021-01-08 00:53:24 -08:00
include Add preliminary zygote code injection support 2021-01-06 22:21:17 -08:00
init Convert indentation to spaces 2020-12-30 22:11:24 -08:00
inject Allow 3rd party code to load pre-specializing 2021-01-10 01:25:30 -08:00
magiskboot Convert indentation to spaces 2020-12-30 22:11:24 -08:00
magiskhide Add preliminary zygote code injection support 2021-01-06 22:21:17 -08:00
magiskpolicy Convert indentation to spaces 2020-12-30 22:11:24 -08:00
resetprop Convert indentation to spaces 2020-12-30 22:11:24 -08:00
su Convert indentation to spaces 2020-12-30 22:11:24 -08:00
utils Add preliminary zygote code injection support 2021-01-06 22:21:17 -08:00
.gitignore Add entrypoint to build test 2019-04-01 02:46:09 -04:00
Android.mk Update pre/post hooks implementation 2021-01-09 17:41:25 -08:00
Application.mk native: fix slower build on non-Windows platforms 2020-05-09 04:41:07 -07:00