* 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}
* 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
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.
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 @code{adb}, that default value must be overwritten,
+methods, like @option{adb}, that default value must be overwritten,
which is already the initial value of @code{tramp-default-host-alist}.
@noindent
@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
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}