You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
32 lines
752 B
Java
32 lines
752 B
Java
package com.topjohnwu.magisk.asyncs;
|
|
|
|
import com.topjohnwu.magisk.MagiskManager;
|
|
import com.topjohnwu.magisk.utils.Shell;
|
|
|
|
public class MagiskHide extends SerialTask<Object, Void, Void> {
|
|
|
|
@Override
|
|
protected Void doInBackground(Object... params) {
|
|
String command = (String) params[0];
|
|
Shell.su(MagiskManager.MAGISK_HIDE_PATH + command);
|
|
return null;
|
|
}
|
|
|
|
public void add(CharSequence packageName) {
|
|
exec("add " + packageName);
|
|
}
|
|
|
|
public void rm(CharSequence packageName) {
|
|
exec("rm " + packageName);
|
|
}
|
|
|
|
public void enable() {
|
|
exec("enable; setprop persist.magisk.hide 1");
|
|
}
|
|
|
|
public void disable() {
|
|
exec("disable; setprop persist.magisk.hide 0");
|
|
}
|
|
|
|
}
|