Home > Linux, Rockchip RK30xx, Rockchip RK31xx, Rockchip RK32xx, Ubuntu > How to Upgrade Firmware for Rockchip RK3066, RK3188, RK3328, RK3288, RK3399 Devices with the Command Line in Linux

How to Upgrade Firmware for Rockchip RK3066, RK3188, RK3328, RK3288, RK3399 Devices with the Command Line in Linux

Previously I wrote an article entitled “How to Flash Rockchip RK3066 / RK3188 Firmware in Linux” explaining how to use a graphical tool called RkFlashKit to upgrade firmware on Rockchip devices using a Linux computer. This tool had some limitations, and it would just have a subset of features of RkAndroidTool (Windows), and it was not possible to flash “update.img” type of firmware which are often provided and flashed with RkBatchTool in Windows.

Luckily there’s now a command line tool called upgrade_tool that allows you to flash the “update.img” firmware files directly from Linux. I’ve already shown how to use it with Radxa Rock, but it’s buried with other instructions, so I’ve decided to make a separate post. This has been tested in Ubuntu 14.04 with Radxa Rock (RK3188) and Measy U2C (RK3066).

Ready? Let’s start by downloading and extracting upgrade_tool. You may want to add the installation path to your PATH, or copy it to /usr/local/sbin directory.

Now download the firmware for your device, let’s call it “android-5.0_rk3xxx.img”, and enter recovery more in your device. This is usually done by connecting a USB to micro USB cable between the OTG port of your device and your PC, and press a “recovery” or “reset” button on your device with a sharp object (e.g. toothpick) and turning on the device.

Now complete the firmware upgrade with the two command below:

Done. It’s that easy. Now just restart your device to boot the new firmware.

The full output during the firmware update procedure should look like:

You can also flash individual files (parameter, boot.img, system.img, etc…) with upgrade_tool utility, as well as do some checks with the NAND flash. More details can be found in the PDF file found in the zip file used for installation.

  1. May 25th, 2014 at 18:34 | #1

    real good point of upgrade_tool is, it can do low level things (e.g. loading/flashing bootloader even on mask rom mode) as like as RK tools for Windows.

    (btw, update.img can be unpacked very easily, it’s not weak point of other open source tools)

  2. adem
    May 26th, 2014 at 15:03 | #2

    sudo ./upgrade_tool lf
    sudo ./upgrade_tool android-5.0_rk3xxx.img

    is wrong it should be

    sudo ./upgrade_tool lf
    sudo ./upgrade_tool UF android-5.0_rk3xxx.img

  3. May 26th, 2014 at 15:04 | #3

    Sorry about that, and thanks for reporting the error. I’ve updated the post.

  4. adem
    May 26th, 2014 at 20:39 | #4

    its cool dude i did it following you post but then i got the error then it said to type ./upgrade_tool -h for a list of commands that’s how i figured it out.

  5. Linuxium
    May 26th, 2014 at 20:50 | #5

    I’d recommend to use ‘ef’ rather than ‘lf’. The ‘lf’ command formats NAND using the existing (loaded) bootloader but if you flash firmware based on a later bootloader (e.g. the Kitkat bootloader which introduces a new metadata partition) then without downloading the later bootloader first and formatting appropriately you will brick your device. So if you use ‘ef’ you will always download the bootloader in your image (as it is included as part of the build process) and then partition before downloading the partition contents. Only if you are confident in what you are doing should you use the ‘lf’ and ‘di’ commands or if you have instructions that are specifically written to use these commands.

  6. May 28th, 2014 at 22:07 | #6

    Any sources for this tool?

  7. May 28th, 2014 at 22:10 | #7

    If I recall correctly it has been released as part of Rockchip SDK as binary only

    December 24th, 2015 at 01:54 | #8

    Thanks man! It worked for me. It revived my old heavily modified tablet! …and it’s simple as well. 🙂

  9. Nathan
    February 27th, 2016 at 19:11 | #9

    Whenever I try to run it, I get the following:

    [email protected] ~/Linux_Upgrade_Tool_v1.21 $ sudo ./upgrade_tool lf
    ./Upgrade_tool: 1: ./upgrade_tool: Syntax error: “)” unexpected

  10. February 27th, 2016 at 19:32 | #10

    Are you running it in a Raspberry Pi? If so, it won’t work, as it only supports x86 (Intel/AMD) processor.
    If you have exagear it might work (or use qemux86 in ARM), but it’s probably better to just use a Linux PC or Virtual machine.

  11. Nathan
    February 28th, 2016 at 00:46 | #11
  12. esteban
    March 17th, 2016 at 20:54 | #12

    Hi, someone knows where I can get an updated stock android image for rk30sdk?
    The installed one sucks, this is the specs of my android tv stick: http://specdevice.com/showspec.php?id=1b4f-6f1e-0033-c58700000000&lang=es.
    Sorry for my English.

    Thanks in advance,

  13. March 21st, 2016 at 14:36 | #13
  1. No trackbacks yet.