Giter VIP home page Giter VIP logo

teslalogs's Introduction

Tesla logs

The first recorded fatal incident involving a Tesla vehicle dates from 2016, where a Model S collided with a semi truck in Florida. The incident was investigated by the NTSB and the results published in a docket (HWY16FH018). Tesla provided the NTSB investigators a translation of logged data. These logs comprise non geo-located data (according to NTSB report) and are stored on an SD card inside the MCU, managed by the gateway. Various other publications have already been made on the content of the SD card (focusing on vulnerabilities etc. link). However, the contents of the log directory is usually left unattended.

This repository contains writeups of the reverse engineering process of these vehicle logs of the Model S, X and 3 vehicles. Some of these logs have retained their structure over a long period of time, while others change more often. We would like to enable objective forensic analysis of these logs. Therefore we are sharing our reverse engineering efforts and developed tools.

Repository layout

The writeups are placed in the writeup directory. For each writeup, we included the tools to analyze the logs. There are example Jupyter notebooks in the notebooks directory which utilize modules from the teslalogs directory. Even though we tested these tools on a number of vehicles, they are still the result of reverse engineering efforts and therefore incomplete. They should be used with caution and common sense. We have not yet encountered any discrepancies between data provided by Tesla and the translation of the log files.

Writeups

  • We initially reverse engineered the Model S and X logs based on static data analysis.
  • Afterwards we augmented the results by reverse engineering the gateway firmware. Additionally, we were able to validate the extracted logs with recorded CAN data.
  • Next came the Model 3 logs, which were used up to software versions 2019.
  • In 2020 the logging transitioned to a directory called: CL.
  • Model 3 vehicles also record High Resolution Logging (HRL) files for certain events.

Snapshots

For AP2 and AP2.5 vehicles, the autopilot snapshots may be synchronized with the logged data and interactively explored. Tools to convert video and image data from snapshots can be found in teslalogs/snapshot_video. Here's an example with data from a salvage unit of this post kindly shared by @greentheonly.

snapshot_interaction

Getting started

To try out the example notebooks or modules, set up a conda environment using the environment.yml file and start jupyter inside the notebooks directory.

conda env create -f environment.yml  # This can take a while
conda activate teslalogs
cd notebooks
jupyter-lab 

teslalogs's People

Contributors

francishoogendijk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.