Hi, Michael,
On Sat, Nov 8, 2014 at 8:38 PM, Michael Albinus <[email protected]> wrote: > Ashi <[email protected]> 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. > 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. > > > - 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? > 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 > 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? > 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 > Wow, it is cool! I'll update my patch accordingly. > > > 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. > Best regards, Zhongwei
_______________________________________________ Tramp-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/tramp-devel
