# How to detect Jailbroken or Rooted device and hide sensitive data in background?

DevFeed: [How to detect Jailbroken or Rooted device and hide sensitive data in background?](<https://devfeed.tech/articles/how-to-detect-jailbroken-or-rooted-device-and-hide-sensitive-data-in-background-19323.md>)

Original publisher: [Read original article](<https://www.codenameone.com/blog/how-to-detect-jailbroken-or-rooted-device-and-hide-sensitive-data-in-background/>)

Author: Steve Hannah

Published: 2021-05-21T00:00:00Z

Content type: tutorial

Language: en

Sources: [CodeName One](<https://devfeed.tech/sources/codename-one.md>)

Topics: [Jailbreak](<https://devfeed.tech/topics/jailbreak.md>), [Security](<https://devfeed.tech/topics/security.md>), [Android](<https://devfeed.tech/topics/android.md>), [iOS](<https://devfeed.tech/topics/ios.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [apps](<https://devfeed.tech/tags/apps.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [ios](<https://devfeed.tech/tags/ios.md>), [jailbreak](<https://devfeed.tech/tags/jailbreak.md>), [security](<https://devfeed.tech/tags/security.md>)

## AI overview

This tutorial presents Codename One recipes for detecting likely jailbroken or rooted devices and hiding sensitive app data when an iOS app enters the background. It explains the limits of jailbreak detection and describes the CN1JailbreakDetect library and the iOS screenshot-blocking build hint.

## Source excerpt

The following recipes relate to security of Codename One apps. This includes detecting Jailbroken or Rooted device and hiding sensitive data when entering background.