osresearch / airbreak

CPAP jailbreak to allow it to be used as a temporary ventilator
MIT License
259 stars 69 forks source link

Add Python version of patcher tool & logo/image patcher #18

Closed colinoflynn closed 4 years ago

colinoflynn commented 4 years ago

Can split this up if preferred - I dumped a bunch of info on the logo patching process along with samples, plus a more robust version of the Python patch tool (doesn't yet do the stub patching). I put all Python in a sub-dir so it doesn't confuse people looking at existing instructions.

osresearch commented 4 years ago

I think splitting the bitmap code and patching into separate commits is a good idea.

On the bitmap code, I wonder if it makes more sense to not rely on the segger tool and have our own tool that can extract a bitmap from the ROM into a normal format, and generate a bitmap in the format for patching into the ROM.

The patching tool has lost some of the comments, such as why 0xF0 is patched in a random address (to bypass RTC backup value checks). To make the patcher more robust and flexible it would be useful to have command line arguments for binaries, things to patch, etc, rather than having the values stored in the binary.

colinoflynn commented 4 years ago

Updating patcher tool! I had started doing this back in master on my repo. I'll leave this open for comments/visibility but may do a new PR and close this one.

On the emWin stuff - agree, just not sure of the format they are using. Could leave that as a TODO (it might be a good one for someone to tackle as it doesn't need hardware even, as long as they have the examples). Anyway I'll strip out the graphics from final PR at least so it's more distinct.

colinoflynn commented 4 years ago

Closing - new PR coming with improved patcher.