在RK3588开发板上使用AIC(Android IN Container)!

系统: https://github.com/Joshua-Riek/ubuntu-rockchip

镜像1: shangzebei/rk3588
感谢shangzebei ( https://github.com/rk-docker/rk-gpu )
issue https://github.com/remote-android/redroid-doc/issues/362

镜像2: chisbread/rk3588-gaming:redroid-firefly
感谢malior团队 https://github.com/ChisBread/malior#malior-redroid
以及zhz https://zhz.moe/57/

docker-compose.yml

version: "3"
services:
  android:
    image: shangzebei/rk3588
    container_name: android
    network_mode: bridge
    privileged: true
    restart: always
    stdin_open: true
    tty: true
    volumes:
      - /root/app/android/data:/data
      - /dev/mali0:/dev/mali0
    ports:
      - 5555:5555
    # devices: # 不要用device传递/dev/mali0!
    command:
      - androidboot.redroid_width=2560
      - androidboot.redroid_height=1440
      - androidboot.redroid_dpi=480
      # - androidboot.redroid_gpu_mode=auto
      - androidboot.redroid_gpu_mode=host # 用shangzebei/rk3588的话选mali
      # - androidboot.redroid_net_proxy_type=static
      # - androidboot.redroid_net_proxy_host=x.x.x.x
      # - androidboot.redroid_net_proxy_port=7890
      # - androidboot.redroid_net_proxy_exclude_list=localhost;127.*;10.*;172.16.*;172.17.*;172.18.*;172.19.*;172.20.*;172.21.*;172.22.*;172.23.*;172.24.*;172.25.*;172.26.*;172.27.*;172.28.*;172.29.*;172.30.*;172.31.*;192.168.*
# 有这两个能运行安卓容器
grep binder /proc/filesystems
grep ashmem /proc/misc

# 安装v4l2loopback, 创建/dev/video1
sudo apt install v4l2loopback-dkms
sudo modprobe v4l2loopback video_nr=1

# 安装scrcpy最新版
# for Debian/Ubuntu
sudo apt install ffmpeg libsdl2-2.0-0 adb wget \
                 gcc git pkg-config meson ninja-build libsdl2-dev \
                 libavcodec-dev libavdevice-dev libavformat-dev libavutil-dev \
                 libswresample-dev libusb-1.0-0 libusb-1.0-0-dev
git clone https://github.com/Genymobile/scrcpy
cd scrcpy
./install_release.sh
scrcpy --tcpip=127.0.0.1 --v4l2-sink=/dev/video1 --video-codec=h265 --video-encoder='c2.rk.hevc.encoder' # --no-video-playback --window-borderless
root@nanopc-t6:/# cat /etc/systemd/system/bilibili.service 
[Unit]
Description=BilibiliLiver
After=android-display.service
Requires=android-display.service

[Service]
WorkingDirectory=/home/canoziia/app/bilibili
ExecStart=/home/canoziia/app/bilibili/BilibiliLiver
Restart=always
# SyslogIdentifier=BilibiliLiver Tool
Type=simple

[Install]
WantedBy=default.target
root@nanopc-t6:/# cat /etc/systemd/system/android-display.service 
[Unit]
Description=Android Display
After=docker.services
Requires=docker.services

[Service]
ExecStart=scrcpy --tcpip=127.0.0.1 --v4l2-sink=/dev/video4 --video-codec=h265 --video-encoder='c2.rk.hevc.encoder' --no-video-playback --require-audio
# --v4l2-buffer=300
Restart=always
Type=simple

[Install]
WantedBy=default.target
version: "3"
services:
  android:
    image: shangzebei/rk3588
    container_name: android
    network_mode: bridge
    privileged: true
    restart: always
    volumes:
      - /Data/android/data:/data
      - /dev/mali0:/dev/mali0
    ports:
      - 5555:5555
    # devices: # 不要用device传递/dev/mali0!
    command:
      - androidboot.redroid_width=1440
      - androidboot.redroid_height=2560
      - androidboot.redroid_dpi=480
      # - androidboot.redroid_gpu_mode=auto
      - androidboot.redroid_gpu_mode=mali
      - androidboot.redroid_net_proxy_type=static
      - androidboot.redroid_net_proxy_host=192.168.31.2
      - androidboot.redroid_net_proxy_port=7890
      - androidboot.redroid_net_proxy_exclude_list=localhost;127.*;10.*;172.16.*;172.17.*;172.18.*;172.19.*;172.20.*;172.21.*;172.22.*;172.23.*;172.24.*;172.25.*;172.26.*;172.27.*;172.28.*;172.29.*;172.30.*;172.31.*;192.168.*


# grep binder /proc/filesystems
# grep ashmem /proc/misc
# # for Debian/Ubuntu
# sudo apt install ffmpeg libsdl2-2.0-0 adb wget \
#                  gcc git pkg-config meson ninja-build libsdl2-dev \
#                  libavcodec-dev libavdevice-dev libavformat-dev libavutil-dev \
#                  libswresample-dev libusb-1.0-0 libusb-1.0-0-dev
# git clone https://github.com/Genymobile/scrcpy
# cd scrcpy
# ./install_release.sh
# scrcpy --tcpip=127.0.0.1 --v4l2-sink=/dev/video1 --video-codec=h265 --video-encoder='c2.rk.hevc.encoder'

暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇