Can You Legally Dump Your Own Router's Firmware to Repair It?
Usually yes, in the UK, if it is a private backup or a step you need to keep using the thing. You own the plastic and the silicon, yet reading the flash makes a copy of someone else's copyright work, which is why there is a question at all.
This is about UK law and a router that really is yours. It is general information, and the awkward cases turn on facts and licence terms.
First check that the router is yours
An ISP router may not belong to you. Some are lent or rented and expected back when you leave, so read the contract before you get the soldering iron out.
Ownership matters for the Computer Misuse Act 1990. Section 1 concerns access to programs or data that you know is unauthorised, and section 17 counts copying and outputting as access. Access is unauthorised if you are not entitled to control it and lack consent from someone who is.
My reading is that an owner dumping a router on their own bench is on solid ground. That gets shakier with a borrowed or ISP-owned box, and it gives you no permission at all to poke at the ISP's management servers using credentials you find inside.
Copying is covered by two different exceptions
A dump is a copy. Section 17 of the Copyright, Designs and Patents Act 1988 (CDPA) says copying includes storing a work electronically, even transiently. So you need permission, either from a licence or from the Act.
The Act helps a "lawful user", meaning someone with a right to use the program. Two exceptions matter here, and although they look similar they behave very differently:
- Section 50A allows any back up copy "which it is necessary for him to have for the purposes of his lawful use". A contract term forbidding it is void.
- Section 50C allows copying or adapting that is necessary for lawful use, expressly including error correction. But it only applies if no term of the agreement governing your use prohibits it.
Hang on, that is backwards from what you might expect. The backup survives a hostile licence; the bug fix may not.
So reading the flash before a risky reflash, and keeping that image to restore the same device, fits 50A well. My interpretation is that "necessary" is easy to argue when one bad write can destroy the only copy, though I am not citing a router case for it.
Patching the image to fix a fault is 50C territory (adaptation), so go and find the end user licence. If it bans modification, 50C will not rescue you. Open source components are different, because their own licences grant that permission.
Taking it apart to understand it has tighter limits
The Act treats studying and decompiling separately. Studying behaviour is broadly allowed; decompiling is narrow.
- Section 50BA lets you observe, study or test a program to find its underlying ideas, while doing things you are already entitled to do, such as running it.
- Section 50B permits decompilation only to get information needed to create an independent program that interoperates, with further conditions. "I want to repair it" is not, by itself, that purpose.
Contract terms cannot override either one (section 296A). Neither is a general licence to run the whole image through Ghidra and publish what falls out.
Encryption and copy protection change the picture
Computer programs have their own anti-circumvention rule. The better-known provisions, sections 296ZA onwards, expressly deal with works other than computer programs.
For programs, section 296 gives rights holders civil claims against someone who, knowing or having reason to believe it will be used to make infringing copies, does either of these:
- makes, imports, distributes, sells or commercially holds a means whose sole intended purpose is unauthorised circumvention
- publishes information intended to help people circumvent the protection
It is aimed at supplying tools and know-how, not at the bare act of one owner getting past a lock. That does not make any resulting copy lawful. A firmware image can also hold things that are not programs, such as artwork, where 296ZA can apply to circumvention itself.
Sharing the dump is where it goes wrong
Keep the image to yourself. Posting it so a stranger can unbrick their router is distribution of copyright material, and a personal backup exception does not stretch to that.
It is also a privacy own goal. A full dump may contain your Wi-Fi password, ISP login, admin password hash, private keys and MAC addresses.
Quick detour: many of these routers run Linux, and this bit is interesting. The kernel is under GPLv2, which requires distributors to provide source or, in the usual alternative, a written offer for it, including the scripts that control compilation and installation. Ask the vendor. It will not cover their proprietary parts, but it may save you a lot of guesswork.
How to take a dump you can trust
Try software before clips and solder. If the router boots and you have a root shell (OpenWrt, for instance), list the partitions:
ssh [email protected] 'cat /proc/mtd'
Then stream each one to your computer, changing the number each time. Using the read-only device node guards against an embarrassing typo in the write direction.
ssh [email protected] 'cat /dev/mtd0ro' > mtd0.bin
ssh [email protected] 'sha256sum /dev/mtd0ro'
sha256sum mtd0.bin
The two hashes should match. A partition that the running system writes to may differ between reads, so investigate which one changed before shrugging it off.
If it is dead and uses SPI NOR flash, an external programmer and flashrom can often read the chip. This example assumes a CH341A:
flashrom -p ch341a_spi -r read1.bin
flashrom -p ch341a_spi -r read2.bin
cmp read1.bin read2.bin && sha256sum read1.bin
Before connecting anything:
- Unplug the router's power supply.
- Find the chip's datasheet and check its voltage. Some are 1.8 V.
- Measure your programmer's output and data lines. Some cheap CH341A boards put 5 V on the data lines even for 3.3 V parts.
- Expect trouble reading in circuit, since the programmer may back-power the rest of the board.
- Check the flash type. This method is not for parallel flash or eMMC, and NAND needs its own handling of spare areas and bad blocks.
Two matching reads show that the result is repeatable, but it could still be wrong. A badly seated clip can return all 0xFF twice with admirable consistency, so check that the file contains recognisable data.
The partition you cannot download again
Save the per-device data before writing anything. Many routers keep radio calibration and MAC addresses in a small partition, often labelled art or factory, though names and locations vary.
The clever and slightly daft bit is that the vendor's download can replace the operating system, but it generally cannot recreate values written for your particular board. Erase the whole chip carelessly and you may get a router that boots happily and has terrible, or no, Wi-Fi.
Restore your own calibration to your own board. Borrowing another unit's image brings its identity and radio values with it, along with the copyright problem above.
Keep the untouched original, its hash and a note of the router's hardware revision together, offline and encrypted. Do your experiments on a copy.