package com.fa.c;

import android.os.Build;
import java.io.BufferedReader;
import java.io.File;
import java.io.InputStreamReader;

public class RootUtil
{
  private static boolean checkRootMethod1()
  {
    String str = Build.TAGS;
    return (str != null) && (str.contains("test-keys"));
  }
  
  private static boolean checkRootMethod2()
  {
    boolean bool2 = true;
    String[] arrayOfString = new String[9];
    arrayOfString[0] = "/system/app/Superuser.apk";
    arrayOfString[1] = "/sbin/su";
    arrayOfString[2] = "/system/bin/su";
    arrayOfString[3] = "/system/xbin/su";
    arrayOfString[4] = "/data/local/xbin/su";
    arrayOfString[5] = "/data/local/bin/su";
    arrayOfString[6] = "/system/sd/xbin/su";
    arrayOfString[7] = "/system/bin/failsafe/su";
    arrayOfString[8] = "/data/local/su";
    int j = arrayOfString.length;
    int i = 0;
    for (;;)
    {
      boolean bool1;
      if (i >= j) {
        bool1 = false;
      }
      do
      {
        return bool1;
        bool1 = bool2;
      } while (new File(arrayOfString[i]).exists());
      i += 1;
    }
  }
  
  private static boolean checkRootMethod3()
  {
    Object localObject3 = null;
    Object localObject1 = null;
    try
    {
      localProcess = Runtime.getRuntime().exec(new String[] { "/system/xbin/which", "su" });
      localObject1 = localProcess;
      localObject3 = localProcess;
      String str = new BufferedReader(new InputStreamReader(localProcess.getInputStream())).readLine();
      return str != null;
    }
    catch (Throwable localThrowable)
    {
      Process localProcess;
      if (localObject1 != null) {
        ((Process)localObject1).destroy();
      }
      return false;
    }
    finally
    {
      if (localThrowable != null) {
        localThrowable.destroy();
      }
    }
  }
  
  public static boolean isDeviceRooted()
  {
    return (checkRootMethod1()) || (checkRootMethod2()) || (checkRootMethod3());
  }
}


/* Location:              /home/enzo/Documents/hacking/malwares/viking-horde/classes.jar!/com/fa/c/RootUtil.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */