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

SecOCKey Restore button #34400

Closed
wants to merge 1 commit into from
Closed

Conversation

calvinpark
Copy link
Contributor

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 onto SecOCKey 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.

@github-actions github-actions bot added the ui label Jan 17, 2025
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing to openpilot! In order for us to review your PR as quickly as possible, check the following:

  • Convert your PR to a draft unless it's ready to review
  • Read the contributing docs
  • Before marking as "ready for review", ensure:
    • the goal is clearly stated in the description
    • all the tests are passing
    • the change is something we merge
    • include a route or your device' dongle ID if relevant

Copy link
Contributor

UI Preview

settings_device : $${\color{red}\text{DIFFERENT}}$$
master proposed
diff composite diff
driver_camera : $${\color{red}\text{DIFFERENT}}$$
master proposed
diff composite diff
All Screenshots

@calvinpark
Copy link
Contributor Author

  1. Is Device the right place for this? I think it is. It's a button not a Toggle. Also TSK is not about openpilot Software. Finally, a TSK vehicle owner is not always a Developer.
  2. Happy to move it down, but I think it belongs above Reset anything.
  3. I'm open to changing wording, display formatting, code paths, code styles, and anything else as comma.ai prescribes.

@adeebshihadeh
Copy link
Contributor

This should not be 100+ new lines... we'd consider a few line change that copies from /cache to the param.

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

Successfully merging this pull request may close these issues.

2 participants