Ubuntu currently does not support YAFFS2. There is a feature request to package the YAFFS2 kernel module, which would provide mount support for the filesystem: [needs-packaging] yaffs2.
Kernel support
Thus, currently, if you need mount support you will have to compile it yourself. The YAFFS website has instructions for compiling a Linux kernel with YAFFS support (using Precise 32-bit):
The Ubuntu wiki also has general information on compiling your own kernel.
Extract and rebuild
Alternatively, try using yaffs2utils
to extract and rebuild the image.
Note that due to a bug, you must specify the --yaffs-ecclayout
option or it will silently fail. So to extract, try something like
git clone https://code.google.com/p/yaffs2utils/
cd yaffs2utils && make && cd ..
./yaffs2utils/unyaffs2 --yaffs-ecclayout system.img tempdir
Theoretically you can also rebuild the image using mkyaffs2
, but I couldn't get it to work (the result wasn't bootable).
Yaffey
I found a program, Yaffey, that lets you edit a YAFFS2 image using a GUI:

While the home page says it's Windows-only, with a trivial change it compiles on Ubuntu Precise. To do so:
- Install dependencies:
sudo apt-get install qt-sdk
hg clone https://code.google.com/p/yaffey/
In the file yaffey/yaffs2/yaffs_guts.h
, change the line
typedef unsigned loff_t;
to
#include <stdlib.h>
- Compile:
cd yaffey && qmake && make
- Run
./yaffey
.
- Open your image, make your desired changes, and save (it refuses to overwrite; you have to select a different filename).
When I tried it, the resulting image booted successfully in the Android emulator.