Announcement

Collapse
No announcement yet.

Announcement

Collapse
No announcement yet.

Station M2 RK3566 - AndroidTV 11 Custom ROM

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Station M2 RK3566 - AndroidTV 11 Custom ROM

    Station M2 RK3566 - AndroidTV 11 Custom ROM v1.2



    v1.2

    Add recent application menu
    (Double-click the home button to open)
    Add Exfat file system support
    Add mouse browsing support
    (Use an air mouse and hold down the OK/DPAD_CENTER button and move up/down to browse Chrome, Websites in Firefox and other browsers)

    v1.1 - 30-09-2021

    Fix 10-Bit H264 Playback
    Improve H265 Playback
    Fix HDR10+ Playback
    Better HDR playback in Kodi
    Add Frame-rate switching for Just Video Player, SmartTubeNext
    Add Top Row Shortcuts
    Removed debug menu from Settings
    Disable Play Protect
    Storage Permission for default apps
    Add HDMI support for recovery
    Remove ro.kernel.android.checkjni
    Fix: BitStream: display error in Chinese
    Increase default max password length to 64
    Add graphics_allocator use permission
    Allow proc for bluetooth
    Fix double ripple in Wifi selection
    Don't request render in GLSurfaceView.GLThread ctr
    Updated apps

    For auto frame-rate switching -
    Remember to Reboot the device after power-on from the long press power button on the remote or Settings - Device - Reboot for it to take effect.

    v1.0 - 08-09-2021

    AndroidTV 11 Bootanimation
    Fix Google apps
    HDMI CEC Support
    Fix HD Audio Passthrough
    Auto frame-rate switching support
    Color Mode Changing
    HDR Support
    Fix rotation for certain apps like TikTok
    Changed default keyboard to LeanKeyKeyboard
    Lots of UI optimizations to increase speed
    Kernel optimizations for improved speed
    Use App-Drawer app to access normal Android apps
    Preinstalled some apps
    Own App Store


    Flash Tool: Here
    Driver: Here
    Miniloader for boot: Here
    Download Link: Here
    Last edited by mo123; 10-26-2021, 05:20.

    #2
    How to Flash Firmware

    Only do this once for AndroidTV firmware or when installing Linux or a different Android OS version.
    In future you can just click Upgrade in 'Upgrade Firmware' and skip all the other steps.

    To download firmware to EMMC, we need to download Boot.img first, and then select to switch the storage to EMMC.
    The specific steps are as follows:

    Step 1: We need to get MiniLoaderAll.bin and download it.

    Step 2: Click the option Advanced Function in RKDevTool and then download the file MiniLoaderAll.bin to the Boot by clicking the button Download when MiniLoaderAll.bin has been selected in the Boot text box. See below:



    Step 3: Click the button List Storage to get the storage media list, the SPINOR is selected in the list, we click EraseAll to erase the Nor-Flash

    • X means device does not exist
    • 0 means the media exist, but is not selected
    • ? means the media exist and in the selected state
    Step 4: Select the storage media Emmc in the list and click the button Switch Storage



    The storage media Emmc state of the list will go from 0 to ?, indicating EMMC is selected. At this time, the firmware we download to the board will be burned into EMMC



    Step 5: click the button EraseAll to erase the EMMC



    Step 6: Click the option Upgrade Firmware?select the unzipped Android update.img we want to download and click Upgrade.



    Wait 5 minutes after Download Firmware completes and the bottom message shows 'Found One ADB Device'.

    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    For Kodi, Reboot the device for frame-rate settings to show.
    HD Audio passthrough - Enable HDMI BitStream in Sound Settings in Android and also enable all the codecs manually for it to show in Kodi.
    - In Kodi - Select IEC Kodi Passthrough instead of RAW to see all the passthrough options.

    For recents menu, use the Dashboard app.
    Google removed recent apps in Android 11 and it only works in the stock launcher, wonder how they will fix their own created problem since the AndroidTV 11 launcher doesn't have it's own built-in recent apps yet.

    Unlinked App Store - Type 'Stationpc' to access the store and install useful AndroidTV apps.
    Tell me some interesting AndroidTV or streaming apps to add that are free or open-source and legal.

    Last edited by mo123; 09-08-2021, 19:58.

    Comment


      #3
      Are you sharing the code changes? GitHub , gitlab?

      I would like to help , I have hk1 rbox r2 , 4g ram (ddr4) , have the device dtb ( and dts source ) , could be nice if we could start android from sd ( test before burn to Emmc .. )

      Comment


        #4
        hmm... cool and unexpected....

        Can't wait to test this firmware...or see a review of it
        Does it have a navigation bar? ( recent/home/back or notifications bar )

        -As for booting from sd, why not use Usb3 port...it should be alot faster ( for testing fw prior to flashing )

        Cheers

        Comment


        • mo123
          mo123 commented
          Editing a comment
          It is stock ATV, so no bottom bar.
          Maybe later I will experiment with tablet firmware.
          I included an app to give Notifications but it works differently then the stock Android notifications bar.
          You also get apps to add navigation bar support - https://apkpure.com/store/apps/details?id=nu.nav.bar
          Android can boot from micro-sd card with SDDiskTool.
          Booting can be done from emmc, micro-sd card, USB and SSD in future since there is a SPI NOR flash storage to select the booting device on startup.

        #5


        or this even could be nicer , to install , or load different systems, kind of os boot manager

        you can’t boot from usb3 / usb

        usb power is off , and it turns on only after uboot/kernel is loaded. ( from tests I’ve done )

        boot order is SD. , EMMC

        Comment


        • mo123
          mo123 commented
          Editing a comment
          There is already SPI NOR flash on the Station M2 to boot from any storage and select the boot device on startup.
          Linux methods used by the RBP 4 is not suited for Android or Rockchip devices and will need lots of changes to work.
          Perhaps a better way is Krescue used by RK3399, maybe it will get new chipset support in future.

        #6
        This is nice work ...

        I have a few questions ...

        where are all the changes done documented ? Source?

        this rom was built for station m2 , using firefly-roc-pc dts/dtb file

        is it possible , maybe , to share all the changes , sources , or maybe build roms for each rk3566 android box device using the dtb sources inside of each device firmware files?

        this rom will work ONLY on m2 , don’t try to load it on your android box

        if I upload my device dts ‘ or dtb , can you recompile your source , with my dts?

        I tried sddiktool , and created the sd memory having sd boot checked ... with a firmware image of my device ( which is installed already so I know it works ) to be sure it loads

        and it didn’t load ... get the android icon with “ no command “ message , instead of android starting



        not sure this tool makes a working bootable android on SD , it looks like it just builds an upgrade/restore tool on sd , not a system load

        so back to my question .. is it possible to recompile if I provide my dts file?
        Last edited by Trigu75; 09-09-2021, 07:11.

        Comment


          #7
          I finally soldered cables to UART on my device (HK1 rbox r2) , connected to my usb-ttl , connected to it using 1500000 as speed

          so if anyone interested ... I can now debug ..

          this is the console while booting android

          Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.


          mo123 ... if I give you my device DTB file , can you make an image for it? or what exactly is needed for the people releasing Roms / OS to create images I can test from SD card .. or from emmc after I backup the entire emmc (will dd work as backup of the whole memory? )

          Comment


            #8
            Updated v1.1 ROM
            Video Playback is now better than on Amlogic S905x3/x4.

            Comment


              #9
              Originally posted by mo123 View Post
              Updated v1.1 ROM
              Video Playback is now better than on Amlogic S905x3/x4.
              Better in what way??? Skeptical :/

              Comment


                #10
                RiCkLaR_atvX

                ​​​​​​​Stock rk356x firmware, 2 months or older is horrible and lots of videos can't even open or play. Most generic rk356x devices won't get any updates or the manufacturers will just compile the same firmware with 10 month old code with a different date.
                That why I only use development boards.
                If you use a no name device, an Amlogic one would provide some better playback if none gets updated.
                WIth the latest Rockchip firmware, the bugs are no more and video playback is similar and in some instances better.

                Just generic info:

                Rockchip color output is more vivid than Amlogic.
                Don't know if it's hardware or software but on Amlogic color look looks a little duller or more blue tinted.
                I think only Ugoos has options for color management and not stock Amlogic firmwares, but I usually check with the default set values.

                HD audio passthrough 7.1 channels is also supported by default on Rockchip A11 in the latest release and not in stock Amlogic firmwares.

                Auto frame-rate also supported without any root access needed on Rockchip A11 using Google API developed for it. Only Ugoos Amlogic devices can use it without root, other Amlogic devices need root and 3rd party apps which are not fully optimized and not using the existing Android framework.

                Motion and movement in video playback feels slightly more natural on Rockchip A11 compared to Amlogic.

                10-Bit H264 hardware decoding and only software decoding on Amlogic devices with high CPU usage and skipped frames.

                Also 64-Bit OS support compared to 32-Bit OS.

                Open-source vendor kernel codec drivers including hardware deinterlace driver with regular bug-fixes and improvements, also compatible with Linux.Older devices like RK3399 using mainline Linux Kernel codec drivers already with great video playback.
                LibreELEC gave up on Amlogic VPU driver support since it was a hot mess. Only CoreELEC with custom older kernel drivers together with Kodi video code hacks work correctly.

                Some S922x devices do support Dolby Vision now which is lacking on all Rockchip devices which make them better in that regard. AV1 is also going to take years to adopt since all smart tv's will need to use new chips and it will only be useful on Google Certified devices using L1 Widevine streaming services. Most PC's also can't play back 4K AV1. So this is just a marketing gimmick. Another 2 generations of Amlogic, Rockchip devices would have to be released before AV1 is more used I think.

                Comment


                  #11
                  All this sound great , I managed to run armbian for station m2 on my hk1 rbox r2 device using the extracted dtb file from my device firmware ..

                  could you help me ( in private if you want or in public ) I would like to try to load your mods on my device , I have soldered uart and have full control of the board from console , so I could even try to load it manually , typing commands on uboot ...

                  I believe these mods could work on all the different rk2566 android boxes ....

                  or maybe .. could you build the same room but using my dtb ? I can upload it somewhere

                  ‘I just don’t want to erase my Mmc , and the sdcard is also recognized as mmc (Mmcblk0 and mmcblk1). I noticed rockchip is constantly updating their GitHub ... but as you said l vendors don’t bother to release new firmwares

                  Comment


                  • mo123
                    mo123 commented
                    Editing a comment
                    The manufacturer mentioned something that their firmware, sdk only works on their devices.
                    Most of the fixes, Rockchip made themselves and any device vendor that just updates their sdk(a one line command) and builds new firmware would get the new fixes included. Best is to contact the manufacturer of HK1 boxes after the Chinese holiday to release updated firmware.

                  #12
                  mo123 thanks for the deeper dive into why you feel the RK356x is better, some valid points, but the premium price these new RK chips and dev boards are selling at is the only reason I've stayed away from them.

                  More Questions:

                  * With this Station_M2 if you add an M.2-SSD drive does it actually fit inside that tight slim case?

                  * Or would you have to get the Station_P2 to have more room for the SSD to be inside the case without modification?

                  * Can Android boot from the M.2-SSD?

                  Comment


                    #13
                    Originally posted by RiCkLaR_atvX View Post
                    mo123 thanks for the deeper dive into why you feel the RK356x is better, some valid points, but the premium price these new RK chips and dev boards are selling at is the only reason I've stayed away from them.

                    More Questions:

                    * With this Station_M2 if you add an M.2-SSD drive does it actually fit inside that tight slim case?

                    * Or would you have to get the Station_P2 to have more room for the SSD to be inside the case without modification?

                    * Can Android boot from the M.2-SSD?
                    I was also curious but think the M2 uses M.2 Type 2242, it is a small form factor SSD(didn't know they existed) compared to the normal thin, longer ones you see everywhere which won't fit.
                    I'll try to get more info in 10 days of actual M2 SSD's that it was tested with, how to fit it and if it still fits in the case.

                    The Station M2 has a whole slot where you can slide in a normal size ssd which would make it better to use for 24/7 Linux OS's or OpenWRT Router, server etc.
                    RK3568 has OpenWRT support and 2 ethernet ports.

                    They have SPINOR flash chips which make things interesting and can help with multi-boot.
                    In future, after the Chinese holiday(maybe end Oct), better multi-boot will be available then you can boot Linux or Android from emmc, micro-sd and m.2/SSD easily without any Rockchip tools that need specific bootloaders, recoveries and flash tools etc.

                    It's just a pity for each new chipset, they don't already have mainline Linux support.
                    RK3399 devices now have mainline Linux support and it makes it so much easier to just use a new Linux OS with full GPU and VPU acceleration.
                    I hope for RK356x devices it won't take too long but the 4.19 vendor kernel has full GPU, VPU support at least for now.

                    Comment


                      #14
                      I don’t know which manufacturer mentioned anything about “their sdk”

                      and it’s abvious they say that they want to sell their device, The core is the same ...

                      i dont understand why are you so closed ...

                      I am able to manually boot from usb , network, Emma , and sd cart just by tying different command on my uboot prompt


                      the dtb file is what configures the device tree , the answer used ... , the only difference I see between m2 and my device ... is my wifi chip , it uses hk5325f

                      armbian image for m2 works great (4.19) using my dtb file ... on that side it’s easy to boot , i’t just a file name inside a configuration file

                      but not the case with android images

                      m2 and my device are both rk3566

                      all I asked is , where can I find the sources of all your changes so I can rebuild the image but using my dtb file

                      i’ve Been able to run smooth video playback under armbian after compiling all their drivers (libmali , libdrm , Librga , mpp , xserver , ffmpeg with rkmpp support , mpv )

                      and all from firefly , and rockchip

                      Comment


                        #15
                        this is my device uboot env ... as you can see everything gets configured on the fly .. it tries mmc1 (sd) then mmc0 (mmc) , then usb0 (first usb storage device mounted on usb port) pxe , dhcp (bootp)

                        I was able to boot the same armbian station m2 image ... just burned on sd , or usb , or as image from network

                        I want to boot yours ( with my device dtb )


                        => env print
                        arch=arm
                        baudrate=1500000
                        board=evb_rk3568
                        board_name=evb_rk3568
                        boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
                        boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}extlinux/extlinux.conf
                        boot_net_usb_start=usb start
                        boot_prefixes=/ /boot/
                        boot_script_dhcp=boot.scr.uimg
                        boot_scripts=boot.scr.uimg boot.scr
                        boot_targets=mmc1 mmc0 usb0 pxe dhcp
                        bootargs=storagemedia=emmc androidboot.storagemedia=emmc androidboot.mode=normal androidboot.dtb_idx=0 androidboot.dtbo_idx=0
                        bootcmd=boot_fit;boot_android ${devtype} ${devnum};run distro_bootcmd;
                        bootcmd_dhcp=run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;
                        bootcmd_mmc0=setenv devnum 0; run mmc_boot
                        bootcmd_mmc1=setenv devnum 1; run mmc_boot
                        bootcmd_pxe=run boot_net_usb_start; dhcp; if pxe get; then pxe boot; fi
                        bootcmd_usb0=setenv devnum 0; run usb_boot
                        bootdelay=0
                        cpu=armv8
                        devnum=0
                        devtype=mmc
                        distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
                        eth1addr=aa:63:fe:2e:2a:22
                        ethaddr=a6:63:fe:2e:2a:22
                        fdt_addr_r=0x0a100000
                        kernel_addr_c=0x04080000
                        kernel_addr_no_low_bl32_r=0x00280000
                        kernel_addr_r=0x00280000
                        mmc_boot=if mmc dev ${devnum}; then setenv devtype mmc; run scan_dev_for_boot_part; fi
                        partitions=uuid_disk=${uuid_gpt_disk};name=uboot,s tart=8MB,size=4MB,uuid=${uuid_gpt_loader2};name=tr ust,size=4M,uuid=${uuid_gpt_atf};name=misc,size=4M B,uuid=${uuid_gpt_misc};name=resource,size=16MB,uu id=${uuid_gpt_resource};name=kernel,size=32M,uuid= ${uuid_gpt_kernel};name=boot,size=32M,bootable,uui d=${uuid_gpt_boot};name=recovery,size=32M,uuid=${u uid_gpt_recovery};name=backup,size=112M,uuid=${uui d_gpt_backup};name=cache,size=512M,uuid=${uuid_gpt _cache};name=system,size=2048M,uuid=${uuid_gpt_sys tem};name=metadata,size=16M,uuid=${uuid_gpt_metada ta};name=vendor,size=32M,uuid=${uuid_gpt_vendor};n ame=oem,size=32M,uuid=${uuid_gpt_oem};name=frp,siz e=512K,uuid=${uuid_gpt_frp};name=security,size=2M, uuid=${uuid_gpt_security};name=userdata,size=-,uuid=${uuid_gpt_userdata};
                        pxefile_addr_r=0x00e00000
                        ramdisk_addr_r=0x0a200000
                        rkimg_bootdev=if mmc dev 1 && rkimgtest mmc 1; then setenv devtype mmc; setenv devnum 1; echo Boot from SDcard;elif mmc dev 0; then setenv devtype mmc; setenv devnum 0;elif mtd_blk dev 0; then setenv devtype mtd; setenv devnum 0;elif mtd_blk dev 1; then setenv devtype mtd; setenv devnum 1;elif mtd_blk dev 2; then setenv devtype mtd; setenv devnum 2;elif rknand dev 0; then setenv devtype rknand; setenv devnum 0;elif rksfc dev 0; then setenv devtype spinand; setenv devnum 0;elif rksfc dev 1; then setenv devtype spinor; setenv devnum 1;fi;
                        scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;
                        scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done
                        scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.conf; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
                        scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
                        scriptaddr=0x00c00000
                        soc=rockchip
                        stderr=serial,vidconsole
                        stdout=serial,vidconsole
                        usb_boot=usb start; if usb dev ${devnum}; then setenv devtype usb; run scan_dev_for_boot_part; fi
                        vendor=rockchip

                        Environment size: 3881/32764 bytes

                        Comment

                        Working...
                        X