Pull people into the pit, run the Rcok5B article of the Android system under the Linux system

Application background, lack of Linux applications, poor software, and ugly software,

There has been such a demand for a long time, and it has been realized as early as 2017. The Android software is directly installed and run on deepin, and it runs normally. The mechanism seems to be xDroid

Now that I have a piece of rock5B, I have to run the Android system, open the software, and then I have the following

本文的方案是GitHub - remote-android/redroid-doc: ReDroid (Remote-Android) is a multi-arch, GPU enabled, Android in Cloud solution. Track issues / docs here

 

file

The Linux system of rock-5b does not enable ashmem_linux and binder_linux by default, and the commands below are invalid

apt install linux-modules-extra-`uname -r`
modprobe binder_linux devices="binder,hwbinder,vndbinder"
modprobe ashmem_linux

The solution is to recompile the kernel to enable the above support by default

The general process is

Pull the source code > compile the kernel > package > install > experience

Install compilation tools

sudo apt-get update
sudo apt-get install -y git  device-tree-compiler libncurses5 libncurses5-dev build-essential libssl-dev mtools bc python dosfstools bison flex rsync u-boot-tools

Pull the source code

mkdir ~/rk3588-sdk && cd ~/rk3588-sdk
git clone -b linux-5.10-gen-rkr3.4 https://github.com/radxa/kernel.git --depth=1
git clone -b master https://github.com/radxa/rkbin.git --depth=1
git clone -b debian https://github.com/radxa/build.git --depth=1

Configure compile options,

cd ~/rk3588-sdk
cd kernel
make rockchip_linux_defconfig
make menuconfig

A dialogue box will pop up,

Device Drivers -> Android -> Android Drivers is checked, the pop-up binder ipc driver is checked, and the binderfs filesystem is also checked, so that the binder module is compiled. Then go back to the previous level, go to Staging Drivers, enter Android, and check Enable the Anonymous Shared Memory Subsystem, so ashmem is also done.

回到最上一级,General Setup -> CPU/Task time and stats accounting -> Pressure stall information tracking, also check the

After selection, press TAB to switch the bottom option, and then saveyou exitcan execute the next command, save the configuration

make savedefconfig
cp defconfig arch/arm64/configs/rockchip_linux_defconfig

The next step is to compile the kernel,

cd ~/rk3588-sdk
sudo ./build/mk-kernel.sh rk3588-rock-5b

Package the kernel (please note that a parameter of the following command represents the minor version number)

sudo ./build/pack-kernel.sh -d rockchip_linux_defconfig -r 39

take myself as an example

5.10.110-39-rockchip-g0a544b8c7

Among them, 39 is the parameter I filled in at that time,

The requirement is that this number must be higher than your current version, otherwise there will be an exception, and you need to configure startup boot and other things

inquiry mode

uname -r

After the execution is complete, install the deb package in the ~/rk3588-sdk/out/packages directory.

The command is as follows

cd ~/rk3588-sdk/out/packages

sudo dpkg -i linux-image-5.10.110-39-rockchip-g0a544b8c7_5.10.110-39-rockchip_arm64.deb
sudo dpkg -i linux-image-5.10.110-39-rockchip-g0a544b8c7-dbg_5.10.110-39-rockchip_arm64.deb

Restart the system to view the current system information

uname -r, whether it has changed

The next step is to pull the official image under docker and run the image

docker run -itd --rm --privileged \
    --pull always \
    -v ~/data:/data \
    -p 5555:5555 \
    redroid/redroid:13.0.0-latest

Install the adb tool, and screen projection software scrcpy

Use adb network debugging to connect,

adb connect rock-5b.lan

scrcpy

You can experience the Android system on rock5b,

Note that after the container is running, it will take a few minutes before it can be used normally. During these few minutes, it cannot be connected normally.

At the same time, I am using the debian system. It may be because of the use of xfce, the GPU is not driven normally, and the Android experience is stuck. You can try a launcher and a desktop.

Install the GNOME desktop (it is said that the GPU driver is turned on)
sudo tasksel install desktop gnome-desktop
set the default graphical login manager
sudo dpkg-reconfigure gdm3
set the default desktop
sudo update-alternatives --config x-session-manager

Conclusion, personal test, relatively smooth

unofficial mirror

Introduction to the use of docker-dobox/free version - Suyunfei
https://docs.suyunfei.com/archives/docker-dobox-mian-fei-ban-shi-yong-jie-shao

References

Using redroid on rock5b - SeeFlowerX
https://blog.seeflower.dev/archives/203/#comment-52

Remember the process of deploying Redroid (cloud phone) on OrangePiZero2 (OrangePiZero2)_OrangePiZero2_CNflysky's blog-CSDN博客

Guess you like

Origin blog.csdn.net/u013833472/article/details/129485916