Blocking app from running in bluestacks, youwave and other emulators

半腔热情 提交于 2020-01-22 15:37:11

问题


I would like to block my app from running in emulators such as bluestacks/youwave etc. Is there anyway I can block or even identify if the user is running in bluestacks/youwave? My app has logging in features. So it users the server as well, so I dont mind blocking the user at clientside/serverside as long as he's blocked. Any help would be greatly appreciated.


回答1:


1: Check for SIM Number and deny access to whoever has none. This includes tablets since you stated that you wanted to block them.

Java:

TelephonyManager telemamanger = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
String getSimSerialNumber = telemamanger.getSimSerialNumber();
String getSimNumber = telemamanger.getLine1Number();

Manifest.xml:

<uses-permission android:name="android.permission.READ_PHONE_STATE"/>

2. Emulator kernel check.

If #1 fails because of user modifications to their emulator, check if (ro.kernel.qemu == 1). This property is read-only and will always return 1 for emulators.



来源:https://stackoverflow.com/questions/13464517/blocking-app-from-running-in-bluestacks-youwave-and-other-emulators

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!