[ROM] AndroidTV Pie Custom firmware by mo123

Hi @mo123 really great work. Some questions (don’t have rock PI yet)
1: have you seen rock pi 1.4 has support to boot nvme? so can we follow the basic instructions to install your OS to nvme by default?
2: Does your OS build have hardware video decoding in Nova Player / others or is it software?

I have a standard chinese android tv media box and the issue is for H265 or high efficiency encoded videos the video player always drop frame and doesn’t play properly so this is a question for changing to rockpi + your os

Hi

Kodi works great.
HD Audio passthrough is supported - DTS, AC3, EAC3, DTS-HD, DTS-HD MA & True-HD
Auto frame-rate switching is supported so videos play at the correct frame-rate eg. 23.976hz, 24hz, 25hz, 50hz, 60hz
8/10-Bit H264, 8/10-bit H265, VC1, VP9, Mpeg2, Mpeg4, HDR are all supported with hardware acceleration using less than 20% CPU usage.

Nova Video Player is also fully supported.
I recently asked the developer to add 10-bit color video playback for Rockhip devices and it was added quickly. So things work great with this video player, auto frame-rate switching also works with it.

You can also use LibreELEC if you want even better performance and also 1080p Netflix playback(but this is software decoded since it’s Linux, so you need the big heatsink for Netflix).

I don’t use an NVME, but other users has succcess in booting it and Radxa can also help you if you have problems when they are back after the holidays.

That’s great.

I like Android TV OS so wanted to buy Raspberry PI 4 but they don’t support android tv
which is how I found ROCK Pi & your rom so thanks again for your work

You mentioned spoofing Xiaomi in v1.3 does this mean it’s possible to get Netflix HD (android app) by default?

Netflix only works in 940px540p resolution in Android.
You need a Widevine L1 license and Netflix contract to play higher which Netflix doesn’t allow on open-source devices and the manufacturer has to sell a minimum of 3 million devices a year which is impossible for most companies.

But 1080p is supported in LibreELEC well since it’s Linux.
I’m working on getting a dual-boot Android/LibreELEC firmware firmware up where it’s easier to switch between the 2 OS’s, but I’m waiting for extra help since it’s a complicated process.

I see understood.
Does your rom have 24FPS auto framerate switching working?

On my alfawise h96 android box (amlogic s912 cpu) this is a problem.
So some videos there is stutter/frame drop when playback.

Yes, 23.976, 24, 29.97, 59.94hz can play correctly in Kodi and Nova Video Player.
You can also map a key on a USB keyboard, airmouse to work with the RefreshRate app in the firmware then you can press this key when in an app eg. MxPlayer, Netflix, IPTV app to manually switch to any frame-rate. If you know the video is eg. 25/50hz(EU) or 23.976hz(US) then you can manually switch to this frame-rate so it doesn’t play at 60hz which will cause stuttering.

Here is also a link to LibreELEC I made, will update it in future

Nice got it.
Any plan to add TWRP recovery for easier backup and flash partitions?
Will allow to backing up data partition when upgrading rom builds you release

Hi
I tested mo123’s firmware boot from NVME.

My ssd is HP EX900.
and, Android 9 radxa official image booted from NVME completely.
U-boot is here.
https://wiki.radxa.com/Rockpi4/install/android-NVME

Result
v1.1 booted. But the home screen flashed.
v1.2 logo showed, but crashed
v1.3 logo showed, but crashed

I will test v1.0 later.

Hi

I’m going to make an update at the end of the week.
Not sure if it will help with NVME booting, but maybe it will work better.

khm … I’m tested booting your android from console from radxa uboot with boot_android mmc 0 and has no image on the screen, should it be like that? Your android works only with own uboot?

p.s. Already understood myself, need uboot only from radxa android github.

I think for Linux, it uses - https://github.com/radxa/u-boot/commits/rk3399-pie-gms-express-baseline
and for Android it uses - https://gitlab.com/rockchip-group/rk/u-boot/-/commits/rk3399-pie-gms-express-baseline/

There are 3 nvme commits I see from 4 March 2020 onwards that are missing in the Android u-boot, maybe it’s causing the crash on nvme devices.
I will just check my u-boot, maybe it’s already changed or Radxa hasn’t updated it in the SDK to use newer code yet.

sorry for the late answerß
the image fro December works well. but not the DS4 controller.

later I didnot had time t test further .

greetings

I’m interest with other case, multiboot. I’m maked uboots from radxa linux and android githubs. With First uboot don’t boot android, with second don’t boot radxa linux. Truly the left leg does not know what the right foot is doing :wink:

yes, with android uboot firstly android booted. Need replace sequence of booting
bootcmd=boot_android ${devtype} ${devnum};bootrkp;run distro_bootcmd;
to
bootcmd=run distro_bootcmd;boot_android ${devtype} ${devnum};bootrkp;
. I’m already tested. Tomorrow I’ll wait, today is Friday night :wink:

Khm … uboot, that I maked yesterday, working in my system with emmc. With android image on new SD android isn’t boot. Make please in your project following changes in rockchip-common.h for test.

#define BOOT_TARGET_DEVICES(func) \
	BOOT_TARGET_USB(func) \
	BOOT_TARGET_MMC(func) \
	BOOT_TARGET_RKNAND(func)
/*	BOOT_TARGET_PXE(func) \
	BOOT_TARGET_DHCP(func) */
#define RKIMG_BOOTCOMMAND \
	"run distro_bootcmd;" \
	"boot_android ${devtype} ${devnum};" \
	"bootrkp;"

Changelog v1.4

Magisk patched by default
Speed optimizations
Updated apps
Added Dashboard - Use it to change the All Apps screen when Long pressing Home or clicking on the red Apps icon.
Added Notifications app - Now you can see notifications like on regular Android
Add Navigation bar app - Open it and enable the Accessibility Service to have a navigation bar
Removed Safe Volume, volume should now stay at 15 steps
Added Setup on first start - Google account needed
Fix auto frame-rate switching
Changed animation speeds so that the spinning wheel in some apps play smoother
Add SmartYoutube, Youtube Vanced
Improve Mele F10 airmouse - Bottom row keys now control Rewind, Stop, Play/Pause, Forward & the 1st key second bottom row now opens menus in apps.
Add USB booting change of rua1

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

2 Likes

thanks, It worked :slight_smile: !!! Your img I put on emmc, on usb ( Usb3.0 bottom port ) put libreelec by balbes150

U-Boot 2017.09 (Feb 24 2020 - 05:23:26 +0200)
starting USB...
USB0: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1o get usb phy
Port not available.
USB4:   USB EHCI 1.00
USB5:   USB OHCI 1.0
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 1 for devices... RKPARM: Invalid parameter part table
2 USB Device(s) found
scanning bus 2 for devices... 1 USB Device(s) found
scanning bus 3 for devices... 1 USB Device(s) found
       scanning usb for storage devices..
            Type: Removable Hard Disk
            Capacity: 3750.0 MB = 3.6 GB (7680000 x 512Scanning usb 0:1...
Found /extlinux/extlinux.conf
Retrieving file: /extlinux/extlinreading /extlinux/extlinux.conf
214 bytes read in 25 ms (7.8 KiB/s)
1:      LibreELEC
Retrieving fireading /KERNEL
17948680 bytes read in 782 ms (21.9 MiB/s)
append: boot=LABEL=Ltty0 coherent_pool=2M cec.debounce_ms=5000
reading /dtb/rockchip/rk3399-rock-pi-4.dtb-pi-4.dtb
54559 bytes read in 38 ms (1.4 MiB/s)
##############################################
#                 LibreELEC                  #
#            https://libreelec.tv            #
##############################################

LibreELEC (community): devel-20200201153248-6e9040d (RK.arm)
LibreELEC:~ # df -h
Filesystem                Size      Used Available Use% Mounted on
devtmpfs                  1.8G      4.0K      1.8G   0% /dev
/dev/sda1               511.7M    131.5M    380.2M  26% /flash
/dev/loop0              105.0M    105.0M         0 100% /
/dev/sda2                 3.0G      7.3M      3.0G   0% /storage

p.s. Android I have not tested yet. I do everything remotely. Console connected to raspberry pi :wink:

1 Like

Thanks for the great news.
I previously put USB booting first but it didn’t seem to work.
Not sure why changing ‘#define RKIMG_BOOTCOMMAND’ too makes USB boot work correctly.
It would be great to know from you or someone else if Android also boots from USB correctly or just Linux OS’s.

Maybe someone can also check if Android boots from NVME storage?
I didn’t add all the changes from u-boot with additional nvme changes since the firmware failed to boot but might try again if it’s not working.

No, no android booted from usb. This uboot propably works only witth msdos partitions on usb, not gpt … and work if it located on emmc. I’m writed it on the SDCard , and then usb with libreelec don’t found. When this uboot is on SD, it does not boot Android from emmc. Some wonder things here.

Yesterday I tested the android a little. The volume level is remembered during settings from the TV remote. Root is installed immediately in the magisk settings. Thanks @mo123 for the work!
I’m installed parted in /system/bin and now I can change boot flags from android. But onscreen keyboard don’n work in terminal :frowning:

Hi

Can you check if other terminal apps work better with the onscreen keyboard?
Apps should be downloadable from the APKPure app in the firmware.
https://apkpure.com/material-terminal/yarolegovich.materialterminal
https://apkpure.com/termux/com.termux

Otherwise it might be a problem with the keyboard app I use, then you can try a different onscreen keyboard app like
https://apkpure.com/gboard-the-google-keyboard/com.google.android.inputmethod.latin
Then in Android Settings, just change the default keyboard in Input Settings to Gboard instead of Leankey Keyboard Pro.

For commands you type in the terminal
Can you check if you can save the commands and run it as a script with the scriptmanager app or a similar app?
https://apkpure.com/script-manager-smanager/os.tools.scriptmanager
If it works and you have useful scripts to share, I can link the scripts to help other users.

parted
Is it already in firmware? I didn’t check.
If not where can I download it to include in the firmware.
Will this work?


and you put it in /system/bin with 664 permission?
I read somewhere, they say gdisk is better than parted, can you check if not used it before if it’s better or not?
http://www.rodsbooks.com/gdisk/