A "command line" is a text interface to enter commands interactively. In our context, it usually means a "Unix Shell" in a terminal app, or the ADB shell on a computer to interact with an Android device.

learn more… | top users | synonyms

15
votes
12answers
18k views

Are there any command line SSH clients available for rooted Android phones?

I of course have ConnectBot, but I'm looking for something I can script. Edit: To clarify here, I'm not interested in running scripts from a terminal. What I want to do is run an SSH command in an ...
11
votes
1answer
3k views

Start an Android application via a shell script?

Is it possible to start an actual Android application from the command line in Android? For example, say I'd simply like to start/bring to the front my calendar. Is there a way that I can do this ...
10
votes
3answers
8k views

Android Read recent SMS messages from command line

I have recently broken my Android's screen. (Again) Its a T-Mobile G2 Trying to keep up with my busy technology related life is hard enough without losing my link with everyone. I have rooted the ...
9
votes
5answers
4k views

Can you run Linux command line apps on Android?

I'm brand new to Android; in fact I've never owned one. But I'm traveling all this summer, and I'm very interested in doing some programming while I'm on the run. QUESTION: Is it possible to run a ...
9
votes
2answers
2k views

how to run a specific app's action via terminal?

I need to run my android app from a remote computer via SSH, but I'm not a command-line expert, so I would like to know: how to run a specific action of an app? (not just open it) Which implies: how ...
9
votes
1answer
2k views

Toggling USB mass storage on (or off) via adb commands

Background: I have a USB stick Android device (e.g. RikoMagic) which I mostly run in "headless" mode. Among other things, I've already figured out how to shut it down via a combination of adb and the ...
8
votes
1answer
3k views

Rooted phone - sending SMS message via command line

I have a rooted Droid (Sholes), with ConnectBot installed. I can ssh into it via dropbear copied to /system/xbin, and/or also the instance of Debian installed on it via the "Linux Installer" ...
7
votes
2answers
2k views

On Android can I write scripts (similar to Win .bat files) to combine several command line commands?

On Windows, I can run two commands using a .bat file. How can I achieve the same thing on Android For example: update my podcasts by calling pcastclient /updateALL force sync of my pictures ...
7
votes
1answer
2k views

How can I remotely change the volume?

At home I often connect my android to some speakers, to listen to internet-radio. It would like to be able to change the sound-level through a command on my laptop. I can open an ssh shell to the ...
7
votes
1answer
7k views

Enter recovery mode from command line

Does anyone know if there's a way to get an Android phone to reboot into recovery mode, from the Android command line? Note: I do NOT have adb access. I do NOT know the magic power-on sequence to ...
7
votes
2answers
3k views

Can I change some Android settings from the command line?

I would like to activate "USB tethering" from within a bash script, so is there any possibility to run a command line with adb shell to change some Android settings ? Edit1: The following command ...
6
votes
2answers
1k views

How to return to the home screen with a terminal command?

Is there a terminal command to go to the home screen? I need to do this via ssh, so I cannot just push the "home" button, I need to send a command-line action..
6
votes
1answer
644 views

Why do linux commands not work properly on android?

> adb shell sh-4.1$ ls -F -F: No such file or directory -F switch works fine on my Ubuntu. Why doesn't it work on android? Is there a way to make it work?
6
votes
2answers
887 views

Where to find description of all “/system/bin/service” calls?

In one answer I was adviced to use service call phone 2 s16 "$number". It works, but in service list I see other useful things I don't know how to use and can't easily find the information on the ...
5
votes
2answers
2k views

How to find the pathname of the swap partition on SD card?

As this warns, you should not enable swap on the wrong partition or you can destroy your phone: OK before we go any further! previous phones had a partition layout where mmcblck0 was the SDcard ...
5
votes
2answers
624 views

Rootless CLI Utilities

Do I have to root my android device to install command line utilities? I would really like to run Vim, among other programs on my phone. I have no reason not to root my phone, I just want to know if ...
5
votes
2answers
2k views

Read APK permission by shell command

I want to read the requested permissions of an .apk file on the computer (android sdk is installed) via command line. I.E.: $ android read-permissions /path/to/someapp.apk I know this is possible, ...
5
votes
1answer
5k views

What's the best way to restart Android via command line (remotely)?

I'm looking for the best / friendliest way to reboot my rooted android 4.1.1 device. I found these solutions so far: su -c "reboot" - Causes problems with wifi after restart on my device... I read ...
5
votes
1answer
3k views

Turn phone on with ADB or Fastboot?

My power button seems to have busted, is there a way I can boot my phone using ADB or Fastboot or some other command line interface?
4
votes
2answers
2k views

How to call from console?

How to make or receive a call from console? Expecting something like this, UNIX-style: make_call +3750291234567 < played_data.wav > recorded_data.wav wait_for_call < played_data.wav > ...
4
votes
1answer
17k views

How to install kernel module for android?

I currently have a custom kernel and ROM installed on my android device. The kernel I'm using comes with a separate download with kernel modules that you are to install yourself if you want. However ...
4
votes
0answers
279 views

Is there a way to switch Android users from the command line?

Using the following command, I managed to enable multi-user mode in an Android device that doesn't officicially support it: adb shell setprop fw.max_users 4. For good measure I also added the ...
3
votes
3answers
13k views

How do I invoke “su” from a terminal prompt?

I can get a root prompt in the terminal by running one exploits documented elsewhere. (e.g. here: http://wiki.cyanogenmod.com/wiki/Motorola_Droid_2_Global:_Full_Update_Guide) At this point, I can ...
3
votes
1answer
2k views

How to take backup of all installed APKs from Phone to PC?

How do I take backup of all installed apks from my sgs2 to PC using android sdk/ 3rd party tool etc? My phone is not rooted. I can install/uninstall apks using adb, but is there any similar command ...
3
votes
1answer
757 views

FFMpeg stream to FFServer from Back Camera

I'm looking for a way to stream my camera video from my Android phone to an FFServer, like I would with FFMpeg from the command line in Linux: ffmpeg -f video4linux2 -i /dev/video0 ...
2
votes
1answer
15k views

Why can't I get root access from shell?

> adb shell sh-4.1$ su Permission denied I have rooted my phone successfully. I know this because I'm able to install apps on SD card and I have a program called SD Maid that is able to operate ...
2
votes
1answer
3k views

A way to get the current resolution size and DPI from the command line/terminal/adb?

I've got adb access to my android phone. So I know that I can override screen density and screen resolution with the am command provided with Android. That's great and dandy, I guess. But is there a ...
2
votes
1answer
3k views

Minicom app for Android?

Is there a comm app similar to minicom, hyperterminal or zterm for Android? I would prefer a port of minicom, if it exits. BTW, I'm running Android ICS on a Galaxy Nexus.
2
votes
1answer
81 views

get webpages from command line

How can I get the contents of a webpage from the command line? On my mac I use the curl command, but there is no such command for the android command line. what command do I use?
2
votes
1answer
299 views

Is there a way to launch app via terminal in the background?

Is there a command to launch an app via terminal and have it start in the background? Something like the "&" in Linux...
2
votes
1answer
156 views

Installing an app from Play Store using the command line

Is it possible to install an app from Play Store using the command line and if yes, how? What I am trying to accomplish is something similar to using adb install file.apk but instead of an apk file ...
2
votes
1answer
253 views

wpa_cli not found on rooted device? [duplicate]

I rooted my device, then I go to adb shell and type su to enter wpa_cli. I was surprised that wpa_cli: not found appeared, although I get information when I type wpa_supplicant. I know that wpa_cli ...
2
votes
3answers
2k views

Open command prompt to access folders of a USB connected Android phone

If I connect a Phone with my Windows 7 machine via USB, it shows up in explorer with a name e.g. Nexus 5. How can I open a command prompt and change directory to this device. For lettered drives, I ...
2
votes
1answer
168 views

No pbcopy-pbpaste command

I am trying to access the clipboard but there is no pbcopy or pbpaste command. Is there an alternative to this command? how can i access the clipboard from the command line?
2
votes
0answers
278 views

How can I easily copy files from an Android device to a computer wirelessly via command line?

I need to copy jpegs from an Android phone's sdcard to a computer, ideally through command line (/storage/sdcard1/*.jpg to a remote location) I've tried Izzy's solution from this post like so: scp ...
2
votes
1answer
2k views

'android' and 'emulator' commands not found

I have installed android-sdk-linux on my ubuntu 12.04 netbook and I see that the commands android (which opens the AVD Manager) and emulator (to which on appending the name of a specific AVD, the AVD ...
2
votes
1answer
604 views

How can I install wpa_cli on my rooted device?

I rooted my device, then I go to adb shell and type su to enter wpa_cli. I was surprised that wpa_cli: not found appeared, although I get information when I type wpa_supplicant. I know that wpa_cli ...
1
vote
1answer
94 views

A Real Terminal (Root or No-Root)

I use KUBUNTU on my laptop, but this goes for any Linux distro. I can open a terminal window and type in things like sudo apt-get update, sudo apt-get install packagename. Is there a terminal that can ...
1
vote
1answer
2k views

Which WiFi-Direct commands can be used in Android?

I am interested to know what commands can be used in Android to control WiFi direct from the terminal/command line. I took a look into p2p WIFI direct but I didn't catch these commands!! I can find ...
1
vote
1answer
25 views

Please explain this weird response to adb command

127|root@android:/ # find / -iname "aaengine" find: /proc/19619: No such file or directory I dont know why I got told about some file I never known about when ...
1
vote
1answer
121 views

how to install command line programs

How to i install binaries on my non-rooted tablet i have the terminal application called Terminal IDE and i followed the instructions, i put my compiled binary in the folder local/bin/. I comiled a C ...
1
vote
2answers
443 views

How to install bundles of additional terminal commands for rooted devices?

I rooted a HTC Wildfire S device recently and flashed an Android 4.1.2 AOKP Jelly Bean Custom ROM. One benefit is that I can use the terminal now. I'm a little used to using terminal emulators on ...
1
vote
2answers
2k views

Format SD card after playing with fdisk (No card reader)

After playing with partitioning using FDISK (from busybox) i finished and now i want to format it back to whatever is usable under Android. Using same FDISK via Android console i deleted all ...
1
vote
2answers
326 views

Close Application with locale?

I use the locale app to automaticly start an obd-app (Torque) when I enter my car. This works well. Now I want to automaticly close that app when I leave my car. As there seem to be no Plugins to ...
1
vote
1answer
567 views

HTC Desire - phone's dead

I was trying my application on HTC Desire when I realized there was a problem with the app so I force stop it. Next thing is the screen freezed - HTC white welcome screen. I tried rebooting several ...
1
vote
1answer
190 views

How do I get the common name of an app having the package name (like com.android.blabla)? (command line or included app)

I’m interested in a way to go from the package name (e.g. com.android.providers.telephony) to it’s common name (Phone/Messaging Storage). The answer should only assume shell access (adb) on the phone ...
1
vote
0answers
997 views

How do i open a text file from a terminal window from within the android gui

I'm trying to open a text file from within a terminal window emulator -- but not so it opens in the actual terminal but more like I've just clicked on it. So my question is: What command can I use to ...
1
vote
0answers
263 views

AVD Manager runs but android.bat does not

I can create virtual devices using AVD manager. I can run the emulator and create AVDs. But i cannot do the same using "android.bat". I get the following error- ERROR: No suitable Java found. In ...
0
votes
2answers
347 views

How to use Android modem without using PC

I have rooted my mobile. I wanted to use modem of Android phone without connecting to PC. How to give AT commands without connecting to PC, because in http://atinout.sourceforge.net/, it is suggesting ...
0
votes
1answer
1k views

Toogle 3G, Bluetooth, and WiFi with Android Linux or ADB commands

Since I have not found an Android command reference list (with meaning and usage of the command), I have some questions: Can I disable/enable 3G? Can I disable/enable bluetooth? Can I switch from ...