Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rjsniffer.amIEmulator returning false positive when running on an emulator #5

Open
Yonkokilasi opened this issue Nov 29, 2024 · 1 comment

Comments

@Yonkokilasi
Copy link

I am using this code to detect if the device is an emulator. When I run it on a Pixel 8 API 35 (android-arm64 emulator) I get this as the log . It is returning false even though I am using an emulator.
Compromised: false, Emulator: false, Debugged: true
Code :

Future<bool> isDeviceAnEmulator() async {
  bool amICompromised =
      await Rjsniffer.amICompromised() ?? false; //Detect JailBreak and Root
  bool? amIEmulator =
      await Rjsniffer.amIEmulator(); //Detect Emulator Environment
  bool amIDebugged = await Rjsniffer.amIDebugged() ?? false;
  logThis('DeviceStatus',
      'Compromised: $amICompromised, Emulator: $amIEmulator, Debugged: $amIDebugged');
  return amIEmulator?? false;
}

Flutter doctor output

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.3, on macOS 14.7 23H124 darwin-arm64, locale en-KE)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.1)
[✓] VS Code (version 1.92.0)
[✓] Connected device (5 available)
[✓] Network resources

• No issues found!
@eshaanagarwal
Copy link

I am also facing the same issue. On emulator it gives false positive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants