Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Owners of Toyota Security Key (TSK) vehicles need to extract the security key and then and write it to
SecOCKey
param. The biggest hurdle for this is the SSH requirement, as many people have not used SSH or GitHub before.Extracting the security key is now possible to do without SSH through a community-developed GUI application TSK Manager. By pushing a GUI button, users are able to extract the security key and then write to 1.
/data/params/d/SecOCKey
to install the param and also to 2./cache/params/SecOCKey
to archive it.While this works well for the initial extraction and putting the param before the initial openpilot installation, reinstalling openpilot remains to be cumbersome. Uninstalling openpilot deletes the param, so the users must SSH in and write the key again on each uninstall/reinstall.
This PR adds a settings button to restore the key that's archived in
/cache/params/SecOCKey
file ontoSecOCKey
param. This allows the users who already extracted and archived the key using TSK Manager to restore the key upon a reinstall without using SSH.A shortcoming of this button is that
/cache/params/SecOCKey
archive file must already contain the key. The existing users who had used SSH in the past to extract the key (as opposed to using TSK Manager) don't have this file, but such people already have SSH configured so it's not difficult to guide them to create the archive file.Verification
I've tested on my device for all code paths.