Getting Started with Raxda Rock – Building an Android 4.2 Image from Source

I’ve posted some pictures, and show some basics how to get started in my first post about Radxa Rock. Today, I’ll post my experience trying the instructions to build Android for Radxa Rock in Ubuntu 13.10. Many of the instructions are also valid for other RK3188 devices.

Radxa_AndroidThe source code is currently located in a private git repository, and if you’re sure you want to get the Android source  code, you should send an e-mail to [email protected] to be granted access to their private repo. Within minutes, I’ve received an email with the subject “GitLab | Account was created for you” to register an account. You’ll then need to add an SSH key just like you’d do for Github.

Assuming you’re already using a service like github, you should already have SSH key. Simply type cat ~/.ssh/, copy the output, and go to, login if needed, and click on “Add SSH key”, enter a description, copy your public SSH key, and click on “Add Key” to confirm. You should then receive an email with the subject “GitLab | SSH key was added to your account” to confirm the key has been added.

While you are waiting for your Gitlab account email, you can start by installing depencies and tools in your Ubuntu or Debian computer:

If you’ve already registered your gitlab account, and added an SSH key, you can now get the source code:

“git clone…’ step will take a while to process depending on the Internet connection between your PC and linux-rockchip server. It took almost 2 hours in my case.

You should then be ready to build the Linux kernel:

If you want to change kernel options just make menuconfig after rk3188_radxa_rock_defconfig

The kernel is now ready, time to build Android per se:

The last step will took a while depending on your computer’s CPU, memory, and storage. It took about 43 minutes on my build machine (AMD FX8350, 16 GB RAM). You may have to change -j8 to match the number of core of your CPU, some recommend to set the value to 1.5x CPU cores. So if you have 4 cores, -j6 may be the optimal value.

The finally step is to create a firmware image (update.img):

You should now a firmware image in rockdev/update.img. You need to flash the image to your Radxa board. Instructions are available both for Linux and Windows, but since we’ll done all previous steps in Linux, let’s keep it that way.
Rockchip has recently release a binary only tool for Linux called Linux Upgrade Tool, let’s download and extract it:

Before you can flash your newly built firwmare to your Radxa board you need to enter recovery mode. There are 2 ways depending on the status of your board:

  • The board not powered on –  Press and hold the RECOVERY switch,  and connect a micro USB to USB cable to your PC. Note that If no recovery activity is found, the board will turn off after two minutes.
  • The board is powered on –  Plug an micro USB to USB cable to your PC first, then press and hold the RECOVERY switch, followed by the RESET switch on the other side of the board.

If you’ve connected Radxa board to your HDMI monitor / TV, you should see the recovery menu. Time to complete the last step, and flash the firmware:

The first time I had the error “No found any rockusb device,please plug device in!”, and it was time to go to bed. The next morning it worked just fine. So if you have the previous error message, you may want to reboot your Radxa board and/or your computer.

If you have error during upgrading, you can try to low level format the nand flash first with following command:

In case you only want to flash some partitions, you can use RKFlashKit instead. This GUI tool does not work with upgrade.bin, only with individual partition, e.g. system.img.

After successful firmware upgrade, you can reboot your board to start Android. Unfortunately in my case, the very last step did not go as expect, since the board is stuck during boot showing the animated logo forever. I’ve documented the issue in Radxa Rock Google Group. Time to give a try at build a Ubuntu image…

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX RK3588 mini-ITX motherboard
Notify of
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
10 years ago

thats cool i might get one of these boards just need to save up some money $$$

10 years ago

I’m curious on your opinions/experience running/compiling Ubuntu

Khadas VIM4 SBC