Android: Allow multiple SharedMap Servers on the same machine
Perhaps by specifying broker names/ports in an environment variable?
- [ ] Core support in LlmpBroker
- [ ] If running without the flag/environment variable, set it to the default for both the broker and client process, so that it can be assumed to exist.
- [ ] The launcher should automate whatever mechanism is used, so just running the launcher twice should give you two brokers. Or perhaps with a command line argument?
- [ ] AshmemService needs to use the broker name/port to make itself unique.
Doesn't specifying an individual broker_port already solve this issue? You can read the port from an env in your fuzzer, if you'd like?
Not in the ashmem service case... that is independent of port, but could be tied to it, I guess.
The ashmem service uses a file instead, but the general concept should remain the same, right? Do we need specific code in the ashmem service to support multiple, like the filename?
Yes. Currently the filename of the service is hard-coded.
The MacOS shmem simply uses the current path for the unix socket, starting with PR #238 - maybe that'd be an easy solution for this issue?
We need to use abstract sockets on android.... they don't really have a path, although we could just use the path prepended with an @.
Or the current broker port, that should be unique, too?
Yeah. Do you want me to make the change?
Feel free. I don't really have the setup to test android atm, so I won't touch it for now :)
How would I get the broker port in the AshmemService?
Good question. The broker launches the shmem service now so it could pass the port, but we could also just go with the path, then?