android - 在 Android 应用程序中阻止模拟器

标签 android security android-emulator android-sensors

为了安全起见,我想阻止模拟器使用我的应用程序。 我不希望我的应用程序安装在任何模拟器上,例如 genymotion、bluestack、droidx 等...

我有一个应用程序,我们有提供墙,其中不包含任何安卓应用程序,使用它可以安装并赚取积分。一旦他们赚取了一些积分,他们就可以使用 Paypal 账户提款。

现在的问题是一些用户通过代理或模拟器安装它。他们通过使用代理或模拟器像任何东西一样赚钱..

请帮忙..我有大麻烦了..

最佳答案

我认为这会奏效。当您的应用程序启动时,请检查此方法。如果它返回 true,请退出您的应用。否则继续。它不会阻止安装,但肯定会阻止运行。

 public static boolean isRunningOnEmulator()
 {
    boolean result=
        Build.FINGERPRINT.startsWith("generic")
            ||Build.FINGERPRINT.startsWith("unknown")
            ||Build.MODEL.contains("google_sdk")
            ||Build.MODEL.contains("Emulator")
            ||Build.MODEL.contains("Android SDK built for x86")
            ||Build.MANUFACTURER.contains("Genymotion");
    if(result)
        return true;

    result|=Build.BRAND.startsWith("generic") && Build.DEVICE.startsWith("generic");

    if(result)
        return true;

    result|="google_sdk".equals(Build.PRODUCT);

    return result;
}

更多信息是here

关于android - 在 Android 应用程序中阻止模拟器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30777127/

相关文章:

asp.net - 如何保护 web.config 中的连接字符串?

android - CPU 饥饿的安卓模拟器 : android ARM EABI image vs x86 image

android - 为什么模拟器给出 IMEI 号码 000000000000000

android - 强制布局刷新/重绘android?

android - 将 AdMob 横幅样式更改为自定义

android - 如何使用 UnityPlayer.UnitySendMessage 调用方法并返回其值

android - 如何从 android 中的 SQLite 中检索特定记录

security - Windows IoT 上基于 SSL 的网络服务器

mysql - 防止第三方连接到 SQL 数据库(来自 config.php 文件)

Android 模拟器设置 GPS 值