Commit graph

14 commits

Author SHA1 Message Date
bunnie
da4c775113 fix backup and restore to be compatible with new SoC format 2023-03-10 00:56:28 +08:00
bunnie
a3086357bd make backup timestamps windows-compatible 2023-01-27 14:19:41 +08:00
bunnie
7b2bfcb247 fix #291: give backups a default name that includes a timestamp
this prevents backups from being overwritten by accident.
2023-01-05 14:26:43 +08:00
bunnie
ad79ebf8ba chore: more typos. no really, i can stop at any time. 2022-12-13 23:02:09 +08:00
bunnie
6230c922ac fix backup/restore scripts 2022-10-09 02:36:48 +08:00
bunnie
8ac80f8c42 update tools to work with checksums (partial update) 2022-10-09 01:12:03 +08:00
bunnie
c33dee152d fix backup opcode setting 2022-10-08 22:20:50 +08:00
bunnie
89d050891b fix incorrect opcode setting on backup 2022-10-08 02:40:07 +08:00
bunnie
42052fdcc5 fix padding on hash check in backup tools 2022-10-08 01:53:28 +08:00
bunnie
a416069002 add hash protection on the metadata header
stage is set for hash protection on the PDDB data itself.
that comes next.
2022-10-08 01:22:14 +08:00
bunnie
0f9195f305 add some sanity checks on the backup header
this tries to catch the cases that:
  - user tried to run the backup without first running "prepare backup..."
  - the USB connection is a little flakey and returning bum data

We can only inspect the plaintext portions of the header, which contains
things like protocol version numbers, time stamps, and language codes.

We use the timestamp validation heavily because it's the only field that
isn't almost always going to be a 0 or 1 when correct, which are highly
likely to be reported anyways if there's a problem with the USB link.

This does assume the user sets the time correctly on the device
doing the backup, and on the Precursor itself.
2022-10-06 00:53:52 +08:00
bunnie
3a5e385b9a add arg to specify file (optionally) in backup 2022-07-29 00:24:40 +08:00
bunnie
ba7532a4fe fix backup length
we were accidentally also backing up the WF200 firmware as well,
chop that off so that the analysis scripts & restore works correctly.
2022-07-26 02:52:40 +08:00
bunnie
802decb55a initial drafts at the backup and restore helper scripts
very, very rough but i was able to run through an entire
cycle exactly once successfully.

much more testing needed.
2022-07-17 03:13:42 +08:00