dimanche 12 août 2012

MELE_android_4.0_vision 1.1 flash failure on Windows 7, bad PhoenixCard version!

In the previous post (New Mele A1000/A2000 ICS Android 4.0.4 firmware released) I announced a new firmware.
Seems that it fails to be flashed with PhoenixCard 3.0.3 on Windows 7 (thanks to JP for pointing it out, see the old post comments)
On mele.cn forum: http://bbs.mele.cn/showtopic.aspx?topicid=751&page=end someone has the same issue.
I never noticed this since I flashed from a Windows XP virtual machine.
The solution is to upgrade to PhoenixCard 3.0.6 on Windows 7, or run the tool on Windows XP.

I made a video from a Mele A2000 flash failure process. I got that when I was tweaking my firmware (missing DISKFS file):
Mele A1000/A2000  flash failure

Flash success sequence, for reference: Mele A1000/A2000 flash success.

vendredi 10 août 2012

New Mele A1000/A2000 ICS Android 4.0.4 firmware released

I was quite happy with the latest official Mele firmware except blank screens on Youtube/Flash/video (for example in MxPlayer).
A new firmware has been released to fix this issue, and to enhance some other things:
Mele.cn Download center for 2012-08-10 4.0.4 firmware

(archive name: MELE_android_4.0_vision 1.1.rar)
Additional note: there is an issue with Windows 7 PhoenixCard (thanks to JP for pointing it out), see my next post.

jeudi 9 août 2012

Mele A2000 custom firmware failure... fixed!

Indeed, the sole issue was the missing "DISKFS_000000000" file in image.cfg.

In a10_flash_kitchen_v2, here is the complete diff with the original file:

diff -uN files/image.cfg.orig files/image.cfg
--- files/image.cfg.orig 2012-02-15 13:15:08.000000000 +0100
+++ files/image.cfg 2012-08-09 13:33:47.264226709 +0200
@@ -58,17 +58,18 @@

     {filename = INPUT_DIR .. "_output\\bootfs.fex",           maintype = ITEM_ROOTFSFAT16, subtype = "BOOTLOADER_00000",},
     {filename = INPUT_DIR .. "_extract\\RFSFAT16_ENVIROMENT_00000.fex",           maintype = ITEM_ROOTFSFAT16, subtype = "ENVIROMENT_00000",},
+    {filename = INPUT_DIR .. "_extract\\RFSFAT16_DISKFS_000000000.fex",           maintype = ITEM_ROOTFSFAT16, subtype = "DISKFS_000000000",},
     {filename = INPUT_DIR .. "_input\\root.fex",   maintype = ITEM_ROOTFSFAT16, subtype = "BOOT_00000000000",},
     {filename = INPUT_DIR .. "_input\\system.fex", maintype = ITEM_ROOTFSFAT16, subtype = "SYSTEM_000000000",},
     {filename = INPUT_DIR .. "_input\\recovery.fex",   maintype = ITEM_ROOTFSFAT16, subtype = "RECOVERY_0000000",},
-    {filename = INPUT_DIR .. "_extract\\RFSFAT16_OEM_000000000000.fex", maintype = ITEM_ROOTFSFAT16, subtype = "OEM_000000000000",},
+;    {filename = INPUT_DIR .. "_extract\\RFSFAT16_OEM_000000000000.fex", maintype = ITEM_ROOTFSFAT16, subtype = "OEM_000000000000",},

     {filename = INPUT_DIR .. "_output\\vboot.fex", maintype = ITEM_ROOTFSFAT16, subtype = "VBOOTLOADER_0000",},
     {filename = INPUT_DIR .. "_extract\\RFSFAT16_VENVIROMENT_0000.fex",           maintype = ITEM_ROOTFSFAT16, subtype = "VENVIROMENT_0000",},
     {filename = INPUT_DIR .. "_output\\vroot.fex", maintype = ITEM_ROOTFSFAT16, subtype = "VBOOT_0000000000",},
     {filename = INPUT_DIR .. "_output\\vsystem.fex", maintype = ITEM_ROOTFSFAT16, subtype = "VSYSTEMFS_000000",},
     {filename = INPUT_DIR .. "_output\\vrecovery.fex", maintype = ITEM_ROOTFSFAT16, subtype = "VRECOVERYFS_0000",},
-    {filename = INPUT_DIR .. "_extract\\RFSFAT16_VOEM_00000000000.fex", maintype = ITEM_ROOTFSFAT16, subtype = "VOEM_00000000000",},
+;    {filename = INPUT_DIR .. "_extract\\RFSFAT16_VOEM_00000000000.fex", maintype = ITEM_ROOTFSFAT16, subtype = "VOEM_00000000000",},

     {filename = INPUT_DIR .. "_extract\\BOOT    _BOOT0_0000000000.fex",             maintype = ITEM_BOOT,   subtype = "BOOT0_0000000000",},
     {filename = INPUT_DIR .. "_extract\\BOOT    _BOOT1_0000000000.fex",             maintype = ITEM_BOOT,   subtype = "BOOT1_0000000000",},

Now the flash process succeeds, and the Mele HTPC boots succefully.
And I can begin to hack this box!
The sole thing that bothers me is the SDCard flash process that is still under Windows (using PhoenixCard), this is the only operation I need to perform under Windows.

My intention is to keep Android on this box. No linux distribution can boot as fast as Android, and Android is linux, why changing something that works?
Furthermore, it is possible to run linux commands on top of an Android OS (using the "chroot" trick), so my armedslack distribution will be able to run concurrently on this box.

To be continued...

Mele A2000 custom firmware failure... found

The box opening is painless (4 screws under, 2 at the rear - all the same type):

OK, wired the serial TTL-to-USB line, only GND, Rx, Tx, paying attention to cross Rx/Tx lines:

And during the flash operation of my custom image, the last log lines are:

[     130.560] normal type verify
[     131.130] pc sum=0x17135c9f, check sum=0x17135c9f
[     131.130] dl name = sysrecovery
[     131.132] img size = 305738752
[     131.136] part size = 536870912
[     131.139] read start=34816
[     131.142] write start=4630528
[     203.602] dl name = UDISK
[     203.603] sprite update error: fail to open part file DISKFS_000000000
[     203.633] sprite update error: current card sprite failed
[     203.640] now hold the machine

OK, missing UDISK (filename DISKFS_000000000)
Indeed, it does not appear in files/image.cfg from the a10_flash_kitchen_v2/packer_ics directory.
Now I need to repair that.
To be continued...

Mele A2000 custom

Now I want to customize the firmware. At least to start the HTPC in English, or French!
I tried the a10_flash_kitchen_v2 from this source: [TUTORIAL/DEV]Build AOSP Android 2.3.7 for Allwinner A10 tablets (Teclast P76Ti), but for Android 4.0, and without using AOSP (just a working image), and all from linux (with wine for windows programs).

At this stage, the modified firmware is generated, but does not load.
During SDCARD update process, normal led flash is followed by a rapid led flash and does not stop.

When I perform simg2img RFSFAT16_SYSTEM_000000000.fex system.ext4
I get this: "computed crc32 of 0x949435d7, expected 0x00000000"
Perhaps this is the root cause of my problems...


I followed more or less this tutorial:
How to build custom LiveSuit images for flashing internally to MK802 but without Windows except for the flashing utility (and even for that I used the PhoenixCard utility).
I converted the .bat scripts into shell scripts, but I think recent versions of wine are able to handle .bat files.

Based on this firmware named HTPC-Android4.0 - filename is android\ 4.0\ 软件.rar (I retrieved it from an alternate source, same name): Mele's Download Center

Since it fails, I need to wire the TTL-to-USB debug cable (I have a DKU-5 phone data cable that perfectly fits this usage).

To be continued...

mercredi 1 août 2012

New hack: mele A2000

Received this
Mele A1000 is a $70 hackable, Linux-friendly ARM-based PC (the Mele A2000 version, seems that only VGA output position is different, specifications are the same).
I bought also the Mele F10 remote, great that it works via RF and not via IR. This allows to hide the Mele box, and still be able to move the mouse.
My first modification is to install a better firmware, at least under ICS.
I took android_4.0.img following this site: MeLe A2000
With this firmware you already have root access, and busybox.

A weird thing: the IR sensor captures my SAMSUNG TV remote, volume down performs "back" in videos.
Install an Android terminal, and then:
su
rmmod sun4i_ir
removes the IR sensor capability (useless with the F10 remote).
The next annoying thing was the blue LED, too bright from my taste; the red one is better. Sanction:
echo '0' > /sys/devices/platform/gpio_sw.1/gpio_sw/PH20/data
and power on the red one, just in order to see that the device is ON:
echo '1' > /sys/devices/platform/gpio_sw.0/gpio_sw/PH10/data

CIFS module is loaded; you can mount CIFS network shares like this:
su
mkdir -p /mnt/cifs/videos
busybox mount -t cifs -o user=guest,domain=MYGROUP //192.168.2.289/videos /mnt/cifs/videos
(change the parameters with yours).

Enable adb connection via TCP (instead of USB):
su
setprop service.adb.tcp.port 5555
stop adbd
start adbd
ifconfig eth0

Well, I want to automate this by generating my own firmware. The best would be to try on the SD Card before flashing it. http://www.cnx-software.com/2012/06/13/hardware-packs-for-allwinner-a10-devices-and-easier-method-to-create-a-bootable-ubuntu-12-04-sd-card/ shows how to generate a bootable SD Card, but for a linux distribution.
To be continued...