uisleuth icon indicating copy to clipboard operation
uisleuth copied to clipboard

Cannot connect to Android Emulator

Open akamud opened this issue 7 years ago • 3 comments

I am using a Google Android Emulator (x64) and I'm trying to connect but I always get:
"Error Code 1006: The connection was forcefully closed. The other party is not responding."

I kept the UISleuth.Inspector.ShowAcceptingConnections(); instruction, and I see an alert showing "Listening on ws://10.0.2.15:9099/", but even trying manual connection, it doesn't work.

Are there any log files I could look at?

akamud avatar Sep 11 '17 14:09 akamud

you'll probably need to setup a port redirect.

  1. open telnet
  2. connect to localhost 5554
  3. follow the onscreen directions for authentication
  4. type: redir add tcp:9099:9099
  5. open ui sleuth, click "Manual Connection."
  6. type localhost for the address
  7. ensure the port is 9099
  8. connect

alternatively, you could run the following command to replace steps 1 - 4. adb forward tcp:9099 tcp:9099

michaeled avatar Sep 17 '17 20:09 michaeled

We should add this to the wiki. It wasn't clear to me that emulators needed special instructions.

akamud avatar Sep 19 '17 13:09 akamud

Sure. I can do this. It's also something that can be done programmatically at runtime. So, I'll keep this open. The google android emulators don't allow the host OS to communicate with the guest OS by default. This is a QEMU default.

michaeled avatar Sep 19 '17 19:09 michaeled