change code to be better
This commit is contained in:
parent
b80248c069
commit
b6025df2ae
|
@ -224,6 +224,7 @@ public class NoPsmDrmInstaller extends AsyncTask<Void, Void, Void> {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Root.setContext(ctx);
|
Root.setContext(ctx);
|
||||||
|
killApplication("com.playstation.psstore");
|
||||||
|
|
||||||
if (isPsmInstalled()) {
|
if (isPsmInstalled()) {
|
||||||
backupPsm();
|
backupPsm();
|
||||||
|
|
|
@ -16,6 +16,10 @@ public class Root {
|
||||||
private static String busyboxBinary = null;
|
private static String busyboxBinary = null;
|
||||||
private static Context ctx = null;
|
private static Context ctx = null;
|
||||||
|
|
||||||
|
public static void killApplication(String processName) throws Shell.ShellDiedException {
|
||||||
|
Log.i("ROOT", "Killing process: " + processName);
|
||||||
|
Shell.Pool.SU.run(new String[] { busyboxBinary + " pkill '" + processName +"'" });
|
||||||
|
}
|
||||||
public static boolean fileExistRoot(String filename) throws Shell.ShellDiedException {
|
public static boolean fileExistRoot(String filename) throws Shell.ShellDiedException {
|
||||||
Log.i("ROOT", "FileExistRoot: " + filename);
|
Log.i("ROOT", "FileExistRoot: " + filename);
|
||||||
int res = Shell.Pool.SU.run(new String[] { busyboxBinary + " stat '" + filename +"'" });
|
int res = Shell.Pool.SU.run(new String[] { busyboxBinary + " stat '" + filename +"'" });
|
||||||
|
|
Loading…
Reference in New Issue