• 残页's avatar
    Don't use xwrite() when patching legacy rootfs init · e3f63994
    残页 authored
    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.
    e3f63994
Name
Last commit
Last update
.github Loading commit data...
app Loading commit data...
buildSrc Loading commit data...
docs Loading commit data...
gradle/wrapper Loading commit data...
native Loading commit data...
scripts Loading commit data...
stub Loading commit data...
tools Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gitmodules Loading commit data...
LICENSE Loading commit data...
README.MD Loading commit data...
build.gradle.kts Loading commit data...
build.py Loading commit data...
config.prop.sample Loading commit data...
gradle.properties Loading commit data...
gradlew Loading commit data...
gradlew.bat Loading commit data...
settings.gradle.kts Loading commit data...