Is it possible to debug an app with a device connected on a remote network? [duplicate]

时光毁灭记忆、已成空白 提交于 2021-01-29 19:06:03

问题


There's an app my team is developing in Android Java using Android Studio.

The app works alright on all our test devices, however it shows some bugs on the client's device.

Is it possible to somehow connect the client's device to his network and make this device available on a developer machine for debugging over the internet?

It was pointed to me that this answer already answers my question. I agree that it does in part; it teaches how to connect the client adb to the adb server on a remote network. Still, can I use Android Studio to debug the phone?

Maybe VPN can be used? I don't know much about VPNs, so suggestions of which would work would be awesome.

Thank you.


回答1:


This is pretty dangerous, as exposing the debugging bridge of your personal device to the internet could prove problematic and unsafe for your personal data.

That aside, the only way I could see this working would be if the client were to port forward the debugging port to the IP address of their device (this would need to be completed on their router)

By default I believe the port to be 5037.

Once the port is forwarded, you should be able to connect to that device in particular by using

adb connect <their external IP>

Again, I cannot stress enough how dangerous this could potentially be.



来源:https://stackoverflow.com/questions/53524186/is-it-possible-to-debug-an-app-with-a-device-connected-on-a-remote-network

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!