The experts on the ArchosFans Forum are at it again, this time giving us a nice little tutorial on building your own custom Android firmware for the Archos 7.  Forum users pmarin and knightdominion teamed up to write the tutorial which shows you step by step how to access and modify the filesystem image, allowing you to create a totally custom load for your needs.

Getting Started

In order to create your own firmware you will need a few things, a base firmware, MyDroidDevTool, and a Linux environment.

Base Firmware

You need to start somewhere and that is exactly what a base load is for.  Either grab the Latest Archos 7 Firmware or one of the two custom firmware versions that knightdominion released.  (Rooted Archos 7 Firmware or Operation Unbrickable Firmware)

MyDroidDevTool

Download MyDroidDevTool and extract AFPTool.exe to the same location that you saved your base firmware.  AFPTool is used to unpack and repack the update.img files and is the only file you need from the SDK.

Linux Environment

The tutorial calls for a Linux VM or some other way to mount an ext2 filesystem (such as Cygwin or a machine running Ubuntu).  I will be using my Ubuntu server but those wishing to do it all on their Windows desktops should look at one of the alternatives, any one of them will get the job done.

Unpacking the Archos 7 Update Image

Copy both AFPTool.exe and your firmware image to a new directory on your system and run the following from the command line in order to extract the update image.

AFPTool.exe -unpack update.img update

If there are any errors you should redownload your update.img file and try again, otherwise you should have a new directory named update that contains the extracted files.

Mounting the Android System Image

Now that you have extracted the update image, copy the system.img file from the Image directory to your Linux machine.  Once there you need to run the following commands to mount the filesystem.

mkdir stock-system
sudo mount -o loop system.img stock-system
genext2fs -d stock-system -b 300000 system.ext2
mkdir temp
sudo mount -o loop system.ext2 temp/

You will now have a directory named temp that contains the base system image that you can modify.

Modifying the Android Filesystem

I will be revisiting this section in the future as I start getting into deeper hacking projects. Right now I am only starting to hack the base OS, so we’ll have to see where that leads.

Until then check around the web for some good tutorials on hacking Android for more information on what is possible.

Rebuilding the Android System Image

When you have completed your changes to the files run the following commands to rebuild a new system image.

sudo mkfs.cramfs temp/ system.1.5.img
sudo umount stock-system
sudo umount temp

Packing the Archos 7 Update Image

Take the system.1.5.img file from the previous step and copy it back to your Windows machine, replacing the original system.img you extracted. You can then execute the following command to pack up a new update.img file.

AFPTool.exe -pack update update.img

Testing your new Firmware

Testing your firmware will be just like any other installstaion on the Archos 7. Connect the device to your computer via USB and drag the update.img file to the root of the device. When you disconnect the tablet it should prompt you to update and after a few reboots you will be running your modified firmware.

What plans do you have for the Archos 7 tablet? Let me know in the comments!