MK802+ (Allwinner A10, 1GB RAM, 4GB NAND flash)

Firmware

Information

  • HW releases (need a specialised firmware)
    • MK802 – 512Mb-1Gb, 2 chips, RTL8188CTV
    • MK802+ – 1Gb, 4 chips, RTL8188CTV, Microphone
    • MK802II – 1Gb/4 IC, RTL8188CUS, Power management IC
    • MK802++ – 1Gb, 2 chips, Power management IC
  • NAND partitions
    • /dev/block/nanda – bootloader (vfat), known as bootfs before, includes boot.axf u-boot.bin etc.
    • /dev/block/nandb – enviroment for u-boot
    • /dev/block/nandc – boot (kernel+initrd)
    • /dev/block/nandd – system, android real rootfs (ext4)
    • /dev/block/nande – user data
    • /dev/block/nandf – misc
    • /dev/block/nandg – recovery (kernel+initrd)
    • /dev/block/nandh – android app cache
    • /dev/block/nandi – private data (exfat)
    • /dev/block/nandj – img backup (MK802II only)
    • /dev/block/nandk – udisk (MK802II only)
  • Firmware versions – MK802 firmware compatibility (also discussed here)

Upgrade by firmware flashing

  • download LiveSuitPack109eng (LiveSuit V1.09) which contains a flashing tool and x86&x64 USB drivers
  • download firmware image file (*.img)
  • proceed as follows
    1. press and hold MK802’s reset button (one of the holes near HDMI port)
    2. connect MK802 via OTG port to PC (still holding the reset button)
    3. wait while Windows will be looking for driver for the device (~5 seconds) and then, the reset button can be released
    4. open Windows Device Manager and select “Update driver” on the new “Unknown device”, ser LiveSuit’s folder when Windows starts looking for a suitable driver
    5. after the driver is installed, you can run LiveSuit (and read or skip emerging help)
    6. in LiveSuit, select the preffered firmware image (*.img file)
    7. disconnect and again connect the MK802 device
    8. flashing starts automatically, when the connected device is recognized (when its driver will be found)
  • if error 0x162 will appear during the flashing (around 3%) proceed as follows
    1. download the image of CWM recovery firmware
    2. flash the image by means of LiveSuit (it should works for this image)
    3. connect the device to TV-set/monitor and in CWM perform “format data/factory reset” and power off the device
    4. now, the flashing of the device should work for any firmware image as usual (that is no 0x162 errors anymore)

Modification of firmware image

  • howtos are availabe at XDA and MiniAnd
  • the following software is needed
  • to extract a firmware image
    1. unpack the firmware image from original.img file
      • Linux: execute awimage tool which will extract the content of the image into original.img.dump directory as awimage -uv original.img
      • Windows: put an image file as original.img into a10_flash_kitchen_v2/packer_ics directory as extract_image.bat in the flash kitchen and execute extract_image.bat
    2. directory _extract or *.dump will contain the extracted files which are
      • SYS_CONFIG* – a command bunch for LiveSuite which tells the app how to flash, what to flash, where, and it configures the device too (screen size, ram info, cpu info, etc)
      • BOOT0_* and BOOT1_* – NAND bootloaders
      • FED_*, FES_*, and FET_* – NAND flashing utilities, checksums, hardware scanner, and other tools used during flashing
      • 1234567890* – bootloaders, config files, and tools for SDMMC flashing, if there’s a device with SDMMC internal instead of NAND, these are used
      • SPLIT_* – some kind of ID string
      • RFSFAT16_BOOTLOADER_00000.fex – the bootloader partition (vfat dump)
      • RFSFAT16_BOOT_00000000000.fex – the boot image (kernel + initrd)
      • RFSFAT16_RECOVERY_0000000.fex – the recovery image (kernel + initrd)
      • RFSFAT16_SYSTEM_000000000.fex – the system partition (ext4 sparse)
    3. extract RFSFAT16_BOOTLOADER_00000.fex by executing mkdir -p RFSFAT16_BOOTLOADER_00000; sudo mount -o loop RFSFAT16_BOOTLOADER_00000.img RFSFAT16_BOOTLOADER_00000 which mounts the vfat dump into ./RFSFAT16_BOOTLOADER_00000 directory
    4. extract RFSFAT16_BOOT_00000000000.fex by executing
      1. tools/split_bootimg.pl RFSFAT16_BOOT_00000000000.fex which extracts the boot image into RFSFAT16_BOOT_00000000000.fex-kernel (kernel) and RFSFAT16_BOOT_00000000000.fex-ramdisk.gz (initrd) images
      2. mkdir -p RFSFAT16_BOOT_00000000000 && cd RFSFAT16_BOOT_00000000000; gunzip -c ../RFSFAT16_BOOT_00000000000.fex-ramdisk.gz | cpio -i which extracts the content of given initrd file into RFSFAT16_BOOT_00000000000 directory
    5. extract RFSFAT16_RECOVERY_0000000.fex by executing
      1. tools/split_bootimg.pl RFSFAT16_RECOVERY_00000000000.fex which extracts the recovery image into RFSFAT16_RECOVERY_00000000000.fex-kernel (kernel) and RFSFAT16_RECOVERY_00000000000.fex-ramdisk.gz (initrd) images
      2. mkdir -p RFSFAT16_RECOVERY_00000000000 && cd RFSFAT16_RECOVERY_00000000000; gunzip -c ../RFSFAT16_RECOVERY_00000000000.fex-ramdisk.gz | cpio -i which extracts the content of given initrd file into RFSFAT16_RECOVERY_00000000000 directory
    6. extract RFSFAT16_SYSTEM_000000000.fex by executing
      1. tools/simg2img RFSFAT16_SYSTEM_000000000.fex RFSFAT16_SYSTEM_000000000.img which creates an ext4 dump
      2. mkdir -p RFSFAT16_SYSTEM_000000000; sudo mount -o loop RFSFAT16_SYSTEM_000000000.img RFSFAT16_SYSTEM_000000000 which mounts the ext4 dump into ./RFSFAT16_SYSTEM_000000000 directory
    7. replace the original kernels (boot.img-kernel and recovery.img-kernel) with customised ones and modify extracted files and files in the mounted directories as you wish
    8. get bootloader.fex by unmounting ./RFSFAT16_BOOTLOADER_00000 directory and renaming RFSFAT16_BOOTLOADER_00000.fex to bootloader.fex
    9. pack new boot.fex by executing
      1. tools/mkbootfs RFSFAT16_BOOT_00000000000 | gzip > boot.img-ramdisk.gz which creates initrd file
      2. tools/mkbootimg --base 0x40000000 --kernel boot.img-kernel --ramdisk boot.img-ramdisk.gz --cmdline 'console=ttyS0,115200 rw init=/init loglevel=8' -o boot.fex which packs the kernel and the initrd images into boot.fex file
    10. pack new recovery.fex by executing
      1. tools/mkbootfs RFSFAT16_BOOT_00000000000 | gzip > recovery.img-ramdisk.gz which creates initrd file
      2. tools/mkbootimg --base 0x40000000 --kernel recovery.img-kernel --ramdisk recovery.img-ramdisk.gz --cmdline 'console=ttyS0,115200 rw init=/init loglevel=8' -o recovery.fex which packs the kernel and the initrd images into recovery.fex file
    11. pack new system.fex by executing sudo tools/mkuserimg.sh -s ./RFSFAT16_SYSTEM_000000000 system.fex ext4 /tmp 300M (the directory should be still mounted when executing the command)
    12. pack the new firmware into output.img file
      • Linux: ???
      • Windows: use flas kitchen as follows
        1. move all new *.fex files into a10_flash_kitchen_v2/packer_ics/_input directory
        2. open a10_flash_kitchen_v2/packer_ics/files/image.cfg file and comment lines with OEM and VOEM strings by preceeding semicolon (;)
        3. in a10_flash_kitchen_v2/packer_ics directory execute create_image.bat to create the firmware image as output.img file

Upgrade by means of CWM

  1. download the image of CWM recovery firmware
  2. flash the image into a device by means of LiveSuit (it should works for this image)
  3. download *.zip files with a system (e.g. CyanogenMod), a google apps compatible with the system, and a compatibility pack of factory drivers, put them into a SD card, and insert it into the device
  4. connect the device to TV-set/monitor and in CWM perform “format data/factory reset”
  5. in CWM install ZIP files from the SD card in order: the system, the google apps, and the compatibility pack; then reboot the device

 Share!

 
comments powered by Disqus