lamster2018 / EasyProtector

一行代码检测XP/调试/多开/模拟器/root
Apache License 2.0
2.2k stars 440 forks source link

mumu模拟器检测不出来 #18

Closed dicallc closed 5 years ago

dicallc commented 5 years ago
  public static void isEmulator() {
    if (EasyProtectorLib.checkIsRunningInEmulator()) {
      KLog.e("是模拟器");
      System.exit(0);
    }else {
      KLog.e("不是模拟器");
    }
  }

isEmulator ] 不是模拟器

lamster2018 commented 5 years ago
EmulatorCheckUtil.getSingleInstance().readSysProperty(this, new EmulatorCheckCallback() {
            @Override
            public void findEmulator(String emulatorInfo) {
                sout 这个emulatorInfo
            }
        });

能不能帮打印一下信息

dicallc commented 5 years ago

打印信息如下:

ceshi start|null|cancro-eng|null|null|cancro|support CameraFlash|sensorNum6|userAppNum11|2:cpu:/
    1:cpuacct:/uid_10117/pid_3985
    |end
lamster2018 commented 5 years ago

我知道了

你调用的是这个方法,我已经标记为deprecate了,这个方法是个简便方案,后续我会删除
    public static boolean checkIsRunningInEmulator() {
        return EmulatorCheckUtil.getSingleInstance().readSysProperty();
    }

你用这个方法吧,加上context,会多一些判断方案
    public static boolean checkIsRunningInEmulator(Context context) {
        return EmulatorCheckUtil.getSingleInstance().readSysProperty(context, null);
    }

而且刚才我试了一下,木木模拟器 2.0.25可以识别为模拟器。

dicallc commented 5 years ago

ok了