导航菜单

页面标题

页面副标题

Namma Yatri v3.3.7 - AbstractC3957a.java 源代码

正在查看: Namma Yatri v3.3.7 应用的 AbstractC3957a.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package o6;

import android.content.Context;
import android.os.Build;
import com.facebook.react.AbstractC1944o;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.nio.charset.Charset;
import java.util.Locale;
import org.apache.commons.lang3.CharEncoding;

public abstract class AbstractC3957a {

    private static final String f51021a = "a";

    private static String f51022b;

    public static String a(Context context) {
        return b(c(context));
    }

    public static String b(Integer num) {
        return "adb reverse tcp:" + num + " tcp:" + num;
    }

    private static Integer c(Context context) {
        return Integer.valueOf(context.getResources().getInteger(AbstractC1944o.f28146a));
    }

    public static String d() {
        if (h()) {
            return Build.MODEL;
        }
        return Build.MODEL + " - " + Build.VERSION.RELEASE + " - API " + Build.VERSION.SDK_INT;
    }

    private static synchronized String e() {
        BufferedReader bufferedReader;
        Throwable th;
        Process process;
        Exception e10;
        synchronized (AbstractC3957a.class) {
            String str = f51022b;
            if (str != null) {
                return str;
            }
            try {
                try {
                    process = Runtime.getRuntime().exec(new String[]{"/system/bin/getprop", "metro.host"});
                } catch (Throwable th2) {
                    th = th2;
                }
            } catch (Exception e11) {
                bufferedReader = null;
                e10 = e11;
                process = null;
            } catch (Throwable th3) {
                bufferedReader = null;
                th = th3;
                process = null;
            }
            try {
                bufferedReader = new BufferedReader(new InputStreamReader(process.getInputStream(), Charset.forName(CharEncoding.UTF_8)));
                String str2 = "";
                while (true) {
                    try {
                        String readLine = bufferedReader.readLine();
                        if (readLine == null) {
                            break;
                        }
                        str2 = readLine;
                    } catch (Exception e12) {
                        e10 = e12;
                        B4.a.H(f51021a, "Failed to query for metro.host prop:", e10);
                        f51022b = "";
                        if (bufferedReader != null) {
                            try {
                                bufferedReader.close();
                            } catch (Exception unused) {
                            }
                        }
                    }
                }
                f51022b = str2;
                try {
                    bufferedReader.close();
                } catch (Exception unused2) {
                }
            } catch (Exception e13) {
                bufferedReader = null;
                e10 = e13;
            } catch (Throwable th4) {
                bufferedReader = null;
                th = th4;
                if (bufferedReader != null) {
                    try {
                        bufferedReader.close();
                    } catch (Exception unused3) {
                    }
                }
                if (process == null) {
                    throw th;
                }
                process.destroy();
                throw th;
            }
            process.destroy();
            return f51022b;
        }
    }

    public static String f(Context context) {
        return g(c(context).intValue());
    }

    private static String g(int i10) {
        String e10 = e();
        if (e10.equals("")) {
            e10 = h() ? "10.0.3.2" : i() ? "10.0.2.2" : "localhost";
        }
        return String.format(Locale.US, "%s:%d", e10, Integer.valueOf(i10));
    }

    private static boolean h() {
        return Build.FINGERPRINT.contains("vbox");
    }

    private static boolean i() {
        String str = Build.FINGERPRINT;
        return str.contains("generic") || str.startsWith("google/sdk_gphone");
    }
}