Skip to content

Instantly share code, notes, and snippets.

@misodengaku
Created April 18, 2014 08:14
Show Gist options
  • Save misodengaku/11031066 to your computer and use it in GitHub Desktop.
Save misodengaku/11031066 to your computer and use it in GitHub Desktop.
スクヘス
private boolean isSuBinaryPresent()
{
String[] arrayOfString = { "/data/local", "/data/local/bin", "/data/local/xbin", "/sbin", "/system/bin", "/system/sd/xbin", "/system/xbin", "/system/bin/failsafe", "/vendor/bin" };
int i = arrayOfString.length;
int j = 0;
String str2;
if (j < i)
{
String str1 = arrayOfString[j];
str2 = str1 + "/su";
}
for (;;)
{
try
{
boolean bool2 = new File(str2).exists();
if (bool2) {
return true;
}
}
catch (Exception localException2)
{
j++;
}
break;
try
{
boolean bool1 = new File("/system/app/Superuser.apk").exists();
if (bool1) {}
}
catch (Exception localException1)
{
label139:
break label139;
}
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment