keepcalculator

06 Numbers and Powers

Device Unlocked and Can’t Be Trusted? Fix It

Card No. 06·38782 · Updated · Standard formula, shown below

The calculator on this card is switched off while it is checked. The formula is below, and the worked example shows how to do the sum by hand.

If your phone or computer shows a message that the device is unlocked and can’t be trusted, it usually means the operating system’s secure boot or bootloader verification has detected an unauthorized change—often from a previous unlock, a custom ROM, or a failed update. The fix is to restore the official firmware and re-lock the bootloader, or in some cases simply reboot or update the system. Below is a detailed breakdown of why this happens, how to resolve it, and how to prevent it.

Formula

The calculator above estimates a simple risk score based on how long ago the device was unlocked and how many unauthorized changes (like custom ROMs or modified system files) have been made. The formula is:

Risk = min(100, (unauthorized_changes × 20) + (months_since_unlock × 2))

Where:

  • unauthorized_changes = number of times the system was modified outside official updates (integer, 0-10)
  • months_since_unlock = months since the bootloader was last unlocked (integer, 0-120)

The output is a score from 0 to 100. A score below 30 suggests low risk, 30-60 moderate, and above 60 high. The recommended action output is 0 if no unauthorized changes (meaning you can likely just re-lock), or 1 if changes exist (meaning you should restore firmware first).

Worked Example

Using the default values: 6 months since unlock, 1 unauthorized change.

  1. Unauthorized changes contribution: 1 × 20 = 20
  2. Months contribution: 6 × 2 = 12
  3. Total = 20 + 12 = 32
  4. Risk score = 32 (out of 100)

The calculator shows 32, which is moderate risk. The recommended action is 1, meaning you should restore the official firmware before re-locking.

What Does “Device Unlocked and Can’t Be Trusted� Mean?

This message typically appears on Android phones (especially Samsung, Pixel, and OnePlus) and some Windows devices. It’s a security warning from the bootloader—the first software that runs when you power on the device. The bootloader checks the digital signature of the operating system. If the signature doesn’t match the official one, the device refuses to boot fully and shows a warning like “Your device has been unlocked and can’t be trusted.�

This happens because unlocking the bootloader (often done to install custom ROMs or root the device) disables the signature verification. Even after you re-lock the bootloader, if the system files aren’t exactly stock, the verification fails.

Why Does This Happen?

  • Bootloader was previously unlocked – Most common cause. Unlocking is a developer feature but leaves a flag that the device isn’t pristine.
  • Custom ROM or modified system files – Installing a custom OS or even a single modified app can trigger the warning.
  • Failed or interrupted system update – Sometimes an update doesn’t install correctly, leaving the system in an inconsistent state.
  • Hardware or software tampering – Rare, but if the device was physically modified, the bootloader may detect it.

How to Fix It (Step-by-Step)

Before you start, back up any important data—the fix usually wipes the device.

  1. Identify your device model – Go to Settings > About Phone (or System > About) to get the exact model number.
  2. Download the official firmware – Use a trusted source like the manufacturer’s website or a reputable community like XDA Developers (for Android). For Windows, use the Media Creation Tool.
  3. Flash the stock firmware – Use the manufacturer’s flashing tool (e.g., Samsung Odin, Google Flash Tool, or the built-in recovery). This replaces all system files with the official version.
  4. Re-lock the bootloader – After flashing, use the same fastboot command that unlocked it: fastboot oem lock (or fastboot flashing lock). This restores full security verification.
  5. Reboot – The warning should disappear. If it doesn’t, repeat the flashing process or contact the manufacturer’s support.

Common Mistakes and Misconceptions

  • “I never unlocked my bootloader� – Some devices come with the bootloader already unlocked (especially carrier models or second-hand units). Check the bootloader status in developer options.
  • “A factory reset will fix it� – No, a factory reset only clears user data, not system files. You need to flash the firmware.
  • “The warning is harmless� – It’s not. It means the device could boot malicious code, so you should fix it before using it for sensitive tasks like banking.
  • “Re-locking without flashing works� – If the system is modified, re-locking alone will cause a boot loop. Always flash stock first.

How to Prevent It in the Future

  • Only unlock the bootloader if you’re an advanced user who needs it for development.
  • If you do unlock, keep a backup of the stock firmware and learn how to restore it.
  • Install updates only from official channels.
  • Avoid random “optimization� apps that claim to speed up your device—they often modify system files.

Frequently Asked Questions

Will this warning affect my daily use?

Yes, it can. Some apps (especially banking and payment apps) refuse to run on devices with an unlocked bootloader, and the warning may appear every time you boot. More importantly, your device is more vulnerable to malware.

Can I fix it without losing my data?

Usually not. Flashing the stock firmware typically wipes all data. Back up your photos, contacts, and files to cloud storage or a computer before starting.

Is it safe to ignore the warning?

It’s not recommended. The warning exists because the device can’t verify the integrity of the OS, so it could be running compromised software. If you must use it temporarily, avoid entering passwords or accessing sensitive accounts.

Why does my device say this after a normal update?

Sometimes a system update fails to install correctly, especially if the device was rooted or had a custom recovery. The update may have partially overwritten the bootloader, causing the verification failure.

Can a repair shop fix this?

Yes, many phone repair shops can reflash firmware and re-lock the bootloader. However, it’s a software fix you can do yourself if you follow the steps carefully. If the device is still under warranty, contact the manufacturer first.

What if I have a Windows PC with this message?

On Windows, this message is rare but can occur if Secure Boot is disabled or the system files are corrupted. You can try restarting, then go to UEFI settings and enable Secure Boot. If that doesn’t help, use the Windows Recovery Environment to repair or reinstall Windows.

Related

Formula used
in t | Time since unlock (months) | - | 6 | 0 | 120
in u | Number of unauthorized changes | - | 1 | 0 | 10
out risk | Risk score (0-100) | - | min(100, (u * 20) + (t * 2)) | 0
out rec | Recommended action | - | (u == 0) ? 0 : 1 | 0

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →