Dich

Dich

不专业的专业博客人,记录知识与感想

Android TV Tinkering Notes

Introduction: Due to the high price of Apple TV and the proliferation of advertisements for ordinary TV boxes, an open-source, multi-functional native Android TV box has gradually become an essential artifact for smart homes. In order to meet the needs of IPTV, YouTube, home theaters, and the expectation of a visually pleasing TV wall, here are some key points for installing Android TV (referred to as ATV below).


Preparation:

  1. An ATV image, here we use Android TV x86 9.0 made by Tosathony, which supports Android TV Remote and can download Google Play Store. https://pan.baidu.com/s/17eDDrf4WzWVmrc9hLw-c_w?pwd=a728
  2. Our old friend Rufus disk writing tool: https://www.423down.com/10080.html
  3. Android TV Remote mobile remote control software: https://android-tv-remote-control.en.softonic.com/android
  4. Tiny ADB software https://androidmtk.com/tiny-adb-and-fastboot-tool#installer
  5. Some installable software:
    Dangbei Market: https://www.dangbei.com/apps/
    Bilibili TV version: https://www.fenxm.com/104.html
    Kodi: http://www.kodiplayer.cn/
    ATV Launcher: https://www.fenxm.com/592.html

Installation process:

  1. Writing to disk, BIOS boot
  2. Use Rufus to write the downloaded ATV image to a USB flash drive.

Screenshot 2023-08-08 192002-1

  1. Insert the USB flash drive into the target host and set the BIOS boot priority. The key to enter the BIOS is different for different devices, mostly F2 or DEL, which is not elaborated here.

  1. Start installation
  2. After successful boot, you can see the following interface:

Screenshot 2023-08-08 at 19-29-21 c2d2c57dfc5ef5ad

  1. We choose automatic installation:

Screenshot 2023-08-08 at 19-40-08 f7ee7f8aa0c14758

  1. After running the code, enter several options, choose "yes" all the way, and select the ext4 file system;

Screenshot 2023-08-08 at 19-42-05 6dc053cc9c2e3b63

Screenshot 2023-08-08 at 19-43-17 55c7f7ad8c601f94-1

Screenshot 2023-08-08 at 19-43-46 7624577aa81561f6

Then run ATV and unplug the USB flash drive;

Screenshot 2023-08-08 at 19-43-43 d808178eaca37d27-1


  1. Enter the Google interface
    Due to problems with the domestic network environment, some interfaces cannot be accessed. You can use the following methods or global science.
  2. If you are stuck on the Google logo screen or the animation is slow, or if you cannot enter the ATV interface after restarting, you need to set it to "Windows 8.X" or "Android" in BIOS-Advanced-OS selection.

Screenshot 2023-08-08 at 19-57-29 d60e5b9ec6b7ab35-1

  1. Then you can see the PayPal interface. Here, you can enter the command line interface by pressing Ctrl+Alt+F1 and then enter pm disable com.tosanthony.tv.networkprovider (note the space), press Enter to execute, and then press Ctrl+Alt+F7 or F8 to return to the graphical interface.

Screenshot 2023-08-08 at 20-01-41 30114ccd999549b7

  1. Next, we can see the automatic update interface, where we need to disable it:
    Similarly, enter the command line interface by pressing Ctrl+Alt+F1, then enter pm disable com.google.android.tungsten.setupwraith (note the space), press Enter to execute, and then press Ctrl+Alt+F7 or F8 to return to the graphical interface.

Screenshot 2023-08-08 at 20-04-13 a70389748af52063

  1. At this time, you will enter a WiFi interface. If you are using a wired connection, there is no problem, or you can use the keyboard to connect to your home WiFi. The author was stuck here for a long time because the industrial control computer does not have a WiFi module.
  2. Now we can see that we have entered the ATV desktop.

Screenshot 2023-08-08 at 20-08-28 883097b62b26ca42


Four, install software and set up desktop startup

  1. First, in the settings, find "Settings" > "Device Preferences" > "About", then click on "Build" several times to unlock the "Developer Options", and then turn on the USB debugging switch.

Screenshot 2023-08-08 at 20-15-25 Android-tv-about

Screenshot 2023-08-08 at 20-15-29 Android-tv-enabl

  1. Then, in Settings > Device Preferences > About > Status, find and note the IP address, then use Tiny ADB to connect to it, using the command adb connect , and then authorize the connection on the ATV side;

Screenshot 2023-08-08 at 20-29-15 Set-up-adb-wirel

Screenshot 2023-08-08 at 20-18-32 Android-tv-allow-1

  1. Then use the command adb install to upload the software package to be installed, or you can drag the file to the command prompt window to copy its path, and press Enter to confirm.

Screenshot 2023-08-08 at 20-29-15 Set-up-adb-wirel-1

Here are some commonly used ADB commands:
adb reboot restarts the Android device.
adb reboot recovery restarts the device in recovery mode.
adb push copies a file from your PC to your Android device.
adb shell wm density changes the pixel density of the display.
adb kill server disconnects the connection between the PC and Android TV.
4. If there are some software packages that cannot be installed, you can enable the ARM compatibility layer. The specific method is to download houdini.sfs from dl.android-x86.org/houdini/9_y/houdini.sfs, rename the file to houdini9_y.sfs, and then copy it to the USB flash drive. Enter the command line interface, enter ls to find the storage directory, enter cd storage to enter your USB flash drive, enter ls to view the houdini9_y.sfs file you copied, and copy it to that directory.
cp houdini9_y.sfs /system/etc
enable_nativebridge
reboot

5. After installing some software packages, we find that we need to replace the default desktop of ATV in order to form a poster wall effect, which is similar to switching desktop environments in Linux. Note: Before replacing, other desktops must have been installed!!!! (such as ATV Launcher) We use the command pm disable-user --user 0 com.google.android.tvlauncher to disable Google's default desktop. Then restart, and you will see the following poster wall:

IMG_20230618_165041_edit_9748826070386


Postscript: About some open-source projects of ATV:
Android TV Google official TV library
https://github.com/googlesamples/leanback-showcase
Smart TV, TV box development SDK
https://github.com/boxmate/tvframe
Selected frame switching animation for TV
https://github.com/EZJasonBoy/FocusChangeAnimation
Imitation of the latest TV version of Taijieting Metro UI effect. Imitation of Tencent Video TV version (Cloud Listening and Aurora) list page
https://github.com/hejunlin2013/TVSample
TV common effect controls, including focus, border processing, etc.
https://github.com/evilbinary/Tvwidget
Android TV, box, projector controls
https://github.com/FrozenFreeFall/Android-tv-widget
TV project common tools (focus issues, adaptation issues, etc.)
https://github.com/genius158/TVProjectUtils

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.