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: Sun, 9 Nov 2014 12:57:22 +0800

Hi, Michael,

Because adb also supports host names, I find tramp can't easily guess port name for user now. For example, the host name of one device is same as another device's serial number:
$ adb devices
List of devices attached
014994ab    device
014994ab:5554    device

and if user type "/adb:014994ab:", tramp can't decide which one user want to access. So I think we'd better not guess port name for user.

Best regards
Zhongwei


On Sat, Nov 8, 2014 at 8:38 PM, Michael Albinus <address@hidden> wrote:
Ashi <address@hidden> writes:

> Hi, Michael,

Hi Zhongwei,

I've played a little bit with your patch.

> I've updated my patch. Add 2 more things:
> - if user provide port number in ADB USB mode, let tramp give error (I
> feel I haven't handled the error message correctly, need your review).

How do you detect, that adb runs in usb mode? I couldn't find a
respective adb command.

The only indication might be, that connections listed via "adb devices"
show a port number, or not. Devices without a port number might be
connected in usb mode.

> - if user doesn't provide port number in ADB TCP mode, let tramp find
> port number from "adb devices" for user.

That's OK. The listed port number shall be used than.

Could it be, that one could access a device twice, on different ports?

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.

And it looks, like adb does support also host names, not only ip
addresses. Look at my example (my Nexus 7 uses 192.168.0.141):

# nslookup 192.168.0.141
Server:         127.0.1.1
Address:        127.0.1.1#53

141.0.168.192.in-addr.arpa      name = android-c05807abea645fdf.fritz.box.

# adb connect android-c05807abea645fdf:5555
connected to android-c05807abea645fdf:5555

# adb devices
List of devices attached
015d24bc55282409        device
android-c05807abea645fdf:5555   device

> But the tramp-test31-utf8 failed on my phone, which is passed on my
> develop board. I haven't looked into it yet.

No problem here, it passes.

> Best regards
> Zhongwei

Best regards, Michael.


reply via email to

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