Sunteți pe pagina 1din 12

Allwinner/Unpacking and building LiveSuit images

Revised on May 22, 2013 03:56 by forbiddenera

Table of contents
Update Introduction Required tools Extracting and building the stock image (Windows) Extracting, modifying and building partitions (Linux) Setting up Linux Prepare files Boot partition Recovery partition System partition Building the new image (Windows)

Update
Xlab has a tool to unpack and repack images on GitHub called Allwinner Kitchen. You may find that much easier than doing it by hand (as is described below).

Introduction
In the past few days, the developer of DroidMote has successfully created a custom LiveSuite image for the MK802, and this guide is based on his experience that he has shared with us. This guide details how to deconstruct an existing image, such as the default image, and to build your own new image. This guide requires a native Windows installation, I've tried to do it from Ubuntu using a Windows VM and it didn't work. This installation also requires a Linux install, either in a VM or a native install.

Required tools

A10 flash kitchen v2 (Miniand mirror) - for extracting and building the final image - discussion thread on XDA. Stock firmware - as a starting base. Linux image tools - for extracting and building the partitions of the image. A text editor that supports Unix line endings, do not use Notepad. A fantastic text editor that supports Unix line endings is Sublime Text 2.

Extracting and building the stock image (Windows)


Extract a10_flash_kitchen_v1.zip and look inside the directory, you'll see packer_gb and packer_ics. packer_ics is for Android ICS, so that is the one you will be using.

Open packer_ics and you will notice a bunch of directories and a couple of .bat scripts. We will spend a lot of time in these directories.

Extract the stock firmware you downloaded earlier, and copy the .img file into this directory. Rename the file to original.img.

Run the extract_image.bat script, and a command window will pop up while it is extracting.

The command window will output like the following, it will display Press any key to continue . . . when it is complete. Press a key to close the window.

Once the command window is closed, open the _extract directory and all of the extracted files will be there. The three following files are the ones we are interested in: RFSFAT16_BOOT_00000000000.fex (the boot partition), RFSFAT16_RECOVERY_0000000.fex (the recovery partition), RFSFAT16_SYSTEM_000000000.fex (the system partition, ext4 sparse). NOTE and WARNING (from a reader): Some systems may also have a RFSFAT16_BOOTLOADER_00000.fex, which may also be required for your device to boot properly. There are some vague instructions @ this TechKnow forums post. I (the reader) will attempt to clarify and modify this page with the updated

additional instructions for these devices to aid in making these instructions more universal for anyone using LiveSuit.

Building the new image (Windows)


Once the files are copied, jump back to Windows and rename the files as following:
new-boot.img -> root.fex new-recovery.img -> recovery.fex new-system.fex -> system.fex

Now we need to make some modifications to the image config file. Navigate to the files directory and you should see image.cfg.

Open this file using your text editor that supports Unix line endings. Using Notepad will break this file. Locate the two lines that reference OEM and VOEM as is highlighted below.

Comment these lines by adding a semicolon (;) to the start of each line. Do not make any other modifications. Save the file once you have made the change.

Go back to the packer_ics root directory and find the create_image.bat script. It will open a console while it is creating the new image.

Once the process is complete, you will see Press you will have a new image called output.img.

any key to continue . . .

and

Use LiveSuit to flash this image to an MK802. If you brick the device and it doesn't boot, just flash the stock firmware to bring the device back to life.

Good luck! Share your exploits, and if you come up with some cool images, contact us for access to the file server to share them!

S-ar putea să vă placă și