✅ Magisk Delta 👉 https://github.com/redroid-rockchip/vendor_magisk
✅ Virtual radio 👉 https://github.com/redroid-rockchip/vendor_redroid_ext2/tree/master/ril
Thanks to @chenzhu005774 for providing vlte to support 4G internet access
- if you can't access the internet via 4G, you need to configure the APN.
- go to Settings -> Network & internet -> Internet -> setting logo -> Access Point Names
- click the menu in the upper right corner and select "Reset to default"
✅ Virtual wifi 👉 https://github.com/redroid-rockchip/vendor_redroid_ext/tree/master/wifi
mac80211_hwsim
kernel module in host
✅ Virtual gps 👉 https://github.com/redroid-rockchip/vendor_redroid_ext/tree/master/gps
adb shell 'echo "LatitudeDegrees=30.281026818001678" > /data/vendor/gps/gnss'
adb shell 'echo "LongitudeDegrees=120.01934876982831" >> /data/vendor/gps/gnss'
adb shell 'echo "AltitudeMeters=1.60062531" >> /data/vendor/gps/gnss'
adb shell 'echo "BearingDegrees=0" >> /data/vendor/gps/gnss'
adb shell 'echo "SpeedMetersPerSec=0" >> /data/vendor/gps/gnss'
✅ Virtual battery 👉 https://github.com/redroid-rockchip/vendor_redroid_ext/tree/master/battery
adb shell 'echo 88 > /data/vendor/battery/power_supply/battery/capacity'
Virtual camera
Virtual sensor
Enable webview debug
Spoof device ids
Disable ssl pinning
✅ Create secure display 👉 https://github.com/redroid-rockchip/aosp_frameworks_native/commit/19a55ccc777db1bce1e3cd27e3bb39296d146cf4
...
sudo docker run -itd --privileged \
--name redroid \
-v ~/data:/data \
-v /dev/mali0:/dev/mali0 \
-p 5555:5555 \
iceblacktea/redroid-arm64:12.0.0-241218 \
androidboot.redroid_gpu_mode=mali \
androidboot.redroid_radio=1 \
androidboot.redroid_wifi=1 \
androidboot.redroid_wifi_gateway=7.7.7.1/24 \
androidboot.redroid_magisk=1
Param | Description | Default |
---|---|---|
androidboot.redroid_width |
display width | 720 |
androidboot.redroid_height |
display height | 1280 |
androidboot.redroid_fps |
display FPS | 30(GPU enabled) 15 (GPU not enabled) |
androidboot.redroid_dpi |
display DPI | 320 |
androidboot.redroid_net_ndns |
number of DNS server, 8.8.8.8 will be used if no DNS server specified |
0 |
androidboot.redroid_net_dns<1..N> |
DNS | |
androidboot.redroid_gpu_mode |
choose from: mail , guest ;guest : use software rendering;mail : use GPU accelerated rendering |
guest |
androidboot.redroid_radio |
enable radio 1: enable; 0: disable |
0 |
androidboot.redroid_wifi |
enable wifi 1: enable; 0: disable |
0 |
androidboot.redroid_wifi_gateway |
wifi gateway (avoid conflicts with the local network's subnet) | 7.7.7.1/24 |
androidboot.redroid_magisk |
enable magisk 1: enable; 0: disable |
0 |
#####################
# fetch code
#####################
mkdir ~/redroid && cd ~/redroid
repo init -u https://github.com/redroid-rockchip/platform_manifests.git -b redroid-12.0.0 --depth=1 --git-lfs
repo sync -c
# apt install git-lfs and then
repo forall -g lfs -c git lfs pull
#####################
# create builder
#####################
cd ~/ && git clone https://github.com/remote-android/redroid-doc.git
cd redroid-doc/android-builder-docker/
docker build --build-arg userid=$(id -u) --build-arg groupid=$(id -g) --build-arg username=$(id -un) -t redroid-builder .
#####################
# start builder
#####################
docker run -it --rm --hostname redroid-builder --name redroid-builder -v ~/redroid:/src redroid-builder
#####################
# build redroid
#####################
cd /src
. build/envsetup.sh
lunch redroid_arm64-userdebug
# 我们编译的是rk3588,用的gpu是mali-G610
# 但是hardware/rockchip/librkvpu/omx_get_gralloc_private/Android.go没有定义mali-G610
# 所以此处选择同用bifrost库的mali-G52
export TARGET_BOARD_PLATFORM_GPU=mali-G52
export TARGET_RK_GRALLOC_VERSION=4
# start to build
m
#####################
# create redroid image in *HOST*
#####################
cd ~/redroid/out/target/product/redroid_arm64
sudo mount system.img system -o ro
sudo mount vendor.img vendor -o ro
sudo tar --xattrs -c vendor -C system --exclude="./vendor" . | DOCKER_DEFAULT_PLATFORM=linux/arm64 docker import -c 'ENTRYPOINT ["/init", "androidboot.hardware=redroid"]' - redroid
sudo umount system vendor
Export redroid image to board
docker save redroid | ssh [email protected] docker load
[Experimental] Build & Run Redroid
- Install Python3, Git, Docker, Docker Compose
wget -qO- get.docker.com | bash
sudo apt-get update
sudo apt-get install -y python3 python3-pip git docker-compose-plugin
- Install linktools library and add redroid repository
python3 -m pip install -U "linktools[container]"
ct-cntr repo add https://github.com/ice-black-tea/cntr-mobile # fetch code from remote repository
ct-cntr add redroid # add redroid containers
ct-cntr config set \
REDROID_COUNT=3 \
REDROID_GPU_MODE=mali \
REDROID_VIRTUAL_WIFI=true
ct-cntr up # start redroid containers
Build the redroid image for the first time
ct-cntr add redroid-builder # add redroid-builder container
#####################
# create and start builder
#####################
ct-cntr config set REDROID_BUILD_PATH=~/redroid # set the path to store source code
ct-cntr config # check whether the docker configuration is correct
ct-cntr up # start redroid-builder container
#####################
# fetch code
#####################
ct-cntr exec redroid-builder init-repo -u https://github.com/redroid-rockchip/platform_manifests.git -b redroid-12.0.0
ct-cntr exec redroid-builder sync-repo
#####################
# build redroid
#####################
ct-cntr exec redroid-builder build-rk3588
#####################
# create redroid image
#####################
ct-cntr exec redroid-builder make-image
Build the redroid image for the second time
ct-cntr update
ct-cntr up # update code from remote repository
ct-cntr exec redroid-builder sync-repo
ct-cntr exec redroid-builder build-rk3588 # build redroid
ct-cntr exec redroid-builder make-image # create redroid image
Export the redroid image to rockchip
docker save redroid | ssh [email protected] docker load