Hot answers tagged

25

am start -a android.intent.action.MAIN -c android.intent.category.HOME More info about shell commands: an archived version of the AndroidWiki page


16

This line will do it (found here): awk '{print $1}' < ~/.android/adbkey.pub | openssl base64 -A -d -a | openssl md5 -c


13

Have a look at simulating keyevents on Android and search for "KEYCODE_VOLUME_UP" and "KEYCODE_VOLUME_DOWN". Events can be generated by executing "input": #local shell: input keyevent 24 #vol up input keyevent 25 #vol down #remotely using ssh ssh your-phone input keyevent 24 #vol up ssh your-phone input keyevent 25 #vol down # 'su -c command' to make it ...


12

Use this: am start -a android.intent.action.MAIN -n <package_name>/<full_class_name> To control an app, you'll have to put correct values of <package_name> and <full_class_name> in the command. For example, you can use com.google.gmail/com.google.gmail.check_mail (Hypothetical names) as last part of command. Obtaining package name ...


11

Termux does provide the openssh package, which contains both the ssh client and the sshd server. Install the package with: apt install openssh, then start the server with sshd - it will run on port 8022 by default, so connect to it with ssh -p 8022 DEVICE_IP, and you can find the device wifi ip using ip addr list wlan0. Password authentication is not ...


9

Like Sachin Shekhar said, you must use the following command : am start -a android.intent.action.MAIN -n <package_name>/<full_class_name> See a concrete example : getting the apk file from your Android device or any Market places running this command : aapt dump xmltree com.android.settings*.apk AndroidManifest.xml I would like to start "...


9

Actually you can just push the "home" button adb shell input keyevent KEYCODE_HOME


9

One of the restrictions introduced with 4.4-kitkat was moving the WRITE_EXTERNAL_STORAGE permission to protection-level "SignatureOrSystem", which means even if requested, a "normal app" (i.e. one you install yourself as "normal user" without any root specialities) will no longer get it granted. So there are very few things you can do to "work around" this: ...


9

If you have a working SSH server running on Android device, you can connect to it on local/private network without any issues (after proper authentication setup obviously). Same may hold true for public network (internet) if your phone has a true public IP address (I don't think that happens on earth). However, when you need to cross networks i.e. traversing ...


7

Many things are possible. Installing an SSH Server app (e.g. SSHelper or DigiSSHD / SSH Server) would give you the possibility to login via ssh, or remote-copy via scp. Terminal IDE (available only for Android 4.4 and earlier, according to the app description) gives you a quite complete package, even including the famous Midnight Commander, and a lot more ...


7

Consider taking at look at the following link: http://developer.android.com/reference/android/view/KeyEvent.html input keyevent KEYCODE_HOME


7

I managed to remap the Caps Lock key to Ctrl using External Keyboard Helper Pro. It was really straightforward, just poke around in the settings and you'll find a way to create a custom mapping (Keycode 58 --> Left Control).


7

To export keys from JuiceSSH (either private or public): Load up JuiceSSH and go to Connections Swipe right to the identities list Long press the identity you want to export the key for Select either "Export public key" or "Export private key" This will bring up a "Share" dialog that will let you save the key to clipboard/gmail/dropbox etc. Thanks Paul (...


6

ES File Explorer is one that can use the secure FTP protocol over ssh protocol. To get the settings, from ES File Explorer: Hit menu key, Show Tabs, Local, LAN, FTP, NET appears Tap on FTP Then tap on New that appears underneath, a dialog box will appear prompting the different FTP types, tap on SFTP Enter the details of the ssh server that hosts the ...


6

Query the system service battery (possibly requires root access) dumpsys battery Output would be like Current Battery Service state: AC powered: false USB powered: true Wireless powered: false status: 2 health: 2 present: true level: 70 scale: 100 voltage:3950 temperature: 260 technology: Li-ion level: 70 is the battery percentage ...


5

The ConnectBot developers recommend Full Keyboard to issue keyboard shortcuts. But there are also other keyboards.


5

You can also use an SSH server without a frontend app -- starting it with a command or through a configuration file, as described in Howto: Connect to Device with SSH. According to that page, CyanogenMod included an SSH server (dropbear) in some releases. ("Cyanogenmod 9.0 RC2 no longer includes Dropbear.") Or you could probably put it into your system ...


5

I have successfully used BotBrew Basil Experimental when running Android 4.4. BotBrew Basil Experimental is based on apt-get so after installing APK and bootstraping I just did apt-get install dropbear in a root shell to install SSH client (and server).


5

If you want to give adbfs a try, here are some instructions. You need to take care to grab the right one, as there are two projects around: one is simply called adbfs, I couldn't get that to work correctly. The other is adbfs-rootless: go to the projects github page on that page, at the right-hand side in about the middle of the page, you find a button ...


5

Summing up from the comments This answer states to use ssh <user>@<ip> -p <port> instead of the "colon syntax" In SSHDroid, go to "Options" and check/define the port (default: 2222) and password to be used According to the screenshots on the app's playstore page, if not using root mode you can use any user name to connect. Thus if you ...


5

Install Termux (Google Play, F-Droid, Fossdroid) apt update apt ugpgrade apt install dropbear I personally chose OpenSSH toover Dropbear apt install openssh To run the server sshd Unless your device is rooted you won't be able to run sshd as root. Note that running as non-root implies that ports below 1024 cannot be bound to. In Termux any packages ...


5

Android turns off some of CPUs and/or don't let apps use them when it's dozing. It's achieved through Linux kernel's Control Groups. One of the cgroups is cpuset that controls which CPU is assigned to which processes. Android creates multiple descendant cgroups in cpuset e.g. background, foreground, system-background, top-apps etc. Apps are normally in ...


4

I've stumbled upon an X server for Android project (now available as an APK to intall from F-Droid, too): This project implements an X11 server for use with Android devices, written in Java. The X11 server runs within an Android View subclass, allowing it to be embedded in other applications. But perhaps it's a bit tricky to connect to it through X ...


4

One way to make your Android machine accessible via WAN SSH access (as in connecting from anywhere) would be to create a reverse SSH tunnel from your Android machine to some machine that is always online. It can be your Desktop machine behind a NAT router (most common case). Then you forward that same port from the Router to your Desktop machine. This is ...


4

Take a look at the various ways to get around this issue as explained in the official docs. Here're some excerpt: One solution, not at all easy, is to take the external storage device out of the Android device, write to it elsewhere, and put it back. This is a great pain, and works only if you have access to the device and are a bit of a techie. There's a ...


4

First as a side-note for other readers: We're not talking about "an app" here (those have already been tried and didn't work on that architecture), but about a command-line binary. DropBear sometimes is part of Busybox, or it comes as separate binary. Now for the installation part. Binaries you install yourself best go to /system/xbin, which is in the $PATH ...


4

You seem to be a bit confused about the article you read. It's about an Android-compatible clone, which has nothing to do with the SSH communications protocol. The company mentioned has SSH in its name, and was founded by one of the original inventors of the SSH protocol, but doesn't "own" the SSH protocol or name, or the OpenSSH server. As you've already ...


4

OpenSSH doesn't use user@host:port notation. If you need to specify a port, you do it with -p port.


4

Note: Make sure your phone is accessible from internet as explained here. You need a rooted device. Android phones nowadays aren't those old low-end devices, they can run a full-featured SSH server happily. And it's an easy recipe: Get fully static sshd binary for your phone's architecture. See details below. Create /etc/passwd and /etc/shadow. To add a ...


3

I have been using the free SSHelper (without rooting) since it recently added zeroConf broadcasting. It provides an SSH and RSYNC (file transfer) server, while also broadcasting a ZeroConf name. Another avahi/bonjour client can connect without needing to know the android hostname. Explained in more detail in this other answer: Set hostname for SSHelper


Only top voted, non community-wiki answers of a minimum length are eligible