AdvancedSharpAdbClient icon indicating copy to clipboard operation
AdvancedSharpAdbClient copied to clipboard

May I ask how to execute adb tcpip 5555 and other adb commands without predefined methods? Thank you!

Open rvhome opened this issue 2 years ago • 2 comments

Describe your question

May I ask how to execute adb tcpip 5555 and other adb commands without predefined methods? Thank you!

rvhome avatar Jul 17 '23 02:07 rvhome

I am not sure it can work.

var adbSocketFactory = Factories.AdbSocketFactory;
var EndPoint = new IPEndPoint(IPAddress.Loopback, AdbClient.AdbServerPort);
using IAdbSocket socket = adbSocketFactory(EndPoint); 
await socket.SendAdbRequestAsync("host:tcpip:5555", cancellationToken); 
AdbResponse response = await socket.ReadAdbResponseAsync(cancellationToken); 
string result = await socket.ReadStringAsync(cancellationToken);

Mybe you can direct execute adb.exe through Process.

wherewhere avatar Jul 17 '23 04:07 wherewhere

Thank you for returning the unknown host service. After removing host:, there is no return value, so we can only use process first

rvhome avatar Jul 17 '23 16:07 rvhome