How to debug Android apps over the Internet
How to debug Android apps over the Internet
The problem
You working remotely and you and the target device are too far away. Or you work on a remote server and want to debug your app on your phone.
The solution
- Connect phone to the one machine with adb, let’s call it “machine A
- On the machine A, run
adb kill-server
andadb start-server
- On the machine A, run
ssh -R 5555:localhost:5555 machineB
- On the remote machine, where you want to debug, run
adb devices
to check that the phone is connected