Bao'An Shenzhen China

Bootloader Recovery | Reading a Locked Boot Region

Published · About 7 min read · PCB-Copy

On this page
  1. What Is Bootloader Recovery?
  2. Why Boot Regions Get Locked—and Why You Need Them Back
  3. How Bootloader Recovery Works: Core Techniques
  4. Chip-Family Specifics for Bootloader Recovery
  5. What Can Go Wrong?
  6. Our Bootloader Recovery Process
  7. Turnaround and Pricing Signals
  8. Frequently Asked Questions About Bootloader Recovery
  9. Related Services and Chip Families

What Is Bootloader Recovery?

Bootloader recovery is the extraction of firmware stored in a microcontroller’s protected boot region—the first block of flash that initializes hardware, validates application code, and hands off execution. When read-protection fuses, flash-lock bits, or a corrupted bootloader itself prevent normal access, specialized techniques are required to recover the binary. Our lab handles bootloader recovery across more than 50 MCU families, with typical turnaround of 5–15 working days depending on the protection scheme and silicon revision.

Why Boot Regions Get Locked—and Why You Need Them Back

Microcontroller on PCB with SWD debug probes attached for bootloader recovery

Manufacturers lock the boot region for good reason: it contains initialization routines, cryptographic keys, and sometimes an entire secondary bootloader that gates over-the-air (OTA) updates. Problems arise when:

  • Original source code is lost — a contract engineer left, or version control was never set up.
  • A failed firmware update corrupted the application zone but left the bootloader intact behind read protection.
  • Legacy equipment relies on a discontinued MCU whose vendor no longer provides replacement binaries.
  • Production cloning of your own design requires the exact boot image, including calibration tables burned at final test.

In every case, authorization and proof of ownership are prerequisites before we begin work. We operate under NDA and require documentation that the requesting party owns the IP or has written consent from the rights holder.

How Bootloader Recovery Works: Core Techniques

1. Debug-Port Exploitation

Many ARM Cortex-M parts (STM32, NXP LPC, GD32) expose SWD or JTAG even when application flash is read-protected, because the boot ROM or system memory bootloader runs in a separate trust domain. If the vendor’s Read-Out Protection (RDP) is set to Level 1 rather than Level 2, our engineers can leverage timing-based or glitch-based attacks on the debug interface to dump the boot region without triggering a mass-erase. Success rate on RDP-1 parts typically exceeds 90%; RDP-2 (irreversible) requires a different approach.

2. Voltage / Clock Glitching

A precisely timed voltage dip (typically 50–200 ns wide, injected on VDD or VCORE) can cause the protection-check logic to skip while the flash read path remains active. We use sub-nanosecond pulse generators synced to the MCU’s clock edge. Key variables:

Parameter Typical Range Notes
Glitch width 30–250 ns Narrower on 90 nm and below
Glitch voltage drop 0.4–1.2 V below nominal VDD Must not brown-out the core
Trigger offset 0–500 clock cycles after reset Varies by boot-ROM version
Attempts to success 500–50,000 Automated; chip is not damaged

This method works well on STM32F1, STM32F4, and many PIC families. For newer STM32 lines like the STM32G4 series, the glitch window is tighter due to improved brown-out detection, but recovery remains feasible on most silicon revisions we have tested.

3. UV / Laser Fault Injection

For parts where electrical glitching fails—particularly those with on-die glitch detectors—we use focused UV or near-IR laser pulses aimed at the security-fuse latch or the flash-controller’s protection register. This requires decapsulation (acid or laser decap) and a microscope-guided fault-injection station. It is more expensive (starting around $800–$2,500 per device) but achieves results on chips that resist all other methods.

4. Bootloader Protocol Replay

Some MCUs ship with a factory ROM bootloader (UART, I²C, SPI, USB-DFU) that can read flash under certain conditions—especially if the option bytes were misconfigured or if a security fuse was set incompletely. Our toolchain probes every available protocol at reset, checks for partial-lock states, and attempts authenticated reads using default or blank keys. On approximately 15% of incoming boards, this alone recovers the boot region without any invasive step.

Chip-Family Specifics for Bootloader Recovery

Protection architectures vary widely. The table below summarizes boot-region recovery feasibility for families we handle regularly.

MCU Family Protection Scheme Boot Region Size Recovery Feasibility
STM32F0 / F1 / F3 RDP Level 0–2 2–16 KB High (Level 1); low (Level 2)
STM32F7 RDP + PCROP 16–32 KB Moderate — PCROP complicates partial reads; see STM32F7 unlock details
STM32L0 / L4 RDP + Firewall 4–16 KB Moderate — firewall must be bypassed separately
STM32G0 / G4 RDP + TrustZone (G0+) / PCROP 8–32 KB Moderate to high on early revisions
STM8S / STM8L ROP bit 2–8 KB (UBC area) High — single-bit protection is well understood; details on STM8S unlock
PIC12 / PIC16 / PIC18 CP / CPD bits 256 B–2 KB High on most revisions
NXP LPC1xxx / LPC5xxx CRP Levels 1–3 4–16 KB High (CRP1/2); CRP3 requires invasive
GD32F1 / F3 SWD lock (similar to STM32 RDP) 4–16 KB High

What Can Go Wrong?

Bootloader recovery is not guaranteed. Honest constraints our clients should know:

  • Irreversible fuses (RDP Level 2, CRP Level 3) — on some silicon revisions, the only path is invasive FIB (focused ion beam) modification, which costs $3,000+ and has a success rate around 40–60%.
  • Encrypted boot images — if the bootloader itself is AES-encrypted and the key is stored in OTP or a secure element, recovering the binary is possible but the plaintext may remain unreadable without the key.
  • Die-level damage — decapsulation risks exposing the die to moisture or chemical residue. We mitigate this with nitrogen-atmosphere handling, but approximately 2–5% of decapped devices fail post-recovery.
  • Silicon revision differences — a technique proven on Rev A may fail on Rev Z due to added countermeasures. We maintain a database of revision-specific parameters, but new revisions occasionally require R&D time (billed separately if beyond 3 working days).

Our Bootloader Recovery Process

Decapped microcontroller under microscope prepared for laser fault injection
  1. Feasibility assessment (1–2 days): You ship us the board or bare chip. We identify the exact part number, silicon revision, and current protection state.
  2. Technique selection: Based on the protection level and our internal success database, we choose the lowest-risk method.
  3. Extraction: The boot region is read out as a raw binary (.bin) or Intel HEX (.hex). We verify the dump with a CRC check against the MCU’s internal flash-checksum register where available.
  4. Validation: We disassemble the first 256 bytes to confirm a valid vector table (ARM) or reset vector (PIC/STM8). If the client provides a known-good reference, we diff against it.
  5. Delivery: Encrypted file transfer under NDA. Typical deliverables include the boot-region binary, a brief report noting the protection state and method used, and option-byte / fuse-byte configuration.

Check feasibility for your project

Send the chip marking or board details and tell us what you need to recover. Add clear photos if available.

Request a feasibility review

Turnaround and Pricing Signals

Exact pricing depends on the chip family and protection level. As a rough guide:

Complexity Tier Typical Turnaround Starting Price (USD)
Non-invasive (RDP-1, CRP-1, ROP) 5–8 working days $300
Glitch-based (RDP-1 tight window, CRP-2) 8–12 working days $500
Invasive (decap + laser/UV FI) 12–20 working days $800–$2,500
FIB-level (RDP-2, CRP-3, hardened parts) 20–30 working days $3,000+

Volume discounts apply for batches of 10+ identical devices. We charge no fee if recovery fails on the agreed method—you pay only for successful extraction.

Frequently Asked Questions About Bootloader Recovery

Is bootloader recovery legal?

Yes, when performed on firmware you own or are authorized to access. We require proof of IP ownership or a written authorization letter before starting work. All projects are executed under NDA. For more on our compliance framework, see our trust and authorization policy.

Will bootloader recovery erase my application firmware?

Not with our preferred non-invasive and glitch-based methods. These techniques read flash without triggering a mass-erase. However, if the MCU’s protection logic detects tampering (common on RDP-2 parts), it may autonomously erase all flash as a security response. We always assess this risk during the feasibility stage and inform you before proceeding.

Can you recover a bootloader from a bricked board?

In most cases, yes. A “bricked” board usually means the application firmware is corrupted but the boot ROM or system-memory bootloader is intact. We access the chip via its native boot pins (BOOT0/BOOT1 on STM32, for example) or through direct SWD/JTAG. If the boot region itself is corrupted, we can still read the raw flash contents for analysis.

What if my chip uses both a locked bootloader and encrypted application code?

We recover the boot region first. If the application zone is AES-encrypted and the decryption key lives inside the bootloader, recovering the boot binary may give you everything you need. If the key is in a separate OTP or secure enclave, we assess that as an additional step. Chips like the STM32L0 with firewall protection often store keys in the firewall-protected area, which requires a combined approach.

Do you support bootloader recovery for FPGA or CPLD boot flash?

Yes, for configuration bitstreams stored in external SPI flash connected to FPGAs (Xilinx, Lattice, QuickLogic). If the bitstream itself is encrypted by the FPGA’s built-in AES engine, we can read the ciphertext but cannot decrypt it without the key. For unencrypted bitstreams, recovery is straightforward.

Related Services and Chip Families

Check feasibility for your project

Send the chip marking or board details and tell us what you need to recover. Add clear photos if available.

Request a feasibility review
TURN THE GUIDE INTO A PROJECT QUESTION

What do you need to recover?

Send the full marking or board photos, sample condition and required outcome. Ask for an NDA before sharing confidential files. Scope and sample handling are confirmed individually.

The article title is carried into the contact form. Add your own details and review the enquiry before sending.

WhatsApp Send board details