File tree Expand file tree Collapse file tree
app/src/main/java/com/devadvance/rootcloak2 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,7 +65,8 @@ private void applyNativeHooks(Context context) {
6565
6666 if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .LOLLIPOP ) {
6767 // Allowing wrapping on Lollipop and newer
68- mRootShell .runCommand ("supolicy --live 'allow untrusted_app zygote fifo_file { write }'" );
68+ WrappingSELinuxPolicy policy = new WrappingSELinuxPolicy ();
69+ policy .inject ();
6970 }
7071 }
7172 }
@@ -112,6 +113,13 @@ private void upgradeLibrary(Context context) {
112113 mRootShell .runCommand ("cp '" + library + "' /data/local/" );
113114 mRootShell .runCommand ("chmod 755 /data/local/librootcloak.so" );
114115 }
115-
116-
116+
117+ private class WrappingSELinuxPolicy extends eu .chainfire .libsuperuser .Policy {
118+ @ Override
119+ protected String [] getPolicies () {
120+ return new String []{
121+ "allow untrusted_app zygote fifo_file { write }"
122+ };
123+ }
124+ }
117125}
You can’t perform that action at this time.
0 commit comments