[Miscellaneous Android Development] DualJoe:
TWRP v2.6.3.0 for Softwinners Wing-D9 (Allwinner A20)

aka JayTech PA1051DA

Warning:

This process might damage your device. Make yourself comfortable how to recover from a broken system (Livesuite, PhoenixCard..). Even though most Allwinners are unbrickable reviving might involve steps that are less suitable for beginners.

General info:

The Allwinner A20 devices are available in many variations. Use the informations below to figure out if your device might be compatible. It's important that the kernel command line (see below) includes a 'partition' section with aliases for the partitions because they are used in the filesystem table of TWRP (see below). Example: recovery@nandg -> Symlinks /dev/block/nandg to /dev/block/recovery.

Do not use on devices with resolution below 1024x600.

Installation:

Flash the image with dd to your device. Don't forget to backup your old recovery (see here):

busybox dd if=recovery.img of=/dev/block/recovery bs=1M

Boot into recovery with either <power> + <vol+> or by 'adb reboot recovery'.

If the recovery only works partially (eg. due to wrong display or touch driver) and you're stuck in a bootloop that always starts the recovery (instead of the system) and ADB is running properly you can write the boot command string to /misc partition manually that should point the bootloader back to Android OS.

echo -n bootloader | busybox dd of=/dev/block/misc bs=16 count=1 conv=sync; sync

It writes the string 'bootloader' and fills up the rest of the 16 char block with 0x00.

Device info:

Tablet brand name: JayTech PA1051DA (Germany 06/2013)

SoC: Allwinner A20 (sun7i)

ro.build.fingerprint=softwinners/wing_d9/wing-d9:4.2.2/JDQ39/20130619:eng/test-keys

ro.product.model=TPC-1051

ro.build.version.release=4.2.2

Dmesg info: Linux version 3.3.0+ (lpp@INGENIC-CROSS) (gcc version 4.6.3 20120201 (prerelease) (crosstool-NG linaro-1.13.1-2012.02-20120222 - Linaro GCC 2012.02) ) #16 SMP PREEMPT Tue Jun 25 10:39:48 CST 2013

ARM Cortex A7 Dual Core 1.5 GHz

ARM Mali400MP2

Display: 10,1" 1024x600

Android 4.2

RAM: 1GB

Nand: 8GB

Kernel command line:

(cat /proc/cmdline)

console=ttyS0,115200 root=/dev/system init=/init loglevel=4 partitions=bootloader@nanda:env@nandb:boot@nandc:system@nandd:data@nande:misc@nandf:recovery@nandg:cache@nandh:databk@nandi:UDISK@nandj

cat /proc/partitions:

(Partition layout (size/position/count) doesn't matter. Kernel command line aliases handle that).

major minor #blocks name

7 0 12506 loop0
7 1 16664 loop1
7 2 17703 loop2
7 3 22901 loop3
7 4 37454 loop4
7 5 21861 loop5
7 6 7308 loop6
93 0 16384 nanda
93 8 16384 nandb
93 16 16384 nandc
93 24 524288 nandd (/system 512MB)
93 32 524288 nande (/data 512MB)
93 40 16384 nandf
93 48 32768 nandg (Recovery 32MB)
93 56 524288 nandh
93 64 262144 nandi
93 72 5521408 nandj (/sdcard 5.6GB)
254 0 12505 dm-0
254 1 16663 dm-1
254 2 17703 dm-2
254 3 22900 dm-3
254 4 37453 dm-4
254 5 21861 dm-5
254 6 7308 dm-6

TWRP recovery.fstab:

# mount point	fstype	device	device2
# /bootloader	vfat	/dev/block/bootloader
/env	emmc	/dev/block/env
/boot	emmc	/dev/block/boot	flags=backup=1
/system	ext4	/dev/block/system	flags=backup=1;wipeingui
/data	ext4	/dev/block/data	flags=backup=1;wipeduringfactoryreset;wipeingui
/misc	emmc	/dev/block/misc
/recovery	emmc	/dev/block/recovery	flags=backup=1
/databk	ext4	/dev/block/databk
/cache	ext4	/dev/block/cache	flags=backup=1;wipeduringfactoryreset;wipeingui
/sdcard	vfat	/dev/block/UDISK	flags=backup=1;storage;settingsstorage;display="Internal SDCard";wipeingui
/external_sd	vfat	/dev/block/mmcblk0p1	flags=backup=1;storage;display="External SDCard";wipeingui;removable

Drivers (lsmod):

cdc_ether 2906 0 - Live 0x00000000
rtl8150 8154 0 - Live 0x00000000
mcs7830 4947 0 - Live 0x00000000
qf9700 5167 0 - Live 0x00000000
asix 12313 0 - Live 0x00000000
usbnet 12504 4 cdc_ether,mcs7830,qf9700,asix, Live 0x00000000
sunxi_csi1 27909 0 - Live 0x00000000
sunxi_csi0 28609 0 - Live 0x00000000
gc2035 12870 1 - Live 0x00000000
gc0308 10968 1 - Live 0x00000000
videobuf_dma_contig 3816 2 sunxi_csi1,sunxi_csi0, Live 0x00000000
videobuf_core 15283 3 sunxi_csi1,sunxi_csi0,videobuf_dma_contig, Live 0x00000000
mma7660 7318 0 - Live 0x00000000
ft5x_ts 66217 0 - Live 0x00000000 <-- Touchscreen
mali 183842 30 - Live 0x00000000 (O)
ump 29576 7 mali, Live 0x00000000 (O)
hdmi 22078 0 - Live 0x00000000
lcd 4126 0 - Live 0x00000000
disp 257984 14 mali,hdmi,lcd, Live 0x00000000
nand 132556 8 - Live 0x00000000 (O)

Source/device tree:

https://github.com/BlueMax/android_device_softwinners_wing_d9