1

For the security purpose, I want to block emulator to use my app. I do not want my app to be installed on any emulator like genymotion,bluestack,droidx etc...

I have an app where we have offer wall which contains no of android app, that use can install and earn points. Once they earn some points then they can withdraw using paypal account.

Now the problem is some of the users are installing it via proxy or emulator.they are earning money like anything by using proxy or emulator..

Please help..I am in big trouble..

Anjali
  • 1,623
  • 5
  • 30
  • 50

1 Answers1

2

I think this would work. When your app starts check this method. If it returns true, exit your app. Otherwise continue. It won't prevent from installing but sure would prevent from running.

 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;
}

More information is here

Community
  • 1
  • 1
Rohit5k2
  • 17,948
  • 8
  • 45
  • 57
  • is it possible to change fingerprint configuration in emulator?.....other setting like model,manufacturer etc already using....hackers are modifying the details and running app on emulator... – Anjali Jun 11 '15 at 10:08
  • I don't think so. But I can't be 100% sure. – Rohit5k2 Jun 11 '15 at 10:17
  • this code working but hacker has changed the value of Build product –  Jun 13 '15 at 10:36