Home > Android, Linux, Rockchip RK30xx, Rockchip RK31xx > How to Flash Rockchip RK3066 / RK3188 Firmware in Linux

How to Flash Rockchip RK3066 / RK3188 Firmware in Linux

November 19th, 2013 Leave a comment Go to comments
Orange Pi Development Boards

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:

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.

RkFlashKit Flashing System.img to MK908 NAND Flash

RkFlashKit Flashing System.img to MK908 NAND Flash

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:

Then use img_unpack tools to unpack the firmware to another format:

Finally, run afptool to extract the files from the resulting file into “firmware” directory:

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.

  1. Download RKAndroidTool, and extract the file. Installing 7-Zip may be required to uncompress the file.
  2. Installed the USB drivers for Windows
  3. Run RKAndroidTool.exe in RkAndroidToolv1.37 directory
  4. Connect you device USB OTG port to your PC USB port, and enter recovery mode.
  5. Load all the available files, and make sure they are ticked on the left
  6. Click on “Erase IDB”, then “Run” to complete the recovery


  1. January 15th, 2014 at 19:59 | #1

    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.

  2. Neil
    February 14th, 2014 at 16:54 | #2

    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.

  3. February 14th, 2014 at 17:27 | #3

    Thanks for the report! Fixed.

  4. Nathan
    February 25th, 2016 at 00:00 | #4

    The link “https://github.com/rk3066/rk-tools.git” isn’t working!

  5. February 25th, 2016 at 10:01 | #5

    @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/

  6. Nathan
    February 27th, 2016 at 18:47 | #6

    Ok thanks!

  7. May 9th, 2017 at 22:40 | #7

    Mara tablat ka 0902 vs 0711 ka masen khrab ho gy ha ples ap pats baje

  1. December 4th, 2013 at 22:44 | #1
  2. January 27th, 2014 at 17:15 | #2
  3. June 15th, 2014 at 18:36 | #3