jeudi 10 octobre 2013

Mele flash kitchen v3

Since this article: http://tmerle.blogspot.fr/2012/09/mele-a2000-my-own-linux-flash-kitchen.html I made some little evolutions.

Here is the Mele flash kitchen v3: mele_flash_kitchen_v3.tgz

The usage is the same.

I added a little script, convert_updater_script_to_sh.sh, that converts an Android updater script (META-INF/com/google/android/updater-script) from an update.zip into a UNIX shell script (I wrote some wrappers for Android functions).
It is useful when you want to apply an update on pre-extracted and mounted system and root partitions (you have to specify their locations to the script).
The -b option is added to mkA10card.sh so that you can blank the sdcard partitions (takes long time) before writing data on them. It is useful if you want to create an archive of the sdcard version (0 are better compressed than random values).

Here are the differences:
mele_flash_kitchen/sdcard/Makefile: fixed boot tar uncompressing error (due to bad userid)
mele_flash_kitchen/sdcard/mkA10card.sh: added -b option to wipe partitions before writing, minor fixes thanks to user Spell
Created mele_flash_kitchen/sdcard/partitions_4GB.txt and
mele_flash_kitchen/sdcard/partitions_8GB.txt (just change the symbolic link partitions.txt to point to what you prefer)
Created mele_flash_kitchen/tools/convert_updater_script_to_sh.sh: a script that converts an Android update script (found in update.zip files) to a shell script. Handy to apply an update on an uncompressed system image.

22 commentaires:

  1. esto funcino para que ande netflix en un mele a2000g

    RépondreSupprimer
  2. I've just found this post on the internet
    http://olimex.wordpress.com/2013/12/18/new-a10-olinuxino-lime-image-have-full-hd-hardware-acceleration/
    Its A10 and Mali GPU with CedarX linux ... they claim its HW accelerated - anyone knows how to port grab this for our Mele A1000/A2000 !?

    RépondreSupprimer
    Réponses
    1. Interesting... should work.
      I will give it a try (downloaging the debian image). The change to do is only the script.bin to replace by a mele one (found in the sdcard image, boot.tgz archive, for example).

      Supprimer
    2. Well, I managed to get something running, but no sound (via HDMI).
      After having dumped the debian image on the sdcard, I put the Mele sdcard image's script.bin in the first partition (for me it is /dev/sdb1), then I performed these things to put the Mele's spl+u-boot:
      # write SPL
      dd if=sun4i-spl.bin of=/dev/sdb bs=1024 seek=8
      # write mele u-boot
      dd if=mele-u-boot.bin of=/dev/sdb bs=1024 seek=32
      as it is made by mkA10card.sh

      Once booted, I performed a 'dhclient eth0' in order to have Ethernet working.
      I am not sure the video playback will work properly, no time this evening sorry...

      Supprimer
  3. Hi Thierry,

    I have Mele A200 HTPC (basic original version, not A2000). On Mele site (http://www.mele.cn/download/135.htm) all FW links are dead. On Mele forum (http://bbs.mele.cn/showtopic-2143.aspx), it looks the last FW is 2.0.2, but both links contain the same USB version, not SDCard img. Do you have .img file for that FW? Can it be converted to boot from 16GB SDCard with Mele flash kitchen v3? May be you can help me to convert it?

    RépondreSupprimer
    Réponses
    1. Unfortunately, I don't have it anymore...
      Do you want specifically the 2.0.2 version?
      The latest is firmware is: http://tmerle.blogspot.com/2014/04/mele-v2052-enus-firmware-fixing-netflix.html
      All links should be OK (I transferred everything from 4shared to mediafire).

      Supprimer
    2. Hmm I guess the link I pointed out is incompatible with your device... All I could find for now is a link to 4pda.ru: http://4pda.ru/forum/index.php?showtopic=342683&st=40

      Supprimer
  4. The link in your 1st post is dead. Can you upload Mele flash kitchen v3 package to Mediafire?

    RépondreSupprimer
    Réponses
    1. Sorry for the delay; I updated the link:
      https://www.mediafire.com/?rbrai8xf5d95uvu

      Supprimer
    2. Thanks for the link. My Mele A200 Single Core suddenly started showing Internal Storage full (0.0B free), after I disconnected a running USB drive. I tried full hardware reset, but it didn't reformat that partition. What image should I boot from SD Card to fix the issue with internal NAND, and how would you suggest to fix it? FW links on Mele site are dead, nothing in linked Baidu forders.

      Supprimer
    3. Well unfortunately I recycled my Mele A2000 as a linux wifi hotspot, so I can only base my thoughts on remembers.
      The phoenixcard method should erase and reset the internal NAND completely...
      I remember an impressive list of fimwares that you can convert as sdcard images here, that could work with your device:
      http://touchscreen-apps.blogspot.fr/2013/01/mk802ii-firmwares-gathered-on-one-place.html
      I use Juicessh on Android to get a terminal and perform command line operations (dmesg, logcat, cat /proc/partitions to see the available partitions, ...)
      You should wire the serial output, very useful to see the startup issues and pehaps some misconfigurations
      Hope this helps...

      Supprimer
  5. Thanks. For Mele HTPCs, what partition is defined as Internal Storage? What root folder is mounted to that partition?

    RépondreSupprimer
    Réponses
    1. The NAND partition containing the internal storage is nande (/dev/block/nande) mounted as /data.
      You will find the other partitions mapping here: http://tmerle.blogspot.fr/2012/11/booting-android-ics-system-from-sdcard.html

      Supprimer
    2. Hmm.. I can browse all these folders with TotalCommander, so the Data volume isn't damaged. Why Internal Storage shows 0.0B?
      I chosen "Hook to PC as USB disk" in Settings to run some checks via PC, but it doesn't show up on a PC. Possible reason?
      I installed Terminal, but can only use on-screen keyboard. When connecting any USB keyboard & mouse, only Mouse works, but not keyboard. Any idea why?

      The link you gave for various images, doesn't show any FW for A200/210. What are HW differences btw A2000 and A200? Any recovery image you can suggest to boot from external SD Card?

      Supprimer
    3. I can't remember if I made this USB option work... To debug, I can't remember if I enabled adb via TCP by default. Just check the IP address, and try to perform adb connect . Otherwise install https://play.google.com/store/apps/details?id=jps.android.adbtcp that will enable adb over TCP.
      non-working keyboard, strange... at least the Mele F10 keyboard is recognized.
      Reading http://linux-sunxi.org/A10s, your device has brothers (Pineriver H25, ...) perhaps you could find a compatible firmware from a different maker.

      Supprimer
    4. Is it possible to flash your SDCard FW version to SDCard in Windows? Using what tool and method?

      I can't install any Telnet SSH package due to Internal Storage error. Can SSH be activated from Mele Terminal? I was able to access ADB functions and NAND via WiFi using TotalCommander ADB plugin.

      Supprimer
    5. Tried to run your Kitchen v3 in VMWare 12 with Linux Mint 17 Guest. Wine installed a few extra packages, than thrown error in unpacking original.img: "Unimg. Sorry this app can't run in Virtual Machine". How I can unpack the original IMG in Windows, and then continue using your kitchen in Mint on the unpacked image?

      Supprimer
    6. Weird. It is possible to run wine for linux inside a virtual machine, there may be a mint configuration somewhere but you can run unimg on your native windows in order to extract the image, just follow the script img_1extract.sh:
      unimg -d original.img
      It will extract into some subdirectories; you can paste this extraction under linux and go on to build sdcard.

      Supprimer
    7. This VT report https://www.virustotal.com/en/file/7d3c3249c257246b7af8de21de41bba63c2916e3821668be097a6a5ef8d90397/analysis/ for unimg.exe doesn't look good. Can I use imgrepacker.exe instead (http://linux-sunxi.org/LiveSuit_images), and than continue with your kitchen script? What would change in this case?

      Supprimer
    8. imgrepacker.exe seems to do the same things but it names the extracted files differently. You will have to rename them as expected by the linux scripts (for "make build_sdcard"), in the _input directory:
      out/bootloader.fex to _input/bootfs.fex,
      out/boot.fex to _input/root.fex,
      out/system.fex to _input/system.fex,
      out/recovery.fex to _input/recovery.fex,

      imgrepacker.exe has also something:
      https://www.virustotal.com/en/file/a4e841c3fcd65f511e91fc410afb911f2d070563644e1061de9659cf01d69da8/analysis/1476949803/

      Supprimer
    9. Will your Flash Kitchen still work for A10S SoC, my A200 HTPC is based on? Any modifications needed? You mentioned script.bin describes the device hardware. While looking for suitable A10S images, I read A13-OLinuXino-MICRO Debian can boot on A200 (https://www.olimex.com/wiki/A13-OLinuXino-MICRO).

      Does your Kitchen work only with Android images, or also Linux images? Should I replace Olinuxino fex with Mele_a210.fex (https://github.com/linux-sunxi/sunxi-boards/tree/master/sys_config/a10s) for Debian? What the fex file does, and how its different in purpose from script.bin you mentioned?

      While Android images must be burned to SD Card in Windows with PhoenixCard tool, should I use Win32DiskImager to burn suitable Linux images to SD Card?

      Supprimer
    10. This flash kitchen is intented for Android images. It works for A10 images, and perhaps on A10s Android fimrwares.
      For linux images, you don't need any kitchen, but you will boot under...linux and not Android and its applications.
      The script.fex file is the text version of script.bin, you can convert one to another using bin2fex or fex2bin (https://github.com/linux-sunxi/sunxi-tools) but you can copy-paste the binary version, no need to change it anyway.
      For A10s, I have found this version: http://www.4shared.com/file/tauTUzVR/A10s_v14_20121210_432_1G.htm
      You can try the flash kitchen to put it on sdcard.
      Another one customized this firmware:
      http://ahappydeal.info/showthread.php?2611-Megafei-A08-firmware-%28AllWinner-A10S-RealTek-RTL8188ETV%29

      And yes, the instructions say that the Debian image must be dumped onto sdcard with Win32DiskImager.

      Supprimer