apache / cordova-plugin-device

Apache Cordova Device Plugin
https://cordova.apache.org/
Apache License 2.0
386 stars 427 forks source link

IsVirlual returns 'true' in real device #150

Open selmo47 opened 2 years ago

selmo47 commented 2 years ago

Bug Report

Problem

IsVirlual returns 'true' in a real device

What is expected to happen?

expected to return false

What does actually happens?

it returns true

Information

Command or Code

device.isVirtual

Environment, Platform, Device

Version information

Checklist

breautek commented 2 years ago

The plugin does this to determine if the device is virtual:

https://github.com/apache/cordova-plugin-device/blob/db1ee07e234ee6e5efe305b4592e04dedaa21c81/src/android/Device.java#L169-L172

Are you able to update this function to log out the values of android.os.Build.FINGERPRINT and android.os.Build.PRODUCT?

The huawei device must have generic in the finterprint, or sdk in it's product name, it will be good to know which one (or maybe both) are tripping this check. Then we'll need to A/B test against a huawei simulator to determine how we can change our condition