(@pxref{Predefined connection information}).
@item
-@value{tramp} requires preserving @env{PATH} environment variable from
-user settings. Android devices prefer @file{/system/xbin} path over
-@file{/system/bin}. Both of these are set as follows:
+On the Android device the directory names are prefixed with an
+application specific prefix, which is
+@file{/data/data/com.termux/files/usr/bin} instead of @file{/usr/bin}
+in the @code{Termux} case. You must adapt the file names in
+@code{tramp-remote-path}, for example via connection-local
+@ifinfo
+settings (@pxref{Connection Variables, , , emacs}):
+@end ifinfo
+@ifnotinfo
+settings:
+@end ifnotinfo
@lisp
@group
-(add-to-list 'tramp-remote-path 'tramp-own-remote-path)
-(add-to-list 'tramp-remote-path "/system/xbin")
+(connection-local-set-profile-variables
+ 'tramp-connection-local-termux-profile
+ `((tramp-remote-path
+ . ,(mapcar
+ (lambda (x)
+ (if (stringp x) (concat "/data/data/com.termux/files" x) x))
+ (copy-tree tramp-remote-path)))))
+
+(connection-local-set-profiles
+ '(:application tramp :machine "192.168.0.26")
+ 'tramp-connection-local-termux-profile)
@end group
@end lisp
directory for temporary files:
@lisp
-(add-to-list 'tramp-remote-process-environment "TMPDIR=$HOME")
+(add-to-list 'tramp-connection-properties
+ (list (regexp-quote "192.168.0.26")
+ "tmpdir" "/data/data/com.termux/files/home/tmp"))
@end lisp
@item
@group
(add-to-list 'tramp-connection-properties
(list (regexp-quote "android") "remote-shell" "sh"))
+(add-to-list 'tramp-connection-properties
+ (list (regexp-quote "android")
+ "tmpdir" "/data/data/com.termux/files/home/tmp"))
+(connection-local-set-profiles
+ '(:application tramp :machine "android")
+ 'tramp-connection-local-termux-profile)
@end group
@end lisp
@noindent
-Open a remote connection with a more concise command @kbd{C-x C-f
+Open a remote connection with the more concise command @kbd{C-x C-f
@trampfn{ssh,android,} @key{RET}}.
@end itemize