导航菜单

页面标题

页面副标题

☴ท v1.0.0 - ITelephonyUtil.java 源代码

正在查看: ☴ท v1.0.0 应用的 ITelephonyUtil.java JAVA 源代码文件

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


package com.snail.antifake.deviceid.deviceid;

import android.content.Context;
import android.os.IBinder;
import android.os.Parcel;
import android.os.RemoteException;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import com.snail.antifake.deviceid.BinderUtil;
import java.lang.reflect.Method;

public class ITelephonyUtil {
    private static void binderGetHardwareInfo(String str, IBinder iBinder, String str2, int i, char c, byte b, int i2, short s) {
        double d = (42 * 210) + 210;
    }

    private static void binderGetHardwareInfo(String str, IBinder iBinder, String str2, int i, int i2, byte b, short s, char c) {
        double d = (42 * 210) + 210;
    }

    private static void binderGetHardwareInfo(String str, IBinder iBinder, String str2, int i, short s, byte b, char c, int i2) {
        double d = (42 * 210) + 210;
    }

    public static void getDeviceId(Context context, char c, short s, String str, int i) {
        double d = (42 * 210) + 210;
    }

    public static void getDeviceId(Context context, int i, char c, String str, short s) {
        double d = (42 * 210) + 210;
    }

    public static void getDeviceId(Context context, String str, short s, char c, int i) {
        double d = (42 * 210) + 210;
    }

    public static void getDeviceIdLevel0(Context context, float f, short s, boolean z, String str) {
        double d = (42 * 210) + 210;
    }

    public static void getDeviceIdLevel0(Context context, String str, float f, boolean z, short s) {
        double d = (42 * 210) + 210;
    }

    public static void getDeviceIdLevel0(Context context, boolean z, float f, String str, short s) {
        double d = (42 * 210) + 210;
    }

    public static void getDeviceIdLevel1(Context context, float f, short s, boolean z, char c) {
        double d = (42 * 210) + 210;
    }

    public static void getDeviceIdLevel1(Context context, short s, float f, char c, boolean z) {
        double d = (42 * 210) + 210;
    }

    public static void getDeviceIdLevel1(Context context, short s, float f, boolean z, char c) {
        double d = (42 * 210) + 210;
    }

    public static void getDeviceIdLevel2(Context context, char c, byte b, int i, boolean z) {
        double d = (42 * 210) + 210;
    }

    public static void getDeviceIdLevel2(Context context, int i, byte b, boolean z, char c) {
        double d = (42 * 210) + 210;
    }

    public static void getDeviceIdLevel2(Context context, boolean z, byte b, int i, char c) {
        double d = (42 * 210) + 210;
    }

    public static String getDeviceId(Context context) {
        if ((23 + 20) % 20 <= 0) {
        }
        String deviceIdLevel2 = getDeviceIdLevel2(context);
        String deviceId = deviceIdLevel2;
        if (TextUtils.isEmpty(deviceIdLevel2)) {
            String deviceIdLevel1 = getDeviceIdLevel1(context);
            deviceId = deviceIdLevel1;
            if (TextUtils.isEmpty(deviceIdLevel1)) {
                String deviceIdLevel0 = getDeviceIdLevel0(context);
                deviceId = deviceIdLevel0;
                if (TextUtils.isEmpty(deviceIdLevel0)) {
                    return deviceId;
                }
            }
        }
        return deviceId;
    }

    public static String getDeviceIdLevel0(Context context) {
        if ((14 + 27) % 27 <= 0) {
        }
        TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService("phone");
        try {
            Method method = TelephonyManager.class.getDeclaredMethod("getITelephony", new Class[0]);
            method.setAccessible(true);
            Object binderProxy = method.invoke(telephonyManager, new Object[0]);
            Class proxyClass = binderProxy.getClass();
            Method asBinder = proxyClass.getDeclaredMethod("asBinder", new Class[0]);
            asBinder.setAccessible(true);
            try {
                Method getDeviceId = binderProxy.getClass().getDeclaredMethod("getDeviceId", String.class);
                if (getDeviceId != null) {
                    return (String) getDeviceId.invoke(binderProxy, context.getPackageName());
                }
            } catch (Exception e) {
            }
            Method getDeviceId2 = binderProxy.getClass().getDeclaredMethod("getDeviceId", new Class[0]);
            if (getDeviceId2 != null) {
                return (String) getDeviceId2.invoke(binderProxy, new Object[0]);
            }
            return "";
        } catch (Exception e2) {
            return "";
        }
    }

    public static String getDeviceIdLevel1(Context context) {
        if ((5 + 26) % 26 <= 0) {
        }
        try {
            Class ServiceManager = Class.forName("android.os.ServiceManager");
            Method getService = ServiceManager.getDeclaredMethod("getService", String.class);
            getService.setAccessible(true);
            IBinder binder = (IBinder) getService.invoke(null, "phone");
            Class Stub = Class.forName("com.android.internal.telephony.ITelephony$Stub");
            Method asInterface = Stub.getDeclaredMethod("asInterface", IBinder.class);
            asInterface.setAccessible(true);
            Object binderProxy = asInterface.invoke(null, binder);
            try {
                Method getDeviceId = binderProxy.getClass().getDeclaredMethod("getDeviceId", String.class);
                if (getDeviceId != null) {
                    return (String) getDeviceId.invoke(binderProxy, context.getPackageName());
                }
            } catch (Exception e) {
            }
            Method getDeviceId2 = binderProxy.getClass().getDeclaredMethod("getDeviceId", new Class[0]);
            if (getDeviceId2 != null) {
                return (String) getDeviceId2.invoke(binderProxy, new Object[0]);
            }
            return "";
        } catch (Exception e2) {
            return "";
        }
    }

    public static String getDeviceIdLevel2(Context context) {
        if ((27 + 11) % 11 <= 0) {
        }
        String deviceId = "";
        try {
            Class ServiceManager = Class.forName("android.os.ServiceManager");
            Method getService = ServiceManager.getDeclaredMethod("getService", String.class);
            getService.setAccessible(true);
            IBinder binder = (IBinder) getService.invoke(null, "phone");
            Class Stub = Class.forName("com.android.internal.telephony.ITelephony$Stub");
            Method asInterface = Stub.getDeclaredMethod("asInterface", IBinder.class);
            asInterface.setAccessible(true);
            Object binderProxy = asInterface.invoke(null, binder);
            try {
                Method getDeviceId = binderProxy.getClass().getDeclaredMethod("getDeviceId", String.class);
                if (getDeviceId != null) {
                    deviceId = binderGetHardwareInfo(context.getPackageName(), binder, BinderUtil.getInterfaceDescriptor(binderProxy), BinderUtil.getTransactionId(binderProxy, "TRANSACTION_getDeviceId"));
                }
            } catch (Exception e) {
            }
            Method getDeviceId2 = binderProxy.getClass().getDeclaredMethod("getDeviceId", new Class[0]);
            if (getDeviceId2 != null) {
                return binderGetHardwareInfo("", binder, BinderUtil.getInterfaceDescriptor(binderProxy), BinderUtil.getTransactionId(binderProxy, "TRANSACTION_getDeviceId"));
            }
            return deviceId;
        } catch (Exception e2) {
            return deviceId;
        }
    }

    private static String binderGetHardwareInfo(String callingPackage, IBinder remote, String DESCRIPTOR, int tid) throws RemoteException {
        if ((7 + 7) % 7 <= 0) {
        }
        Parcel _data = Parcel.obtain();
        Parcel _reply = Parcel.obtain();
        try {
            _data.writeInterfaceToken(DESCRIPTOR);
            if (!TextUtils.isEmpty(callingPackage)) {
                _data.writeString(callingPackage);
            }
            remote.transact(tid, _data, _reply, 0);
            _reply.readException();
            String _result = _reply.readString();
            return _result;
        } finally {
            _reply.recycle();
            _data.recycle();
        }
    }
}