How do I make this work on Ubuntu 24.04? Device could not be connected (state=offline)
I followed the instructions for 22.04, because there are non for 24.04. It shouldn't be that different though. https://github.com/remote-android/redroid-doc/blob/master/deploy/ubuntu.md
the command sudo modprobe ashmem_linux resulted with an error, but its optional anyways:
$ sudo modprobe ashmem_linux
modprobe: FATAL: Module ashmem_linux not found in directory /lib/modules/6.8.0-51-generic
I have downloaded adb from https://dl.google.com/android/repository/platform-tools_r28.0.1-linux.zip.
$ adb version
Android Debug Bridge version 1.0.40
Version 4986621
Installed as /opt/android/platform-tools/adb
Then start android 15:
$ docker run -itd --rm --privileged --pull always -v ~/data:/data -p 5555:5555 redroid/redroid:15.0.0_64only-latest
15.0.0_64only-latest: Pulling from redroid/redroid
Digest: sha256:cba8c4a7630a8b9091cb20b3e44dd9dd65371a6c1116884af41bb786919bbba3
Status: Image is up to date for redroid/redroid:15.0.0_64only-latest
1bd8d93a31875c1fa0b3727e942ee23fb04fb7298a7d821ac3a49878f80e0ee1
Next step is adb connnect, which yields:
adb connect localhost:5555
* daemon not running; starting now at tcp:5037
* daemon started successfully
failed to connect to localhost:5555
Running it again yields:
adb connect localhost:5555
already connected to localhost:5555
Then the last step, scrcpy could not find the device...:
$ scrcpy -s localhost:5555
scrcpy 1.25 <https://github.com/Genymobile/scrcpy>
adb server version (40) doesn't match this client (39); killing...
* daemon started successfully
ERROR: Could not find ADB device localhost:5555:
ERROR: (tcpip) emulator-5554 offline
ERROR: Server connection failed
adb devices yields:
$ adb devices
List of devices attached
emulator-5554 offline
localhost:5555 offline
What am I doing wrong?
Please follow https://github.com/remote-android/redroid-doc?tab=readme-ov-file#troubleshooting to get debug blobs.
@zhouziyang Thanks for responding. I got more info and the logs. I tried both android 12 and 15 images. Also made sure that --pull always.
First of all, I was using a snap version of scrcpy. I downloaded the binaries from their github repo instead: https://github.com/Genymobile/scrcpy/releases/tag/v3.1
The initial error resolved but now I am stuck at this:
$ adb connect localhost:5555
* daemon not running; starting now at tcp:5037
* daemon started successfully
failed to connect to localhost:5555
$ adb connect localhost:5555
already connected to localhost:5555
$ adb devices
List of devices attached
localhost:5555 offline
$ scrcpy -s localhost:5555
scrcpy 3.1 <https://github.com/Genymobile/scrcpy>
ERROR: Device could not be connected (state=offline)
ERROR: Server connection failed
The logs:
$ ps -A
USER PID PPID VSZ RSS WCHAN ADDR S NAME
root 1 0 10976276 12108 do_sys_po+ 0 S init
root 9 1 0 0 0 0 Z [init]
root 10 1 10828652 7604 do_sys_po+ 0 S ueventd
logd 20 1 10860908 5964 sigsuspend 0 S logd
shell 24 1 10792812 3348 wait_woken 0 S sh
system 173 1 10844508 4832 futex_wai+ 0 S blank_screen
root 175 1 0 0 0 0 Z [vold]
root 183 1 0 0 0 0 Z [crash_dump64]
root 185 1 0 0 0 0 Z [vold]
root 186 1 10791160 4196 futex_wai+ 0 S vdc
root 189 0 10755948 3308 sigsuspend 0 S sh
root 195 189 10798060 4828 0 0 R ps
I added the logcat and dmesg logs as attachments because their long.
many Abort message: 'Binder driver could not be opened. Terminating.' error logs.
Try
apt install linux-modules-extra-`uname -r`
modprobe binder_linux devices="binder,hwbinder,vndbinder"
docker restart <your-redroid-container>
@zhouziyang Sorry m bad... Got it working! Thanks a lot! So how do I enable libhoudini. There are only instructions for libndk_translation. I have an intel and nvidia gpu unfortuneately.