How to Build Android 4.4 for Rockchip RK3288 Devices (Tronsmart Orion R28)

After blowing up my ATX power supply, and learning such things as “FULL” power supplies do exists, I finally managed to build Android for Tronsmart Orion R28 using the provided SDK. I haven’t tried to load it on the device yet, but the build could complete successfully after following the steps below in Ubuntu 14.04. The SDK is probably not specific to one device, so it might just also work on other RK3288 TV boxes and tablets.

First download Android 4.4 SDK for RK3288, or use the one in the micro SD card provided with the Beta version of R28 Pro and Meta.

Install some dependencies:

Extract the SDK:

And build the kernel first:

  1. Enter the kernel directory:
  2. Change arch/arm/boot/dts/Makefile to use RK3288 device tree file instead of an RK3188 (may not be needed, but the build failed for me without that change…):

    It’s also quite possible you need to extract the device tree file from your firmware or device.
  3. Building the kernel and resources (device tree + logo) images:
  4. Done
    It will fail with:

    drivers/usb/dwc_otg_310/dwc_otg_hcd.c: In function ‘dwc_otg_hcd_rem_wakeup_cb’:
    drivers/usb/dwc_otg_310/dwc_otg_hcd.c:446:31: error: inlining failed in call to always_inline ‘dwc_otg_hcd_to_hcd’: function body not available

  5. Edit the culprit file, remove the inline directive, and continue the build:
  6. Similar errors will occur one or twice more, so repeat step 5 as needed….
  7. Create kernel.img (not sure the command line is correct)

Before building Android, you need to make sure you use the right version of Java. I recently build AOSP for ARMv8 which requires OpenJDK 1.7 in Ubuntu, but this version requires Oracle 1.6 SE.  At first I used JDK 6u45 (1.6.045), but I got some errors:

In file included from external/chromium_org/content/common/android/
out/target/product/rk3288/obj/GYP/shared_intermediates/content/jni/HashSet_jni.h:10:26: error: extra tokens at end of #ifndef directive [-Werror]

Based on a thread on XDA developer forums, I installed Java instead, which you can download here:

Now add the new Java version to the “alternatives”:

and make sure Java is used by default:

I’m not sure all six tools need to be configured, but it probably does no hurt to do so.

Finally, you just need to run a script to build Android:

Be patient, and it should finish with something like:

Creating filesystem with parameters:
Size: 1073741824
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 4096
Blocks: 262144
Block groups: 8
Reserved block group size: 63
Created filesystem with 1792/65536 inodes and 149182/262144 blocks
+ '[' 0 -ne 0 ']'
Install system fs image: out/target/product/rk3288/system.img
out/target/product/rk3288/system.img+out/target/product/rk3288/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p maxsize=1096212480 blocksize=135168 total=598297319 reserve=11083776
system filesysystem is ext4
make ota images...
create boot.img with kernel... done.
create recovery.img with kernel... done.
create misc.img.... done.
create system.img... done.
3288_4.4 sdk do finish

All relevant files can be found in rockdev/Image-rk3288 directory:

Next step is to flash it to the device, and see if it can boot.

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.
9 years ago

While you sleep the bugs will play?

Step 2: rk3288-box.dts not rk3288-box.dtb

Step 3: CROSS_COMPILE=/RK3288_R-BOX_ANDROID4.4.2-SDK_V1.0.0/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi

I tried this just for the kernel and got a screen displaying “Google TV” … in pink though as my device seems ,,,

9 years ago

No, use rk3288-box.dtb (I thought it fixed something else, but it didn’t!)

9 years ago


i downloaded the RK3288_R-BOX_ANDROID4.4.2-SDK_V1.0.0/ for Tronsmart.
I wan to to make a kernel for HPH RK3288 Box.
I extracted the kernel.dtb file and converted it to a *.dtd file from the resource.img. What must I do with this file now? Should I just make a normal kernel and flash the kernel and stock resource.img to my box?

9 years ago


Anyone already downloaded the Firefly RK3288 SDK and can only upload the kernel?
Here is the kernel seperate but it’s much older

it takes too long to download from baidu and cloning the repo takes ages.
Already have the Tronsmart SDK, since it was uploaded to mega.

9 years ago

If i try to install the dependencies i het this error in ubuntu ~$ sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.8-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev pngcrush schedtool libxml2 libxml2-utils xsltproc lzop libc6-dev schedtool g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline-gplv2-dev gcc-multilib libswitch-perl gcc-arm-linux-gnueabi lzop libncurses5-dev libssl1.0.0 libssl-dev Reading package lists… Done Building dependency tree Reading state information… Done E: Unable to locate package squashfs-tools E: Unable to locate package libxml2-utils E: Unable to locate package lib32readline-gplv2-dev E: Unable to locate package libssl1.0.0 E: Couldn’t find any package by regex ‘ libssl1.0.0’ kraakie256@ubuntu:~$ kraakie256@ubuntu:~$ Read more: What… Read more »

9 years ago

I found the problem copy paste issue thnx 🙂

But what i am wondering do i have to run make kenrel.img in the kernel folder or make make rk3288-box.img -j8 ? after the deconfig command of course ?

9 years ago

Managed to produce a binary under fedora using the toolchain in the SDK as 32b gcc would not compile. Hijacking the thread, does anyone know how to enable RT2X00 USB wifi modules? CONFIG_RT2X00=m gets overwritten when issuing make ARCH=arm. Ralink does not appear in make menuconfig.

9 years ago

To answer my own post, solved this by pulling /drivers/net/wireless/ Kconfig & Makefile from
the vanilla

9 years ago

There is a mistake in the article

sudo update-alternatives –install /usr/bin/javadoc javah /usr/lib/jvm/jdk1.6.0_27/bin/javah 1

should be

sudo update-alternatives –install /usr/bin/javah javah /usr/lib/jvm/jdk1.6.0_27/bin/javah 1

Khadas VIM4 SBC