Navigate back to the homepage

How to detect device rooted or jailbroken in react native

Infinitbility
React Native
July 23rd, 2021 · 1 min read
How to detect device rooted or jailbroken in react native

Hello Friends,

Welcome To Infinitbility!

First, I try react-native-isDeviceRooted ( https://www.npmjs.com/package/react-native-is-device-rooted ) but due to manual installation I got errors and started to research on an alternative solution and I got jail-monkey ( https://www.npmjs.com/package/jail-monkey ) and it’s like a charm and below tutorial, I will explain how I do it…

Note ❗ Since emulators are usually rooted, you might want to bypass these checks during development. Unless you’re keen on constant false alarms ⏰

Introduction

jail-monkey package provide functionality to check or detect device is rooted or jailbroken and also is easy installation compare to react-native-isDeviceRooted, our emulators are usually rooted then we have to stop checking is rooted or jailbroken when we developing and testing in emulators.

Installation

jail-monkey installation are very simple…

  • Install jail-monkey using npm
1npm i jail-monkey --save
  • Install jail-monkey using yarn
1yarn add jail-monkey
  • Link jail-monkey package ( Not required as of React Native 0.60.0 )
1react-native link jail-monkey # Not required as of React Native 0.60.0

jail-monkey isJailBroken example

jail-monkey provide isJailBroken functionality to check android device is rooted or iOS device is jailbroken and it’s work both platform with same codebase checl below example

1import JailMonkey from 'jail-monkey'
2
3if (JailMonkey.isJailBroken()) {
4 // Alternative behaviour for jail-broken/rooted devices.
5}

Keywords

react-native, rooted, jailbroken, ios, android, secured, Detect

Thanks for reading…

Join our email list and get notified about new content

No worries, I respect your privacy and I will never abuse your email.

Every week, on Tuesday, you will receive a list of free tutorials I made during the week (I write one every day) and news on other training products I create.

Looking For React Native Tutorial?

we are trying to create the best Tutorial for react native developers.

When you want a daily updates about React Native Tutorial or infinitbility update subscribe to our newsletter.

Read React Native Tutorial

Request New Tutorial or Article on mail [email protected]

Tutorials

React Native

Categories

More articles from Infinitbility

How to get browser details in react

How to get browser details in react

get browser or device detail in react

July 20th, 2021 · 1 min read
React Native Validation Example

React Native Validation Example

how to do validation in react native

July 11th, 2021 · 1 min read
© 2020–2021 Infinitbility
About
Link to $https://medium.com/infinitbilityLink to $https://www.facebook.com/InfinitbilityLink to $https://github.com/infinitbilityLink to $https://twitter.com/infinitbilityLink to $https://www.buymeacoffee.com/infinitbilityLink to $mailto:[email protected]