* Connection caching:: Reusing connection related information.
* Remote Programs:: How @value{tramp} finds and uses programs on the remote machine.
* Remote shell setup:: Remote shell setup hints.
-* Windows setup hints:: Issues with Cygwin ssh.
+* Android shell setup:: Android shell setup hints.
* Auto-save and Backup:: Auto-save and Backup.
+* Windows setup hints:: Issues with Cygwin ssh.
Using @value{tramp}
Remote commands on Windows hosts are available since September 2011.
@end ifset
Ad-hoc multi-hop methods (with a changed syntax) have been reenabled
-in November 2011.
+in November 2011. In November 2012, Juergen Hoetzel's
+@file{tramp-adb.el} has been added.
In December 2001, @value{tramp} has been added to the XEmacs package
repository. Being part of the Emacs repository happened in June 2002,
* Connection caching:: Reusing connection related information.
* Remote Programs:: How @value{tramp} finds and uses programs on the remote machine.
* Remote shell setup:: Remote shell setup hints.
+* Android shell setup:: Android shell setup hints.
* Auto-save and Backup:: Auto-save and Backup.
* Windows setup hints:: Issues with Cygwin ssh.
@end menu
External methods should be configured such a way that they don't
require a password (with @command{ssh-agent}, or such alike). Modern
@command{scp} implementations offer options to reuse existing
-@command{ssh} connections, see method @command{scpc}. If it isn't
-possible, you should consider @ref{Password handling}, otherwise you
-will be prompted for a password every copy action.
+@command{ssh} connections, which will be enabled by default if
+available. If it isn't possible, you should consider @ref{Password
+handling}, otherwise you will be prompted for a password every copy
+action.
@node Inline methods
This method supports the @samp{-p} argument.
-@item @option{scpc}---@command{ssh} and @command{scp}
-@cindex method scpc
-@cindex scpc method
-@cindex scp (with scpc method)
-@cindex ssh (with scpc method)
-
-Newer versions of @option{ssh} (for example OpenSSH 4) offer an option
-@option{ControlMaster}. This allows @option{scp} to reuse an existing
-@option{ssh} channel, which increases performance.
-
-Before you use this method, you should check whether your @option{ssh}
-implementation supports this option. Try from the command line
-
-@example
-ssh localhost -o ControlMaster=yes /bin/true
-@end example
-
-If that command succeeds silently, then you can use @option{scpc}; but
-if it fails like
-
-@example
-command-line: line 0: Bad configuration option: ControlMaster
-@end example
-
-then you cannot use it. Note, that the option
-@option{ControlPersist}, if it is supported by your @option{ssh}
-version, must be set to @option{no}.
-
-This method supports the @samp{-p} argument.
-
-
-@item @option{rsyncc}---@command{ssh} and @command{rsync}
-@cindex method rsyncc
-@cindex rsyncc method
-@cindex rsync (with rsyncc method)
-@cindex ssh (with rsyncc method)
-
-Like the @option{scpc} method, @option{rsyncc} improves the underlying
-@command{ssh} connection by the option @option{ControlMaster}. This
-allows @command{rsync} to reuse an existing @command{ssh} channel,
-which increases performance.
-
-This method supports the @samp{-p} argument.
-
-
@item @option{pscp}---@command{plink} and @command{pscp}
@cindex method pscp
@cindex pscp method
file names like @file{//melancholia/daniel$$/.emacs}. The only
disadvantage is that there's no possibility to specify another user
name.
+
+
+@item @option{adb}
+@cindex method adb
+@cindex adb method
+
+This special method uses the Android Debug Bridge for connecting
+Android devices. The Android Debug Bridge, part of the Android SDK,
+must be installed locally. The variable @var{tramp-adb-sdk-dir} must
+be set to its installation directory.
+
@end table
The @option{synce} method allows communication with Windows Mobile
devices. Beside GVFS for mounting remote files and directories via
FUSE, it also needs the SYNCE-GVFS plugin.
+
@end table
@defopt tramp-gvfs-methods
shortened syntax for the @samp{root} account, like
@file{@trampfn{su, , , /etc/motd}}.
-People who edit large files may want to consider @option{scpc} instead
+People who edit large files may want to consider @option{scp} instead
of @option{ssh}, or @option{pscp} instead of @option{plink}. These
external methods are faster than inline methods for large files.
Note, however, that external methods suffer from some limitations.
@end lisp
@noindent
-See the documentation for the variable
-@code{tramp-default-user-alist} for more details.
+See the documentation for the variable @code{tramp-default-user-alist}
+for more details.
One trap to fall in must be known. If @value{tramp} finds a default
user, this user will be passed always to the connection command as
because @samp{/:} is the prefix for quoted file names.
@end ifset
+@vindex tramp-default-host-alist
+Like with methods and users, you can also specify different default
+hosts for certain method/user combinations via the variable
+@code{tramp-default-host-alist}. Usually, this isn't necessary,
+because @code{tramp-default-host} should be sufficient. For some
+methods, like @option{adb}, that default value must be overwritten,
+which is already the initial value of @code{tramp-default-host-alist}.
+
+@noindent
+See the documentation for the variable @code{tramp-default-host-alist}
+for more details.
+
@node Multi-hops
@section Connecting to a remote host using multiple hops
Finally, a function which parses @file{~/.netrc} like files. This
includes also @file{~/.authinfo}-style files.
+
@end table
If you want to keep your own data in a file, with your own structure,
@end table
+@node Android shell setup
+@section Android shell setup hints
+@cindex android shell setup
+
+Android devices use a restricted shell. They can be accessed via the
+@option{adb} method. However, this restricts the access to a USB
+connection, and it requires the installation of the Android SDK on the
+local machine.
+
+When an @command{sshd} process runs on the Android device, like
+provided by the @code{SSHDroid} app, any @option{ssh}-based method can
+be used. This requires some special settings.
+
+The default shell @code{/bin/sh} does not exist. Instead, you shall
+use just @code{sh}, which invokes the shell installed on the device.
+You can instruct @value{tramp} by this form:
+
+@lisp
+(add-to-list 'tramp-connection-properties
+ (list (regexp-quote "192.168.0.26") "remote-shell" "sh"))
+@end lisp
+
+@noindent
+with @samp{192.168.0.26} being the IP address of your Android device.
+
+The user settings for the @code{$PATH} environment variable must be
+preserved. It has also been reported, that the commands in
+@file{/system/xbin} are better suited than the ones in
+@file{/system/bin}. Add these setting:
+
+@lisp
+(add-to-list 'tramp-remote-path 'tramp-own-remote-path)
+(add-to-list 'tramp-remote-path "/system/xbin")
+@end lisp
+
+@noindent
+If the Android device is not @samp{rooted}, you must give the shell a
+writable directory for temporary files:
+
+@lisp
+(add-to-list 'tramp-remote-process-environment "TMPDIR=$HOME")
+@end lisp
+
+@noindent
+Now you shall be able to open a remote connection with @kbd{C-x C-f
+@trampfn{ssh, , 192.168.0.26#2222, }}, given that @command{sshd}
+listens on port @samp{2222}.
+
+It is also recommended to add a corresponding entry to your
+@file{~/.ssh/config} for that connection, like
+
+@example
+Host android
+ HostName 192.168.0.26
+ User root
+ Port 2222
+@end example
+
+@noindent
+In this case, you must change the setting for the remote shell to
+
+@lisp
+(add-to-list 'tramp-connection-properties
+ (list (regexp-quote "android") "remote-shell" "sh"))
+@end lisp
+
+@noindent
+You would open the connection with @kbd{C-x C-f @trampfn{ssh, ,
+android, }} then.
+
+
@node Auto-save and Backup
@section Auto-save and Backup configuration
@cindex auto-save
by adding @file{#<port>} to the host name, like in @file{@trampfn{ssh,
daniel, melancholia#42, .emacs}}.
+Note that @value{tramp} supports only filenames encoded in unibyte.
+
@node Alternative Syntax
@section URL-like filename syntax
In order to speed up @value{tramp}, one could either try to avoid some
of the operations, or one could try to improve their performance.
-Use an external method, like @option{scpc}.
+Use an external method, like @option{scp}.
Use caching. This is already enabled by default. Information about
the remote host as well as the remote files are cached for reuse. The
@end example
-@item
-How can I use @samp{ControlPersist}?
-
-When @samp{ControlPersist} is set to @samp{yes}, the @option{scpc}
-method does not work. You can use @option{scpx} instead with the
-following settings in @file{~/.ssh/config}:
-
-@example
-Host *
- ControlMaster auto
- ControlPersist yes
-@end example
-
-
@item
File name completion does not work with @value{tramp}