tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Enable adb port in tramp adb


From: Ashi
Subject: Re: Enable adb port in tramp adb
Date: Tue, 11 Nov 2014 08:50:10 +0800

Hi, Michael,
I've updated the patch:
  - add tramp-adb-connect-if-not-connected feature
  - remind user if unnecessary port number is provided in USB mode
  - discover port number for user if port number is not provided in TCP mode

Tests result is:

Ran 35 tests, 26 results as expected, 1 unexpected, 8 skipped (2014-11-11 08:48:17+0800)
1 expected failures

1 unexpected results:
   FAILED  tramp-test31-utf8

8 skipped results:
  SKIPPED  tramp-test20-file-modes
  SKIPPED  tramp-test21-file-links
  SKIPPED  tramp-test22-file-times
  SKIPPED  tramp-test27-start-file-process
  SKIPPED  tramp-test28-shell-command
  SKIPPED  tramp-test29-vc-registered
  SKIPPED  tramp-test30-special-characters
  SKIPPED  tramp-test32-asynchronous-requests

Best regards,
Zhongwei

On Sun, Nov 9, 2014 at 9:43 PM, Ashi <address@hidden> wrote:
Hi, Michael,

On Sun, Nov 9, 2014 at 5:37 PM, Michael Albinus <address@hidden> wrote:
Ashi <address@hidden> writes:

> Hi, Michael,

Hi Zhongwei,

> Yes, there is no adb command can be used to detect which mode it is
> in.
>
> I'll update my patch by searching the port number instead of searching
> the ipv4 address.

Yep, let's use this as indication.

>     That's OK. The listed port number shall be used than.
>
>     Could it be, that one could access a device twice, on different
>     ports?
>
> Yes, but it only can be done sequentially. For example:
> $adb connect 192.168.1.162:5555 //adb is connected to device's 5555
> port
> $adb -s 192.168.1.162:5555 tcpip 5554 //restart device's adb daemon,
> let it listen on 5554 port. And adb will be disconnected on 5555 port
> now.
> $adb connect 192.168.1.162:5554 //adb is connected to devices's 5554
> port

So we have no problem. Per devices there can be exactly one tcpip
connection only at a given time. 

>     Furtheron, I found some other use cases which are not handled yet,
>     I believe. If a device is not listed in "adb devices", Tramp shall
>     first connect to that device with "adb connect
>     device:port". Afterwards, Tramp could access to this device via
>     "adb -s device:port shell", as it does already for usb devices.
>
> But if that device can not be connected, user has to wait adb connect
> until timeout (about 10s). It could be annoying if user realize the
> device name is wrong and want to try again immediately. What do you
> think about it?

Yes, this would be bad. So let the user control, whether "adb connect ..."
is called. Either we ask interactively, or we install a defcustom
tramp-adb-connect-if-not-connected, which is set to nil by default.
 
Agree, adding a defcustom makes sense here.

> Best regards,
> Zhongwei

Best regards, Michael.
Best regards,
Zhongwei


Attachment: adb_port_enable.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]