This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
docu:tutos:android:adb_tcp_forwarding [2020/02/07 12:05] admin |
docu:tutos:android:adb_tcp_forwarding [2020/02/07 12:31] admin |
||
---|---|---|---|
Line 32: | Line 32: | ||
There can be a case when you want to **use a device connected to a server by usb**\\ | There can be a case when you want to **use a device connected to a server by usb**\\ | ||
- | You can do this easily by enabling tcpip mode on adb and forwarding the port\\ | + | You can do this easily by enabling tcpip mode on adb and forwarding the port.\\ |
+ | |||
+ | First, **enable tcpip on 5557**, and forward on **server to 5558** | ||
+ | <code bash> | ||
+ | adb tcpip 5557 | ||
+ | adb forward tcp:5558 tcp:5557 | ||
+ | </ | ||
+ | |||
+ | Check forward is working | ||
+ | <code bash>adb forward --list</ | ||
+ | |||
+ | Now, you can use ssh forwarding to connect the **phone shell or screen remotely**!!! | ||
+ | <code bash> | ||
+ | ssh -L 5558: | ||
+ | adb connect 127.0.0.1: | ||
+ | </ |