ModelCpuMismatchMethod class

Detection method that checks if the device model and CPU mismatch.

This method examines the device's model and hardware properties to detect emulators. Many Android emulators return "sm-g" as the model and "x86" as the hardware, which is uncommon on physical devices that typically have specific model and hardware names.

Reliability: Medium (70-80%)

  • Good indicator for many emulators
  • Easy to spoof by modifying device properties

Score: 10 points when model contains "sm-g" and hardware contains "x86"

Performance: Fast - only checks string properties

Inheritance

Constructors

ModelCpuMismatchMethod.new({double score = 10, String? reason = "Model looks real but CPU indicates emulator"})

Properties

hashCode int
The hash code for this object.
no setterinherited
reason String?
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
score double
finalinherited

Methods

execute() Future<({String? reason, double score})>
Executes the method and returns a score between 0 and 100
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited