jail-monkey icon indicating copy to clipboard operation
jail-monkey copied to clipboard

Unexpected Behavior in isJailBroken() Method After React Native Upgrade

Open iremyk opened this issue 2 years ago • 3 comments

We are currently facing an issue with the jailbreak detection feature in the jail-monkey library after upgrading our React Native application to a newer version. Prior to the upgrade, the isJailBroken() method was functioning correctly and returning true as expected when running the app on both Android emulator and iOS simulator.

However, post the React Native upgrade, the isJailBroken() method now consistently returns false when the app is run on the emulator.

Additional Information:

  • React Native Version: 0.72.5
  • jail-monkey Version: 2.8.0
  • Emulator: Android Studio Emulator

We have thoroughly checked for changes in the React Native upgrade documentation and the jail-monkey release notes but haven't found any relevant information. Any guidance or insights into resolving this issue would be greatly appreciated.

iremyk avatar Dec 19 '23 14:12 iremyk

I guess this is not relevant to react-native upgrade @iremyk . After I investigate to implementation of isJailBroken function. It is returning if the target is simulator.

#if TARGET_OS_SIMULATOR return NO; #endif

To able to get true simply return YES like below;

#if TARGET_OS_SIMULATOR return YES; #endif

guvenkaranfil avatar Jan 03 '24 14:01 guvenkaranfil

I'm running the debug release APK on my android device, which is rooted, but I still get no message indicating that the device is rooted.

Bernardo1411 avatar May 03 '24 19:05 Bernardo1411

I guess this is not relevant to react-native upgrade @iremyk . After I investigate to implementation of isJailBroken function. It is returning if the target is simulator.

` #if TARGET_OS_SIMULATOR

  return NO;

#endif`

To able to get true simply return YES like below;

` #if TARGET_OS_SIMULATOR

  return YES;

#endif`

Where to check this? I am having the same issue. Always false on emulators.

faljabi avatar Dec 15 '24 14:12 faljabi