How to detect whether device is rooted (android) or jailbroken (iOS)?

4.3k views Asked by At

I'm working on an app that shows the user some specs of his device. For example, RAM, disk size etc.

Now I want to show whether the device is rooted or not in case of android device. And whether the device is jailbroken or not in case of devices with iOS.

How to achieve this? Let me tell you that I'm not familiar with native iOS development. So it would be hard for me to write plugin.

EDIT I want the solution in Unity3d. And I want to handle android and iOS devices. That's why it's not a duplicate question as someone mentioned in the comments.

2

There are 2 answers

0
Håvard Nygård On

All i can do is to give you a reference.

http://answers.unity3d.com/questions/1012407/detecting-rootedjail-broken-devices.html

Basicaly, the simplest method, would be to pay 5 bucks for a detection script in the asset store.

0
Viraf Z On

You can use Application.sandboxType == SandboxBroken // Application is running in broken sandbox.

https://docs.unity3d.com/ScriptReference/Application-sandboxType.html https://docs.unity3d.com/ScriptReference/ApplicationSandboxType.html