I hope you’re doing well. I have a couple of questions and feature suggestions regarding Anbox Cloud:
ADB Connection Issues on AWS:
I’ve noticed an issue when running an instance on an AWS machine. After about 5 minutes, the ADB connection stops working, and attempting to reconnect results in a “connection refused” error. Even after attempting to restart the ADB daemon on the device, the problem persists. This happens both when exposing the ADB service using +adb and when using anbox-connect. Could you provide any guidance on why this might be happening and how to resolve it?
Event Dispatcher for Anbox Events:
Is there an event dispatcher or any sort of notification system in Anbox Cloud that can alert us when certain events occur, such as when a container is created, stopped, deleted, or encounters an error? If this feature does not exist, I’d like to propose it as it would be extremely useful for managing Anbox servers.
Using anbox-connect in Docker:
Running anbox-connect inside a Docker container has been quite challenging due to the following issues:
The Snap Store cannot be used within Docker, making it impossible to install anbox-connect directly.
The binary is dynamically compiled, which complicates copying it into the container as all necessary libraries need to be linked manually.
To address this problem, I have a few suggestions:
Option 1: Develop a library (perhaps in Go, given that anbox-connect is likely written in Go) to allow programmatic connection to instances.
Option 2: Distribute a statically compiled version of anbox-connect to avoid issues with missing libraries.
Option 3: Make anbox-connect available via other package managers like apt, apk, etc., to simplify installation in different environments.
Unable to Register Services Using .rc Files After 1.23 Update:
After updating to version 1.23, it is no longer possible to register services using .rc files copied into /system/etc/init/ via the pre-start hook. This was working correctly in previous versions. For your reference, here’s the .rc file and shell script I’m trying to use:
frida-server.rc:
service frida /data/local/tmp/frida-server.sh
class main
user root
oneshot
frida-server.sh:
#!/bin/sh
# Check if frida-server is running
if ! pgrep -x "frida-server" >/dev/null
then
# Start frida-server
/data/local/tmp/frida-server &
fi
I hope you find these suggestions and observations helpful, and I’m happy to assist in any way I can. Please let me know if you need more details or logs regarding any of these issues.
Thanks a lot for your feedback, this is very valuable!
Let me answer for each point separately.
ADB Connection Issues on AWS:
Could you tell us a bit more about this issue? Is it happening for all instances? If you have an easy way to reproduce it, it would be perfect. Otherwise, could you please provide the logs (anbox and android) from a malfunctioning instance?
Event Dispatcher for Anbox Events:
This is already supported, please take a look at either:
amc monitor for the CLI. Please run amc monitor --help to have a bit of an explanation as it’s (unfortunately) not well-documented at the moment (see LP#2081989)
the 1.0/events endpoint of the AMS HTTP API
If none of these fulfill your needs, please let us know what we can improve.
Using anbox-connect in Docker:
The anbox-connect binary should be statically linked already:
$ file /snap/anbox-connect/current/bin/anbox-connect
/snap/anbox-connect/current/bin/anbox-connect: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=DvqZ_ccczPHsi9zIb6bE/vw1-pNrUrzZq72Gr5Lu_/DR3UKgavS0S5ydPR8b2u/SQI01R2--CveSkIWnLHf, with debug_info, not stripped
Would you mind sharing what base Docker image you are using? We have copied the binary inside Ubuntu docker images on our side, and it seemed to be working.
Unable to Register Services Using .rc Files After 1.23 Update:
As far as I can tell, this should still be working. Could you please share the Anbox and Android logs for that instance? That would help tremendously!
Thanks again for your feedback and your questions, this is very useful to us!
Also, if you are interested in investigating these issues with us, feel free to come have a chat in our Matrix room! It’s (sadly) a bit empty for now, but we would be happy to chat with you there!
ADB Connection Issues on AWS: I’ve attached the logs from an instance that is experiencing both issues 1 and 4, as this problem occurs across all instances.
Event Dispatcher for Anbox Events: Thank you for the pointers! It would be fantastic if this could be integrated into the AMS SDK in the future.
Using anbox-connect in Docker: I retried it, and it’s indeed working now. I’m not sure why I faced linking issues with libc earlier. Nevertheless, I believe distributing anbox-connect via other package managers could be helpful for others to avoid copying the binary directly into Docker containers.
Unable to Register Services Using .rc Files After 1.23 Update: As mentioned, I’m attaching the relevant logs for this issue as well.