[Android Stick & Console AllWinner based Computers] lexminriko:
Very frustrating: seems that rkflashtool restore isn't working on Rikomagic MK802IIIS

First of all, the explanation for why I bricked my Rikomagic MK802 IIIS: when trying to install Pic Untu, I did that dd command on the recovery partition (see the first post in this thread for the exact command). Well, the procedure is not working like this because when accessing the mtdblock devices with normal *nix commands (dd, cat), the mtdblock Android driver is not handling I/O as usual and it causes data corruption on all the mtd device. That's why I bricked the device.

So, not having a backup before, I had to use a WindowsXP vmware VM with windows RK flashing utility. I restored the device to firmware "Rikomagic MK802IIIS 4GB, 8GB Recovery Software (20130121)" downloaded from rikomagic.co.uk.

Restoring was successfull so here I am with a fully functional Android which boots up OK. All fine for a day... :P

I decided to make a full device backup using Linux rkflashtool which I downloaded from the thread I mentioned in my first post (http://xdaforums.com/showthread.php?t=1286305), this is the link: http://xdaforums.com/attachment.php?attachmentid=785592&d=1321547155

I modified the source so that the rk3066 chipset is recognized (I added the 2207 usb vendor id).

The OS/computer I've used: Kubuntu 12.04 LTS 64 bit on a Thinkpad T420:

root@awesome:~# uname -a
Linux awesome 3.2.0-49-generic #75-Ubuntu SMP Tue Jun 18 17:39:32 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Now follows the copy/paste of commands & output of the backup operation, with the mention that: of course I put the device in flashing mode first, using paperclip + power-on cable in device's OTG connector linked to laptop :) :

root@awesome:~# ./rkflashtool r 0x00000000 0x01000000 > /mnt/media/mk802iiis_android_backup_20130706.bin

root@awesome:~# du /mnt/media/mk802iiis_android_backup_20130706.bin
8388608 /mnt/media/mk802iiis_android_backup_20130706.bin

root@awesome:~# du -h /mnt/media/mk802iiis_android_backup_20130706.bin
8.0G /mnt/media/mk802iiis_android_backup_20130706.bin
root@awesome:~#

root@awesome:~# hexdump -C /mnt/media/mk802iiis_android_backup_20130706.bin |head -10
00000000 50 41 52 4d 5b 02 00 00 46 49 52 4d 57 41 52 45 |PARM[...FIRMWARE|
00000010 5f 56 45 52 3a 34 2e 30 2e 34 0d 0a 4d 41 43 48 |_VER:4.0.4..MACH|
00000020 49 4e 45 5f 4d 4f 44 45 4c 3a 72 6b 33 30 73 64 |INE_MODEL:rk30sd|
00000030 6b 0d 0a 4d 41 43 48 49 4e 45 5f 49 44 3a 30 30 |k..MACHINE_ID:00|
00000040 37 0d 0a 4d 41 4e 55 46 41 43 54 55 52 45 52 3a |7..MANUFACTURER:|
00000050 52 4b 33 30 53 44 4b 0d 0a 4d 41 47 49 43 3a 20 |RK30SDK..MAGIC: |
00000060 30 78 35 30 34 31 35 32 34 42 0d 0a 41 54 41 47 |0x5041524B..ATAG|
00000070 3a 20 30 78 36 30 30 30 30 38 30 30 0d 0a 4d 41 |: 0x60000800..MA|
00000080 43 48 49 4e 45 3a 20 33 30 36 36 0d 0a 43 48 45 |CHINE: 3066..CHE|
00000090 43 4b 5f 4d 41 53 4b 3a 20 30 78 38 30 0d 0a 4b |CK_MASK: 0x80..K|

As you can see, the resulted backup file has 8 GB size, and the hexdump of it shows the usual stuff for a non-corrupted backup.

Note1: I avoided to "spam" the thread with the whole header of the hexdumped backup file, but I assure you that it has the boot command line with the size/offset of all the partitions. So, it is a backup successfully created.

Note2: The backup operation took about 25-30 minutes, no errors in the system logs.

After backup was done, Android still boots OK, all is fine. Until the nightmare came... :P

I decided to test the restore process, so I added the device once more in flashing mode (with paperclip & OTG), and did:

root@awesome:~/rk3066-rkflashtool/rk3066-rkflashtool-master/trunk# ./rkflashtool e 0x00000000 0x01000000
rkflashtool: info: interface claimed
rkflashtool: info: erasing flash memory at offset 0x00ffff00

root@awesome:~# ./rkflashtool w 0x00000000 0x01000000 < /mnt/media/mk802iiis_android_backup_20130706.bin
...
...
...
rkflashtool: info: writing flash memory at offset 0x00fffe80
rkflashtool: info: writing flash memory at offset 0x00fffea0
rkflashtool: info: writing flash memory at offset 0x00fffec0
rkflashtool: info: writing flash memory at offset 0x00fffee0
rkflashtool: info: writing flash memory at offset 0x00ffff00
rkflashtool: info: writing flash memory at offset 0x00ffff20
rkflashtool: info: writing flash memory at offset 0x00ffff40
rkflashtool: info: writing flash memory at offset 0x00ffff60
rkflashtool: info: writing flash memory at offset 0x00ffff80
rkflashtool: info: writing flash memory at offset 0x00ffffa0
rkflashtool: info: writing flash memory at offset 0x00ffffc0
rkflashtool: info: writing flash memory at offset 0x00ffffe0

Note1: Writing operation took 2 hours and 8 minutes, no errors in the system logs..

Note2: ... but it was the end of my working mk802iiis ! :(

When I reconnected the device, Android won't boot, instead the device seems to enter the flashing mode again. I say it "seems" because I am not really sure, actually it should not even attempt to enter flashing mode because I'm not touching the little oriffice with the paperclip.

So that's it on short: Android does not start!

When I specifically manually entered flashing mode again, I tried to read several megabytes from near the start addresses of the flash memory. Unfortunately, I get garbage:

root@awesome:~# hexdump -C recoverytry.bin |head -10
00000000 ae e6 ff a7 75 26 3e 6f ee b7 d3 66 33 f7 e7 fa |....u&>o...f3...|
00000010 97 b4 e6 fe bf da 10 4e 70 b6 a7 d9 db 9f 3b b7 |.......Np.....;.|
00000020 6b 3d f6 7f fe ff bf 5e e1 af ef 3e ff df 93 f7 |k=.....^...>....|
00000030 d7 ee 3f ef 31 d2 cb cc ef eb db f7 f7 ff 7f e7 |..?.1...........|
00000040 cf 6d 96 e9 dd a5 d6 9f f7 11 67 ef 6d dc dd fd |.m........g.m...|
00000050 5e 4b f3 77 7d fd bd cd 9f 15 f9 17 83 fb f7 5b |^K.w}..........[|
00000060 b9 11 fd 61 b4 cd dd 93 b9 f7 de d7 f8 d1 9b ef |...a............|
00000070 76 fe bf 1f 67 77 f5 5f 67 e2 97 96 15 f7 ae 7f |v...gw._g.......|
00000080 e4 ce 7d e5 36 fb fe 56 ce e6 fb ca f3 f7 d0 37 |..}.6..V.......7|
00000090 3d af 49 cd d5 71 ff f9 33 db fe 34 f6 17 d3 1d |=.I..q..3..4....|

Compare the output above with the first 10 lines of my backup file posted earlier and you can understand what I mean by garbage. :(

So to resume:

1) I managed to create a correct backup of mk802iiis using rkflashtool ("rkflashtool r" worked as expected)

2) Rkflashtool failed to restore the backup ("rkflashtool w" doesn't work, at least not for restoring all 8 GB).

Does anyone experienced similar situations?

Is 8 GB too much to backup at once?

Is there some workaround for this?

Could be a PC problem or device problem?

Is 2 hours too long(or too short) for flashing 8 GB to NAND?

Please help.

Regards,

Lexminriko