正在查看: klikUMKM v2.0.1 应用的 i.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: klikUMKM v2.0.1 应用的 i.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.datavisorobfus;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.KeyguardManager;
import android.bluetooth.BluetoothAdapter;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.hardware.Sensor;
import android.hardware.SensorManager;
import android.hardware.display.DisplayManager;
import android.location.Location;
import android.location.LocationManager;
import android.media.AudioManager;
import android.media.MediaDrm;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.wifi.ScanResult;
import android.net.wifi.WifiManager;
import android.opengl.GLSurfaceView;
import android.os.BatteryManager;
import android.os.Build;
import android.os.Environment;
import android.os.Handler;
import android.os.Process;
import android.os.SystemClock;
import android.provider.Settings;
import android.telephony.TelephonyManager;
import android.util.DisplayMetrics;
import android.view.Display;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.view.accessibility.AccessibilityManager;
import android.view.inputmethod.InputMethodInfo;
import android.view.inputmethod.InputMethodManager;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.widget.FrameLayout;
import com.datavisor.vangogh.bridge.crypto;
import com.datavisorobfus.h;
import com.google.firebase.encoders.json.BuildConfig;
import com.google.firebase.messaging.Constants;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileFilter;
import java.io.FileReader;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.TimeZone;
import java.util.UUID;
import java.util.regex.Pattern;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class i {
private static i f5954e = new i();
public static String f5955f = m.a;
private final Object a = new Object();
private final Object f5956b = new Object();
private final Object f5957c = new Object();
private final Object f5958d = new Object();
public class a implements Comparator<JSONArray> {
public a(i iVar) {
}
@Override
public int compare(JSONArray jSONArray, JSONArray jSONArray2) {
try {
int i10 = jSONArray.getInt(2);
int i11 = jSONArray2.getInt(2);
if (i10 < i11) {
return 1;
}
return i10 == i11 ? 0 : -1;
} catch (JSONException unused) {
return 0;
}
}
}
public class b implements FileFilter {
public b(i iVar) {
}
@Override
public boolean accept(File file) {
try {
return Pattern.matches("cpu[0-9]", file.getName());
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return false;
}
}
}
public class c implements Runnable {
final Context a;
final com.datavisorobfus.h[] f5959b;
final String[] f5960c;
public class a implements h.c {
public a() {
}
@Override
public void a(String str) {
c cVar = c.this;
cVar.f5960c[0] = str;
synchronized (i.this.f5956b) {
try {
i.this.f5956b.notifyAll();
} finally {
}
}
}
}
public c(Context context, com.datavisorobfus.h[] hVarArr, String[] strArr) {
this.a = context;
this.f5959b = hVarArr;
this.f5960c = strArr;
}
@Override
public void run() {
if (i.h0(this.a)) {
this.f5959b[0] = new com.datavisorobfus.h(this.a, new a());
return;
}
com.datavisor.vangogh.util.f.a("WebView unavailable");
this.f5959b[0] = null;
this.f5960c[0] = "not_supported";
synchronized (i.this.f5956b) {
try {
i.this.f5956b.notifyAll();
} finally {
}
}
}
}
public class d implements Runnable {
final com.datavisorobfus.h[] a;
public d(i iVar, com.datavisorobfus.h[] hVarArr) {
this.a = hVarArr;
}
@Override
public void run() {
com.datavisorobfus.h hVar;
try {
com.datavisorobfus.h[] hVarArr = this.a;
if (hVarArr == null || (hVar = hVarArr[0]) == null) {
return;
}
hVar.a();
this.a[0] = null;
} catch (Throwable unused) {
}
}
}
public class e implements GLSurfaceView.Renderer {
final JSONObject a;
final Context f5962b;
final View f5963c;
final GLSurfaceView f5964d;
public class a implements Runnable {
public a() {
}
@Override
public void run() {
try {
e eVar = e.this;
((ViewGroup) eVar.f5963c).removeView(eVar.f5964d);
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
}
}
}
public e(JSONObject jSONObject, Context context, View view, GLSurfaceView gLSurfaceView) {
this.a = jSONObject;
this.f5962b = context;
this.f5963c = view;
this.f5964d = gLSurfaceView;
}
@Override
public void onDrawFrame(GL10 gl10) {
}
@Override
public void onSurfaceChanged(GL10 gl10, int i10, int i11) {
}
@Override
public void onSurfaceCreated(GL10 gl10, EGLConfig eGLConfig) {
try {
try {
String glGetString = gl10.glGetString(7936);
if (glGetString == null) {
glGetString = BuildConfig.FLAVOR;
}
String glGetString2 = gl10.glGetString(7937);
if (glGetString2 == null) {
glGetString2 = BuildConfig.FLAVOR;
}
com.datavisor.vangogh.util.f.a("strVendor: " + glGetString + " strRenderer: " + glGetString2);
this.a.put("vendor", glGetString);
this.a.put("renderer", glGetString2);
synchronized (i.this.a) {
try {
i.this.a.notifyAll();
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
}
}
new Handler(this.f5962b.getMainLooper()).post(new a());
} catch (Throwable th2) {
com.datavisor.vangogh.util.f.a(th2);
}
} catch (Throwable th3) {
try {
com.datavisor.vangogh.util.f.a(th3);
new Handler(this.f5962b.getMainLooper()).post(new a());
} catch (Throwable th4) {
try {
new Handler(this.f5962b.getMainLooper()).post(new a());
} catch (Throwable th5) {
com.datavisor.vangogh.util.f.a(th5);
}
throw th4;
}
}
}
}
public class f implements Runnable {
final View a;
final GLSurfaceView f5966b;
public f(i iVar, View view, GLSurfaceView gLSurfaceView) {
this.a = view;
this.f5966b = gLSurfaceView;
}
@Override
public void run() {
try {
((ViewGroup) this.a).addView(this.f5966b, 0);
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
}
}
}
public class g implements s {
final String[] a;
final boolean[] f5967b;
public g(String[] strArr, boolean[] zArr) {
this.a = strArr;
this.f5967b = zArr;
}
@Override
public void a(String str) {
this.a[0] = str;
synchronized (i.this.f5957c) {
this.f5967b[0] = true;
try {
i.this.f5957c.notifyAll();
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
}
}
}
}
public class h implements s {
final String[] a;
final boolean[] f5969b;
public h(String[] strArr, boolean[] zArr) {
this.a = strArr;
this.f5969b = zArr;
}
@Override
public void a(String str) {
this.a[0] = str;
synchronized (i.this.f5958d) {
this.f5969b[0] = true;
try {
i.this.f5958d.notifyAll();
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
}
}
}
}
private String C() {
try {
BluetoothAdapter defaultAdapter = BluetoothAdapter.getDefaultAdapter();
if (defaultAdapter == null) {
return null;
}
String address = defaultAdapter.isEnabled() ? defaultAdapter.getAddress() : null;
if (address == null || address.endsWith("00:00:00:00:00")) {
address = a(defaultAdapter);
}
if (com.datavisor.vangogh.util.h.a(address)) {
return null;
}
return address;
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return null;
}
}
private Activity D() {
try {
Class<?> cls = Class.forName("android.app.ActivityThread");
Object invoke = cls.getMethod("currentActivityThread", new Class[0]).invoke(null, new Object[0]);
Field declaredField = cls.getDeclaredField("mActivities");
declaredField.setAccessible(true);
for (Object obj : ((Map) declaredField.get(invoke)).values()) {
Class<?> cls2 = obj.getClass();
Field declaredField2 = cls2.getDeclaredField("paused");
declaredField2.setAccessible(true);
if (!declaredField2.getBoolean(obj)) {
Field declaredField3 = cls2.getDeclaredField("activity");
declaredField3.setAccessible(true);
return (Activity) declaredField3.get(obj);
}
}
return null;
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return null;
}
}
public static i E() {
return f5954e;
}
private String F() {
String str;
try {
new FileReader("/sys/block/mmcblk0/device/type");
str = "/sys/block/mmcblk0/device/";
} catch (Throwable unused) {
str = null;
}
try {
new FileReader("/sys/block/mmcblk1/device/type");
str = "/sys/block/mmcblk1/device/";
} catch (Throwable unused2) {
}
try {
new FileReader("/sys/block/mmcblk2/device/type");
return "/sys/block/mmcblk2/device/";
} catch (Throwable unused3) {
return str;
}
}
private String f0(Context context) {
byte[] hardwareAddress;
if (b(context, "android.permission.ACCESS_WIFI_STATE")) {
com.datavisor.vangogh.util.f.a(f5955f, "no permission ACCESS_WIFI_STATE");
return "no_permission";
}
try {
String a10 = k.d().a(context);
if (com.datavisor.vangogh.util.h.a(a10) || (hardwareAddress = NetworkInterface.getByInetAddress(InetAddress.getByName(a10)).getHardwareAddress()) == null) {
return "empty";
}
StringBuilder sb2 = new StringBuilder();
for (byte b3 : hardwareAddress) {
sb2.append(String.format("%02X:", Integer.valueOf(b3 & 255)));
}
if (sb2.length() > 0) {
sb2.deleteCharAt(sb2.length() - 1);
}
if (!sb2.toString().equals("02:00:00:00:00:00") && !sb2.toString().equals("00:00:00:00:00:00")) {
return sb2.toString();
}
return "empty";
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
private WindowManager g0(Context context) {
Object systemService;
try {
if (Build.VERSION.SDK_INT > 30) {
systemService = context.getSystemService((Class<Object>) DisplayManager.class);
context = context.createDisplayContext(((DisplayManager) systemService).getDisplay(0)).createWindowContext(2038, null);
}
return (WindowManager) context.getSystemService("window");
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return null;
}
}
public static boolean h0(Context context) {
try {
new WebView(context).destroy();
return true;
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a("WebView Unavailable: ", th);
return false;
}
}
public String A() {
try {
String displayName = TimeZone.getDefault().getDisplayName(false, 0);
return com.datavisor.vangogh.util.h.a(displayName) ? "empty" : displayName;
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String B() {
try {
byte[] propertyByteArray = new MediaDrm(new UUID(-1301668207276963122L, -6645017420763422227L)).getPropertyByteArray("deviceUniqueId");
StringBuilder sb2 = new StringBuilder();
for (byte b3 : propertyByteArray) {
sb2.append(String.format("%02x", Byte.valueOf(b3)));
}
return sb2.toString();
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String G(Context context) {
try {
if (b(context, "android.permission.READ_PHONE_STATE")) {
com.datavisor.vangogh.util.f.a(f5955f, "no permission READ_PHONE_STATE");
return "no_permission";
}
if (context == null) {
com.datavisor.vangogh.util.f.a(f5955f, "context is null");
return "para_err";
}
String simOperator = ((TelephonyManager) context.getSystemService("phone")).getSimOperator();
return com.datavisor.vangogh.util.h.a(simOperator) ? "empty" : simOperator;
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String H(Context context) {
try {
if (b(context, "android.permission.READ_PHONE_STATE")) {
com.datavisor.vangogh.util.f.a(f5955f, "no permission READ_PHONE_STATE");
return "no_permission";
}
if (context == null) {
com.datavisor.vangogh.util.f.a(f5955f, "context is null");
return "para_err";
}
String networkOperatorName = ((TelephonyManager) context.getSystemService("phone")).getNetworkOperatorName();
return com.datavisor.vangogh.util.h.a(networkOperatorName) ? "empty" : networkOperatorName;
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String I(Context context) {
boolean isMock;
try {
if (b(context, "android.permission.ACCESS_COARSE_LOCATION") && b(context, "android.permission.ACCESS_FINE_LOCATION")) {
return "no_permission";
}
JSONObject jSONObject = new JSONObject();
LocationManager locationManager = (LocationManager) context.getSystemService("location");
for (String str : locationManager.getProviders(true)) {
Location lastKnownLocation = locationManager.getLastKnownLocation(str);
if (lastKnownLocation != null) {
JSONArray jSONArray = new JSONArray();
int i10 = Build.VERSION.SDK_INT;
jSONArray.put(lastKnownLocation.isFromMockProvider() ? "1" : "0");
if (i10 >= 31) {
isMock = lastKnownLocation.isMock();
jSONArray.put(isMock ? "1" : "0");
} else {
jSONArray.put("empty");
}
jSONObject.put(str, jSONArray);
}
}
return jSONObject.toString();
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String J(Context context) {
String str;
String str2;
if (b(context, "android.permission.CHANGE_WIFI_STATE")) {
str = f5955f;
str2 = "no permission CHANGE_WIFI_STATE";
} else if (b(context, "android.permission.ACCESS_WIFI_STATE")) {
str = f5955f;
str2 = "no permission ACCESS_WIFI_STATE";
} else if (b(context, "android.permission.ACCESS_NETWORK_STATE")) {
str = f5955f;
str2 = "no permission ACCESS_NETWORK_STATE";
} else {
if (!b(context, "android.permission.ACCESS_FINE_LOCATION")) {
try {
JSONArray jSONArray = new JSONArray();
WifiManager wifiManager = (WifiManager) context.getSystemService("wifi");
wifiManager.startScan();
for (ScanResult scanResult : wifiManager.getScanResults()) {
JSONArray jSONArray2 = new JSONArray();
jSONArray2.put(scanResult.SSID);
jSONArray2.put(scanResult.BSSID);
jSONArray2.put(scanResult.level);
jSONArray.put(jSONArray2);
}
ArrayList arrayList = new ArrayList();
for (int i10 = 0; i10 < jSONArray.length(); i10++) {
arrayList.add((JSONArray) jSONArray.get(i10));
}
Collections.sort(arrayList, new a(this));
JSONArray jSONArray3 = new JSONArray();
for (int i11 = 0; i11 < Math.min(arrayList.size(), 10); i11++) {
jSONArray3.put(arrayList.get(i11));
}
return jSONArray3.toString();
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
str = f5955f;
str2 = "no permission ACCESS_FINE_LOCATION";
}
com.datavisor.vangogh.util.f.a(str, str2);
return "no_permission";
}
public String K(Context context) {
NetworkInfo activeNetworkInfo;
if (context == null) {
com.datavisor.vangogh.util.f.a(f5955f, "context is null");
return "para_err";
}
if (b(context, "android.permission.ACCESS_NETWORK_STATE")) {
com.datavisor.vangogh.util.f.a(f5955f, "no ACCESS_NETWORK_STATE");
return "no_permission";
}
try {
ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService("connectivity");
if (connectivityManager == null || (activeNetworkInfo = connectivityManager.getActiveNetworkInfo()) == null || !activeNetworkInfo.isAvailable()) {
return "-1";
}
return activeNetworkInfo.getType() + BuildConfig.FLAVOR;
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public synchronized String L(Context context) {
String[] strArr;
strArr = new String[]{"empty"};
boolean[] zArr = {false};
r.b(context, new g(strArr, zArr));
synchronized (this.f5957c) {
try {
if (!zArr[0]) {
try {
this.f5957c.wait(50L);
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
}
}
} catch (Throwable th2) {
throw th2;
}
}
com.datavisor.vangogh.util.f.a("getOAID getOAID getOAID getOAID: " + strArr[0]);
return strArr[0];
}
public String M(Context context) {
return com.datavisor.vangogh.util.g.a(context);
}
public String N(Context context) {
return com.datavisor.vangogh.util.g.b(context);
}
public String O(Context context) {
if (!b(context, "android.permission.READ_PHONE_STATE")) {
return com.datavisor.vangogh.util.g.c(context);
}
com.datavisor.vangogh.util.f.a(f5955f, "no permission READ_PHONE_STATE");
return "no_permission";
}
public String P(Context context) {
if (!b(context, "android.permission.READ_PHONE_STATE")) {
return com.datavisor.vangogh.util.g.d(context);
}
com.datavisor.vangogh.util.f.a(f5955f, "no permission READ_PHONE_STATE");
return "no_permission";
}
public String Q(Context context) {
if (!b(context, "android.permission.READ_PHONE_STATE")) {
return com.datavisor.vangogh.util.g.e(context);
}
com.datavisor.vangogh.util.f.a(f5955f, "no permission READ_PHONE_STATE");
return "no_permission";
}
@SuppressLint({"MissingPermission"})
public String R(Context context) {
String str;
if (b(context, "android.permission.READ_PHONE_STATE")) {
com.datavisor.vangogh.util.f.a(f5955f, "no permission READ_PHONE_STATE");
return "no_permission";
}
if (context == null) {
com.datavisor.vangogh.util.f.a(f5955f, "context is null");
return "para_err";
}
try {
TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService("phone");
str = telephonyManager != null ? telephonyManager.getSimSerialNumber() : "default";
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
str = "exception";
}
return com.datavisor.vangogh.util.h.a(str) ? "empty" : str;
}
public String S(Context context) {
try {
WindowManager g02 = g0(context);
if (g02 == null) {
return "empty";
}
DisplayMetrics displayMetrics = new DisplayMetrics();
g02.getDefaultDisplay().getRealMetrics(displayMetrics);
return BuildConfig.FLAVOR + displayMetrics.heightPixels;
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String T(Context context) {
try {
if (context == null) {
com.datavisor.vangogh.util.f.a("getScreenSharingStatus context is null");
return "empty";
}
Display[] displays = ((DisplayManager) context.getSystemService(Constants.ScionAnalytics.MessageType.DISPLAY_NOTIFICATION)).getDisplays();
if (displays == null) {
return "empty";
}
com.datavisor.vangogh.util.f.a("Current screen num: " + displays.length);
return displays.length > 1 ? "1" : "0";
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String U(Context context) {
try {
WindowManager g02 = g0(context);
if (g02 == null) {
return "empty";
}
DisplayMetrics displayMetrics = new DisplayMetrics();
g02.getDefaultDisplay().getRealMetrics(displayMetrics);
return BuildConfig.FLAVOR + displayMetrics.widthPixels;
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String V(Context context) {
try {
JSONArray jSONArray = new JSONArray();
for (Sensor sensor : ((SensorManager) context.getSystemService("sensor")).getSensorList(-1)) {
JSONArray jSONArray2 = new JSONArray();
jSONArray2.put(sensor.getName());
jSONArray2.put(sensor.getType() + BuildConfig.FLAVOR);
jSONArray2.put(sensor.getVendor());
jSONArray.put(jSONArray2);
}
return jSONArray.toString();
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String W(Context context) {
try {
return BuildConfig.FLAVOR + ((SensorManager) context.getSystemService("sensor")).getSensorList(-1).size();
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String X(Context context) {
try {
if (b(context, "android.permission.READ_PHONE_STATE")) {
com.datavisor.vangogh.util.f.a(f5955f, "no permission READ_PHONE_STATE");
return "no_permission";
}
if (context == null) {
com.datavisor.vangogh.util.f.a(f5955f, "context is null");
return "para_err";
}
TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService("phone");
if (telephonyManager == null) {
return "empty";
}
return BuildConfig.FLAVOR + telephonyManager.getSimState();
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String Y(Context context) {
try {
WindowManager g02 = g0(context);
if (g02 == null) {
return "empty";
}
DisplayMetrics displayMetrics = new DisplayMetrics();
g02.getDefaultDisplay().getRealMetrics(displayMetrics);
int i10 = displayMetrics.widthPixels;
int i11 = displayMetrics.heightPixels;
return Math.max(i10, i11) + "*" + Math.min(i10, i11);
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String Z(Context context) {
try {
String defaultUserAgent = WebSettings.getDefaultUserAgent(context);
if (com.datavisor.vangogh.util.h.a(defaultUserAgent)) {
defaultUserAgent = System.getProperty("http.agent");
}
if (com.datavisor.vangogh.util.h.a(defaultUserAgent)) {
return "empty";
}
StringBuilder sb2 = new StringBuilder();
int length = defaultUserAgent.length();
for (int i10 = 0; i10 < length; i10++) {
char charAt = defaultUserAgent.charAt(i10);
if (charAt > 31 && charAt < 127) {
sb2.append(charAt);
}
sb2.append(String.format("\\u%04x", Integer.valueOf(charAt)));
}
return sb2.toString();
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String a0(Context context) {
if (context == null) {
com.datavisor.vangogh.util.f.a(f5955f, "context is null");
return "para_err";
}
try {
JSONObject jSONObject = new JSONObject();
AudioManager audioManager = (AudioManager) context.getSystemService("audio");
int i10 = audioManager.getRingerMode() == 0 ? 1 : 0;
int streamVolume = audioManager.getStreamVolume(0);
int streamVolume2 = audioManager.getStreamVolume(1);
int streamVolume3 = audioManager.getStreamVolume(2);
int streamVolume4 = audioManager.getStreamVolume(3);
int streamVolume5 = audioManager.getStreamVolume(4);
jSONObject.put("ringermode", BuildConfig.FLAVOR + i10);
jSONObject.put("call", BuildConfig.FLAVOR + streamVolume);
jSONObject.put("system", BuildConfig.FLAVOR + streamVolume2);
jSONObject.put("ring", BuildConfig.FLAVOR + streamVolume3);
jSONObject.put("music", BuildConfig.FLAVOR + streamVolume4);
jSONObject.put("alarm", BuildConfig.FLAVOR + streamVolume5);
return jSONObject.toString();
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public int b(Context context) {
NetworkInfo activeNetworkInfo;
if (context == null || b(context, "android.permission.ACCESS_NETWORK_STATE")) {
return -1;
}
try {
ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService("connectivity");
if (connectivityManager != null && (activeNetworkInfo = connectivityManager.getActiveNetworkInfo()) != null && activeNetworkInfo.isAvailable()) {
return activeNetworkInfo.getType();
}
} catch (Throwable unused) {
}
return -1;
}
public String b0(Context context) {
try {
String[] strArr = {"default"};
Handler handler = new Handler(context.getMainLooper());
com.datavisorobfus.h[] hVarArr = new com.datavisorobfus.h[1];
handler.post(new c(context, hVarArr, strArr));
synchronized (this.f5956b) {
try {
this.f5956b.wait(1000L);
} finally {
com.datavisor.vangogh.util.f.a("now wait for webrtc finished");
handler.post(new d(this, hVarArr));
return strArr[0];
}
}
com.datavisor.vangogh.util.f.a("now wait for webrtc finished");
handler.post(new d(this, hVarArr));
return strArr[0];
} catch (Throwable unused) {
return "exception";
}
}
public String c0(Context context) {
String str;
String str2;
String str3;
if (b(context, "android.permission.ACCESS_WIFI_STATE")) {
str2 = f5955f;
str3 = "no ACCESS_WIFI_STATE";
} else {
if (!b(context, "android.permission.ACCESS_COARSE_LOCATION")) {
if (context == null) {
com.datavisor.vangogh.util.f.a(f5955f, "context is null");
return "para_err";
}
try {
WifiManager wifiManager = (WifiManager) context.getSystemService("wifi");
str = wifiManager.isWifiEnabled() ? wifiManager.getConnectionInfo().getBSSID() : "default";
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
str = "exception";
}
return (com.datavisor.vangogh.util.h.a(str) || str.equals("02:00:00:00:00:00") || str.equals("00:00:00:00:00:00")) ? "empty" : str;
}
str2 = f5955f;
str3 = "no ACCESS_COARSE_LOCATION";
}
com.datavisor.vangogh.util.f.a(str2, str3);
return "no_permission";
}
public String d0(Context context) {
if (b(context, "android.permission.ACCESS_WIFI_STATE")) {
com.datavisor.vangogh.util.f.a(f5955f, "no ACCESS_WIFI_STATE");
return "no_permission";
}
if (context == null) {
com.datavisor.vangogh.util.f.a(f5955f, "context is null");
return "para_err";
}
try {
WifiManager wifiManager = (WifiManager) context.getSystemService("wifi");
String ssid = wifiManager.isWifiEnabled() ? wifiManager.getConnectionInfo().getSSID() : null;
if (com.datavisor.vangogh.util.h.b(ssid) && ssid.equals("<unknown ssid>")) {
ssid = ((ConnectivityManager) context.getSystemService("connectivity")).getActiveNetworkInfo().getExtraInfo();
}
if (!com.datavisor.vangogh.util.h.a(ssid)) {
if (ssid.length() < 2 || !ssid.startsWith("\"") || !ssid.endsWith("\"")) {
return ssid;
}
String substring = ssid.substring(1, ssid.length() - 1);
if (!com.datavisor.vangogh.util.h.a(substring)) {
return substring;
}
}
return "empty";
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String e() {
try {
return new File("/sys/devices/system/cpu/").listFiles(new b(this)).length + BuildConfig.FLAVOR;
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public boolean e0(Context context) {
try {
if (b(context, "android.permission.ACCESS_NETWORK_STATE")) {
com.datavisor.vangogh.util.f.a(f5955f, "no ACCESS_NETWORK_STATE");
return true;
}
if (context == null) {
com.datavisor.vangogh.util.f.a(f5955f, "context is null");
return true;
}
NetworkInfo activeNetworkInfo = ((ConnectivityManager) context.getSystemService("connectivity")).getActiveNetworkInfo();
return activeNetworkInfo != null && activeNetworkInfo.isAvailable();
} catch (Throwable unused) {
return true;
}
}
public String f() {
try {
String e10 = m0.e("/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq");
return com.datavisor.vangogh.util.h.a(e10) ? "empty" : e10;
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String g() {
try {
String b3 = m0.b("Processor");
return com.datavisor.vangogh.util.h.a(b3) ? "empty" : b3;
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String h() {
try {
String b3 = m0.b("Hardware");
return com.datavisor.vangogh.util.h.a(b3) ? "empty" : b3;
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String i() {
return Build.BRAND;
}
public String j() {
try {
String c5 = m0.c(crypto.convert("KZHQy23Vq8RBVph/BuAb"));
return com.datavisor.vangogh.util.h.a(c5) ? BuildConfig.FLAVOR : c5;
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String k() {
return Build.MANUFACTURER;
}
public String l() {
return Build.DEVICE;
}
public String m() {
return Build.HARDWARE;
}
public String n() {
try {
String locale = Locale.getDefault().toString();
return com.datavisor.vangogh.util.h.a(locale) ? "empty" : locale;
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String o() {
try {
return new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(new Date(System.currentTimeMillis()));
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String p() {
return BuildConfig.FLAVOR + System.currentTimeMillis();
}
public String q() {
BufferedReader bufferedReader;
FileReader fileReader = null;
try {
FileReader fileReader2 = new FileReader("/proc/meminfo");
try {
bufferedReader = new BufferedReader(fileReader2, 8192);
} catch (Throwable th) {
th = th;
bufferedReader = null;
}
try {
String readLine = bufferedReader.readLine();
if (readLine == null) {
try {
fileReader2.close();
} catch (Throwable unused) {
}
try {
bufferedReader.close();
return "empty";
} catch (Throwable unused2) {
return "empty";
}
}
String str = BuildConfig.FLAVOR + Long.valueOf(Long.parseLong(readLine.split("\\s+")[1]));
try {
fileReader2.close();
} catch (Throwable unused3) {
}
try {
bufferedReader.close();
} catch (Throwable unused4) {
}
return str;
} catch (Throwable th2) {
th = th2;
fileReader = fileReader2;
try {
com.datavisor.vangogh.util.f.a(th);
if (fileReader != null) {
try {
fileReader.close();
} catch (Throwable unused5) {
}
}
if (bufferedReader == null) {
return "exception";
}
try {
bufferedReader.close();
return "exception";
} catch (Throwable unused6) {
return "exception";
}
} finally {
}
}
} catch (Throwable th3) {
th = th3;
bufferedReader = null;
}
}
public String r() {
return Build.MODEL;
}
public String s() {
try {
return Process.myPid() + BuildConfig.FLAVOR;
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String t() {
String F = F();
if (F == null) {
return "empty";
}
try {
return new BufferedReader(new FileReader(F.concat("csd"))).readLine();
} catch (Throwable unused) {
return "exception";
}
}
public String u() {
String F = F();
if (F == null) {
return "empty";
}
try {
return new BufferedReader(new FileReader(F.concat("cid"))).readLine();
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String v() {
String F = F();
if (F == null) {
return "empty";
}
try {
return new BufferedReader(new FileReader(F.concat("name"))).readLine();
} catch (Throwable unused) {
return "exception";
}
}
public String w() {
String F = F();
if (F == null) {
return "empty";
}
try {
return new BufferedReader(new FileReader(F.concat("serial"))).readLine();
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String x() {
try {
String a10 = l0.a(Build.BOARD + Build.BRAND + Build.CPU_ABI + Build.DEVICE + Build.DISPLAY + Build.HOST + Build.ID + Build.MANUFACTURER + Build.MODEL + Build.PRODUCT + Build.TAGS + Build.TYPE + Build.USER);
return com.datavisor.vangogh.util.h.a(a10) ? "empty" : a10;
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String y() {
try {
return SystemClock.elapsedRealtime() + BuildConfig.FLAVOR;
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String z() {
try {
return BuildConfig.FLAVOR + (System.currentTimeMillis() - SystemClock.elapsedRealtime());
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String A(Context context) {
List<InputMethodInfo> inputMethodList;
try {
JSONArray jSONArray = new JSONArray();
JSONArray jSONArray2 = new JSONArray();
InputMethodManager inputMethodManager = (InputMethodManager) context.getSystemService("input_method");
Object obj = "empty";
if (inputMethodManager != null && (inputMethodList = inputMethodManager.getInputMethodList()) != null) {
for (int i10 = 0; i10 < inputMethodList.size(); i10++) {
InputMethodInfo inputMethodInfo = inputMethodList.get(i10);
String packageName = inputMethodInfo.getPackageName();
String charSequence = inputMethodInfo.loadLabel(context.getPackageManager()).toString();
if (com.datavisor.vangogh.util.h.b(packageName)) {
if (com.datavisor.vangogh.util.h.a(charSequence)) {
charSequence = "empty";
}
JSONArray jSONArray3 = new JSONArray();
jSONArray3.put(packageName);
jSONArray3.put(charSequence);
jSONArray2.put(jSONArray3);
}
}
}
String string = Settings.Secure.getString(context.getContentResolver(), "enabled_input_methods");
if (com.datavisor.vangogh.util.h.a(string)) {
string = "empty";
}
String string2 = Settings.Secure.getString(context.getContentResolver(), "default_input_method");
if (!com.datavisor.vangogh.util.h.a(string2)) {
obj = string2;
}
jSONArray.put(jSONArray2);
jSONArray.put(string);
jSONArray.put(obj);
return jSONArray.toString();
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String B(Context context) {
if (b(context, "android.permission.ACCESS_WIFI_STATE")) {
com.datavisor.vangogh.util.f.a(f5955f, "no permission ACCESS_WIFI_STATE");
return "no_permission";
}
if (context == null) {
com.datavisor.vangogh.util.f.a(f5955f, "context is null");
return "para_err";
}
try {
String macAddress = ((WifiManager) context.getSystemService("wifi")).getConnectionInfo().getMacAddress();
return (com.datavisor.vangogh.util.h.a(macAddress) || macAddress.equals("02:00:00:00:00:00")) ? "empty" : macAddress.equals("00:00:00:00:00:00") ? "empty" : macAddress;
} catch (Throwable unused) {
return "exception";
}
}
public String C(Context context) {
if (b(context, "android.permission.ACCESS_WIFI_STATE")) {
com.datavisor.vangogh.util.f.a(f5955f, "no permission ACCESS_WIFI_STATE");
return "no_permission";
}
if (context == null) {
com.datavisor.vangogh.util.f.a(f5955f, "context is null");
return "para_err";
}
try {
String macAddress = ((WifiManager) context.getSystemService("wifi")).getConnectionInfo().getMacAddress();
if (!com.datavisor.vangogh.util.h.a(macAddress) && !macAddress.equals("02:00:00:00:00:00") && !macAddress.equals("00:00:00:00:00:00")) {
return macAddress;
}
return a(context, "wlan0");
} catch (Throwable unused) {
com.datavisor.vangogh.util.f.a(f5955f, "throw Exce");
return "exception";
}
}
public String D(Context context) {
try {
return b(context) == 0 ? f0(context) : "empty";
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String E(Context context) {
try {
return b(context) == 1 ? f0(context) : "empty";
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String F(Context context) {
if (b(context, "android.permission.READ_PHONE_STATE")) {
com.datavisor.vangogh.util.f.a(f5955f, "no permission READ_PHONE_STATE");
return "no_permission";
}
try {
TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService("phone");
String str = (String) telephonyManager.getClass().getMethod("getDeviceId", Integer.TYPE).invoke(telephonyManager, 2);
return a(str) ? "empty" : str;
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String a() {
try {
long freeSpace = Environment.getDataDirectory().getFreeSpace();
if (freeSpace == 0) {
return "default";
}
return freeSpace + BuildConfig.FLAVOR;
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String c() {
return Build.VERSION.RELEASE;
}
public String d() {
return Build.CPU_ABI;
}
public String e(Context context) {
try {
Map<String, Integer> a10 = m0.a();
if (a10 == null) {
return "empty";
}
return BuildConfig.FLAVOR + a10.get("userid").intValue();
} catch (Throwable unused) {
return "exception";
}
}
public String f(Context context) {
try {
String b3 = l0.b(context.getPackageManager().getPackageInfo(context.getPackageName(), 64).signatures[0].toByteArray());
return com.datavisor.vangogh.util.h.a(b3) ? "empty" : b3;
} catch (Throwable unused) {
return "exception";
}
}
public String g(Context context) {
try {
return BuildConfig.FLAVOR + ((Double) Class.forName("com.android.internal.os.PowerProfile").getMethod("getBatteryCapacity", new Class[0]).invoke(Class.forName("com.android.internal.os.PowerProfile").getConstructor(Context.class).newInstance(context), new Object[0])).doubleValue();
} catch (Throwable unused) {
return "exception";
}
}
public synchronized String h(Context context) {
try {
int intProperty = ((BatteryManager) context.getSystemService("batterymanager")).getIntProperty(4);
if (intProperty == 0) {
if (context.getApplicationInfo().targetSdkVersion < 28) {
return "not_supported";
}
return intProperty + BuildConfig.FLAVOR;
}
if (Integer.MIN_VALUE == intProperty) {
return "not_supported";
}
return intProperty + BuildConfig.FLAVOR;
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public synchronized String i(Context context) {
try {
if (Build.VERSION.SDK_INT < 26) {
return "empty";
}
return ((BatteryManager) context.getSystemService("batterymanager")).getIntProperty(6) + BuildConfig.FLAVOR;
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String j(Context context) {
try {
Intent registerReceiver = context.registerReceiver(null, new IntentFilter("android.intent.action.BATTERY_CHANGED"));
if (registerReceiver == null) {
return "empty";
}
int intExtra = registerReceiver.getIntExtra("voltage", -10000);
if (intExtra == -10000) {
return "default";
}
return BuildConfig.FLAVOR + intExtra;
} catch (Throwable unused) {
return "exception";
}
}
public java.lang.String k(android.content.Context r6) {
throw new UnsupportedOperationException("Method not decompiled: com.datavisorobfus.i.k(android.content.Context):java.lang.String");
}
public String l(Context context) {
if (context == null) {
return "empty";
}
try {
return Settings.System.getInt(context.getContentResolver(), "screen_brightness") + BuildConfig.FLAVOR;
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String m(Context context) {
StringBuilder sb2;
try {
boolean b3 = o.a(context).b("uuid10");
if (Build.VERSION.SDK_INT < 29 || !b3) {
return "empty";
}
String absolutePath = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MUSIC).getAbsolutePath(), "au_uu_SzH34yR2.mp3").getAbsolutePath();
String a10 = com.datavisor.vangogh.storage.local.a.a(context, "au_uu_SzH34yR2");
if (!com.datavisor.vangogh.util.h.a(a10)) {
long iVar = crypto.geti(absolutePath);
sb2 = new StringBuilder();
sb2.append(iVar);
sb2.append("_");
sb2.append(a10);
} else {
if (com.datavisor.vangogh.util.e.a(absolutePath)) {
return "empty";
}
String uuid = UUID.randomUUID().toString();
if (!com.datavisor.vangogh.storage.local.a.a(context, "au_uu_SzH34yR2", uuid)) {
return "empty";
}
long iVar2 = crypto.geti(absolutePath);
sb2 = new StringBuilder();
sb2.append(iVar2);
sb2.append("_");
sb2.append(uuid);
}
return sb2.toString();
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String n(Context context) {
try {
String a10 = com.datavisor.vangogh.storage.local.b.a(".__psek.sys");
if (com.datavisor.vangogh.util.h.a(a10)) {
a10 = k0.e(context, "DVSPSEQ");
}
String str = ((com.datavisor.vangogh.util.h.b(a10) ? Integer.parseInt(a10) : 0) + 1) + BuildConfig.FLAVOR;
com.datavisor.vangogh.storage.local.b.a(".__psek.sys", str);
k0.a(context, "DVSPSEQ", str);
return str;
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public synchronized String o(Context context) {
String str;
try {
String a10 = com.datavisor.vangogh.storage.local.b.a(".__puuk.sys");
String e10 = k0.e(context, "DVSPUUID");
str = BuildConfig.FLAVOR;
if (com.datavisor.vangogh.util.h.b(a10)) {
str = a10;
} else if (com.datavisor.vangogh.util.h.b(e10)) {
str = e10;
}
if (com.datavisor.vangogh.util.h.a(str)) {
str = UUID.randomUUID().toString();
}
if (com.datavisor.vangogh.util.h.a(a10)) {
com.datavisor.vangogh.storage.local.b.a(".__puuk.sys", str);
}
if (com.datavisor.vangogh.util.h.a(e10)) {
k0.a(context, "DVSPUUID", str);
}
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
return str;
}
public String p(Context context) {
return "empty";
}
public String q(Context context) {
try {
String a10 = com.datavisor.vangogh.storage.local.b.a(".__pfrk.sys");
String e10 = k0.e(context, "DVSPFIRSTREPORTTIME");
String str = com.datavisor.vangogh.util.h.b(a10) ? a10 : com.datavisor.vangogh.util.h.b(e10) ? e10 : BuildConfig.FLAVOR;
if (com.datavisor.vangogh.util.h.a(str)) {
str = System.currentTimeMillis() + BuildConfig.FLAVOR;
}
if (com.datavisor.vangogh.util.h.a(a10)) {
com.datavisor.vangogh.storage.local.b.a(".__pfrk.sys", str);
}
if (com.datavisor.vangogh.util.h.a(e10)) {
k0.a(context, "DVSPFIRSTREPORTTIME", str);
}
return str;
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String r(Context context) {
String optString;
try {
String d6 = k0.d(context, "DVSPOPENGL");
if (com.datavisor.vangogh.util.h.b(d6)) {
return d6;
}
Activity D = D();
if (D == null) {
return "empty";
}
JSONObject jSONObject = new JSONObject();
View decorView = D.getWindow().getDecorView();
GLSurfaceView gLSurfaceView = new GLSurfaceView(D);
try {
e eVar = new e(jSONObject, context, decorView, gLSurfaceView);
gLSurfaceView.setEGLContextClientVersion(1);
gLSurfaceView.setEGLConfigChooser(8, 8, 8, 8, 0, 0);
gLSurfaceView.setRenderer(eVar);
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(1, 1);
layoutParams.height = 1;
layoutParams.width = 1;
gLSurfaceView.setLayoutParams(layoutParams);
new Handler(context.getMainLooper()).post(new f(this, decorView, gLSurfaceView));
synchronized (this.a) {
try {
this.a.wait(500L);
} finally {
optString = jSONObject.optString("vendor");
String optString2 = jSONObject.optString("renderer");
return !com.datavisor.vangogh.util.h.b(optString) ? "empty" : "empty";
}
}
optString = jSONObject.optString("vendor");
String optString22 = jSONObject.optString("renderer");
if (!com.datavisor.vangogh.util.h.b(optString) && com.datavisor.vangogh.util.h.b(optString22)) {
String str = optString + "~" + optString22;
k0.b(context, "DVSPOPENGL", str);
return str;
}
} catch (Throwable unused) {
return "exception";
}
} catch (Throwable unused2) {
return "exception";
}
}
public synchronized String s(Context context) {
String[] strArr;
strArr = new String[]{"empty"};
boolean[] zArr = {false};
r.a(context, new h(strArr, zArr));
synchronized (this.f5958d) {
try {
if (!zArr[0]) {
try {
this.f5958d.wait(50L);
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
}
}
} catch (Throwable th2) {
throw th2;
}
}
com.datavisor.vangogh.util.f.a("getGoogleAdsId getGoogleAdsId getGoogleAdsId getGoogleAdsId: " + strArr[0]);
return strArr[0];
}
public String t(Context context) {
try {
KeyguardManager keyguardManager = (KeyguardManager) context.getSystemService("keyguard");
return keyguardManager != null ? keyguardManager.isKeyguardSecure() ? "1" : "0" : "empty";
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
@SuppressLint({"MissingPermission"})
public String u(Context context) {
String str;
if (b(context, "android.permission.READ_PHONE_STATE")) {
com.datavisor.vangogh.util.f.a(f5955f, "no permission READ_PHONE_STATE");
return "no_permission";
}
if (context == null) {
com.datavisor.vangogh.util.f.a(f5955f, "context is null");
return "para_err";
}
try {
TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService("phone");
str = telephonyManager != null ? telephonyManager.getDeviceId() : "default";
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
str = "exception";
}
return com.datavisor.vangogh.util.h.a(str) ? "empty" : str;
}
public String v(Context context) {
if (b(context, "android.permission.READ_PHONE_STATE")) {
com.datavisor.vangogh.util.f.a(f5955f, "no permission READ_PHONE_STATE");
return "no_permission";
}
try {
TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService("phone");
String str = (String) telephonyManager.getClass().getMethod("getDeviceId", Integer.TYPE).invoke(telephonyManager, 1);
return a(str) ? "empty" : str;
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
@SuppressLint({"MissingPermission"})
public String w(Context context) {
String str;
if (b(context, "android.permission.READ_PHONE_STATE")) {
com.datavisor.vangogh.util.f.a(f5955f, "no permission READ_PHONE_STATE");
return "no_permission";
}
if (context == null) {
com.datavisor.vangogh.util.f.a(f5955f, "context is null");
return "para_err";
}
try {
TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService("phone");
str = telephonyManager != null ? telephonyManager.getSubscriberId() : "default";
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
str = "exception";
}
return com.datavisor.vangogh.util.h.a(str) ? "empty" : str;
}
public String x(Context context) {
String string;
if (context == null) {
com.datavisor.vangogh.util.f.a("testMockLocation context is null");
return "para_err";
}
try {
return (Settings.Secure.getInt(context.getContentResolver(), "location_mode") == 0 || (string = Settings.Secure.getString(context.getContentResolver(), "location_providers_allowed")) == null) ? "0" : string.length() == 0 ? "1" : "0";
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "0";
}
}
public String y(Context context) {
try {
return Settings.Secure.getInt(context.getContentResolver(), "adb_enabled", 0) > 0 ? "1" : "0";
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String z(Context context) {
try {
return (context.getResources().getConfiguration().screenLayout & 15) >= 3 ? "1" : "0";
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
private String a(BluetoothAdapter bluetoothAdapter) {
Object obj;
try {
Field declaredField = BluetoothAdapter.class.getDeclaredField("mService");
declaredField.setAccessible(true);
obj = declaredField.get(bluetoothAdapter);
} catch (Throwable unused) {
}
if (obj == null) {
return null;
}
Method declaredMethod = obj.getClass().getDeclaredMethod("getAddress", new Class[0]);
declaredMethod.setAccessible(true);
Object invoke = declaredMethod.invoke(obj, new Object[0]);
if (invoke != null && (invoke instanceof String)) {
return (String) invoke;
}
return null;
}
public String b() {
try {
long totalSpace = Environment.getDataDirectory().getTotalSpace();
if (totalSpace == 0) {
return "default";
}
return BuildConfig.FLAVOR + totalSpace;
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public String c(Context context) {
try {
if (context == null) {
com.datavisor.vangogh.util.f.a("context is null");
return "para_err";
}
AccessibilityManager accessibilityManager = (AccessibilityManager) context.getSystemService("accessibility");
boolean isEnabled = accessibilityManager != null ? accessibilityManager.isEnabled() : false;
String string = Settings.Secure.getString(context.getContentResolver(), "enabled_accessibility_services");
if (string == null) {
string = BuildConfig.FLAVOR;
}
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("on", isEnabled);
jSONObject.put("value", string);
return jSONObject.toString();
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "empty";
}
} catch (Throwable th2) {
com.datavisor.vangogh.util.f.a(th2);
return "exception";
}
}
public String d(Context context) {
if (context == null) {
com.datavisor.vangogh.util.f.a(f5955f, "context is null");
return "para_err";
}
try {
String string = Settings.Secure.getString(context.getContentResolver(), "android_id");
if (!com.datavisor.vangogh.util.h.a(string)) {
return string;
}
com.datavisor.vangogh.util.f.a(f5955f, "androidId is null");
return "empty";
} catch (Throwable th) {
com.datavisor.vangogh.util.f.a(th);
return "exception";
}
}
public static boolean b(Context context, String str) {
return !c(context, str);
}
public static boolean c(Context context, String str) {
return context.getPackageManager().checkPermission(str, context.getPackageName()) == 0;
}
public String a(Context context) {
boolean z10;
ConnectivityManager connectivityManager;
NetworkInfo networkInfo;
if (b(context, "android.permission.INTERNET")) {
com.datavisor.vangogh.util.f.a(f5955f, "no permission INTERNET");
return "no_permission";
}
boolean z11 = false;
try {
Enumeration<NetworkInterface> networkInterfaces = NetworkInterface.getNetworkInterfaces();
if (networkInterfaces != null) {
Iterator it = Collections.list(networkInterfaces).iterator();
z10 = false;
while (it.hasNext()) {
try {
NetworkInterface networkInterface = (NetworkInterface) it.next();
if (networkInterface.isUp() && networkInterface.getInterfaceAddresses().size() != 0 && ("tun0".equals(networkInterface.getName()) || "ppp0".equals(networkInterface.getName()) || "tap0".equals(networkInterface.getName()) || "ppp".equals(networkInterface.getName()) || "tun".equals(networkInterface.getName()) || "tap".equals(networkInterface.getName()))) {
z10 = true;
}
} catch (Throwable th) {
th = th;
com.datavisor.vangogh.util.f.a(th);
connectivityManager = (ConnectivityManager) context.getSystemService("connectivity");
if (connectivityManager != null) {
z11 = networkInfo.isConnectedOrConnecting();
}
if (z10) {
}
}
}
} else {
z10 = false;
}
} catch (Throwable th2) {
th = th2;
z10 = false;
}
try {
connectivityManager = (ConnectivityManager) context.getSystemService("connectivity");
if (connectivityManager != null && (networkInfo = connectivityManager.getNetworkInfo(17)) != null) {
z11 = networkInfo.isConnectedOrConnecting();
}
} catch (Throwable th3) {
com.datavisor.vangogh.util.f.a(th3);
}
return (!z10 || z11) ? "1" : "0";
}
public java.lang.String a(android.content.Context r9, java.lang.String r10) {
throw new UnsupportedOperationException("Method not decompiled: com.datavisorobfus.i.a(android.content.Context, java.lang.String):java.lang.String");
}
private boolean a(String str) {
if (str != null) {
if (!str.equals(BuildConfig.FLAVOR) && !str.contains("unknown") && !str.contains("null") && !str.contains("nil") && !str.toLowerCase().contains("0123456789abcdef")) {
int i10 = 0;
int i11 = 0;
while (i10 <= str.length() - 1) {
int i12 = i10 + 1;
if (str.substring(i10, i12).equals("0") && (i11 = i11 + 1) > str.length() / 2) {
return true;
}
i10 = i12;
}
return false;
}
return true;
}
return true;
}
}