Magisk/native/jni/init
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
..
getinfo.cpp Support custom legacy Sony devices with init.real setup 2021-10-30 18:59:20 -07:00
init.cpp Support custom legacy Sony devices with init.real setup 2021-10-30 18:59:20 -07:00
init.hpp Support custom legacy Sony devices with init.real setup 2021-10-30 18:59:20 -07:00
magiskrc.inc Make post-fs-data scripts block at most 35 secs 2020-12-17 16:54:53 -08:00
mount.cpp Support custom legacy Sony devices with init.real setup 2021-10-30 18:59:20 -07:00
raw_data.cpp Update mmap implementation 2021-01-12 22:50:55 -08:00
raw_data.hpp Update mmap implementation 2021-01-12 22:50:55 -08:00
rootdir.cpp Don't use xwrite() when patching legacy rootfs init 2021-10-29 03:23:34 -07:00
twostage.cpp Support custom legacy Sony devices with init.real setup 2021-10-30 18:59:20 -07:00