Application security feature

Android app data encryption

Otukan encrypts the Android app data platform defaults leave exposed: files, databases, preferences and caches, with keys held in Android Keystore.

  • Android
Readable app storage is met at the keystore-bound keys boundary before it reaches the appReadable app storageKeystore-bound keysYour app
  • Beyond disk encryption

    Android encrypts storage at rest, yet an unlocked, rooted or backed-up device can still expose app files. Otukan encrypts the data itself.

  • Keys stay in Keystore

    Encryption keys are generated in Android Keystore, hardware-backed where the device offers it, and are not written to app storage.

  • Decrypted only when needed

    Data stays encrypted until the step that uses it, and runtime checks decide whether that step may run on this device.

Android storage risks Otukan closes

Choose a risk to see how Otukan handles it, what changes in the app and what your team can verify.

Rooted file access

  1. Detect

    Otukan root detection flags devices where another process can read your app's private directory.

  2. Respond

    Encrypted files remain unreadable without the Keystore key, and sensitive steps can refuse to decrypt on that device.

  3. Report

    A device-integrity signal reaches your backend with the next request.

Backup and transfer copies

  1. Detect

    The data inventory identifies which files cloud backup and device-to-device transfer copy, and Otukan keeps them encrypted with a Keystore key that stays on the original device.

  2. Respond

    On a restored device, Otukan detects the missing key and establishes fresh keys after the user signs in again.

  3. Report

    Your team can confirm in testing which files travel and what they contain.

Cached server responses

  1. Detect

    Otukan identifies response caches and web view storage holding account or health data during the data inventory.

  2. Respond

    Those caches are encrypted or cleared at sign-out, as you decide.

  3. Report

    The inventory records each cache and its treatment for your review.

Plain preferences

  1. Detect

    Tokens, identifiers and flags kept in key-value preferences are found during the inventory.

  2. Respond

    Otukan stores them encrypted, with keys held in Keystore.

  3. Report

    Your engineers see which preference entries moved to encrypted storage.

Values in memory

  1. Detect

    Hooking and debugger checks run before protected data is decrypted into memory.

  2. Respond

    Decryption is refused when the runtime looks unsafe, per your policy.

  3. Report

    The runtime signal goes to your backend with the request.

What Otukan data encryption covers on Android

Storage encryption, key handling and the runtime controls that protect data once it is in use.

  • File and database encryption

    Encrypts app files and local databases that hold personal, financial or session data.

  • Preference encryption

    Keeps tokens and identifiers stored as key-value pairs encrypted on disk.

  • Secrets protection

    Protects API keys and embedded secrets the app must carry, alongside the data they unlock.

  • Memory data protection

    Shortens the time decrypted values stay in memory and clears them after use.

  • Android root detection

    Flags devices where the app sandbox no longer keeps other processes out of your storage.

  • Cryptographic controls

    Applies current, well-reviewed algorithms and modes, so encryption is not undermined by a weak choice.

From inventory to encrypted release

  1. Inventory the data

    List every file, database, preference and cache the Android app writes.

  2. Classify sensitivity

    Decide what must be encrypted, what can be cleared and what can stay.

  3. Bind the keys

    Create keys in Android Keystore with the use conditions your data needs.

  4. Build as usual

    Encryption joins your existing pipeline, and the signing keys never leave your team.

  5. Test the lifecycle

    Check install, update, restore, sign-out and key rotation on supported devices.

Free for app publishers

Check your app's exposure

A passive review of your published app by an Otukan engineer. No files, no access to your systems. Findings go by email to the verified publisher.

You finish the request on the next page.

Android encrypts the device’s storage at rest, but that protection ends when the phone is unlocked. After that, anything your app wrote in plain form can be read by a rooted process, copied by a backup or pulled from a cache. Data that identifies a person, authorises an action or carries regulated content needs its own encryption. Otukan encrypts app files, databases and preferences with keys generated in Android Keystore, hardware-backed where the device supports it, and decrypts only at the step that needs the data, after runtime checks pass. This page covers Android only; iOS storage is protected separately.

Data inventory

Encryption starts with knowing what the app writes. Otukan runs the inventory with your engineers, because the surprises are usually in caches and third-party libraries rather than in the code your team wrote.

LocationTypical contentWhat Android does by defaultWhat Otukan adds
App-private filesDocuments, downloads, exported reportsSandbox by app identity; at-rest disk encryptionPer-file encryption with Keystore-protected keys
Local databasesMessages, transactions, offline recordsSame sandbox and disk encryptionDatabase encryption with a wrapped data key
Key-value preferencesTokens, user IDs, feature flagsStored as plain values in the sandboxEncrypted entries; sensitive tokens moved out of plain storage
Response and web view cachesAccount pages, images, API responsesKept until cleared by the app or systemEncryption or clearing at sign-out, per your rule
Shared storageFiles other apps can openReadable by apps with the right accessA review of what should never leave private storage

Libraries inside your app write data too. The inventory includes analytics, crash reporting and web view components, so nothing sensitive sits outside the plan.

Deciding what to encrypt

Not every byte needs the same treatment. Otukan helps your team sort stored data into three groups. Data that identifies a person, authorises an action or falls under a retention rule is encrypted. Data the app can fetch again, such as cached pages, is cleared at sign-out or after a set period of inactivity you define. Data with no sensitivity, such as layout preferences, stays as it is. Sorting first puts encryption where it protects something and leaves the rest of the app untouched. The classification is recorded, so a reviewer can see why each location was treated the way it was.

Key lifecycle

Origin

Keys are generated inside Android Keystore on the device. They are not shipped in the app package and not fetched from a server in plain form, so there is nothing to extract from the download.

Storage

Keystore keys cannot be exported by the app. On devices with a trusted execution environment or a dedicated security chip, key material stays in that hardware. Data keys are stored only in wrapped form.

Use

Keys can carry conditions, such as requiring a recent user authentication before they unlock. Otukan applies those conditions to the data that deserves them, such as offline records or stored documents.

Rotation

Rotation replaces the Keystore key and re-wraps the data keys under it. Your team decides the trigger, and the test plan checks that rotation survives updates and interrupted sessions.

Runtime boundary

Encrypted data is only as safe as the moment it is decrypted. Otukan draws that boundary clearly.

MomentData stateWho can reach itOtukan control
App closedEncrypted on diskOnly code running as your app, through KeystoreKeystore-bound keys
App open, idleEncrypted on disk; keys unusedYour app onlyDecryption deferred until needed
Sensitive stepDecrypted in app memoryYour app, or a hook or debugger if presentRuntime checks before decryption; memory clearing after use
Sign-outCaches and keys removed as setNo protected data left to decryptClearing rules and key deletion

Testing follows the same boundary. On supported physical devices, your engineers and Otukan confirm that protected files are unreadable when copied off the device, that a fresh install and an update keep data accessible to the genuine app, that a restore leads to clean re-enrolment, and that sign-out removes what it should.

A hooked or debugged process can read what the app itself can read, so Otukan checks the runtime before handing over plaintext. For stored secrets, see mobile app secrets protection. The wider Android picture is covered on Android app security.

Common questions

  • Doesn't Android already encrypt the device?

    It does, and that protects a powered-off or locked phone. Once the user unlocks it, the operating system serves app files to your app, and on a rooted device to other processes too. Backups and transfers can also copy files elsewhere. Encrypting the data itself, with a key held in Android Keystore, keeps it protected in those cases.

  • What happens to encrypted data after a backup restore?

    The files arrive encrypted, but the Keystore key does not travel with them. Otukan detects that the key is missing and, after the user signs in, creates new keys and fetches or rebuilds what the app needs. You decide which data should be excluded from backups altogether.

  • How are keys rotated without losing user data?

    Data is encrypted with data keys, which are in turn protected by a key in Android Keystore. Rotation replaces the protecting key and re-wraps the data keys, so large files do not need to be re-encrypted in one go. Your team sets when rotation happens, for example on sign-in or after an app update.

  • Does this page apply to iOS?

    No. iOS has its own data protection classes and Keychain, and Otukan designs iOS storage protection separately rather than carrying Android behaviour across. Everything described here applies to Android only.

On the mobile engineering team?

How protection fits your build, signing and release, platform by platform.

Encrypt what your Android app stores

Tell us the framework, the kinds of data your Android app stores on the device and any retention rules you follow. We do not ask for binaries, signing keys, user data or production credentials.

Or request a technical demo