I tried connecting my emulator to drozer but getting this error. I followed every steps same like mentioned in docs
sivalive123 opened this issue · 4 comments
docker run --net host -it withsecurelabs/drozer console connect --server 10.0.2.16
Socket Error
<class 'RuntimeError'>
yayerroryay you probably didn't specify a valid drozer server and that's why you're seeing this error message
There was a problem connecting to the drozer Server.
Things to check:
- is the drozer Server running?
- have you set up appropriate adb port forwards?
- have you specified the correct hostname and port with --server?
- is the server protected with SSL (add an --ssl switch)?
- is the agent protected with a password (add a --password switch)?
Debug Information:
[Errno 111] Connection refused
- what is the IP address and subnet of your computer?
- what is the IP address of your android device
- what operating system are you running on your computer
- what version of drozer is running on your android device?
last chance to reply before i close this ticket
I having the same issue. Below are the details:
- Android Studio Koala | 2024.1.1
- Android IP 10.0.2.16 (this is useless when I used the dozer image from F-Secure Lab)
- Windows 11 64-bit
- Drozer Agent 3.0.0 downloaded (when installed and checked the version it shows version v2.5.2)
Below are the steps I used before taken over by WithSecureLabs and it was working fine for me:
Drozer
- make sure Docker service is running
- just run the following command:
First, forward port 31415 to the phone via ADB:
adb forward tcp:31415 tcp:31415
Next, obtain a shell into the container while adding an address to the container's Hosts file:
docker run -it --add-host host.docker.internal:host-gateway fsecurelabs/drozer
Finally, connect to drozer:
drozer console connect --server host.docker.internal
@joshuaspy: I mean, that doesn't sound like the same issue at all (you're connecting in entirely different ways), but you're right that the instructions for Docker + Windows should probably differ. The approach you described towards the end of your message should be pretty much correct for Windows. Have you tried it?
That said... is there a particular reason why you're using Docker on what seems to be a pretty standard Windows 11 box? Why add a layer of complexity to your stack?