PackageTrack
Sign in Get early access

safe_device

This package helps to detect iOS Simulator, Android Emulator and Debug Mode. This package also detects MockLocation/Fake GPS location on Android Device. Also check device is real or not.

1.4.1 140K downloads/mo #986 most downloaded on pub.dev ufukhawk/safe_device

What this package is like to depend on

Last release 1 months ago

07 Jul 2026

Ships fairly regularly

a new release about every 2 months

Nearly every release is documented

notes for 32 of 35 stable releases

Nothing withdrawn

no release was ever pulled

5 years old

35 releases · first in 2021

7 releases in the last 12 months

see the full history below

Release timeline

35 releases · May 2021 to Jul 2026
2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 35
  1. 1.4.1 07 Jul 2026
    Release notes
    • iOS: Fix Xcode failing to resolve Swift Package Manager dependencies with the package manifest at '/Package.swift' cannot be accessed when building on Flutter 3.44.2/3.44.4. DTTJailbreakDetection is now vendored directly into the safe_device SPM package instead of being referenced as a remote dependency, since its upstream repository ships no Package.swift of its own.
    Open source →
  2. 1.4.0 26 Jun 2026
    Release notes
    • iOS: Add Swift Package Manager (SPM) support alongside CocoaPods. Resolves the "plugin does not support Swift Package Manager" warning under Flutter 3.44+. Addresses #94.
    • iOS: Fix Xcode 16+ semantic compiler error in SafeDeviceJailbreakDetection.m by replacing file-scope static array literals with class methods. Resolves #98.
    Open source →
  3. 1.3.10 24 Apr 2026
    Release notes
    • Fixed build error: checkTestKeys() method was missing from RootedCheck.java — the call in getRootDetectionDetails() now uses an inline Build.TAGS check instead.
    Open source →
  4. 1.3.9 24 Apr 2026
    Release notes
    • Resolved #95. Fixed NullPointerException crash when isMockLocation is called before the location listener is initialized (e.g. when mockLocationCheckEnabled is false).
    • Resolved #83. Fixed GPS running continuously in background — location updates are now properly stopped when the plugin detaches from the Flutter engine.
    • Resolved #91. Fixed false positive jailbreak detection on iPad apps running on macOS (Mac Catalyst). Detection now always returns false on Mac Catalyst.
    • Resolved #92 and #93. Improved palera1n rootless jailbreak detection by adding specific indicator paths (/var/jb/.installed_palera1n, /var/jb/usr/bin/su, /var/jb/usr/lib/apt).
    • Resolved #85. Added MuMu Player (NetEase) emulator detection.
    • Resolved #82. Fixed false positive on Vivo Y11 — isRealDevice was incorrectly returning false due to an overly broad Build.HOST check; added Vivo and other common OEM manufacturers to the exclusion list. Applied conservative multi-indicator root detection for Vivo devices.
    • Resolved #80. Fixed false positive isJailBroken on Samsung Galaxy Z Fold5 — Knox security system was triggering detection on non-rooted devices. Samsung devices now require multiple strong indicators before being flagged as rooted.
    • iOS: Removed /bin/sh from jailbreak paths — this file is present on stock iOS 16+ devices and was causing false positives.
    • Android: Fixed process leak in canExecuteCommandprocess.destroy() is now always called.
    • Android: Removed duplicate checkTestKeys() method (was identical to checkBuildTags()).
    • Resolved #86. Fixed SafeDeviceJailbreakDetection not being called by isJailBrokenCustom nor isJailBroken.
    • Resolved #77. Fixed jailbreakDetails method channel name.
    • Added missing bool cast for isSimulator value in jailbreakDetails.
    Open source →
  5. 1.3.8 15 Oct 2025
    Release notes
    • iOS bug fix
    Open source →
  6. 1.3.7 15 Oct 2025

    Nothing published for this version

  7. 1.3.6 15 Oct 2025
    Release notes
    • Android Configurable Mock Location Detection: The mock location check on Android is now conditional based on the configuration provided via the init method from Dart. If mockLocationCheckEnabled is set to false, mock location detection is disabled and location updates are not started. If no configuration is provided, the plugin behaves exactly as before for full backward compatibility.
    • iOS Config Support: The iOS plugin now accepts and stores the configuration from Dart via the init method, mirroring the Android API. While iOS does not currently use the mock location flag, this enables future extensibility and API consistency.
    • Bug fix for emulator.

    Technical Details

    • Added SafeDeviceConfig class, served to both Platform to include mockLocationCheckEnabled and future possible configuration
    • Added init method to both Android and iOS native plugins to receive and store configuration from Dart.
    • Android: Location updates and mock location checks are only started if enabled in config.
    • iOS: Configuration is stored for future use, since the only configuration available now is for mock location check which is not supported on iOS.
    Open source →
  8. 1.3.5 14 Jul 2025

    Nothing published for this version

  9. 1.3.4 13 Jul 2025
    Release notes
    • CRITICAL: Fixed false positive root detection on real Android devices (especially Xiaomi/Redmi devices)
    • Removed normal Android system files from emulator root detection that were causing false positives
    • Fixed emulatorSpecificRoot check to only apply to actual emulators, not real devices
    • Improved Xiaomi/Redmi/POCO device support with more conservative root detection

    Changed

    • Emulator-specific root checks now only run on actual emulators, not real devices
    • Xiaomi/Redmi/POCO devices now use more conservative root detection methods
    • Removed false positive triggers: /system/bin/app_process32, /system/bin/debuggerd, /system/bin/debuggerd64, /system/bin/rild, /proc/1/maps, /system/recovery-from-boot.p, /system/etc/security/otacerts.zip

    Technical Details

    • Added isLikelyEmulator() method to properly identify emulators before applying emulator-specific checks
    • Xiaomi devices now require multiple strong indicators (obvious root signs + basic check + su binary) before being flagged as rooted
    • Better separation between emulator detection and real device root detection
    Open source →
  10. 1.3.3 01 Jul 2025
    Release notes
    • CRITICAL iOS SECURITY FIX: Resolved false positive jailbreak detection in development environment that affected real devices.
    • Development Environment Detection: Added intelligent detection to distinguish between legitimate development variables and actual jailbreak indicators.
    • DYLD_INSERT_LIBRARIES Fix: Fixed false positive caused by Apple's legitimate development environment variables (DYLD_INSERT_LIBRARIES).
    • Real Device Accuracy: iPhone 16 Pro Max, iPhone SE, and other real devices now correctly return false for jailbreak detection during development.
    • Platform Consistency: Resolved discrepancy where macOS development showed true while Windows development showed false.
    • Type Safety Fix: Fixed Map<Object?, Object?> casting error in jailbreakDetails method.
    • Enhanced Debug Info: Added comprehensive debugging information including development environment status, legitimate environment variables, and DTT library results.
    • Smart Filtering: Added filtering for legitimate Apple framework paths in DYLD_INSERT_LIBRARIES.
    • Production Safety: Maintains full jailbreak detection accuracy in production while being lenient in development.
    • API Change: jailbreakDetails now returns Map<String, dynamic> instead of Map<String, bool> for better debugging info.
    Open source →
  11. 1.3.2 27 Jun 2025
    Release notes
    • Major Architecture Change: Converted iOS jailbreak detection from Swift to Objective-C for complete build stability.
    • Eliminated All Bridging Issues: Removed all Swift-Objective-C bridging dependencies that caused compilation errors.
    • Simplified iOS Build: No more Swift compiler requirements, bridging headers, or module configurations needed.
    • Complete Type Safety: Direct Objective-C implementation eliminates type conversion issues between Swift and Dart.
    • Enhanced Compatibility: Works across all iOS project configurations without custom build settings.
    • Performance Improvement: Direct Objective-C calls eliminate runtime class resolution overhead.
    • Same Functionality: All 20+ jailbreak detection methods preserved with identical behavior.
    • Bug Fix: Permanently resolved all Swift-related build errors including bridging header and linker issues.
    Open source →
  12. 1.3.1 26 Jun 2025
    Release notes
    • iOS Build Fix: Resolved Swift bridging header compilation issues that caused build failures.
    • Swift Integration Improvement: Replaced compile-time Swift header imports with runtime class resolution for better compatibility.
    • Podspec Optimization: Simplified iOS podspec configuration to prevent bridging header path conflicts.
    • Enhanced Swift-Objective-C Interoperability: Added @objcMembers annotation for automatic method exposure.
    • Bug Fix: Fixed "Build input file cannot be found: safe_device-Bridging-Header.h" error.
    • Bug Fix: Resolved "Undefined symbol: OBJC_CLASS$_SafeDeviceJailbreakDetection" linker error.
    Open source →
  13. 1.3.0 26 Jun 2025
    Release notes
    • Enhanced Android Emulator Detection: Improved detection for popular Android emulators including LDPlayer, MEmu, BlueStacks.
    • LDPlayer Detection: Added specific detection for LDPlayer emulator with brand, model, and file-based checks.
    • Enhanced Root Detection: Improved root detection for emulators with additional checks for:
      • Test-keys in build tags
      • Emulator-specific root files
      • Enhanced su binary detection
      • Dangerous system properties (ro.debuggable, ro.secure, service.adb.root)
    • Architecture Detection: Added enhanced x86/i686 architecture detection for emulator identification.
    • Bug Fix: Resolved issue where rooted LDPlayer was not properly detected as both emulator and rooted device.
    • Enhanced iOS Jailbreak Detection: Implemented comprehensive custom jailbreak detection for iOS.
    • New Swift Implementation: Added SafeDeviceJailbreakDetection class with advanced detection methods.
    • Expanded Path Checking: Added detection for 20+ additional jailbreak-related paths including:
      • Cydia and package managers (/Applications/Cydia.app, /private/var/lib/apt, etc.)
      • System binaries (/bin/bash, /usr/sbin/sshd, /usr/libexec/ssh-keysign, etc.)
      • MobileSubstrate files (/Library/MobileSubstrate/MobileSubstrate.dylib)
      • Launch daemons (/System/Library/LaunchDaemons/com.saurik.Cydia.Startup.plist)
    • Multiple Detection Methods: Added URL scheme detection, sandbox violation testing, environment variable checking, and symbolic link detection.
    • New API Methods:
      • isJailBrokenCustom: iOS-only method using custom detection algorithm
      • jailbreakDetails: Returns detailed breakdown of detection methods
    • Improved Reliability: Enhanced main isJailBroken method now combines DTTJailbreakDetection with custom detection.
    • Swift 5.0 Support: Updated podspec to support modern Swift development.
    • Updated Example App: Enhanced example to demonstrate new jailbreak detection features.
    • Bug Fix: Resolved Swift pod integration issue by adding modular headers support for DTTJailbreakDetection dependency.
    • Bug Fix: Fixed iOS Simulator false positive detection - custom jailbreak detection now correctly returns false on simulator environment.
    Open source →
  14. 1.2.1 20 Mar 2025
    Release notes
    • Upgraded rootbeer-lib dependency from version 0.1.0 to 0.1.1.
    • Corrected the activity name in AndroidManifest.xml from 'MainActivityvvvv' to 'MainActivity'.
    Open source →
  15. 1.2.0 06 Jan 2025
    Release notes
    • Updated android code for better performance.
    • Bug Fixes.
    Open source →
  16. 1.1.9 28 Sep 2024
    Release notes
    • Removed the Permission Handler package.
    • Updated the example code.
    • Upgraded the iOS platform version.
    • Updated the Dart version.
    • Added location permission request for iOS.
    • Integrated Geolocator package for handling location permissions.
    Open source →
  17. 1.1.8 20 Aug 2024
    Release notes
    • Disable RootBear logs
    • Sony devices bug fix.
    Open source →
  18. 1.1.7 22 Apr 2024
    Release notes
    • upload build.gradle file for Gradle 8
    Open source →
  19. 1.1.6 29 Feb 2024
    Release notes
    • Update Readme
    • Downgrade min dart version
    • format code
    Open source →
  20. 1.1.5 29 Feb 2024
    Release notes
    • Removed trust_location package.
    • Updated Flutter and Dart version.
    • Updated Gradle version.
    Open source →
  21. 1.1.4 16 May 2023
    Release notes
    • Bug Fix
    Open source →
  22. 1.1.3 16 May 2023
    Release notes
    • Updated Flutter and Dart version.
    • Changed location permission request package.
    Open source →
  23. 1.1.2 14 Nov 2022

    Nothing published for this version

  24. 1.1.1 07 Apr 2022
    Release notes
    • Added development mode for Android.
    Open source →
  25. 1.1.0 27 Jan 2022
    Release notes
    • Android detect root bug fix.
    Open source →
  26. 1.0.9 21 Oct 2021
    Release notes
    • Android mock location error solved.
    Open source →
  27. 1.0.8 11 Sep 2021
    Release notes
    • Android v2 error solved.
    Open source →
  28. 1.0.7 19 Jul 2021
    Release notes
    • Emulator detection error solved.
    Open source →
  29. 1.0.6 26 May 2021
    Release notes
    • Mock Location detection error solved.
    Open source →
  30. 1.0.5 26 May 2021
    Release notes
    • 'Example' codes in the project have been edited and location permission request has been added for Mock Location control.
    Open source →
  31. 1.0.4 07 May 2021
    Release notes
    • Small Changes.
    Open source →
  32. 1.0.3 05 May 2021
    Release notes
    • iOS bug fix.
    Open source →
  33. 1.0.2 05 May 2021
    Release notes
    • iOS bug fix.
    Open source →
  34. 1.0.1 04 May 2021
    Release notes
    • Small Changes.
    Open source →
  35. 1.0.0 04 May 2021
    Release notes
    • Flutter Jailbroken, root, emulator and mock location detection.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive