Magisk/native/jni
Chris Renshaw 6663fd3526
Support custom legacy Sony devices with init.real setup
Custom ROM bring-ups of legacy Sony devices contain the following:
/init (symlink to /bin/init_sony)
/init.real (the "real" Android init)
/bin/init_sony (this was /sbin/init_sony on Android <11)

Kernel loads the ramdisk and starts /init -> /bin/init_sony
/bin/init_sony does low-level device setup (see: https://github.com/LineageOS/android_device_sony_common/blob/lineage-18.1/init/init_main.cpp)
/bin/init_sony unlinks /init and renames /init.real to /init
/bin/init_sony starts /init

Since init_sony needs to run first magiskinit needs to replace init.real instead, so add workarounds based on detection of init.real to boot patcher and uninstaller

Thanks @115ek and @bleckdeth

Fixes #3636

Co-authored-by: topjohnwu <topjohnwu@gmail.com>
2021-10-30 18:59:20 -07:00
..
core Replace module fd with memfd if possible 2021-10-28 00:26:18 -07:00
external Update libcxx 2021-10-21 02:08:13 -07:00
include Make zygisk survive zygote restarts 2021-10-27 01:53:16 -07:00
init Support custom legacy Sony devices with init.real setup 2021-10-30 18:59:20 -07:00
magiskboot Support custom legacy Sony devices with init.real setup 2021-10-30 18:59:20 -07:00
magiskpolicy Update rules again 2021-10-29 03:37:14 -07:00
resetprop Prune unused nodes from trie 2021-10-09 02:15:03 -07:00
su realpath /proc/pid/cwd 2021-10-29 03:13:20 -07:00
utils Make zygiskd ABI aware 2021-10-23 14:38:30 -07:00
zygisk Stop extreme verbose logging 2021-10-27 04:00:40 -07:00
.gitignore Add entrypoint to build test 2019-04-01 02:46:09 -04:00
Android.mk Make zygisk survive zygote restarts 2021-10-27 01:53:16 -07:00
Application.mk Build on API 21 headers 2021-10-20 03:17:42 -07:00