Skip to content

Fixed the app getting stuck when enabling it on newer root solutions (through a Magisk/KernelSU/APatch module) #10

@Swyter

Description

@Swyter

Hi, given that some newer root solutions don't have the supolicy binary anymore, P2oggle gets stuck after trying to toggle on the superuser functionality due to this:

val supolicy = "supolicy --live " +
"'allow appdomain input_device dir search' " + // directory rule
"'allow appdomain input_device chr_file { getattr read open }'" // character device rule

To solve it I've created a tiny Magisk/KernelSU/APatch module that adds a dummy supolicy shell script under /system/bin (that just returns 0) and a sepolicy.rules file that applies the same SELinux rules that the app usually does.

allow appdomain input_device dir search
allow appdomain input_device chr_file { getattr read open }

--

That's it, after installing that P2oggle 1.2 works fine again. You can download it from here: t2oggle-compat.zip

It's only a couple of lines, so it should be easy to inspect and audit. Hope that helps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions