User:Äxl/Android on SD card

This page will describe how to take an installed stock firmware and put it on a SD card to boot e.g. Android from there and Linux from NAND. If you want to "Extract and build the stock image (Windows)" you might look here: https://www.miniand.com/wiki/Allwinner/Unpacking+and+building+LiveSuit+images

unpackbootimg tool from Android source
http://code.google.com/p/android-serialport-api/downloads/detail?name=android_bootimg_tools.tar.gz&can=2&q=

U-Boot
Boot up Android and start a terminal app or SSH into the device. mkdir /sdcard/boot mount /dev/block/nanda /sdcard/boot It's linux/u-boot.bin

boot.img
Check cat /proc/partitions for /system and adjust count= as necessary: dd if=/dev/block/nandc of=/sdcard/boot.img bs=1M count=32768

SSH/SCP it together with u-boot.bin to your PC.

Unpack boot.img
If necessary: chmod +x unpackbootimg ./unpackbootimg -i boot.img You'll need boot.img-zImage (kernel) and boot.img-ramdisk (from boot.img-ramdisk.gz) from that.

Adjust mount on init.sun4i.rc
Unpack boot.img-ramdisk and edit init.sun4i.rc like this: /system: nandd becomes mmcblk0p2 /data: nande becomes mmcblk0p3 /cache: nandg becomes mmcblk0p4 /UDISK: nandi becomes mmcblk0p5

Repack boot.img-ramdisk: find. | cpio -H newc -o | gzip -9 >../ramdisk.gz

Weblinks

 * http://www.enck.org/tools.html William Enck's split_bootimg.pl and explanation
 * https://gist.github.com/1832541 updated split_bootimg.pl that outputs base address of boot.img


 * http://tmerle.blogspot.fr/2012/11/booting-android-ics-system-from-sdcard.html
 * http://jas-hacks.blogspot.co.uk/2012/12/hackberry-a10-booting-android-from-sd.html


 * French forum thread about MPMan tablet