all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#55651: 28.1; Wrong format specifiers in tramp-adb-get-device
@ 2022-05-26  2:12 Hayden Shenk
  2022-05-26 16:14 ` Michael Albinus
  0 siblings, 1 reply; 2+ messages in thread
From: Hayden Shenk @ 2022-05-26  2:12 UTC (permalink / raw)
  To: 55651

[-- Attachment #1: Type: text/plain, Size: 4588 bytes --]

Description:
When attempting to open a file on Android devices via tramp using adb
over tcp/ip tramp-adb-get-device throws the following error:

error: "Format specifier doesn’t match argument typex"

Reproducing the bug:
To reproduce the bug set up an android device to connect to over
TCP/IP with adb.  Instructions to do so can be found here:

https://developer.android.com/studio/command-line/adb

In this example, we'll assume the device is listening for adb
connections on 192.168.1.7:7449

Then the bug can be triggered by executing the following bit of elisp:

(find-file "/adb:192.168.1.7#7449:/data/local/tmp")

Patch:
Here is a proposed patch, which fixes the issue on my host:

modified   lisp/net/tramp-adb.el
@@ -1112,9 +1112,9 @@ E.g. a host name \"192.168.1.1#5555\" returns \"
192.168.1.1:5555\"
        tramp-prefix-port-format ":"
        (cond ((member host devices) host)
      ;; This is the case when the host is connected to the default port.
-     ((member (format "%s%s%d" host tramp-prefix-port-format port)
+     ((member (format "%s%s%s" host tramp-prefix-port-format port)
       devices)
-      (format "%s:%d" host port))
+      (format "%s:%s" host port))
      ;; An empty host name shall be mapped as well, when there
      ;; is exactly one entry in `devices'.
      ((and (zerop (length host)) (= (length devices) 1))

In GNU Emacs 28.1 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo version
1.16.0, Xaw scroll bars)
 of 2022-05-24 built on papa-XPS-15-9500
Windowing system distributor 'The X.Org Foundation', version 11.0.12013000
System Description: Ubuntu 20.04.4 LTS

Configured using:
 'configure --with-x-toolkit=lucid --with-mailutils --with-modules
 --enable-gcc-warnings --with-json --with-native-compilation --with-jpeg
 --with-png --with-rsvg --with-tiff --with-wide-int --with-imagemagick'

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ IMAGEMAGICK
JPEG JSON LIBSELINUX MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG
SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM LUCID
ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail
rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json map text-property-search seq byte-opt
gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils time-date subr-x cl-loaddefs
cl-lib iso-transl tooltip eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button
loaddefs faces cus-face macroexp files window text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads dbusbind inotify
dynamic-setting system-font-setting font-render-setting cairo x-toolkit
x multi-tty make-network-process native-compile emacs)

Memory information:
((conses 16 70504 11007)
 (symbols 48 7157 0)
 (strings 32 21358 1675)
 (string-bytes 1 686899)
 (vectors 16 14101)
 (vector-slots 8 297090 16970)
 (floats 8 25 38)
 (intervals 56 260 0)
 (buffers 992 11))

[-- Attachment #2: Type: text/html, Size: 5179 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#55651: 28.1; Wrong format specifiers in tramp-adb-get-device
  2022-05-26  2:12 bug#55651: 28.1; Wrong format specifiers in tramp-adb-get-device Hayden Shenk
@ 2022-05-26 16:14 ` Michael Albinus
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Albinus @ 2022-05-26 16:14 UTC (permalink / raw)
  To: Hayden Shenk; +Cc: 55651-done

Version: 28.2

Hayden Shenk <hayden.shenk@zetier.com> writes:

Hi Hayden,

> Description:
> When attempting to open a file on Android devices via tramp using adb
> over tcp/ip tramp-adb-get-device throws the following error:
>
> error: "Format specifier doesn’t match argument typex"

Thanks for reporting!

> Reproducing the bug:
> To reproduce the bug set up an android device to connect to over
> TCP/IP with adb.  Instructions to do so can be found here:
>
> https://developer.android.com/studio/command-line/adb
>
> In this example, we'll assume the device is listening for adb
> connections on 192.168.1.7:7449
>
> Then the bug can be triggered by executing the following bit of elisp:
>
> (find-file "/adb:192.168.1.7#7449:/data/local/tmp")
>
> Patch:
> Here is a proposed patch, which fixes the issue on my host:

Yep. tramp-dissect-file-name returns the port as a string for a long
time already, it was an oversight that this hasn't been changed
here. I've applied the patch in your name to the repositories, will
appear with Emacs 28.2.

Tramp 2.5.2.5, which will be released next days on GNU ELPA, will
contain the patch as well. Closing the bug.

Best regards, Michael.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-26 16:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-26  2:12 bug#55651: 28.1; Wrong format specifiers in tramp-adb-get-device Hayden Shenk
2022-05-26 16:14 ` Michael Albinus

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.