[Bug Report] Redroid16 failed on AWS Ubuntu 22.04 and 24.04 ARM
Hello,
Glad to see that redroid 16 has been released.
Now I've used Amazon AWS EC2 Ubuntu ARM Server, and followed the deploy document to test it, and find bugs.
docker run -itd --rm --privileged \
--pull always \
-v ~/data16:/data \
-p 5555:5555 \
--name redroid16 \
redroid/redroid:16.0.0-latest
Test 1. For Ubuntu 20.04 ARM (the official Amazon AMI image, ami-00143d563a951c8e4)
Everything goes fine! Perfect!
Test 2. For Ubuntu 22.04 ARM (the official Amazon AMI image, ami-0c96d7d095577f8de)
2-1. While input modprobe ashmem_linux, it prompts modprobe: FATAL: Module ashmem_linux not found in directory /lib/modules/6.8.0-1029-aws. Clearly, it is because "removed since 5.18".
2-2. While using scrcpy to connect redroid 16, it failed as the following:
C:\Users\Administrator\Downloads\scrcpy-win64-v3.3.1>scrcpy -s 3.142.210.32:5555 --audio-codec=flac
scrcpy 3.3.1 <https://github.com/Genymobile/scrcpy>
INFO: FLAC audio: audio buffer increased to 120 ms (use --audio-buffer to set a custom value)
INFO: ADB device found:
INFO: --> (tcpip) 3.142.210.32:5555 device redroid16_arm64
C:\Users\Administrator\Downloads\scrcpy-win64-v3.3.1\scrcp... file pushed, 0 skipped. 65.2 MB/s (90788 bytes in 0.001s)
[server] INFO: Device: [redroid] redroid redroid16_arm64 (Android 16)
[server] ERROR: Attempt to invoke virtual method 'android.view.InputDevice android.hardware.input.InputManagerGlobal.getInputDevice(int)' on a null object reference
java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.InputDevice android.hardware.input.InputManagerGlobal.getInputDevice(int)' on a null object reference
at android.view.KeyCharacterMap.load(KeyCharacterMap.java:367)
at com.genymobile.scrcpy.control.Controller.<init>(Controller.java:86)
at com.genymobile.scrcpy.Server.scrcpy(Server.java:114)
at com.genymobile.scrcpy.Server.internalMain(Server.java:267)
at com.genymobile.scrcpy.Server.main(Server.java:215)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:371)
ERROR: Could not retrieve device information
ERROR: Server connection failed
2-3. Following the Troubleshooting instructions, here are the debug blobs: ubuntu22.04arm-redroid16-debug.skiJivYf.zip
Test 3. For Ubuntu 24.04 ARM (the official Amazon AMI image, ami-019eeff96c2865995)
3-1. While input modprobe ashmem_linux, it prompts modprobe: FATAL: Module ashmem_linux not found in directory /lib/modules/6.8.0-1029-aws. Clearly, it is because "removed since 5.18".
3-2. While using scrcpy to connect redroid 16, it failed as the following:
C:\Users\Administrator\Downloads\scrcpy-win64-v3.3.1>scrcpy -s 3.144.172.57:5555 --audio-codec=flac
scrcpy 3.3.1 <https://github.com/Genymobile/scrcpy>
INFO: FLAC audio: audio buffer increased to 120 ms (use --audio-buffer to set a custom value)
INFO: ADB device found:
INFO: --> (tcpip) 3.144.172.57:5555 device redroid16_arm64
adb: error: connect failed: closed
ERROR: "adb push" returned with value 1
ERROR: Server connection failed
3-3. Following the Troubleshooting instructions, here are the debug blobs: ubuntu24.04arm-redroid16-debug.o2q7Zq1u.zip
So, any ideas about the failure of Redroid 16 on Ubuntu 22.04 and 24.04 ARM? Is it caused by the ashmem_linux? @zhouziyang @brunoaduarte
Many thanks!
Hi @titusbiao , in my case I'm running Redroid12 (x86) on a Ubuntu 24.04 and it works fine.
As ashmem_linux was removed from Linux, only binder_linux will be available, but that should not be an issue, just use memfd instead.
androidboot.use_memfd=true
docker run -itd --rm --privileged \
--pull always \
-v ~/data16:/data \
-p 5555:5555 \
--name redroid16 \
redroid/redroid:16.0.0-latest \
androidboot.use_memfd=true
ubuntu@ubuntu:~$ lsmod | grep _linux
binder_linux 233472 659
Also try connecting to the running docker instance and check logcat to see what's going on
docker exec -it <container_id_or_name> logcat
Hello @brunoaduarte
Thanks for the reply.
Redroid 12-15 run well on Amazon Ubuntu 22.04 and 24.04 ARM. The problem just occurs on Redroid 16.
Following your instructions, adding androidboot.use_memfd=true has no luck. It will still prompt as below (no matter using --audio-codec=flac or --no-audio):
C:\Users\Administrator\Downloads\scrcpy-win64-v3.3.1>scrcpy -s 18.225.56.12:5555 --audio-codec=flac
scrcpy 3.3.1 <https://github.com/Genymobile/scrcpy>
INFO: FLAC audio: audio buffer increased to 120 ms (use --audio-buffer to set a custom value)
INFO: ADB device found:
INFO: --> (tcpip) 18.225.56.12:5555 device redroid16_arm64
C:\Users\Administrator\Downloads\scrcpy-win64-v3.3.1\scrcp... file pushed, 0 skipped. 62.8 MB/s (90788 bytes in 0.001s)
[server] INFO: Device: [redroid] redroid redroid16_arm64 (Android 16)
[server] ERROR: Attempt to invoke virtual method 'android.view.InputDevice android.hardware.input.InputManagerGlobal.getInputDevice(int)' on a null object reference
java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.InputDevice android.hardware.input.InputManagerGlobal.getInputDevice(int)' on a null object reference
at android.view.KeyCharacterMap.load(KeyCharacterMap.java:367)
at com.genymobile.scrcpy.control.Controller.<init>(Controller.java:86)
at com.genymobile.scrcpy.Server.scrcpy(Server.java:114)
at com.genymobile.scrcpy.Server.internalMain(Server.java:267)
at com.genymobile.scrcpy.Server.main(Server.java:215)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:371)
ERROR: "adb reverse --remove" returned with value 1
ERROR: Could not retrieve device information
ERROR: Server connection failed
While using docker exec -it <container_id_or_name> logcat, it will prompts out a lot of messages that full of screen about 10+ minutes. I cannot figure out what caused the problem.
So any other ideas? Could you please have a test on Ubuntu 22.04 or 24.04 ARM with Redroid 16? Does it repeat this failure scenario and the troubleshooting files something like ubuntu24.04arm-redroid16-debug.o2q7Zq1u.zip?
Many thanks!
@brunoaduarte @zhouziyang
Same NullPointerException for me with v16.0, see my issue #862 opened recently.
(Trying to use it on a default Ubuntu 24 docker container host, where versions up to 15 are working fine)
I got the same error when running v16; version 15 works without issues.
I did nothing more than:
apt install linux-modules-extra-`uname -r`
modprobe binder_linux devices="binder,hwbinder,vndbinder"
modprobe ashmem_linux
docker run -itd --rm --privileged \
--pull always \
-v ~/data:/data \
-p 127.0.0.1:5555:5555 \
redroid/redroid:16.0.0_64only-latest
It pulls the container, then I run scrcpy on a different host, which gives:
PS C:\Users\user\Downloads\scrcpy-win64-v3.3\scrcpy-win64-v3.3> .\scrcpy.exe
scrcpy 3.3 <https://github.com/Genymobile/scrcpy>
INFO: ADB device found:
INFO: --> (tcpip) 127.0.0.1:5555 device redroid16_x86_64_only
C:\Users\user\Downloads\scrcpy-win64-v3.3\scrcpy-win64-v3... file pushed, 0 skipped. 96.7 MB/s (90752 bytes in 0.001s)
[server] INFO: Device: [redroid] redroid redroid16_x86_64_only (Android 16)
[server] ERROR: Attempt to invoke virtual method 'android.view.InputDevice android.hardware.input.InputManagerGlobal.getInputDevice(int)' on a null object reference
java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.InputDevice android.hardware.input.InputManagerGlobal.getInputDevice(int)' on a null object reference
at android.view.KeyCharacterMap.load(KeyCharacterMap.java:367)
at com.genymobile.scrcpy.control.Controller.<init>(Controller.java:86)
at com.genymobile.scrcpy.Server.scrcpy(Server.java:114)
at com.genymobile.scrcpy.Server.internalMain(Server.java:264)
at com.genymobile.scrcpy.Server.main(Server.java:214)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:371)
ERROR: "adb reverse --remove" returned with value 1
ERROR: Could not retrieve device information
ERROR: Server connection failed