In the previous article
OpenaATV Enigma2 image compilation
we built an Enigma2 image.
This shows how to view the content of an Enigma2 image.
As an example we will always use the image for Zgemma H2H.
In a Linux environment, Debian 8 in our case, download the image to a folder, for example enigma2
In a terminal unzip it with the command
1 |
unzip imagename.zip |
In the unpacked folder we have several files
What we are interested in is rootfs.bin.
The command
1 |
file filename |
provides informations about the file type. In the case of rootfs.bin
the command indicates that this is an image with ubi filesystem.
Now install the memory technology device utilities as the first step. In a terminal run
1 |
sudo apt-get install mtd-utils |
To view the contents run
1 2 3 4 5 6 7 |
sudo modprobe nandsim first_id_byte=0x2c second_id_byte=0xda third_id_byte=0x90 fourth_id_byte=0x95 sudo flash_erase /dev/mtd0 0 0 sudo ubiformat /dev/mtd0 -O 2048 -f ./rootfs.bin sudo modprobe ubi sudo ubiattach -p /dev/mtd0 -O 2048 sudo mkdir /mnt/ubifs sudo mount -t ubifs /dev/ubi0_0 /mnt/ubifs |
The file content is now visible under /mnt/ ubifs
1 |
sudo umount /mnt/ubifs |
Finally to detach the UBI from the mtd device use the command
1 |
sudo ubidetach /dev/ubi_ctrl -m 0 |
Below the links to find more informations about mtd and ubi filesystem