Recovery and fastboot errors
Flashing fails with a number and no explanation. Here's what the common ones mean and what to do about each — the recovery errors first, then fastboot and adb.
Error 7
TWRP / OrangeFoxThe zip's updater-script ran an assert that failed. Nearly always the device check: the package expects one codename and your phone reports another. It can also fire when the ROM asserts a minimum vendor or firmware version you haven't flashed.
Fix · Check the codename the ROM expects against the one your device actually reports — the plate at the top of every CustomDroid device page is that value (ro.product.device). Regional variants share a marketing name but not a codename, which is how most people end up here. Do notdelete the assert line to force it through: the assert is the only thing standing between you and flashing another phone's partitions.
Error 1
TWRP / OrangeFoxA generic failure inside the update script — the script ran but a step returned non-zero. Common causes: a recovery too old for the ROM's partition layout, a partially downloaded zip, or an encrypted /data the recovery can't read.
Fix · Verify the download's checksum first — a truncated zip is the single most common cause. Then update to the recovery build the ROM recommends. If the phone uses dynamic partitions you need a recovery that understands them.
Error 20
TWRP / OrangeFoxThe package is for a different partition scheme than the one on the phone — usually an A/B package being flashed on an A-only device or the reverse.
Fix · Confirm which scheme your device uses and download the matching build. Some projects publish separate A/B and A-only zips under very similar filenames.
Error applying update: 21
adb sideloadkDownloadStateInitializationErrorfrom the A/B payload installer: the package's payload doesn't match what the device expects, usually because the running firmware is older than the ROM's required base.
Fix · Flash the vendor firmware version the ROM asks for, then sideload again. This is one of the few errors that genuinely requires reading the ROM's own install page for your device — the required base differs per phone and per release.
Failed to mount /system (Invalid argument)
TWRP / OrangeFoxThe recovery is trying to mount a partition that no longer exists in that form. On devices with dynamic partitions, /system is a logical partition inside super, and an older recovery doesn't know how to reach it.
Fix · Use a current recovery built for your device. On many modern phones the harmless version of this message appears at boot and can be ignored — it only matters if the flash itself fails.
Can't install this package on top of incompatible data
TWRP / OrangeFoxThe existing /datawas set up by a different ROM, or is still encrypted with a key the incoming ROM can't use.
Fix · Format data — the format option that types yes, not the wipe checkbox, since only the format destroys the encryption key. This erases internal storage, so back up first.
Zip signature verification failed
Stock recoveryYou're in the manufacturer's recovery, which only accepts packages signed by the manufacturer. Custom ROMs are not.
Fix · Boot a custom recovery, or use the ROM's own installer if it ships one.
FAILED (remote: 'Flashing is not allowed in Lock State')
fastbootThe bootloader is locked. Nothing will flash until it isn't.
Fix · Unlock it — enable OEM unlocking in developer options first. On most phones this wipes the device. Some vendors require a waiting period or an unlock code, and a few never allow it at all — how unlocking works per brand.
FAILED (remote: 'partition table doesn't exist')
fastbootYou're flashing a logical partition from the bootloader, which can only see physical ones. system, vendor and product live inside super on modern devices.
Fix · Reboot to fastbootd (fastboot reboot fastboot) and flash from there.
no devices/emulators found
adb / fastbootThe tool can't see the phone at all — a driver, cable or mode problem, not a ROM problem.
Fix · On Windows this is nearly always the driver. Which USB drivers you need covers it per chipset. Also check you're using a data cable rather than a charge-only one, and that adb commands are run in Android or recovery while fastboot ones are run in the bootloader.
dm-verity corruption / red state
BootVerified boot found the system partition modified. Expected after flashing, and on some devices the phone refuses to boot until the check is satisfied.
Fix · Flash the ROM's recommended vbmeta with verification disabled, exactly as its install guide specifies. The flags differ per device, which is why this one is worth reading rather than guessing.
None of these override the ROM's own instructions for your phone. Codename asserts and required firmware versions are per-device facts, and the project's install page is the only authority on them — find your device to get to it, or read the glossary if a term here was new.