[ROM] AndroidTV Pie Custom firmware by mo123

thx again,

I was successful to reinstall Magisk and copy the two files Vendor_054c_Product_05c4.kl and Vendor_054c_Product_09cc.kl.

I restartet the device, but the controller still dos not work.

even after reconnect, it does not work

its a cuh-zct2e DualShock 4 controller.

something more i cloud to?


On a PC

And on Android
Open a Terminal app(there should be one in the AppDrawer already) enter the command
cat /proc/bus/input/devices

Now you will see the vendor id and product id codes of the remote.
Please paste the output.

When you copied the remote files, can you check their file permissions, it must be read/write, read, read.

Hi Mo,

The controller is connected via Bluetooth, but it is not lkistenet as a device.

the two files have rw- r-- r-- 644 permission

do i need to install an extra driver?


Are you successful to do the initial bluetooth connection with the PS4 controller and RockPi 4?
“Hold down the Share and PS buttons simultaneously until the light bar begins to flash white to connect to bluetooth.”

Please check if you can do the steps here on a PC to get the remote’s information if you have a bluetooth dongle.

Or run this command in Android in a terminal app after connecting with bluetooth and share the output.
cat /proc/bus/input/devices

I only have Xbox controllers so can’t test any PS3/4 remotes.

I will upload a new firmware soon, also with an extra 20 game controllers support.


thats the Hardware ID when connected to windows via usb:

only connected to Bluetooth its shown as generic Bluetooth device

I connected it several times to the rockpi, but it isn’t listed as device, I used an app and I check it in the shell via adb.

Hi @pumuckll

Can you test this firmware?

I upgraded the bluetooth and Sony drivers and added the DS4 keylayout files.
Perhaps the Bluetooth DS4 controller works now.
You can also try to copy the keylayout files I sent last and root and overwrite them if needed, can use the existing patched boot image you already made on existing firmware.

I also have other Sony DS4 keylayout files I will upload, I found somewhere, some keys seem to be mapped differently then the Lineageos files previously posted, so I’m not sure which ones will work the best.

@mo123 Can you add one small patch to the build process ?

Yes, just tell the patch to add.

Move the launch string from USB before the SD (mmc) string. This will allow to easily run any images from USB on your firmware (without the need to have a working u-boot specifically for RockPi in the image). :slight_smile:

1 Like


Seems I already added the change.
I tried LibreELEC booting from all 4 USB ports with Android on micro sd-card(with u-boot patch) but Android still boots every time.
EMMC is empty.
So perhaps something is different on the RockPi 4?
It would be very interesting to get it working, would make booting different OS’s a lot easier.

Show the UART startup log.

I hope someone will be able to test my Android image([ROM] AndroidTV Pie Custom firmware by mo123) on emmc or micro-sd card and try to boot with USB with a LibreELEC/Armbian image and can post the uart logs.
Link to LibreELEC to be written to USB with etcher - https://yadi.sk/d/xhF45Z3BK-joGA/KODI-19/kernel-5/20191203

Unfortunately I don’t have a uart cable to get the logs.

1 Like

Hi Mo
sry I could not test before

now I could, but the link is down

Is this the same link?

looks like the Password is “radxa” is wrong


You can try the new link

I have a problem with CEC. It works after boot. But if I switch to TV and then back to HDMI, it stops working.

Now this is no longer relevant, I ordered a set RockPi and will be able to get all the necessary information and tests. :sunglasses:

That’s fantastic.
Will be great to be able to boot from USB in future.

Changelog v1.2

  • Fixed bootlogo causing green stripes on some 4K displays
  • Reduced image size from 4.6GB to 4.0GB - should flash 13% faster now
  • Fixed Google Play Store new layout to use the top Apps/Games/Updates/Settings menu correctly. Seems it’s a server side switch by Google and not everyone gets updated to the new layout.
  • Removed additional stock apps not needed
  • Changed DPI to 320 for a better AndroidTV experience
  • Updated to latest video codecs
  • Added some extra HDMI CEC properties. Hope it can fix the not working after resume issue.
  • Changed AppDrawer icon
  • Updated to the latest Magisk Manager
    Patch your boot.img and then click 5 times on build Info under the About menu to activate Developer Options. In Developer Options choose Flash image and select the /Download/magisk_patched.img and then select the boot partition. Restart your device for Magisk to work.
    Or you can boot to TWRP Recovery and flash the Magisk.zip file
  • Add RefreshRate switching for any app
  • Check the useful guide on how to make it work.
    Guide for AndroidTV Firmware by mo123
  • Add KeyMapper application I build from the latest source code.
    This is an open-source app, so it replaces the Button Mapper app I used previously in the Useful guide screenshots since it doesn’t have limitations. Check the AppDrawer to open it.
    You can map the power off menu, screenshot and Google Assistant(if you have a voice button on your airmouse)
  • Add CetusPlay server app so you can use your phone as a remote control for AndroidTV.
    Install the client app on your phone - https://play.google.com/store/apps/details?id=com.cetusplay.remotephone

Additional remote apps for your phone
General AndroidTV remote - https://play.google.com/store/apps/details?id=fr.bouyguestelecom.remote
Kodi remote - https://play.google.com/store/apps/details?id=org.leetzone.android.yatsewidgetfree
Casting videos - https://play.google.com/store/apps/details?id=com.ionitech.airscreen
Screen mirroring - HappyCast: Install the tv box version to RockPi 4 and then the phone app to your phone. http://www.hpplay.com.cn/index_english.jsp
The phone app is now translated from Chinese to English, you can also use an app like BubbleUPnP to cast videos from your phone to the Happycast server app on RockPi 4 if installed, it sometimes works better than the built-in app to receive videos.

I would suggest you to use BubbleUPnP(https://play.google.com/store/apps/details?id=com.bubblesoft.android.bubbleupnp&hl=en_US) or another casting app and then set Kodi up as a UPnP receiver(https://www.youtube.com/watch?v=GFBHi6DSCQc) then videos can be played in Kodi for much better performance.

  • Add Kodi and Nova Video Player app preinstalled.
    Nova is a very decent video player app with poster art, subtitle download, network playback, auto frame-rate switching and audio passthrough and works better than VLC & MXPlayer. Check the useful guide to use it optimally.
  • Improved auto frame-rate switching accuracy and removed unused resolutions.
    Check the useful guide for Kodi setup.
  • Youtube Vanced login support added so you don’t have to use the rooted versions.
    You must install the MicroG and Youtube Vanced app to be able to login.
    (Youtube Vanced gives a phone layout without ads compared to SmartYoutubeTV that has an AndroidTV layout)

Other changes

  • Fix bootanimation stack overflow
  • Add missing INTERACT_ACROSS_USERS_FULL permission for SettingsProvider
  • Use Cloudflare DNS as the default fallback
    (Cloudflare DNS has a better privacy policy than Google Public DNS and
    has DNS-over-TLS and DNS-over-HTTPS so it won’t be a downgrade)
  • SystemUI: Remove annoying log caused by AOSP bug
  • Fix refreshing storage summary after force stop
    (if app is force stopped, current implementation causes a nasty loop which in turn causes
    very high cpu usage)
  • setDequeueTimeout(-1) on the output surface. This ensures that allocation blocks in ACodec.
  • Remove battery log
  • Do not build Traceur
  • drm/rockchip: vop: fix dclk invert register define error
  • rkwifi: fixed wifi onoff crash
  • rkwifi: fix pno scan failed
  • fix race between input event and governor exit

If it feels a little slow after booting, just set the resolution manually again.
If Radxa can create a script that runs on bootup 5 seconds after the Android homescreen appears that resets the resolution to what it currently was, it will help a lot and I will include it in future.

Download link: https://mega.nz/#!RdNAHKLY!pU57DI-li47H4ZPRb4oZNW3duW1DGRkAnv3MgRxiEU8
Password: radxa
Use 7zip to unzip and flash with etcher.


Changelog v1.3

  • Decreased animation time by 50% for AndroidTV.
    Should be a lot snappier now.
  • Fixed slow AndroidUI on every boot caused by fractional frame-rates(finally)
    No need to manually set the resolution anymore.
  • Spoof Xiaomi device to improve compatibility for apps.
    Still need to use Magisk if wanting to fully spoof a device but adds a little better compatibility out of the box.
  • Nova Video Player updated
    – Support 10-Bit H265 video playback on Rockchip devices now
    – Support 10-Bit H264 software decoding now used by Anime videos.
    (1080p support still wip)
  • Updated video codecs

Other changes

  • mmc: core: Fix init of SD cards reporting an invalid VDD range
  • clk: fractional-divider: add handle to frac numerator is not to be greater than 4
  • soc: rockchip: ipa: Fix temperature scaling coefficient overflow
  • drm: call mode_set hooks when connectors change
  • drm/rockchip/rk618: hdmi: remove main interrupt polarity setting
  • drm/rockchip: cdn-dp: Reject non-32-bits-aligned mode widths
  • drm/bridge: analogix_dp: set IRQ_NOAUTOEN to the irq flag
  • drm/bridge: synopsys: dw-hdmi: check hdmi status in resume
  • drm/rockchip: vop: p2i is supported from rk3399
  • drm/rockchip: vop: workaround a issue of px30 treat rgb888 as bgr888
  • drm/rockchip: drv: use for_each_available_child_of_node for child iterator
  • drm/rockchip: rk3066_hdmi: set edid fifo address fix edid reading err when edid’s block > 2
  • drm/rockchip: vop: initial enable vop dither up for rgb565/666 can dither to rgb888
  • MALI: midgard: Fix power coefficient overflow
  • clk/rockchip: rk618: enlarge buffer size for clk name
  • clk: rockchip: half-divider: Use DIV_ROUND_UP to round divisor values
  • clk: rockchip: rk3399: Update the isp clocks
  • video/drm: rockchip_display: add return value for automatic test
  • video/drm: rgb: set lcdc data[15:12] output
  • clk: rk3399: fix up the i2c clk error
  • video/drm: rgb: add S888 mode support
  • power: io-domain: Don’t printf sudev->name when get regulator failed
  • regulator: pwm: remove init voltage setting
  • clk: rockchip: rk3399: init 816 MHz for ARM big core

Download link: https://mega.nz/#!tEUR3QAJ!X9hXXkWx2nkzTM2E4kaTrcL8CtYkTO_GRTohnXvFjZA
Password : radxa
Use 7zip to unzip and flash with etcher.

Boot.img: https://mega.nz/#!9RMTxKCI!kkDM709Qcw9rKGLJwWNZA9eCPawfZBhF01cvfZIg6_g
(If you want to patch it with Magisk. Flash the patched image then through Developer Settings, Flash Image and choose Boot)

1 Like

Changelog v1.3

and a link to the old version 1.2 :slight_smile: