Getting “error: closed” twice on “adb reverse”

前端 未结 6 1103
走了就别回头了
走了就别回头了 2020-12-04 18:01

I am trying to reverse-forward port through ADB, but it just returns cryptic error of error: closed. Normal forwarding works. Session snippet:

$         


        
6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-04 18:21

    cause of adb reverse isnt working on android prior 5 you could propably use adb forward with a service listening on android and tunneling other connections through this inbound connection. I am doing this mostly with ssh, but you would need an ssh server on android. you than can connect using ssh -R incommingreverseportonandroid:hostyouwanttoforwardto:portyouwanttoforwardto sshuseronandroid@localhost -p portyouhaveusedforadbforwaqrdtoaccessandroidssshserver

    but i dont know how to enable an ssh server on android and maybe there is a better way cause ssh uses encryption which isnt needed over usb and using up cpu.

    i am using this way with my server to share a service when i am forced behind a nat...

    hope someone will find a way to bring this teoretical way into practical possibility

提交回复
热议问题