cordova-plugin-device
cordova-plugin-device copied to clipboard
IsVirlual returns 'true' in real device
Bug Report
Problem
IsVirlual returns 'true' in a real device
- Phone: Huawei P20 Pro
- model: CLT-L29
What is expected to happen?
expected to return false
What does actually happens?
it returns true
Information
- phone: Huawei P20 Pro
- model: CLT-L29
- Ionic 3
- plugin version: 2.0.3
Command or Code
device.isVirtual
Environment, Platform, Device
- Phone: Huawei P20 Pro
- model: CLT-L29
- Platform: Android
Version information
- Ionic 3
- plugin version: 2.0.3
- Android Version: 8.1
Checklist
- [x] I searched for existing GitHub issues
- [ ] I updated all Cordova tooling to the most recent version
- [ ] I included all the necessary information above
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