问题
I don't want to allow my users to run my app on an emulator.
I have succeeded detecting any other emulator, except Nox app player.
Check my solutions here: How can I detect when an Android application is running in the emulator?
Nox emulator has same device data as an actual phone, they even simulate deviceId (IMEI number, it is not 000000000000
and nut null), and network operator name. Looks like every time I launch the Nox app player, it randomizes all the Build.PRODUCT
and similar fields.
Although there is a pattern, some of the fields have incompatible names, like the manufacturer is sony, but device model is HTC...
回答1:
Check BASEBAND
version os the device. In case of Nox player the baseband version is null. In the android devices you will get the BASEBAND
version value.
Since SDK Lvl 14 you should use Build.getRadioVersion()
in order to retrieve the baseband version.
回答2:
Confirm that the phone does not have these 3 apps installed com.vphone.googlesign com.vphone.helper and com.vphone.launcher
来源:https://stackoverflow.com/questions/40407255/android-how-to-detect-if-app-running-on-nox-emulator