software - egonalter/R-Link_kernel GitHub Wiki

General

Android 2.2 (Froyo) with kernel 2.6.32. ARM board name "Strassbourg".

Binaries (ROM)

The R-Link toolbox downloads updates from the TomTom site. It uses the usual URL of the form: http://download.tomtom.com/sweet/navcore/system-update_<version>_all.ttpkg, where <version> is replaced by the build id, e.g. 1526528. The released versions can be found in the ttdaemon/SoftwareVersions.xml in the filesystem (see below).

Unpack ROM

The ttpkg is a tar.gz archive with an propietary header added. It also contains 20 bytes of extra data every 100k (always the same data). The short bash script below can be used to convert from ttpkg to tar.gz.

#!/bin/bash

while :; do
    dd conv=notrunc bs=102400 iflag=skip_bytes,fullblock \
       oflag=append skip=20 count=1 2>&1 >&3 | grep 0+1 && break
done < <(tail -c +9 $1) 3>&1 | tail -c +55

Note: The format of the ttpkg may vary between TomTom devices, e.g. the 9 and 55 byte header may be different.

The tar contains a directory named system-update_<version>_all_data and four files:

  • package.id (detail build id)
  • files (sha1 chksum of package.id, kernel, filesystem, and ipk)
  • files.sig (crypt signature of the the "files" file)
  • system_update__all.ipk (modified debian package)

The system_update directory contains the kernel (zImage) and the filesystem (rootfs.img.new). The rootfs is an ext3 system which can be loopback mounted easily. The kernel has an android style initrd concatenated.

Booting

The system is booted using u-boot. It is guessed that u-boot loads an u-boot app which checks if kernel and rootfs are valid. The device-tree for the kernel is loaded from NAND. It is unknown who is loading u-boot for now (x-loader, CAN processor, ???).

Source

TomTom releases source code of the OS versions starting from Feb 2014. Past versions are not yet released. Source code seems to be complete otherwise, except first bootloader maybe (x-loader). It's also possible, that the main cpu is booted via CAN processer somehow. TomTom download page for source.

Reverse Engineering

Here is a small script to decompile the Android Apps: https://github.com/egonalter/R-Link-RE

Kernel

Kernel seems to be based on some internal branch from TomTom which also includes forward ported stuff from other TomTom devices. So it's hard to find a small diff which only contains stuff Strassbourg.

Bootloader

u-boot contains only minimal board support stuff. It's based on some ancient version and patch is pretty small, allthough it contains support for an other board (e.g. Overo) and lots of dos line ending mess.

⚠️ **GitHub.com Fallback** ⚠️