Function: tramp-adb-execute-adb-command
tramp-adb-execute-adb-command is a byte-compiled function defined in
tramp-adb.el.gz.
Signature
(tramp-adb-execute-adb-command VEC &rest ARGS)
Documentation
Execute an adb command.
Insert the result into the connection buffer. Return nil on error and non-nil on success.
Source Code
;; Defined in /usr/src/emacs/lisp/net/tramp-adb.el.gz
(defun tramp-adb-execute-adb-command (vec &rest args)
"Execute an adb command.
Insert the result into the connection buffer. Return nil on
error and non-nil on success."
(when (and (length> (tramp-file-name-host vec) 0)
;; The -s switch is only available for ADB device commands.
(not (member (car args) '("connect" "disconnect"))))
(setq args (append (list "-s" (tramp-adb-get-device vec)) args)))
(with-current-buffer (tramp-get-connection-buffer vec)
;; Clean up the buffer. We cannot call `erase-buffer' because
;; narrowing might be in effect.
(let ((inhibit-read-only t)) (delete-region (point-min) (point-max)))
(zerop (apply #'tramp-call-process vec tramp-adb-program nil t nil args))))