Skip to content
Tamandua
← All posts

Root detection is a signal, not a verdict: layering checks when root can be hidden

Root and jailbreak checks are useful signals, not proof. What the common checks actually detect, how modern root hiding defeats them, and how to combine local checks, attestation and server-side decisions.

Tamandua Team · · 6 min read

Almost every security review of a mobile app ends up asking the same question: does the app detect rooted Android devices and jailbroken iPhones? It is a reasonable question, but it often gets a misleading answer. Root and jailbreak detection is a useful signal. It is not a guarantee, and treating it as one leads to apps that block honest users while still being taken apart by anyone with a few hours and the right tools.

This post explains what the common checks actually look for, where they stop working, and how to combine them with other controls so the result holds up.

Why a compromised device matters

Mobile platforms give each app a sandbox. Your app's files, memory and network traffic are isolated from other apps, and the operating system enforces code signing. Root on Android, or a jailbreak on iOS, removes that guarantee. With privileged access, a user or a piece of malware can read your app's private storage, attach a debugger, inject instrumentation such as Frida, install a custom certificate authority into the system trust store, or modify the app as it runs.

That does not mean every rooted device is hostile. Plenty of developers and enthusiasts root their phones for reasons that have nothing to do with your app. It means that on such a device, the assumptions your security design relies on no longer hold.

What the common checks look for

Android

  • Root binaries and apps: su in the usual paths, and packages of root managers.
  • System properties: builds signed with test keys, ro.debuggable=1 or ro.secure=0 on a production device.
  • File system state: system partitions mounted read-write, or unexpected mounts.
  • SELinux: the device running in permissive mode.
  • Runtime evidence: injected libraries, hooking frameworks and modified system functions in the app's own process.

iOS

  • Jailbreak artifacts: package managers and files that do not exist on a stock device.
  • Sandbox checks: attempting to write outside the app container, or to use calls that the sandbox normally forbids.
  • Loaded images: tweak injection libraries showing up in the list of images loaded by dyld.
  • URL schemes: whether jailbreak-only apps can be opened.

A naive Android check looks like this:

fun looksRooted(): Boolean {
    val paths = listOf("/system/bin/su", "/system/xbin/su", "/sbin/su")
    return paths.any { File(it).exists() } ||
        Build.TAGS?.contains("test-keys") == true
}

It catches old-style roots and careless setups. Against a modern rooting tool configured to hide from your app, it catches nothing.

What the checks can't catch

The root ecosystem has spent years building tools whose explicit purpose is to hide from apps. Being honest about them is the starting point for a sensible design.

  • Systemless root with hiding. Magisk modifies the boot image rather than the system partition, so the system partition looks untouched. Its DenyList, combined with Zygisk modules built for hiding, removes root traces from the processes of selected apps. File and package checks run inside those processes see a clean device.
  • Kernel-level root. Solutions that implement root inside the kernel can control what a user-space app observes at a level the app has no way to inspect.
  • Rootless jailbreaks. Modern iOS jailbreaks avoid modifying the system volume and keep their files in a different location, which breaks checks that only look for classic paths.
  • Hooked checks. Whatever the check does, it runs in a process the attacker controls. If they can find the function, they can make it return false.

There is also the opposite problem: a stock, unrooted device is not automatically safe. Android malware that abuses accessibility services, overlays or screen sharing does not need root at all.

Attestation: asking someone other than the device

Local checks have a structural weakness: the device answers questions about itself. Platform attestation moves part of the decision off the device. On Android, the Play Integrity API returns a signed verdict about the app and device that your server verifies. On iOS, App Attest and DeviceCheck let your server confirm that requests come from a genuine instance of your app.

Attestation is stronger than local checks because the verdict is signed and verified on your server, but it is not perfect either. Its strongest guarantees depend on hardware-backed keys, its coverage depends on platform services being available, and it tells you about the device and app, not about what the user is doing. It belongs in the stack, alongside local signals rather than instead of them.

Layering: how the pieces fit together

  1. Many local signals, not one. File checks, property checks, sandbox checks, injected library detection and hook detection each fail differently. An attacker has to defeat all of them, not just the weakest.
  2. Hook and tamper detection next to root detection. Hiding root usually requires hooking or modifying something, so detecting instrumentation and repackaging catches cases where root checks are blinded.
  3. Hardening that hides the checks. Obfuscation and string encryption make it harder to find the detection code and switch it off.
  4. Server-side attestation for high-value operations such as login, payments and account changes.
  5. A policy, not a reflex. Decide per feature what a compromised environment means. A banking app might block transfers but allow viewing balances. A game might only flag the session for anti-cheat review. Blocking every rooted user by default costs you customers and teaches attackers exactly where your check is.
  6. Telemetry. Knowing how many sessions show which signals, on which app versions, tells you whether a change in the numbers is a new bypass in circulation.

A realistic goal

The goal of root and jailbreak detection is not to make compromise impossible. It is to make the cheap attacks fail, make the expensive ones visible, and give you a way to decide what each signal should mean for your app. The OWASP MASVS frames this under resilience: the app should validate the integrity of the platform it runs on, as one layer of defense in depth.

Next step: write the signal policy before the checks

Decide, for each environment signal, what your backend does with it. A starting table for most apps:

  • Rooted or jailbroken, no other signal: log and allow. Many legitimate users root their devices.
  • Rooted plus hooking or a modified app signature: step up authentication for sensitive actions.
  • Attestation fails server-side: treat the session as untrusted for payments, payouts or account changes.
  • Signal missing entirely: do not treat silence as "clean". Record that the check did not report.

Review the table after a week of real traffic. The false-positive rate on legitimate rooted devices will tell you where the thresholds belong.

How we think about this at Tamandua

The layered model above (environment signals treated as evidence rather than verdicts, a signed policy that starts in observe-only mode, and reporting that keeps detected, degraded and bypassed outcomes visible) are the direction Tamandua App Guard is heading, not a description of what it ships today.

Current App Guard evidence is a detect-only Android lab observation on one tested device: root and re-signing were detected and logged on-device. No hosted completion, console telemetry, public enrollment, purchase, blocking, or verified effect is offered. An assisted Android pilot is under consideration, not available. iOS is source/preview only, with no enrollment or availability offer. A request records interest; it does not grant access or guarantee delivery. Register interest.

The iOS material in this post is general background, not a description of the product.

Updated 2026-10-10: current App Guard availability boundaries replace the prior status paragraph.

Your app's third-party SDKs are attack surface too

Analytics, ads, crash reporting and payment SDKs run with your app's permissions and ship under your name. How to inventory them, what to check before adding one, and why app hardening doesn't change who you trust.

· 6 min read

Account takeover on mobile: the device-side signals that matter

Most account takeover is decided on the server, but the device often knows something first. Which client-side signals are worth collecting, how to bind a session to a device, and how to use them without locking out real users.

· 7 min read

Ship apps that fight back

App Guard protects Android and iOS apps: zero-code hardening for APKs, a native iOS SDK, real-time telemetry and a verifiable receipt for every build.