Android Tv Guide

Posted skdev

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Android Tv Guide相关的知识,希望对你有一定的参考价值。

1 Source

Rock4/downloads - Radxa Wiki

Rockpi4/rockpi-android9 - Radxa Wiki

2 Rockchip flashing tools

https://dl.radxa.com/tools/windows/RKDevTool_Release_v2.81.zip

3 Android 9 TV

3.1 Establishing a Build Environment

android's source code primarily consists of Java, C++, and XML files.

To compile the source code, you'll need to install OpenJDK 8, GNU C and C++ compilers, XML parsing libraries, ImageMagick, and several other related packages.

Ubuntu 16.04 64bit

   radxa$ apt-get update -y && apt-get install -y openjdk-8-jdk python python-pip git-core gnupg flex bison gperf build-essential \\

          zip curl liblz4-tool zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 \\

          lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache \\

          libgl1-mesa-dev libxml2-utils xsltproc unzip mtools u-boot-tools \\

          htop iotop sysstat iftop pigz bc device-tree-compiler lunzip \\

          dosfstools vim-common parted udev lzop rsync

   radxa$ pip install pycrypto

Configure java environment

   radxa$ export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64

   radxa$ export PATH=$JAVA_HOME/bin:$PATH

   radxa$ export CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar

3.2 Repo

   radxa$ echo "export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/'" >> ~/.bashrc

   radxa$ source ~/.bashrc

   radxa$ curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo -o /tmp/repo -k

   radxa$ sudo cp /tmp/repo /usr/local/bin/repo

   radxa$ sudo chmod +x /usr/local/bin/repo

3.3 Get source

export GIT_SSL_NO_VERIFY=1

git config --global user.email "you@example.com"

git config --global user.name "Your Name"

radxa:rockpi4-android9$ repo init -u https://github.com/radxa/manifests.git -b rockpi-box-9.0 -m rockpi-release.xml

   radxa:rockpi4-android9$ repo sync -d --no-tags

添加环境变量

sudo vi /etc/enviroment

JAVA_HOME=”/usr/lib/jvm/java-8-openjdk-amd64”

PATH=”$JAVA_HOME/bin:$PATH”

CLASSPATH=”$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar”

SSL_CERT_DIR=”/etc/ssl/certs”

Issue 1

Traceback (most recent call last):

  File "/home/thornton/work/rockpi4-android9/.repo/repo/main.py", line 42, in <module>

    from git_config import RepoConfig

  File "/home/thornton/work/rockpi4-android9/.repo/repo/git_config.py", line 774

self._Set(f'superproject.key', value)

Solution:

apt-get install libffi-dev

wget http://www.openssl.org/source/openssl-1.1.1.tar.gz --no-check-certificate

./config shared zlib

make

sudo make install

sudo /sbin/ldconfig

sudo reboot

wget https://www.python.org/ftp/python/3.7.12/Python-3.7.12.tar.xz

./configure --enable-loadable-sqlite-extensions

Make

sudo make install

Issue 2

fatal: error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)

Solution:

sudo apt-get update -y

sudo apt-get install ca-certificates

sudo update-ca-certificates --fresh

export SSL_CERT_DIR=/etc/ssl/certs

Issue 3

fatal: unable to access 'https://github.com/radxa/manifests.git/': gnutls_handshake() failed: The TLS connection was non-properly terminated.

Solution:

git config --global --unset http.proxy

git config --global --unset https.proxy

4 Build

4.1 Build u-boot

$ cd u-boot

$ make distclean

$ make mrproper

$ ./make.sh rk3399

$ cd ..

The generated images are rk3399_loader_v_xxx.bin , idbloader.img and uboot.img

4.2 Building kernel

$ cd kernel

$ make ARCH=arm64 rockchip_defconfig

$ make rk3399-rockpi-4b.img -j$(nproc)

$ cd ..

The generated images are boot.img:

boot.img android p system as root boot.

4.3 Building AOSP

$ source build/envsetup.sh

$ lunch rk3399-userdebug

# build Android TV

$ lunch rk3399_box-userdebug

$ make -j$(nproc)

It takes a long time, take a break and wait...

4.4 Generate images

$ ln -s RKTools/linux/Linux_Pack_Firmware/rockdev/ rockdev

$ ./mkimage.sh

4.5 Generated Image

 radxa$ cd rockdev

   radxa$ ln -s Image-rk3399_box Image

./mkupdate.sh

./android-gpt.sh

4.6 Usb driver

https://wiki.radxa.com/Rockpi4/dev/usb-install

以上是关于Android Tv Guide的主要内容,如果未能解决你的问题,请参考以下文章

如何在 Android TV 主屏幕上为当前正在运行的任务设置图标和标题

Android TV-电视开发知识点速览

Android TV开发焦点移动源码分析

Android TV开发总结TV上屏幕适配总结

Android TV 应用无法安装在 Android TV 设备上

Smart TV、Android TV 和 Fire TV 的一种语言