• topjohnwu's avatar
    Add hijack sepolicy support for rootfs devices · e841aab9
    topjohnwu authored
    On older Android versions, pre-mounting selinuxfs will lead to errors,
    so we have to use a different method to block init's control flow.
    Since all devices that falls in this catagory must both:
    
    1. Be Android 8.0 - 9.0
    2. Have early mount fstab in its device tree
    
    We can actually use the same FIFO trick, but this time not on selinuxfs,
    but on the read-only device tree nodes in sysfs or procfs. By mocking
    the fstab/compatible node in the device tree, we can block init when
    it attempts to do early mount; at that point, we can then mock selinuxfs
    as we normally would, successfully hijack and inject patched sepolicy.
    e841aab9
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...