Amazon Echo Rooting: Part 2

Filesystem Information

While searching through the partial filesystem I extracted from the package updates, I found /etc/dev.tar which appears to be a skeleton of the dev filesystem. We can infer several things about the partition layout on the internal MMC with this information.

We now know that the internal MMC has 8 partitions and we know the names of all of those partitions. Next, in the open source code released by Amazon as required by the GPL, we can find the uBoot options that load the operating system.

The environment variable ${root} is set in u-boot/board/ti/lab126/evm.c.

This will set ${root} to /dev/mmcblk1p%d where %d is the index of a partition labeled main-A. The bootloader will try to load this filesystem as ext3.

Building the SD Card

Partitioning the SD Card

Create Partitions

It appears that uBoot will only attempt to use the partition named main-A as the root filesystem. I created a small partition named _ because there is a bug with get_partition_num that will cause it to occasionally be unable to find the first partition on the disk.

Installing the TI SDK

We’ll need the files from the TI SDK to supplement what isn’t available in the Amazon packages. We will extract the filesystem provided by TI for this CPU, then extract the Amazon provided files over it.

SDK Setup

More information on this subject can be found on the Wiki. A prebuilt Debian SD card image is available for use.

Leave a Reply

Your email address will not be published. Required fields are marked *