Flash Image¶
Introduction¶
This page describes how to flash the image file from the host to the development board’s eMMC, via the Type-C cable or USB OTG + Type-C adapter(Hereinafter referred as Type-C).
Please choose the right way according to the host OS and the type of image file .
Preparatory Work¶
Board and Host OS¶
ROC-RK3328-PC development board
Image file
Host PC
Type-C Cable / Dual male usb data cable
There are two types of image file:
Packed image, often known as update.img, which contains the bootloader, parameter and all the partition image files. It is used for firmware release.
Partition image, like kernel.img, boot.img, recovery.img, etc, which are created during development.
You can find the compiled unified ROC-RK3328-PC firmware here, and extract it after downloading. You can also compile it yourself by referring to the instructions for compiling the firmware.
Supported host OS:
Windows XP (32/64bit
Windows 7 (32/64bit)
Windows 8 (32/64bit)
Linux (32/64bit)
Install RK USB Driver¶
Download Release_DriverAssistant.zip, then “驱动安装”(Driver install).), uncompress it, then run DriverInstall.exe inside.
In order to use new driver for all the rockchip devices, please select “驱动卸载”(Driver uninstall), then “驱动安装”(Driver install).
Device Mode¶
There are two ways to switch the device to upgrade mode.
The first one, device is cut off all the power sources, such as power adapter and Type-C connection:
Keep Type-A cable connected with host PC.
Press and hold RECOVERY key.
Connect Type-C cable to the device.
After around two seconds, release RECOVERY key.
The other way:
Use Type-C cable to connect host and device together.
Press and hold RECOVERY key.
Shortly press RESET key.
After around two seconds, release RECOVERY key.
The host will prompt to have new device detected and configured. Open the Device Management, you’ll find a new device name “Rockusb Device”, as shown below. Return to previous step to reinstall driver if it is not shown.
Download Firmware¶
Download Tool for upgrade¶
Windows OS:
Flash Linux(GPT) or Android8.1 AndroidTool_v2.58
Flash Android7.1 AndroidTool_v2.38
Flash Android10 AndroidTool_v2.71
Linux OS:
Flash Linux(GPT) or Android8.1 Upgrade_tool_v1.34
Flash Android7.1 Upgrade_tool_v1.24
Flash Android10 Upgrade_Tool_v1.49
Flash on windows¶
Download AndroidTool,and Uncompress it . AndroidTool defaults to display in Chinese. We need to change it to English. Open config.ini with an text editor (like notepad). The starting lines are:
#选择工具语言:Selected=1(Chinese);Selected=2(English)
[Language]
Kinds=2
Selected=1
LangPath=Language\
Change “Selected=1” to “Selected=2”, and save. From now on, AndroidTool will display in English.Now, run AndroidTool.exe: (Note: If using Windows 7/8, you’ll need to right click it, select to run it as Administrator)
Flash update.img¶
Steps of flashing update.img:
Switch to “Upgrade Firmware” tab page.
Click “Firmware” button and open the image file. Detail information of the image file, like version and chip, is shown.
Click “Upgrade” button to start flash.
If the upgrade fails, Maybe the version of firmware you flash is different from version of the original machine, you can try to erase the Flash by pressing the “EraseFlash” button before upgrading. .
WARNING:”EraseFlash” Be sure to erase and upgrade according to the Flashing Notes
Flash partition image¶
The partition of each firmware may be different. Please note the following two points:
Use Androidtool_2.38 to upgrade Android7.1 firmware using the default configuration;
Use Androidtool_2.58 to upgrade ubuntu (GPT) to use the default configuration. To upgrade Android8.1 firmware, please do the following:
Use Androidtool_2.71 to upgrade Android10 firmware using the default configuration;
Switch to “Download Page”; right click on the form and select “Load Config”; select rk3328-Android81.cfg.
Steps of flashing partition images:
Switch to “Download Image” tab page.
Check the partitions you want.
Make sure the image file’s path is correct. Click the rightmost empty table cell to select new path if needed.
Click “Run” button to start flashing. Device will reboot automatically when finish.
Flash on linux¶
There is no need to install a device driver under Linux. You can connect to the device by referring to the Windows chapter.
Download Upgrade_Tool and install it follow the command to host filesystem :
unzip Linux_Upgrade_Tool_xxxx.zip
cd Linux_UpgradeTool_xxxx
sudo mv upgrade_tool /usr/local/bin
sudo chown root:root /usr/local/bin/upgrade_tool
sudo chmod a+x /usr/local/bin/upgrade_tool
NOTE: If you are prompted with the following error:
upgrade_tool: error while loading shared libraries: libudev.so.1: cannot open shared object file: No such file or directory
You can use the following command to solve:
sudo ln -sf /lib/i386-linux-gnu/libudev.so.1 /lib/i386-linux-gnu/libudev.so.0
Flashing firmware:¶
sudo upgrade_tool uf update.img #update.img:Firmware to be upgraded
If the upgrade fails, you can try to erase and then upgrade. Be sure to erase and upgrade according to the table of Flashing Notes.
# erase flash
sudo upgrade_tool ef update.img #update.img:Firmware to be upgraded
# flashing
sudo upgrade_tool uf update.img
Flashing partition images¶
Android7.1 use the following way:
sudo upgrade_tool di -b boot.img
sudo upgrade_tool di -k kernel.img
sudo upgrade_tool di -s system.img
sudo upgrade_tool di -r recovery.img
sudo upgrade_tool di -m misc.img
sudo upgrade_tool di resource resource.img
sudo upgrade_tool di -p paramater #flash parameter
sudo upgrade_tool ul bootloader.bin #flash bootloader
sudo upgrade_tool di trust trust.img #flash trust
Android8.1 use the following way:
sudo upgrade_tool ul bootloader.bin # flash bootloader
sudo upgrade_tool di -p paramater # flash parameter
sudo upgrade_tool di -uboot uboot.img
sudo upgrade_tool di -trust trust.img
sudo upgrade_tool di -m misc.img
sudo upgrade_tool di -baseparameter baseparameter.img
sudo upgrade_tool di -b boot.img
sudo upgrade_tool di -k kernel.img
sudo upgrade_tool di -resource resource.img
sudo upgrade_tool di -r recovery.img
sudo upgrade_tool di -s system.img
sudo upgrade_tool di -vendor vendor.img
sudo upgrade_tool di -oem oem.img
Android10 use the following way:
sudo upgrade_tool di -b boot.img
sudo upgrade_tool di -dtbo dtbo.img
sudo upgrade_tool di -misc misc.img
sudo upgrade_tool di -parameter parameter.txt
sudo upgrade_tool di -r recovery.img
sudo upgrade_tool di -super super.img
sudo upgrade_tool di -trust trust.img
sudo upgrade_tool di -uboot uboot.img
sudo upgrade_tool di -vbmeta vbmeta.img
Ubuntu(GPT) use the following way:
sudo upgrade_tool ul $LOADER
sudo upgrade_tool di -p $PARAMETER
sudo upgrade_tool di -uboot $UBOOT
sudo upgrade_tool di -trust $TRUST
sudo upgrade_tool di -b $BOOT
sudo upgrade_tool di -r $RECOVERY
sudo upgrade_tool di -m $MISC
sudo upgrade_tool di -oem $OEM
sudo upgrade_tool di -userdata $USERDATA
sudo upgrade_tool di -rootfs $ROOTFS
If errors occur due to flash problem, you can try to low format, or erase the flash:
upgrade_tool lf update.img # low format flash
upgrade_tool ef update.img # erase flash