Magisk/native/jni
残页 e3f6399473 Don't use xwrite() when patching legacy rootfs init
Fix topjohnwu#4810
> [    2.927463]  [1:           init:    1] magiskinit: Replace [/system/etc/selinux/plat_sepolicy.cil] -> [xxx]
[    2.936801]  [1:           init:    1] magiskinit: write failed with 14: Bad address

Since topjohnwu#4596, magisk fails to patch `/init`, xwrite() fails with EFAULT, break the original `/init` file and make the device unbootable. Reverting this commit for legacy rootfs devices fixes the problem. I think this is a Samsung kernel magic since currently I can't reproduce this on other devices or find something special in the log currently we have.
2021-10-29 03:23:34 -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 Don't use xwrite() when patching legacy rootfs init 2021-10-29 03:23:34 -07:00
magiskboot boot image header v4 2021-08-29 03:14:23 -07:00
magiskpolicy Load *_compat_cil_file from system_ext 2021-10-29 03:14:26 -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