public boolean readSysProperty(Context context) {
int i;
int i2;
if (context == null) {
throw new IllegalArgumentException("context must not be null");
}
String property = getProperty("gsm.version.baseband");
if (property == null || property.contains("1.0.0.0")) {
SystemLog.i(TAG, "baseBandVersion = " + property);
i = 1;
} else {
i = 0;
}
String property2 = getProperty("ro.build.flavor");
if (property2 == null || property2.contains("vbox") || property2.contains("sdk_gphone")) {
SystemLog.i(TAG, "buildFlavor = " + property2);
i++;
}
String property3 = getProperty("ro.product.board");
if (property3 == null || (property3.contains(WXEnvironment.OS) || property3.contains("goldfish"))) {
SystemLog.i(TAG, "productBoard = " + property3);
i++;
}
String property4 = getProperty("ro.board.platform");
if (property4 == null || property4.contains(WXEnvironment.OS)) {
SystemLog.i(TAG, "boardPlatform = " + property4);
i++;
}
String property5 = getProperty("ro.hardware");
SystemLog.i(TAG, "hardWare = " + property5);
if (property5 == null) {
i++;
} else if (property5.toLowerCase().contains("ttvm")) {
i += 10;
} else if (property5.toLowerCase().contains("nox")) {
i += 10;
}
if (!context.getPackageManager().hasSystemFeature("android.hardware.camera.flash")) {
SystemLog.i(TAG, "isSupportCameraFlash = false");
i2 = i + 1;
} else {
i2 = i;
}
int size = ((SensorManager) context.getSystemService("sensor")).getSensorList(-1).size();
if (size <= 7) {
SystemLog.i(TAG, "sensorSize = " + size);
i2++;
}
String str = "userAppNum";
int userAppNum = getUserAppNum(CommandUtil.getSingleInstance().exec("pm list package -3"));
SystemLog.i(TAG, "userAppSize = " + userAppNum);
if (userAppNum <= 5) {
i2++;
}
String exec = CommandUtil.getSingleInstance().exec("cat /proc/self/cgroup");
if (exec == null) {
SystemLog.i(TAG, "filter = " + exec);
i2++;
}
if (i2 > 4) {
return true;
}
return false;
}
private int getUserAppNum(String str) {
if (TextUtils.isEmpty(str)) {
return 0;
}
return str.split("package:").length;
}
private String getProperty(String str) {
String property = CommandUtil.getSingleInstance().getProperty(str);
if (TextUtils.isEmpty(property)) {
return null;
}
return property;
}
public boolean checkXposed() {
Exception exc = new Exception("checkXposed");
for (StackTraceElement className : exc.getStackTrace()) {
if ("de.robv.android.xposed.XposedBridge".equals(className.getClassName())) {
SystemLog.i("checkXposed", "true");
SystemLog.upload(exc);
return true;
}
}
SystemLog.i("checkXposed", "false");
return false;
}
public String getProperty(String str) {
String str2;
try {
Object invoke = Class.forName("android.os.SystemProperties").getMethod("get", new Class[]{String.class}).invoke(null, new Object[]{str});
if (invoke != null) {
str2 = (String) invoke;
} else {
str2 = null;
}
return str2;
} catch (Exception e) {
return null;
}
}