118. A count with no population, and opcode 3's destination comes first¶
Two corrections and one new field reading, all from trelowney's mail of 10 August 2026, all measured here before being believed, per decision 7. The instructive part is that his observation is right in both cases and his explanation is right in one, and separating those took one measurement each.
The 912 was never base slot 11's¶
Section 101 explained a discrepancy between 1080 and 1992 opcode 22s in h525_config by saying the
extra 912 "sit in programs base slot 11 addresses directly". His objection: base slot 11 in his 525
holds 22 programs containing exactly two opcodes, 0 and 17, so there is no opcode 22 in that slot at
all.
Measured here, on our own 525 config, which is a different remote from his:
| population | addresses | opcodes present | opcode 22 |
|---|---|---|---|
| base slot 11 | 22 | 0 and 17 only | 0 |
| base slot 14 value map targets | 22 | 0 and 17 only | 0 |
| mode pages | 135 | 0, 3, 4, 5, 16, 22, 23 | 1080 |
| mode records | 114 | 0, 3, 4, 5, 16, 22, 23 | 912 |
His count of slot 11 reproduces exactly. So the sentence in section 101 was wrong, and wrong about the one population it named.
Where 1992 came from is now plain: 293 roots of which 157 are distinct, walked without
deduplication. reachable_screen_programs dedupes and returns 1080. The number 1992 was produced by
a one off script that did not, and it went into a document because it agreed with a figure somebody
was expecting.
His explanation is a coincidence, and the safe mode container is what shows it¶
He offers the arithmetic: 114 mode records times eight display rows is 912 exactly, so every mode's page program is being visited a second time by way of its mode record. The conclusion is right. The arithmetic is not the mechanism, and it fails on a third sample:
| sample | mode records | records times 8 | opcode 22 actually reached through them |
|---|---|---|---|
h525_config |
114 | 912 | 912 |
h525_config_2 |
75 | 600 | 600 |
h525_safemode_ahcm |
44 | 352 | 348 |
The arch 9 safe mode container holds one page program with four opcode 22s where every other
program in the corpus has eight, so it draws half a screen. That breaks records * 8 and leaves the
real mechanism standing: every mode record root is also a page program address, 114 of 114, 75 of
75 and 44 of 44. It is the same programs reached twice, which is what he concluded, established by
address identity rather than by a product that happens to match.
This is the third time that container has been the counterexample. It broke the font rule in section 78, it broke the picture width rule in section 85, and it breaks this. A corpus that agrees with itself is the condition every one of those hid in.
Opcode 3 is destination, source, size¶
His second report, and it is a field reading this project had not attempted: opcode 3's six position
bytes are dx, dy, sx, sy, w, h, with the destination first.
Most of them cannot say. In h525_config, 1080 of 1114 carry the same pair twice, which is a page
strip copied to where it already sits, so either order reads the same. Our corpus reproduces his
figures to the instruction: 1114 total, 1080 symmetric, 34 asymmetric, and all 34 are the same shape
(0, 12, 0, 0, 96, 1) naming the same 96 by 64 solid ink bitmap at 0x032C86.
His argument is typographic: the rule sits between a title and text at y = 13, so 12 is a
destination and it is the line under a menu heading. Correct, and there is a closure that does not
depend on reading the layout:
Opcode 22 has already selected a page, and the destination has to be inside it. The instruction
before each of these draws is 22 [1], page 1, which is rows 8 to 15. A destination of y = 12 is
in that page and a destination of y = 0 is not, and nothing can be transferred to a page that is
not selected.
| first pair inside the selected page | second pair inside it | |
|---|---|---|
h525_config, 34 asymmetric |
34 | 0 |
h525_config_2, 21 asymmetric |
21 | 0 |
h525_config, 1080 symmetric, the calibration |
1080 | 1080 |
55 of 55 against 0 of 55, with the symmetric draws as the calibration case: the test has to pass on the instructions whose answer is not in dispute, and it does. So the order is read off the hardware's own addressing rather than off the typography, which is the stronger of the two arguments and the one this project's standard asks for.
Nothing in this repository was wrong, which is worth saying plainly rather than claiming a save:
bitmap_reference takes opcode 3's last three bytes and no reader here has ever consumed the six
position bytes. His renderer had them swapped and was drawing all 34 rules along the top edge. Ours
draws nothing at all, so it could not have the bug, and it also could not have found it. That is the
argument for building the renderer, not against it.
Glen's caveat about a config writing to arbitrary flash, measured¶
A separate mail passes on a caveat from the format's original designer: a config could in principle contain an instruction sequence that makes the runtime write to arbitrary flash, including firmware or the bootloader. Flagged as unverified by everyone who passed it on, and taken seriously here because it bears on the write rails.
The premise is right and it is not a hypothesis: section 108 read that path out of the firmware.
Action list opcodes 0x65 and 0x66 feed 0x159F4, which is a write to the external serial flash
through a five command SPI vocabulary. So an action list can make a remote write to flash, and no
config in the corpus does.
What the caveat leaves open is whether the address is the config's to choose, and it is not. Three bounds, all in the firmware and none of them in the config:
0x159F4reads five values and returns without writing if any of them is zero, which is five separateRETURNs before anything is sent.- It then compares the region limit at
0xD3Dagainst both the write cursor and the cursor plus the length, at0x15A88and0x15A98. Out of range branches to0x15BDE, which updates a variable and returns, again without writing. That matches section 47's finding that the log area's writer refuses out of range rather than erroring, which was read from the other end. - The region itself is computed by
0x15D3Afrom the detected chip size and the config's own end, and section 108 already established that base slot 2's declared reservation does not decide it. The config cannot move the target because the config is not asked.
So on arch 14 the reachable target is an append region at the top of the serial flash. And the structural point is the one worth carrying, because it is not an argument about bounds at all: arch 14 keeps its firmware in internal program memory and its config in a separate SPI serial chip. The write path here speaks SPI to that chip. It cannot reach the firmware because the firmware is not on it.
Arch 12 is where firmware and config do share one memory, the mapped parallel NOR, so on the One the
question would be live. Opcodes 0x65 and 0x66 do not exist there. Section 107 read the arch 12
ladder: every opcode from 0x65 to 0x6E is tested and branches to the dispatcher's common exit
doing nothing, and the 525 is the same. So the architecture whose firmware shares flash with its
config does not implement the instruction, and the architecture that implements it keeps its firmware
somewhere the instruction cannot address.
What this does not establish, stated plainly because the caveat deserves better than a reassurance:
- It is three architectures of at least eleven, and only the ones whose firmware is in the lab.
- It is the reachable path from the action list language. The screen language queues action list instructions through opcode 17 and is therefore covered, but a claim that no other route exists is a claim about everything, and this project does not have it.
0x76remains placement only: it walks an array nothing names, section 108.
The rails do not change and none of them rested on this. Writing stays behind
HARMONY_ENABLE_WRITES, WRITE_FLASH stays restricted to the config region, and arch 14 has no
write target at all because only one arch 14 remote is on the bench. (Until section
281, when a Harmony 650 arrived and became one; the Harmony 600 stays unwritable.)
How safe mode is entered: the procedure is documented, the mechanism is half read¶
Written up here twice in one sitting, because the first version said safe mode is a mode this project can read and cannot enter. There is a published procedure, and finding it changed the question from "how is it triggered" to "where in the firmware is that trigger".
The procedure, from harmonyremoterepair.com's own instruction sheet, which is the archive
reference/checksums.md already cites for firmware packages:
- charge the remote in its cradle, because the step below needs a charged battery;
- remove the battery and wait at least a minute;
- press and hold the Off button at the top of the remote;
- keeping it held, insert the battery;
- hold for up to 30 seconds, until the splash screen reads "Safe Mode".
It is a cold boot key test, and that is why the searches in the first draft of this section looked in the wrong place. Nothing about it involves the config, the host, or a command over USB: the key is already down when power arrives. The sheet also notes that a remote with a blank or white display may show no message and still be in safe mode, which matters to anyone verifying it.
Source quality, stated because it decides how the claim is marked: this is a third party repair business, not Logitech, so it is a hypothesis of the same standing as an upstream finding under decision 7. It is worth having anyway because it is specific and falsifiable, and because it does not contradict anything read here.
What the firmware says, measured on the One's own internal page and application image:
- The internal bootloader does test a key, and this bullet said the opposite for a fortnight. It
read "The internal bootloader does not test a key. Every port access in
0x000000to0x001000is a write ... Zero reads.", and section 189 refutes it: there is one read,MOVFF PORTB,gprF3Bat0x0095A, inside the routine the boot decision calls, and the scan reaches the keypad over the external memory bus rather than through a port at all. The test behind this bullet missed it becauseMOVFFwas not in its list of reading mnemonics and, worse, because aMOVFFhas no addressing mode field, so a guard selecting direct accesses discarded it before the port check ran. Section 87 had the right answer in this same document the whole time. So the reset path that section 116's arch 8 analogue made interesting is where the choice is made on arch 12. - The safe mode image does read the keypad, fifteen port reads from
0x004D8Con,PORTB,PORTAbit 4,PORTFandPORTG, which is the same set section 13 names for the One's matrix. That is what a mode has to do to respond to buttons once it is running, so it is consistent with the procedure and it does not identify the trigger. - No literal
0x002000or0x040000reachesTBLPTRUanywhere in the application image, zero sites, so the config base arrives in a variable. That is the indirect access dead endtrace-sectionnames as its most common one, and it is the remaining thread. 0x19120is a hardwiredRESETbehind a key combination, section 13. ARESETis a reboot, so it is plausibly how a held key survives into a fresh boot rather than how a container is chosen, and nothing read here connects it to either.
So the mechanism is closed rather than narrowed, and by section 189 rather than here: it is the internal bootloader, and it is reachable from a key held across power-on. This paragraph read "the mechanism is narrowed rather than closed: not the internal bootloader" until then. The cheap next step is hardware, not firmware, and it is read only: the spare Harmony One is on the bench, the procedure needs no host software to reach step 5, and either the screen says "Safe Mode" or it does not. That would turn a repair shop's instruction sheet into a measurement on a unit whose contents are backed up byte for byte.
This matters to the write rails and it improves them. A recovery route a user can trigger by hand, with no host and no software, is a better rail than one that depends on our own code being correct. It is the reason the rails can treat a bad config as recoverable rather than fatal, which is what the caveat above was really asking about.
Confirmed on a Harmony 525, 11 August 2026, by following the procedure on a remote the sheet does not name: battery out, hold the key, battery in, and it entered safe mode. So the procedure generalises off the models it was written for, and arch 9 has it too.
Predictions recorded before the remote was read, and section 87 had already written this one down for exactly this case, so that a remote which ends up in safe mode by other means can be recognised rather than induced:
| normal boot, measured 8 August 2026 | predicted in safe mode | |
|---|---|---|
GET_VERSION reply byte |
0x27 |
0x27, seven fields |
| field 4 | 0x90 |
0x94, architecture 9 and software type 4 |
| field 5, the skin | 0x16, 22 |
unchanged |
| field 6, the platform | 0x09 |
unchanged, since section 116 found it identical in a remote's safe mode image and in its application |
| field 0, the firmware version | 0x30, 3.0 |
may differ, because a different image is answering |
The low nibble is the one worth the trouble. Section 87 read it out of arch 8 firmware constants and Logitech's own comment naming value 4 safe mode, and no live remote had ever reported anything but 0.
Measured, and the remote names its own state¶
Read the same day, read only throughout, and the headline is that the prediction holds:
version 20 25 12 ff 94 16 00
| field | normal boot | safe mode | |
|---|---|---|---|
| 0, firmware version | 0x30, 3.0 |
0x20, 2.0 |
a different image is answering |
| 1, 2, 3 | 0x25 0x12 0xFF |
unchanged | board and flash id are the hardware's |
| 4 | 0x90 |
0x94 |
predicted, architecture 9 and software type 4 |
| 5, the skin | 0x16, 22 |
unchanged | as predicted |
| 6, the platform | 0x09 |
0x00 |
refuted, see below |
So software type 4 is confirmed on a live device for the first time. It had been read from arch 8 firmware constants and from Logitech's own comment naming the value, on an architecture whose firmware this project did not hold when the reading was made, and the confirmation arrives on a third architecture from a remote reporting its own state.
Before any command was sent, enumeration alone already said so: the remote's USB product string is
Harmony Safe Mode!, on both the manufacturer and the product descriptor. Its product id is
unchanged at 0xC111 and its bcdDevice unchanged at 0x0916, so a host that keys on either sees
an ordinary 525. The HID report descriptor differs in exactly one byte, 0x81 0x02 where the
application reports 0x81 0x06: the input report is declared Absolute rather than Relative, one bit
of the HID Input item's flags.
Field 6 is zero in safe mode, which refutes a claim in section 116¶
Section 116 gave field 6 its first reading, a platform id, and supported it partly with "the same
value in a remote's safe mode image as in its application, on arch 12 and arch 14".
A live arch 9 remote in safe mode reports 0x00 where the same unit reports 0x09 running
normally.
That is not a small correction, because it removes one of the three legs the platform reading stood
on. What survives is the other two, 0x0C on both arch 12 and arch 14 across six images and 0x09
against 0x08 on arch 9 and arch 8, and those are the legs that made it a platform rather than an
architecture.
And the refutation has a shape: the arch 8 bootloaders also report field 6 as zero, section 116, which that section explained away as "the one role that has no use for a platform constant". Two recovery role images out of two now report zero, one of them measured on hardware. So the honest reading is narrower than section 116's: field 6 names a platform in an application image, and a recovery image reports zero. Section 116's arch 12 and arch 14 safe mode figures were read out of the images' own constants rather than off a remote, and they disagree with this measurement, which is either an architecture difference or a difference between what an image contains and what it answers.
Resolved since section 190, and it is the architecture. This subsection asked for an arch 12 or
arch 14 remote in safe mode and got one on 27 August 2026: a live Harmony One in safe mode reports
field 6 as 0x0C, exactly what it reports running normally. So "a recovery image reports zero"
was too broad and this section overgeneralised from one architecture, the same way section 116 had
in the other direction. The narrow statement is that a recovery image answers zero on arch 9 and arch 8
and answers the platform on arch 12, with arch 14 still unmeasured on hardware. The mechanism is
section 189's: arch 9 copies its safe mode image over the application, so a different firmware
generation answers, where arch 12 hands control to an image resident beside the application and of the
same generation.
Safe mode is latched, and that is new¶
The procedure enters it. A clean power cycle does not leave it: battery out, a minute's wait, battery back in with no key held, and the 525 came up in safe mode again. So it is not a live key test whose effect ends with the boot that read it; something non-volatile is holding it.
That is arch 9's and not safe mode's, section 190. The same power cycle brings a Harmony One up normally, and the mechanism rules the arch 9 candidate out structurally rather than by measurement: the paragraph below names internal EEPROM as the obvious holder, and neither the PIC18F87J50 nor the PIC18F67J50 has data EEPROM at all.
Where is not established. The 525's bootloader carries EEPROM read and write primitives at 0x00130
and 0x00150, block routines taking their base address from 0x422, so internal EEPROM is the
obvious candidate and the callers have not been traced. What the mode is waiting for is presumably a
completed firmware transfer, which is what the instruction sheet has the reader do next, and this
project will not be the one to try that: it is a write.
Reads work in safe mode, which is worth recording for the application. READ_FLASH answers, and
at flash 0x820000 it returns this unit's ordinary user config, AHCM with end_addr 0x0002C7F7 and
format 0x1400. So a config can be read off a remote in safe mode, and a recovery tool can identify
what it is looking at before doing anything. GET_VERSION is flaky here in a way it is not
normally: probe.ts gave up after three polls of 2000 ms, and read-window.ts, which retries four
times, got a reply. The retry loop was added for an idle remote on 9 August 2026 and it earned itself
again.
On arch 9, entering safe mode overwrites the application firmware¶
The reason safe mode is latched, and it is not a flag. There is nothing else on the remote to
boot. Read out of the connected 525 and compared against h525_code, which is that same unit's
internal program flash read over USB on 8 August 2026:
| internal address | 8 August | in safe mode |
|---|---|---|
0x000000, 0x000800 |
bootloader | byte identical |
0x001000 |
an HG image header, GOTO 0x7FB4 |
an HG image header, GOTO 0x17EA |
0x002000, 0x003000, 0x003400 |
application code | different code |
0x003800 and above, to 0x008000 |
99% populated | erased, 0xFF |
So the bootloader is untouched and the 28 KiB application is gone, replaced by an image of under
10 KiB whose own entry point is at 0x17EA rather than 0x7FB4. That resident image is what reports
firmware 2.0 and software type 4, and it is not in the 8 August dump: its five accessors would
read 20 04 16 00 09 and no such run exists anywhere in those 32 KiB, where the application's
30 00 16 09 09 sits at 0x05774.
The mechanism makes this expected rather than alarming. The part is a PIC18F4550 with 32 KiB of
program flash. The bootloader takes 4 KiB and the application takes the remaining 28. There is no room
for a second image in internal program flash, so safe mode has to be loaded into the
application's space, and loading it means erasing what was there. Arch 14 does not have this problem:
its safe mode image sits at internal 0xFE + 0x1000 and its application at +0x9000, both resident,
which is why a 600 can enter and leave safe mode without losing anything.
The words "in internal program flash" are load bearing and were missing here for an hour. Both arch 9 images are resident, in external flash a 64 KiB apart, and the internal region holds a copy of whichever one the bootloader last put there. That is measured two subsections below, and it is a better account of the same overwrite: nothing is transferred from a host to enter safe mode, and nothing has to be to leave it.
Attribution, stated carefully because the claim is that a documented procedure is destructive. The
application was complete and running on 8 August, reporting firmware 3.0 and software type 0, and it
was read in full. The only event between then and now is the safe mode entry. No write has ever been
sent to this remote by this project, and the reads that could disturb it, the odd count internal reads
of section 96, write into data memory and are refused by packages/usb anyway.
So this is a rail, and it is the strongest one this section produces. Do not enter safe mode on arch 9 as an experiment. It is not reversible by a power cycle, and leaving it needs the application firmware written back. That is fine for the purpose the instruction sheet has in mind, where the reader is about to reflash regardless, and it is not fine as a way of looking around.
It also sharpens the assurance that a bad config cannot brick a remote, which is what the caveat
earlier in this section was about. That assurance holds, and safe mode is not the free fallback it
sounds like on arch 9: reaching it costs the application image. The recovery is only as good as the
firmware dump you already hold, which is precisely why the rails require a verified dump of that exact
unit before any write. Here that requirement is met, h525_code, and it is the difference between a
recoverable remote and a lost one.
The way out, and the application firmware is still on the remote¶
The overwrite above is recoverable without our own firmware dump, because arch 9 keeps its firmware
in external serial flash and the internal copy is the working one. concordance's architecture table
says so and this project had never read that row: arch 9 has flash_base 0x800000,
firmware_base 0x810000, config_base 0x820000 and firmware_update_base 0x810000, with
firmware_4847_offset 4, which is the same HG at offset 4 that section 114 read on arch 8.
Read off the connected remote in safe mode, against the 8 August internal dump:
| external | internal in the dump | |
|---|---|---|
0x810000 |
0x1000 |
identical, the HG header and GOTO 0x7FB4 |
0x810010 |
0x1010 |
identical |
0x811000 |
0x2000 |
identical |
0x814000 |
0x5000 |
identical |
0x817000 |
0xFF, past the image |
So external 0x810000 + N is internal 0x1000 + N, and the application image the safe mode entry
erased from internal flash is intact in external flash, byte for byte the firmware that was running
on 8 August. The bootloader's job is to copy it in, which is why a 32 KiB part can afford to hand its
whole application region to safe mode.
What tells it to copy is one byte. On arch 9 firmware_update_base equals firmware_base, so
concordance takes its first branch in PrepFirmware and FinishFirmware, libconcord/remote.cpp:
| step | what concordance does |
|---|---|
| prepare | WRITE_MISC selector 0x09 MISC_RESTART_CONFIG, then write 0x00 to flash 0x200000 |
| stage | write the image to 0x810000 |
| finish | write 0x02 to flash 0x200000 |
So that address is a one byte update state cell, 0x00 staging and 0x02 install, and 0x200010 is
where the same table puts the serial. That is the latch, or the nearest thing to it that is
documented: safe mode persists because nothing has told the bootloader the staged image is complete.
Every word of that is concordance's, including calling the address flash, and section 119 reads it
out of the firmware instead. It is not flash: top byte 0x20 selects the on chip EEPROM, the cell
is EEPROM byte 0, and the latch is not what this paragraph guesses. The table is left as written
because it is a faithful description of what the client does, which is a different claim from what the
remote is.
Two cautions, because this is a route and not a recipe:
- It is client sourced, from concordance's table and code, and unconfirmed against the 525's own
firmware.
docs/host-client.mdis where that standing is recorded. The staged image being byte identical to a known working one is measured here; the meaning of0x200000is not. - Our own read validator refuses top byte
0x20on arch 9, and correctly by what section 88 read: the firmware'sREAD_FLASHvalidator at0x02E30refuses below0x80and at or above0x88. So either the write path uses a different validator or that region is handled specially, and the value at0x200000has not been read. Deliberately not worked around: extending a validator to reach an address the firmware is read as refusing would be guessing, and it is a write we would be reaching for anyway.
This project is not the thing that should perform that write. The one write it has performed,
section 222, was to arch 12 and reproduced bytes already on the device; the rails put arch 9 outside
ARCHITECTURES_WITH_A_WRITE_TARGET, and a first write to an architecture should not be the
one that installs firmware on an irreplaceable unit. concordance has done this for years and is the
tool for it. What this section contributes is the part worth having beforehand: the staged image is
verified against a known good copy, so the operation is a well understood one rather than a blind
reflash, and if it goes wrong h525_code is a second copy of the same bytes.
The whole staged image read back, and the safe mode entry did not touch it¶
The four sampled offsets above were a spot check, so the region was read in full: 28672 bytes from
external 0x810000, in seven passes of 4096, on 11 August 2026. Three way comparison, all identical:
| sha256 prefix | |
|---|---|
external 0x810000, read today in safe mode |
facf26f411f39432 |
external 0x810000, read on 8 August |
the same over these 28672 bytes |
internal 0x1000 in h525_code, 8 August |
facf26f411f39432 |
So the staged image is byte for byte the application that was running before any of this, and the safe mode entry erased internal program flash while leaving external flash alone. That is the asymmetry the recovery depends on, and now it is measured rather than sampled.
A correction to what this project told its owner an hour earlier. The read was proposed as
producing "a third copy", on the grounds that only four offsets had been compared. The lab already
held the whole thing: 20260808-harmony-525-flash-810000.bin is 65536 bytes covering the entire
firmware region, including the arch 9 safe mode container at offset 0x8000 that section 76 cut out of
it. So the backup was never missing and the read is a confirmation, which is a smaller claim than
the one made for it. It is still the confirmation that matters, because it is what rules out the safe
mode entry having disturbed the staged copy, and nothing else could have ruled that out. The habit
worth keeping from this: look in the lab before offering to read a remote.
Both arch 9 images are resident in external flash, and the safe mode one was already in the lab¶
Looking in the lab rather than at the remote turned up the other half of the mechanism, and it had
been sitting there since 8 August under a filename that says what it is. Three reads of the 525's
external flash, all in ../lab/reads:
| length | populated | first bytes | |
|---|---|---|---|
0x800000 |
65536 | 10061 | 26 16 ff ff 48 47 00 70 f5 ef 0b f0 |
0x810000 |
65536 | 43559 | fb 6a ff ff 48 47 00 70 da ef 3f f0 |
0x810000, today, in safe mode |
28672 | 27798 | the same twelve bytes |
Two distinct HG framed images, a whole 64 KiB apart, differing in their header checksum word and in
the target of the GOTO at offset 8. checksums.md has called the lower one "the safe mode
application" since 8 August, from its header alone.
That guess is a finding now, and the closure came from the stranded remote. Section 87's five
accessors are emitted as a RETLW run, and the run for the values a safe mode remote reports is in
the lower image and nowhere else:
| searched for | in 0x800000 |
in 0x810000 |
|---|---|---|
20 04 16 00 09, safe mode |
file offset 0x1406 |
absent |
30 00 16 09 09, the application |
absent | file offset 0x4774 |
So the five bytes a live 525 answered on 11 August are inside an image that was dumped and labelled on 8 August, before safe mode had ever been entered on it. The label was recorded first and the device agreed with it afterwards, which is the calibration this project asks for and which a comparison made the other way round would not have been.
This also answers the question section 118 opened above better than the paragraph about a 32 KiB part does. Arch 9 does not lack a resident safe mode image: it keeps both images off chip, and the single internal application region holds whichever one the bootloader last copied in. That is why entering safe mode is destructive to the internal copy and costs nothing permanent, and it is why the recovery is a copy rather than a reflash from a host.
A prediction, written down before it is measured, because the remote is still connected and in this state, and the internal read that settles it is a single 62 byte window:
- If external file offset zero is internal
0x1000, which is the convention the0x810000read established, then internal0x002400right now holds external0x800000file offset0x1400, and the accessor run sits at internal0x002406. - The alternative convention, file offset zero being internal
0x0000, puts it at internal0x001406instead. Both windows are read, so the measurement distinguishes them rather than only confirming one. - Either way the run must be present in internal flash now and it is absent from the 8 August
internal dump, which is already asserted by
test_the_safe_mode_accessors_are_nowhere_in_the_dump. If neither window holds it, the bootloader does something other than copy an image in, and the account above is wrong.
Measured immediately afterwards, on 11 August 2026, both windows read off the connected remote, which announced itself as software type 4 and architecture 9 in the same command:
0x002400 9b 6f 7f ef 1a f0 20 0c 04 0c 16 0c 00 0c 09 0c e2 c3 ee f0 ... 62 bytes
0x001406 e5 52 e5 cf da ff 11 00 00 00 1d d8 89 9a 00 01 16 bytes
| internal | what it holds |
|---|---|
0x002400 |
external 0x800000 file offset 0x1400, byte for byte over all 62, run at 0x002406 |
0x001406 |
not the run, and not anything resembling a RETLW chain |
So the first convention is the right one, the two external images are addressed the same way, and
the internal application region is a copy of one of them. The 525 is running the image at
0x800000 and the image at 0x810000 is untouched, which is the whole of the recovery situation in
one sentence.
What this changes about the recovery is the risk, not who performs it. concordance's staging step
would write the image at 0x810000 over the bytes already at 0x810000, which we have now read twice
and compared to a third copy, so the transfer has nothing to get wrong that a verification read would
not catch. What still needs a write is whatever tells the bootloader to copy the upper image back in,
and the only candidate for that is the 0x200000 state cell above, which is client sourced,
unconfirmed and unreadable by our own validator. The rails are unchanged: arch 9 is not in
ARCHITECTURES_WITH_A_WRITE_TARGET, the one write this project has performed was to arch 12 and
changed nothing, section 222, and a first write here
should not be the one that installs firmware. The contribution here is that the operation is now
fully characterised beforehand.
There is no concordance command line that does the finish step alone¶
Looked for, and the answer is no. concordance.c has thirteen modes and none of them reaches
finish_firmware; --firmware sets MODE_WRITE_FIRMWARE, which calls update_firmware, and that is
the whole sequence:
prep_firmware write 0x00 to flash 0x200000
invalidate_flash WRITE_MISC, COMMAND_MISC_INVALIDATE_FLASH
erase_firmware erase the firmware region
write_firmware_to_remote
finish_firmware write 0x02 to flash 0x200000
reset_remote
_set_time
Two of those steps are actively unwanted on a remote whose staged image is already the right one.
erase_firmware erases 0x810000, which is the one good copy of the application currently on the
device, and invalidate_flash marks the config unusable. The config would otherwise survive:
concordance's own is_config_safe_after_fw returns safe whenever firmware_update_base differs from
config_base, and on arch 9 they are 0x810000 and 0x820000.
--firmware is also not usable with a raw image. OperationFile::ReadAndParseOpFile accepts a zip or
a plain file carrying an <INFORMATION> XML envelope, so h525_code would have to be wrapped in a
fabricated package first, and there is no published 525 firmware package: the archive that has the One,
the 650 and the 700 has no 5xx.
finish_firmware is exported, so the finish step is reachable without the command line.
libconcord.h declares init_concord, get_identity, finish_firmware and deinit_concord, and
get_identity is what populates the ri that FinishFirmware reads its architecture from. So four
calls, and on arch 9 the third is one WRITE_FLASH of one byte: FinishFirmware at remote.cpp:433
branches on firmware_update_base == firmware_base, which holds on arch 9, and that arm is
data[0] = 0x02 then WriteFlash(0x200000, 1, ...). libconcord.dylib is installed on this bench,
so ctypes reaches it with nothing to compile.
The progress callbacks are not optional, and this paragraph said they were. The
claim was that every call site is guarded by if (cb), which is true of remote.cpp and is where it
was checked. _report_stages in libconcord.cpp:610 is not guarded: its whole body is cb(...), and
get_identity calls it before anything else. So a ctypes caller passing NULL takes SIGSEGV inside
get_identity, which is what a lab script did on 11 August 2026, exit 139 with init_concord having
already returned 0.
Three things worth keeping from that, none of them about libconcord:
- It failed at the safe end. The crash is two calls before the write, so nothing was written. That is luck rather than design, and the design lesson is the ordering: identify first, write last, so a wrong assumption about the binding surfaces before the byte does.
- A guard checked in one file is not a guard. The reading was of
remote.cpp, where every one of the ninecbuses is guarded, and the unguarded one is in the file above it. Same shape as the--part 4550register map and the0xB0 | pagecontroller: a rule confirmed on the population that was looked at. - Buffered output turned a crash into silence. The script printed nothing at all on its first run, because stdout is block buffered when captured and a SIGSEGV never flushes it. That read as "nothing happened", which is the worst possible report from a script that is one step from a firmware write. Anything that calls into a library that can take the process down flushes every line and announces each call before making it.
Recorded as the route and not as something this project does or ships:
- It is still a write, and the standing rails do not bend because the write is small.
- Anything calling into libconcord is GPLv3 territory and this repository is MIT, decision 1. A recovery script belongs in the private lab directory and must never be committed here.
0x200000's meaning remains client sourced,docs/host-client.md. What is measured is that the image staged at0x810000is byte identical to the application that was running, which is the half that decides whether the operation is worth attempting at all.
A bug in this project's own tooling, which only this state could expose¶
read-window.ts read the version block, printed it, and then threw the architecture away: the
region validator fell back to DEFAULT_REGION_ARCHITECTURE, which is 12, so a legitimate read of a
525's flash was refused with a message naming an architecture the remote had just contradicted in the
line above. The only way through was to repeat by hand what the remote had already said.
Two reasons it survived: the refusal is in the safe direction, so nothing broke, and the bench habit is to read arch 12 and arch 14, where the default happens to be right for half of them.
Fixed by putting the derivation where it belongs. architectureFromVersion and
softwareTypeFromVersion are in protocol.ts next to the field constants, so field 4's two nibbles
are decoded in one place rather than shifted by hand at each call site, and HarmonyRemote.useArchitecture
narrows only: it adopts what the remote states when the caller supplied nothing, and a caller who
pinned an architecture that disagrees gets a refusal rather than a silent override. The write rails
are untouched, because ARCHITECTURES_WITH_A_WRITE_TARGET is consulted separately and is [12], so
learning that a remote is arch 9 cannot make it writable.
One thing he suggests that is already done¶
The Harmony 650 is in the corpus, and has been since before this exchange: the update package's
firmware image and its safe mode container, arch 14, all eleven checks passing, with golden vectors
on both sides. His note that a 650 places the first byte of the file at 0x030000 and ours records
0x020000 is not a disagreement: a safe mode container sits at 0x020000 on arch 14 and a user
config at 0x030000, which is the same split arch 12 has at 0x002000 and 0x040000. He has a
user config and we have the package.
And three of his own claims withdrawn, none of which this project adopted¶
He withdrew a twelve byte block header per keyboard matrix row, a seven byte record trailer holding a
pointer to its own bytecode, and 124 references buried in record bodies. Checked: none of the three
appears in any document or reader here. The third is worth recording as a method note, since it is a
trap this project could fall into. He found 16 <u24> matching inside an opcode 4 whose y
coordinate happened to be 0x16, which is a byte pattern search finding its pattern in the middle
of an instruction. The defence is the one chains.py already states for switch tables: decode the
stream, do not scan it.
Section 117 | the archive | section 119. Section 118 of the findings archive, which is frozen; the reference holds the current answer. The archive on GitHub.