# Renault R-Link reverse-engineering

Collection of materials and scripts to attempt reverse engineering Renault R-Link. Very WIP.

## Note

Everything in here is for educational purposes and shall not be used for commercial gain. Be advised that using any of provided tools on your own R-Link is done at your own risk
and you may void your device's warranty. Moreover, these tools are not guaranteed to work. Beware that you may permanently brick your device and in some cases this damage is irrecoverable.

## Legend

- FW, SW, HW = firmware, software, hardware
- RL = R-Link
- TT = TomTom
- Strasbourg/Struttgart = R-Link HW (internal TT project name)

### Submodule

This repository includes some helpful submodules that are relevant to RL:

- [R-Link-RE](https://github.com/egonalter/R-Link-RE): Collection of scripts for unpacking TT FW updates and decompiling revealed APKs
- [R-Link-Evolution-Missing-Explorer](https://github.com/JV-conseil-Internet-Consulting/R-Link-Evolution-Missing-Explorer): Explorer for TOMTOM.XXX files

### Scripts (WIP)

There are several scripts in this repository. Note that for the scripts to work correctly you must launch them from the root directory of this repository, e.g. `./scripts/download_releases.sh`.

These scripts are currently available:

- `download_releases.sh` - Downloads open source software released by TT for all known RL releases and extracts them into the `local/releases/<version>` directory.
- `create_kernel_git.sh` - Creates a git repository containing commits with the modified kernel provided of each TT release. Easier to diff between every release. Requires `download_releases.sh` to be run first.
- `create_release_git.sh` - Same as `create_kernel_git` but with everything in the release TAR.

### Links and thoughts

References and sources for this repo. Also notes/thoughts for the future.

#### Software

- Currently, the R-Link-RE scripts that decompile the Java APKs must be modified to work properly. Might just be a platform issue.
- The decompiler fails to fully decompile all apps, it might need additional third party library references to decompile properly?
- <https://www.softpedia.com/get/Maps-GPS/R-Link-Explorer.shtml#download> - Windows alternative to R-Link-Evolution-Missing-Explorer, this download is not verified though (TODO)

<https://www.speakev.com/threads/new-r-link-update-v11-344-3198541.139034/>

- <http://download.tomtom.com/sweet/navcore/system-update_3198541_all.ttpkg>
- Example release download (note the id is the differentiator for most releases, except the most latest one has a different URL? (see `include/vars.sh`)): <https://download.tomtom.com/open/gpl/Renault_R-Link/release_open_sources-tt3198541.tar.gz>

<https://github.com/egonalter/R-Link_kernel/blob/master/arch/arm/mach-omap2/board-strasbourg-whitelist.h>

- all allowed devices

#### Hardware

There are links to files that have also been copied to the files directory to preserve them if they were become unavailable.

- FCC: <https://fccid.io/S4L1ME09>
  - Photos (internal): <https://fccid.io/S4L1ME09/Internal-Photos/Internal-Photos-2145434.pdf>
  - Photos (external): <https://fccid.io/S4L1ME09/External-Photos/External-Photos-2145433.pdf>
  - Unfortunately the cool stuff like schematics are confidential...
- ANATEL: <https://fccid.io/ANATEL/00355-14-09666>
  - Certification Construction File: <https://fccid.io/ANATEL/00355-14-09666/Manual_1ME09_rev1/F2B1E423-3290-440A-99C1-0BD994D5C828/PDF>
- Additional photos: <https://www.dropbox.com/scl/fo/fe39tlljyd71ddn1fbaer/ABi6F6LmGpZwUGo2WHgPhMY?dl=0&rlkey=0jl2z9u37sfdnwc72resucz24>

#### Forum links

- <https://github.com/egonalter/R-Link_kernel/issues/1>
- <https://xdaforums.com/t/renault-r-link-developer-mode-need-help-android-tomtom.3456337/>
