Set the dex2oat wrapper owner and group to `root:shell` (#2248)
This commit is contained in:
parent
c5918f7886
commit
6b70b624e3
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
package org.lsposed.manager.ui.widget;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.graphics.Typeface;
|
||||
import android.os.Bundle;
|
||||
|
|
@ -113,7 +112,6 @@ public class ExpandableTextView extends MaterialTextView {
|
|||
return super.onPreDraw();
|
||||
}
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
@Override
|
||||
public boolean onTouchEvent(@NonNull MotionEvent event) {
|
||||
Layout layout = this.getLayout();
|
||||
|
|
@ -129,6 +127,7 @@ public class ExpandableTextView extends MaterialTextView {
|
|||
if (links.length == 0) {
|
||||
return false;
|
||||
} else {
|
||||
performClick();
|
||||
return super.onTouchEvent(event);
|
||||
}
|
||||
}
|
||||
|
|
@ -137,6 +136,11 @@ public class ExpandableTextView extends MaterialTextView {
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean performClick() {
|
||||
return super.performClick();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Parcelable onSaveInstanceState() {
|
||||
Bundle bundle = new Bundle();
|
||||
|
|
|
|||
|
|
@ -105,9 +105,7 @@ public class Dex2OatService {
|
|||
public Dex2OatService() {
|
||||
initNative();
|
||||
try {
|
||||
Files.walk(Paths.get(magiskPath).resolve("dex2oat")).forEach(path -> {
|
||||
SELinux.setFileContext(path.toString(), "u:object_r:magisk_file:s0");
|
||||
});
|
||||
Files.walk(Paths.get(magiskPath).resolve("dex2oat")).forEach(path -> SELinux.setFileContext(path.toString(), "u:object_r:magisk_file:s0"));
|
||||
} catch (IOException e) {
|
||||
Log.e(TAG, "Error setting sepolicy", e);
|
||||
}
|
||||
|
|
@ -130,7 +128,7 @@ public class Dex2OatService {
|
|||
var devPath = Paths.get(devTmpDir);
|
||||
var sockPath = devPath.resolve("dex2oat.sock");
|
||||
try {
|
||||
Log.i(TAG, "Daemon start");
|
||||
Log.i(TAG, "Dex2oat wrapper daemon start");
|
||||
if (setSocketCreateContext("u:r:dex2oat:s0")) {
|
||||
Log.d(TAG, "Set socket context to u:r:dex2oat:s0");
|
||||
} else {
|
||||
|
|
@ -161,7 +159,7 @@ public class Dex2OatService {
|
|||
}
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
Log.e(TAG, "Daemon crashed", e);
|
||||
Log.e(TAG, "Dex2oat wrapper daemon crashed", e);
|
||||
try {
|
||||
server.close();
|
||||
Files.delete(sockPath);
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ else
|
|||
fi
|
||||
|
||||
set_perm_recursive "$MODPATH" 0 0 0755 0644
|
||||
set_perm_recursive "$MODPATH/bin" 0 0 0755 0755 u:object_r:dex2oat_exec:s0
|
||||
set_perm_recursive "$MODPATH/bin" 0 2000 0755 0755 u:object_r:dex2oat_exec:s0
|
||||
chmod 0744 "$MODPATH/daemon"
|
||||
|
||||
if [ "$(grep_prop ro.maple.enable)" == "1" ] && [ "$FLAVOR" == "zygisk" ]; then
|
||||
|
|
|
|||
Loading…
Reference in New Issue