|Subject:||Re: Enable adb port in tramp adb|
|Date:||Mon, 3 Nov 2014 19:04:38 +0800|
Ashi <address@hidden> writes:
> Hi, Michael,
> adb has 2 kinds of connection:
> - connected by USB, and adb devices will list a serial No., like in
> your case:
> 3335F075A13600EC device
> - connected by TCPIP, and adb devices will list IP address + PORT,
> 10.164.2.162:5555 device
> you can switch to this by running "adb tcpip" if your device have a
> network interface, and then run "adb connect IP_ADDRESS" to connect to
> your device. There are more details in this page:
> So in your case, there is no need to add port number in the path. It
> should be "/adb:3335F075A13600EC:". The port number is only needed
> when connected by TCPIP.
I'm not an adb expert, as you might have discovered already. However,
reading all the instructions I would conclude:
- If adb is in usb mode, port numbers are not applicable. Shouldn't we
discover this? Or should we switch to tcpip mode, whenever a port
number is specified in the remote file name?
- If adb is in tcpip mode, a user *must* specify the port number
according to your patch. Otherwise, the ip address wouldn't be
detected by `tramp-adb-parse-device-names', because "adb devices"
lists all devices with their respective port number. This sounds
> diff --git a/test/tramp-tests.el b/test/tramp-tests.el
> index 864a43d..5ea0291 100644
> --- a/test/tramp-tests.el
> +++ b/test/tramp-tests.el
> @@ -1165,7 +1165,8 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
> (skip-unless (set-file-times tmp-name1 '(0 1)))
> ;; Dumb remote shells without perl(1) or stat(1) are not
> ;; able to return the date correctly. They say "don't know".
> - (unless (equal (nth 5 (file-attributes tmp-name1)) '(0 0))
> + (unless (or (equal (nth 5 (file-attributes tmp-name1)) '(0 0))
> + (equal (nth 4 (file-attributes tmp-name1)) '(0 0)))
> (should (equal (nth 5 (file-attributes tmp-name1)) '(0 1)))
> (write-region "bla" nil tmp-name2)
> (should (file-exists-p tmp-name2))
I'm thinking about whether this is the best solution. In fact, this
masks only a problem, I believe.
You have said, that after applying
(set-file-times "/adb:10.164.2.12#5555:data/local/tramp_testdir/tramp-test12242_Hq" '(0 1))
=> (nil 1 0 0 (0 0) (-948638 13211) (0 0) 3 "-rw-rw-rw-" t 1 (-1 . 6))
which is obviously wrong. And on adb shell level, there is
-rw-rw-rw- root root 3 -001-12-01 00:00 tramp-test12242_Hq
Shouldn't it be better that we investigate, why `set-file-times' behaves that
strange? It doesn't happen, when I test with my Nexus S (running Android 4.1).
> Best regards,
Best regards, Michael.
|[Prev in Thread]||Current Thread||[Next in Thread]|