[Top][All Lists]

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

Re: Enable adb port in tramp adb

From: Michael Albinus
Subject: Re: Enable adb port in tramp adb
Date: Sun, 09 Nov 2014 10:37:06 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

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 //adb is connected to device's 5555
> port
> $adb -s tcpip 5554 //restart device's adb daemon,
> let it listen on 5554 port. And adb will be disconnected on 5555 port
> now.
> $adb connect //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.

> Best regards,
> Zhongwei 

Best regards, Michael.

reply via email to

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