[ROM][Android9.0][RockPI 4A/B] Android TV firmware released

@Lili: I’m still seeing the gles crash with Kodi. Do you think you can look at getting the fixed libgles_mesa.so into the build?

Details in this thread;


We will communicate with rockchip first. If this is the final solution, we will add it into build.

Hi, thank you for providing us such a good and stable android TV firmware. I have a problem in Vol+ and Vol- button in the remote controller. I also try to adjust volume using a multimedia keyboard, but still doesn’t work. How can I change the volume in android TV 9 ? Many thanks for your help.

@chisteven : You use the remote that came with your television. HDMI outputs are not supposed to be volume adjusted. This behavior is set to be consistent with both HDMI and with Nexus Player (which is the best reference for an “as intended” Android TV box).

This would be different for an Android TV device that is actually built in to a TV or a sound bar, since with those platforms, the HAL will directly be able to signal the amplifier.

Now there is a way around this, which is to integrate the audio HAL with CEC. However, CEC volume control on TV’s is somewhat hit-or-miss, CEC support in RockPi4/Rock960 is not all there yet, and it would require a good amount of work in the audio HAL to implement.

According to documentation; https://source.android.com/devices/tv/hdmi-cec , the audio HAL is expected to hook into CEC for sending volume controls.

And here; https://android.googlesource.com/device/asus/fugu/+/refs/heads/master/libaudio/HDMIAudioOutput.cpp#68 , this is a stub for a function (which is never called from anywhere) that is supposed to actually implement this for Fugu (Nexus Player). Apparently, they never completed the code for it.

And it doesn’t appear that there is any provision at all in the rockchip audio HAL for volume controls. They straight up use the audioflinger soft volume controls.

It looks like that Fugu code was misleading me. Its not the audio HAL that is supposed to send the command, its the audio SERVICE, which has a link to HdmiControlService. That being the case, nothing needs to be implemented in the audio HAL at all. It might just work, if (a) CEC is working, which seems to, at least partially, and (b) if the TV supports volume-via-CEC.

And HERE is the code that does just that: https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/services/core/java/com/android/server/audio/AudioService.java#1792

And it looks like the only condition on activating that code is having the FEATURE_HDMI_CEC declared in the system (which it is): https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/services/core/java/com/android/server/audio/AudioService.java#953

Now here is the awkward part;

Basically means that if we set the device for fixed volume (as Nexus Player does), then the volume-via-CEC code will never be executed. A few weeks ago, I suggested setting that because the volume was essentially not working at all. But now that CEC is enabled, I wonder if it will bypass the software volume control and go straight to CEC?

I’ll have to look into that and see what the right way to handle it is.

Thank you for your reply. Because I use a PC monitor (which has built-it speakers) as a display, there is no remote to adjust the volume.T.T Also, we sometimes use a 2.4 GHz wireless remote controller (Air Mouse) to control the Android TV. Use the remote that came with the television to adjust volume is inconvenient. Therefore, I do hope that the Android TV 9 is allowed to control its volume like Android TV 7! Thank you!

If your monitor can’t receive CEC commands, then there is no way to send it a command to change the volume anyway. Nothing can be done about this. You might want to look into buying an actual television, if you want it to behave like one.

Hi, can it be installed on any TV?
I have a JVC android TV but the Google Services stopped working and the TV is barely usable.
Does any of you know what I can do to fix it?
I can’t even find the original firmware for it.

It can be installed on any TV… that has a working HDMI port.

I have tested it on a “real” TV with CEC enabled on both TV and Rock Pi. However, still no response on the volume up, volume down, and the mute keys.

I installed a key mapping app and noticed that the key code of these keys can not be detected, so I mapped other keys to Vol+ and Vol- functions, but still no luck.

If the android system is allowed to send volume commands via HDMI when CEC is enabled, while it is allowed to adjust the system volume when CEC is disabled, that would be great.

This developement board and the firmware is perfect to me, except for the volume issue. :disappointed_relieved:

Like I said, the CEC is hit or miss at this point. I have a TV that responds to CEC volume keys with a Nexus Player, but with this, all I see in the log are errors. I have another TV that doesn’t respond to CEC volume keys on ANYTHING, but all the other CEC is working as expected (i.e., press “HOME” and it powers the TV on and sets the proper input).

What you are suggesting regarding choosing to send CEC vs digitally adjusting the volume, is not possible. This would break volume for EVERY HDMI device that doesn’t support CEC.

Think about it like this; In order to have a digital volume control pre-HDMI, it would require you to set the receiver volume to 100%. Most receivers will hum loudly at 100%, and if you decided to switch inputs to a correctly behaving input, you would find it suddenly blasting sound at maximum volume. That would be HORRIBLE.

If your receiver has its own volume control, then YOU MUST USE THAT VOLUME CONTROL, whether it supports CEC or not. It is contrary to HDMI to digitally manipulate the volume before the wire. HDMI sound output should ALWAYS be full range with 0 dB adjustment.


Want to try this new August version, is there way to upgrade rather than Build from scratch ??

“RKUPDATE 9” I noticed this mentions update ??

I guess you want to keep user data.
No, that’s the official rockchip image format.
The latest version has partition changes, So we need to rewrite the image.

Hey @Lili : The latest build broke the sound again. There is a software volume control that has been enabled, which means that wrong audio level is being sent to HDMI.

Some people would like to be able to adjust the volume, can you modify the framework to fix this bug?

Unfortunately, the side effect of this is that most people, which is probably everyone using TV build, is going to have no sound at all from this.

Perhaps a reasonable compromise would be to apply the setting based on whether it is a TV build (fixed volume) or Tablet build (volume control).

Ideally, it would be able to use a hardware mixer based volume control, applying only to analog output, but unfortunately, Android only supports hardware mixer based volume control in its automotive implementation: https://source.android.com/devices/automotive/audio/audio-control#configure-volume

I hesitate to suggest frameworks changes to handle use case issues, however, you could implement a workaround like this;

If you change this line;
mUseFixedVolume = mContext.getResources().getBoolean(com.android.internal.R.bool.config_useFixedVolume);

to something like this;
mUseFixedVolume = SystemProperties.getBoolean("persist.service.audio.useFixedVolume", true);

Then switching between fixed and non-fixed volume would be a simple matter of running “setprop persist.service.audio.useFixedVolume false” – which could also be added as a checkbox in some settings menu.

hi please want to know if i can install it on RK3229 ? thank you

It’s impossible as the flashtools will refuse to flash it because it detects that you have a RK3229 chipset and not a RK3399.


Hi @evenxiao

No problems with Google apps.
What problems do you experience?
VPN, Firewall not blocking Google apps perhaps?