Rockchip provides 2 tools to update the flash:
- RkBatchTool – Used to upgrade firmware with a single file
- RkAndroidTool – Used to flash the NAND flash with image corresponding to particular partition, e.g. system.img. kernel.img, boot.img. recovery.img. etc…
One problem is that the company only provides these tools for Windows, so if you’re using a Linux based operating systems, you’d have to run a Windows XP or 7 virtual machine in VirtualBox or VMWare, which is an inconvenience, and requires a license in theory. To work around this issue, I’ve tried to use ReactOS, an open source operating systems compatible with Windows XP, but although the USB drivers appeared to install properly, RKAndroidTool failed to recognized my device (MK908). But a member of Mini PCs community informed me about a tool called RkFlashKit, written in Python and using GTK, that can flash firmware to Rockchip RK3066 and RK3188 devices in Linux, so I’ve given it a try.
Installing RkFlashKit
In order to install RkFlashKit in Debian or Ubuntu, you need to get the source code, build it, and install the package:
1 2 3 4 5 |
git clone https://github.com/linuxerwang/rkflashkit cd rkflashkit ./waf debian sudo apt-get install python-gtk2 sudo dpkg -i rkflashkit_0.1.1_all.deb |
In Ubuntu, you can just go to the dash to find rkflashkit, and run it (You’ll need to be sudo).
Flashing firmware with RkFlashKit
The tool is similar to RkAndroidTool as it can burn partition images to specific partitions. You’ll need to enter recovery mode just like you would do in Windows, by pressing the recovery button, before powering the device via the USB port, and connect the USB cable to your PC. RkFlashKit should automatically find your device, so you just have to select the correct NAND partition, select the image file to flash, and click on Flash image.
This is very easy to use thanks to the user interface. However, it currently lacks support for the parameter file, as well as Rockchip Loader, which means it will not work if those two files are changes, and you may brick your device if the partition table has changed for example. It’s normally possible to recover with RKAndroidTool if your device is bricked, so you may still want to have a Windows device or Virtual Machine ready in case something does wrong.
Flash RKBatchTool Firmware File with RkFlashKit
Another problem is that firmware updates are often distributed using RKBatchTool file format, which can not be directly handled by RkFlashKit. Luckily, there are some other tools available to extract the partitions file from such firmware. I used one of the latest MK908 firmware (update_mk908_106j2107_04.img) to try it out.
You’ll first need to build rk-tools:
1 2 3 4 |
git clone https://github.com/rk3066/rk-tools.git cd rk-tools sudo apt-get install libssl-dev libcrypto++-dev make |
1 2 3 4 5 6 |
./img_unpack update_mk908_106j2107_04.img update_mk908_106j2107_04_unpack.img rom header code: 1060000 rom version: 4.1.1 build time: 2013-09-07 10:39:22 chip: 70 checking md5sum....OK |
Finally, run afptool to extract the files from the resulting file into “firmware” directory:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
./afptool -unpack update_mk908_106j2107_04_unpack.img firmware Check file...OK ------- UNPACK ------- package-file 0x00000800 0x00000242 RK3188Loader(L)_V1.20.bin 0x00001000 0x0002F8AE parameter 0x00031000 0x00000264 Image/misc.img 0x00031800 0x0000C000 Image/boot.img 0x0003D800 0x00A2C000 Image/recovery.img 0x00A69800 0x00BFC000 Image/system.img 0x01665800 0x1A630000 backupimage/backup.img 0x1BC95800 0x01665004 update-script 0x1D2FB000 0x000003A5 recover-script 0x1D2FB800 0x0000010A UnPack OK! |
Now that we’ve got our partition files, simply use RkFlashKit as mentioned above.
Unbrick Your Rockchip Device with RKAndroidTool
Since the steps above may fail, I’ll just quickly mention a method that should unbrick the device in Windows with RKAndroidTool.
- Download RKAndroidTool, and extract the file. Installing 7-Zip may be required to uncompress the file.
- Installed the USB drivers for Windows
- Run RKAndroidTool.exe in RkAndroidToolv1.37 directory
- Connect you device USB OTG port to your PC USB port, and enter recovery mode.
- Load all the available files, and make sure they are ticked on the left
- Click on “Erase IDB”, then “Run” to complete the recovery
Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress
Rockchip has now released a binary tool for Linux called “Linux Upgrade Tool v1.16” similar to the one for Windows. Visit http://wiki.radxa.com/Rock/flash_the_image for details.
Hello Sir,
I think you have a typo. The third line under “Installing RkFlashKit” is actually:
./waf debian
Thank you so much for all your great posts, I’ve learned a lot from here.
@Neil
Thanks for the report! Fixed.
The link “https://github.com/rk3066/rk-tools.git” isn’t working!
@Nathan The repository has been deleted.
But it’s now probably a better idea to use upgrade_tool @ http://www.cnx-software.com/2014/05/25/how-to-upgrade-firmware-for-rockchip-rk3066rk3188-devices-with-the-command-line-in-linux/
@cnxsoft
Ok thanks!
Mara tablat ka 0902 vs 0711 ka masen khrab ho gy ha ples ap pats baje
Hi. Am I understood correctly that I can install Ubuntu on a tablet that runs on the RockChip RK3066 processor?
Yes, it’s possible. But it’s not necessarily easy, and things like touchscreen may not work.
If something goes wrong you may also brick your tablet. If you boot the OS from microSD card it should be safe to try though.
You can search for picuntu tablet to see some demos. Note that RK3066 is fairly old, so the image you may find are likely based on Ubuntu 12.04 or 14.04.
Thanks for the answer
Hi,
thanks for this article. In your article there is a link to Google+ page but I think Google+ is down. Is it possible to somehow get the information from that post? I’d like to know how you managed to install the drivers in ReactOS and what else worked there. Thanks.
I can still access G+ since I have a company account, instead of an individual account.
It reads: