User:Äxl/Android on SD card

Jump to: navigation, search

RENAME: Copy Android from NAND

Most devices based on Allwinner SoCs are distributed with an installed Android. Many vendors do not offer an image to later flash the device. There you have three possibilities:

  • Try another firmware or ClockwordMod
  • Run Linux from SD card
  • Extract Android from device

This page will describe latter and how to safe the installed stock firmware.

If you want to unpack an existing image, modify and use it from SD card you might look here: Boot Android from SdCard

Here's a more MS way:


Boot up Android and start a terminal app, e.g.: Terminal Emulator

Or SSH into the device, e.g.: SSHdroid


SSHdroid will give you the devices IP. Password is mostly "root".

mkdir /sdcard/boot
mount /dev/block/nanda /sdcard/boot

It's linux/u-boot.bin


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