Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better verification #4

Open
ReservedField opened this issue Jan 4, 2016 · 1 comment
Open

Better verification #4

ReservedField opened this issue Jan 4, 2016 · 1 comment

Comments

@ReservedField
Copy link
Contributor

I was implementing verification for evic-sdk binaries and I found out that the verification in python-evic is not fully compliant with the original updater. This is not some high priority issue, just a heads up.

First, the official updater checks for "Joyetech APROM" as a sequence of bytes (no null terminator required), just like python-evic does. But the string needs to start at least 26 bytes from the end of the file (i.e. there must be at least 25 bytes after the 'J'). The second check, that python-evic also does, is for the device string ("E052" for the eVic VTC Mini). This must start at least 9 bytes from the end of the file.

Immediately after the device string there are three bytes. Let's call them, in order, A, B and C. Those encode the hardware version A.BC (e.g. 01 02 03 -> 1.23). This is the maximum hardware version supported by the firmware and is checked to be greater than or equal to the device hardware version. It makes sense since the display driver defaults to SSD1306, so newer hardware versions with SSD1327 would not work with older firmwares.

In my opinion the at-least-X-bytes-from-end thing is not really important, but the hardware version verification could be nice to have.

@Ban3
Copy link
Owner

Ban3 commented Jan 6, 2016

I added the hardware version check in cc462c4. I'll think about the other changes and see if they would offer some benefit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants