From 491158ff468903f23499966be43d10c0704c4747 Mon Sep 17 00:00:00 2001 From: Charlie Gorichanaz Date: Tue, 27 Nov 2018 07:59:35 -0800 Subject: [PATCH] Issue #11: adb-channel fix (#13) * Consistent names, typo * adb shell -n: don't read from stdin --- README.md | 8 ++++---- adb-channel | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index fd45db4..d5ced0e 100644 --- a/README.md +++ b/README.md @@ -98,20 +98,20 @@ convenience wrapper to connect a networking socket on the Android device to file descriptors on the PC side. It can even launch and shut down the given application automatically! -It is best used as a `ProxyCommand` for SSH (intall +It is best used as a `ProxyCommand` for SSH (install [SSHelper](https://play.google.com/store/apps/details?id=com.arachnoid.sshelper) first) using a configuration like: ``` -Host sshhelper +Host sshelper Port 2222 ProxyCommand adb-channel tcp:%p com.arachnoid.sshelper/.SSHelperActivity 1 ``` -After adding this to `~/.ssh/config`, run `ssh-copy-id sshhelper`. +After adding this to `~/.ssh/config`, run `ssh-copy-id sshelper`. Congratulations! You can now use `rsync`, `sshfs` etc. to the host name -`sshhelper`. +`sshelper`. Contributing ============ diff --git a/adb-channel b/adb-channel index 51ecffd..1a2b470 100755 --- a/adb-channel +++ b/adb-channel @@ -16,7 +16,7 @@ atexit() { trap atexit EXIT trap 'exit 0' HUP INT ALRM TERM -[ -z "${activity}" ] || adb shell am start -W ${activity} +[ -z "${activity}" ] || adb shell -n am start -W ${activity} [ -z "${delay}" ] || sleep "${delay}" adb forward localfilesystem:"${t}/sock" "${remote}" socat stdio unix:"${t}/sock"