[ROM] AndroidTV Pie Custom firmware by mo123

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/

Yes, I’m tested this version of parted from xda. I’ll look, maybe there are other versions. This one cannot accept parameters from a command string. I’m don’t tested gdisk for this purpose.
In android SD - /dev/block/mmcblk0 EMMC - /dev/block/mmcblk1

v1.4 not booted from SD too. If replace uboot in it from v1.2, then boot.

Just tried v1.4 on sd with my rock pi 4B 1.3 without SPI. Unfortunately it’s not booting. How do I check the uboot version on my rp?

Thanks @mo123 or your builds! I used the 1.3 the last few weeks and I was very happy with it.

replace uboot from older version

dd if=gpt_mo-1-3.img of=/dev/<your_SD_with_mo-1-4.img> skip=64 seek=64 count=$((32768-64)) 
1 Like

I think I will upload a new firmware with old u-boot behaviour, first sdcard then emmc boot without USB booting first like it always was, perhaps it fixes sdcard booting.

I hope Radxa can look into it next week so we get a better u-boot that boots emmc, sdcard and USB properly. It can be very useful for users that use sdcard booting for Android and want to run LibreELEC/Armbian from USB too.

It would be very good, if we can boot again from sd.

I’m new to this, I might do something wrong and know to little about it. I have a emmc as well, but it’s too painful to always take it off, as it’s sitting between board and heatsink, when I want to use another os. So simply I don’t use it.

I also bought a ssd, but the ribbon cable would cover the sd slot… so I don’t use it…

Is there no such thing like boot selection during the start?

Note: Slightly offtopic

One idea is to mount the extension board under the big heat sink! :slightly_smiling_face:
There is a post about it:

(big heatsink + standoffs from Rock Pi acrylic case can be used for it)

I faced the same issue. Recently I found a solution thats for me, which is to erase bootloader on eMMC to disable boot from it. Can give it a try if interested:

Its possible (but tedious) to remove the eMMC without removing the heatsink. A small screwdriver or spoon can be used to pluck or set it!

If you have any doubts, post about it in the respective topics!

Changing boot sequence will not help! While the old uboots are booting from SDcards