Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the destination of 'AdbStream object corresponding to the specified destination'? #15

Open
emptywalker opened this issue Jan 28, 2021 · 5 comments

Comments

@emptywalker
Copy link

I'm doubt about what is destination at AdbConnection$open(String destination) , the code:


/**
   * Opens an AdbStream object corresponding to the specified destination.
   * This routine will block until the connection completes.
   *
   * @param destination The destination to open on the target
   * @return AdbStream object corresponding to the specified destination
   * @throws UnsupportedEncodingException If the destination cannot be encoded to UTF-8
   * @throws IOException                  If the stream fails while sending the packet
   * @throws InterruptedException         If we are unable to wait for the connection to finish
   */
public AdbStream open(String destination) throws UnsupportedEncodingException, IOException, InterruptedException {

}

i don't clearly that how many the specified destination ; I want to execute adb forward tcp:$port localabstract: $remotePort, what should I set destination ? why ?

@MuntashirAkon
Copy link

@wjj1928
Copy link

wjj1928 commented Feb 8, 2024

Anyone make forward work? I try adb.open("forward:tcp:1234:tcp:1234") but it report exception.

@mirfatif
Copy link

mirfatif commented Feb 8, 2024

Anyone make forward work? I try adb.open("forward:tcp:1234:tcp:1234") but it report exception.

It should be forward:tcp:1234;tcp:1234. Note the semicolon separator.
Reference

@wjj1928
Copy link

wjj1928 commented Feb 8, 2024

Changed that but still the same:

02-08 10:08:44.311 16802 16890 I MyExam  : forward:tcp:1234;tcp:1234
02-08 10:08:44.329 16802 16890 E AndroidRuntime: FATAL EXCEPTION: pool-2-thread-1
02-08 10:08:44.329 16802 16890 E AndroidRuntime: Process: com.sample.atest, PID: 16802
02-08 10:08:44.329 16802 16890 E AndroidRuntime: java.lang.RuntimeException: java.net.ConnectException: Stream open actively rejected by remote peer
02-08 10:08:44.329 16802 16890 E AndroidRuntime: 	at com.sample.atest.Adb$1.run(Adb.java:100)

@zwc456baby
Copy link

Changed that but still the same:

02-08 10:08:44.311 16802 16890 I MyExam  : forward:tcp:1234;tcp:1234
02-08 10:08:44.329 16802 16890 E AndroidRuntime: FATAL EXCEPTION: pool-2-thread-1
02-08 10:08:44.329 16802 16890 E AndroidRuntime: Process: com.sample.atest, PID: 16802
02-08 10:08:44.329 16802 16890 E AndroidRuntime: java.lang.RuntimeException: java.net.ConnectException: Stream open actively rejected by remote peer
02-08 10:08:44.329 16802 16890 E AndroidRuntime: 	at com.sample.atest.Adb$1.run(Adb.java:100)

Is this solved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants