Flashing a New Android Image to the RIoT Board
Flashing a New Android Image to the RIoT Board
Join the DZone community and get the full member experience.Join For Free
I understand the challenges of board vendors: they produce many boards, and typically they have an early/first firmware version on it. And when that board gets shipped to customers, that firmware typically is old and outdated :-(. Same for the RIoT board I have received: I was desperately trying some advanced features, only to realize that the firmware on the board is an older one from this year. So time to update the Android on that board.
Where is the latest stuff?
As the documentation, software and tools on riotboard.org and element14 are outdated, go directly to http://www.embest-tech.com/shop/star/riotboard.html and to download the more recent stuff:
- User Manual V2.0:https://www.dropbox.com/s/ang6nrpbm9045db/RIoTboard%20User%20Manual_V2.0.pdfas reference information.
- Android svn2597 image (image.rar):https://www.dropbox.com/sh/cz9gcglv5sxpa8s/AADOoqUqaiYRz3Qm255cJYjBa. This archive has the binary image files we are going to load to the board.
- Andriod Programming tools:https://www.dropbox.com/sh/iiu9qko36ftbs2y/u_Ljn1c2VS. This tools are needed to download the image files to the board.
The Embest site has as a very brief release note what has been changed between releases. The Update List mentions two Android releases: SVN2515 (initial version from 20-Jan-2014, this is what I have on my board as shipped) and SVN2597 which as of the time of this post the most recent one (file date 30-Apr-2014)).
:?: I have no idea why the element14/riotboard.org site has outdated and old firmare on it. Only google helped me to find the Embest site with the newer files.
Loading a new Android Firmware
So in the steps below, I show how to flash the new Android firmware binaries to the board. The User Manual describes some steps how to boot a new firmware from the SD card(s), but up to now this is very confusing information. Instead, I’m showing how to flash a new Android firmware using with a serial download. For this I download the new files with a loader over USB to the board.
- Create a new folder (e.g. riot_update)
- Extract the ‘Android tools’ files into that folder
- Extract the ‘Android image’ files into folder
- Copy riot_update\u-boot-mx6solo-RIoTboard.bin intoriot_update\tools\Mfgtools-Rel-4.1.0_130816_MX6DL_UPDATER\Profiles\MX6DL Linux Update\OS Firmware\files\android
- From riot_update\eMMC, copy boot.img, recovery.img and system.img and place them into same folder as above (riot_update\tools\Mfgtools-Rel-4.1.0_130816_MX6DL_UPDATER\Profiles\MX6DL Linux Update\OS Firmware\files\android) and replace the existing files in that folder.
- Power off the board and set the switches from the original settings
to this Serial Download Settings:
- Plug-in the USB cable to J11 (Mini-USB port near Ethernet plug on the board).
- Power the board with the 5V power supply.
- The board should now be recognized as and drivers getting installed:
- The device should now be recognized as USB HID:
- Now start the MFG tool (tools\Mfgtools-Rel-4.1.0_130816_MX6DL_UPDATER\MfgTool2.exe), and most likely you will have an error….
- If you get an error 21:
then the log file will not tell other than “ModuleID LevelID: Parse ucl script failed, error code: 21″. That cryptic message means that riot_update\tools\Mfgtools-Rel-4.1.0_130816_MX6DL_UPDATER\Profiles\MX6DL Linux Update\OS Firmware\ucl2.txt needs to renamed into ucl2.xml (!!!!) (thanks to this guide I have found the solution)
- If everything goes fine, you should get this dialog with the board recognized as HID-compliant device:
- Press the “Start” to begin downloading the new image.
- While downloading, the board enumerates as USB Mass Storage Device:
- Be patient while the download progresses:
- It takes about 2-3 minutes to complete the operation:
- Press ‘Stop’ and then ‘Exit’ to finish and close the dialog.
- Unpower the board.
- Restore the previous jumper settings again:
- Re-power the board with the 5V barrel and let it boot again.
With this, a new Android version should be on the board. You can verify this in the About of the board:
How cool is that? :-)
Always check if the firmware is the latest and greatest if something is not working or not present. Boards from large batches can have old firmware on it. Updating the firmware of a board is typically not very easy, except there is a step-by-step guide. And as in this case, it is not easy to find the latest firmware files (I hope riotboard.org improves that?), and even the provided tools and configuration files have bugs in it, like that *.txt to *.xml file name extension? It looks like Embest is the real provider of that board, and element14 is lagging behind with their files and updates. So best to always check at the source for the latest and greatest files. I wish that riotboard.org would be the first stop for anything around that board. At least I have now a new shiny Android on my board, and I hope that this post can save others a lot of time.
Happy Androiding :-)
Published at DZone with permission of Erich Styger , DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.