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

3
votes
0answers
207 views
+50

How to change “Preferred Network Mode” using adb without reboot?

I'm trying to change my phone's (CM 12, Stock 4.2, both rooted) preferred network mode from "GSM/WCDMA" (0) to "WCDMA only" (2) and vice versa (there can be other modes too), using command-line only. ...
2
votes
4answers
670 views

How to list all major partitions with their labels?

I want to figure out all partitions on my device together with their resp. mount points or labels (i.e. to know which partition is holding system, recovery, boot, etc.). This needs to be device ...
6
votes
3answers
170 views

Enable On-screen navigation in CM12 (Lollipop) using shell?

Device: OnePlus One (OPO); running CM12, is rooted, and has Xposed Framework installed. I need to enable On-screen navigation (it disables Hardware (HW) keys and shows soft keys at the screen; like ...
2
votes
2answers
4k 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 ...
3
votes
1answer
49 views

command on adb waits forever

I can successfully execute ADB commands, but if the command has no output the command line just waits there and does not let me enter a new command until I press ctrl-c, the commands do work however. ...
0
votes
0answers
19 views

How are the commands “log” and “logwrapper” used?

I'm trying to figure out the usage of "log" and "logwrapper" command but so far cannot find out a good manual. (E.g. This is a very good manual written for "logcat"). I'm looking for a real-time ...
1
vote
2answers
847 views

Allow “unknown sources” from Terminal without going to Settings App?

I have a corrupted Settings app in CyanogenMod and have a possible idea to restore a backup of it (App and Data) in Titanium Backup. But it's currently set to not allow "unknown sources" so Titanium ...
5
votes
3answers
6k 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?
0
votes
2answers
38 views

Fastboot poweroff command

I need a way to shutdown my mate7 from fastboot .. Long press power button make the phone keep restarts again .. I need to shut it down so i can recharge it then restore to stock.
2
votes
2answers
9k 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
2k 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 ...
0
votes
1answer
2k views

Need one-line adb shell su push & pull to access /data from Windows batch file

I've been struggling for two days. Hope for help here. I wrote a Windows batch file that replaces Amazon lockscreen ads with user images on rooted kindle fire hd 7", 2013 (kfsowi). Just learned I ...
13
votes
3answers
10k 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 ...
0
votes
0answers
85 views

Start wifi hotspot through adb using service command

I saw this question, the answer there and the comments on it. The solution still needs at least three steps to enable hotspot using command line. I'm looking for one single command. E.g In Lollipop, ...
1
vote
0answers
30 views

Camera group not found in Android groups

Edit: I found that using ls -n shows the group's id and not its name. The group id for camera is 1006. I can now use the find command as well. However, this id isn't listed in the output of id or ...
0
votes
1answer
20 views

find command says: unknown group XYZ

This question is the next part of this question. I'm trying to use find command (Android 4.2.1; Busybox installed, have root access) to list files owned by a specific group under /, but every time I ...
0
votes
1answer
41 views

How to launch apps from terminal

In linux I like to launch the applications from the terminal. Most of the time it is the fast way to launch apps especially on repeated use. In android there are good launcher like Fast app search ...
0
votes
2answers
110 views

How to run a script on a rooted android device?

We recently deployed a lot of android devices internally for displaying customized web page only. Device: RKM MK902 OS: Android 4.4.2 Rooted Wifi radius 8021x Dolphin browser with kiosk mode and ...
1
vote
0answers
18 views

Ngrok (compiled for Arm5) crash on android: can't find core dump files!

I downloaded Ngrok which I want to install on a old HTC Hero [the project is to transform the phone in a ipcam, reachable behind a NAT network], so I chose the version compiled for Arm5. You can find ...
1
vote
2answers
242 views

How do I display message from from `adb shell` (or a shell script)?

I expect it to be something like adb shell am start SomethingArcane ... "Hello, world" and the message box pops up on screen, saying "Hello, world".
8
votes
1answer
12k 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
34k 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 ...
0
votes
1answer
75 views

How do I create an archive for easy extraction to /data/local/tmp/ in “adb shell”?

Usual shar archives fail to extact in adb shell due to problems with lock directory and temporary files for HERE documents. Zip archives are also not an option. How do I make an archive that can be ...
15
votes
2answers
13k 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 ...
11
votes
3answers
12k 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 ...
4
votes
1answer
2k 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 ...
0
votes
0answers
347 views

How do I get list of all application packages together with their activity label from adb shell?

Sometimes I have a trouble matching application's package name in /data/data/ or /data/app/*.apk with the user-friendly activity label I see in GUI. How do I list application packages together with ...
0
votes
1answer
285 views

Why does Terminal Emulator for Android has completely different commands comparing to GNU/Linux?

I installed Terminal Emulator for Android hoping I could easily get root access,install apps via terminal etc.So,thinking Android is a Linux distribution,I felt that it must have a terminal emulator ...
1
vote
1answer
204 views

Update Android SDK Platform Tools via Command line

I want to write a script to update the Android SDK platform tools and I need the command if available to run in order to achieve this. What I have found is that I can use the Android command under the ...
1
vote
1answer
787 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
448 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 ...
2
votes
0answers
250 views

How can I change preferred network type through a script (or terminal command)

I'm currently attempting to create a workaround for a problem that is plaguing a ROM that I'm using. While my phone and ROM are capable of using LTE, and use it perfectly fine, the "preferred network ...
1
vote
1answer
170 views

Tar.gz not working (Segmentation fault) on ext4 partition

I have a strange problem with tar gz compression. I used to have SD card mounted as a fat32 partition. However, now I changed it so that external sdcard is being mounted under /data/media/0 and is ...
11
votes
2answers
5k 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 ...
0
votes
1answer
837 views

Why Does Not My File Explorer See A Mounted Folder?

Why can't i see a mounted folder into my file explorer, but i can see it from a terminal? I'm mounting a folder (/mnt/sdcard/Source) into other folder (/mnt/sdcard/Destination) with the next command ...
1
vote
0answers
731 views

What are the command line options of Genymotion's player

Can someone give me a list of the cli options of Genymotion's player command. I see that I can get a list of the devices via VituralBox's command: $ VBoxManage list vms Then I can start the ...
18
votes
12answers
30k 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 ...
0
votes
0answers
48 views

Command line entry to check apk compatibility

I am using android via an emulator integrated with eclipse ide. I usually download app from my windows 7 ultimate / from my ubuntu 14.04. Then, I will copy the apk to \android-sdk\platform-tools. ...
0
votes
1answer
980 views

How do you capture video from the command-line on an Android device?

How do you capture video from the camera on command-line of a rooted Android mobile device?
2
votes
1answer
3k 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 ...
0
votes
0answers
26 views

Is this command safe to run from / as root

find . * -depth -print0 | xargs -0 rmdir It finds and removes all empty folders (including hidden ones) recursively. I only tired it on my home folder and a pendrive in Linux PC and it worked but I ...
4
votes
3answers
18k 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
6k 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
124 views

ERRORLEVELs in adb push and pull

I need to execute adb commands from DOS batch files, but I need to know if the push and pull commands were successful. Do these commands return an ERRORLEVEL, or some other environment variable to ...
0
votes
1answer
39 views

where can I find man page for top

I have a bugreport file containing output from (as it says) top -n 1 -d 1 -m 30 -t The -m option is not known on my ubuntu linux, wo where can I find the android man page for the top command? I ...
-1
votes
1answer
92 views

CLI commands in android?

Since Android is linux, cant i use standard linux commands inside android? I know there are applications that allow for a "Command Line Interface" (CLI). I also imagine that adb would provide access ...
1
vote
2answers
1k 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 ...
2
votes
1answer
59 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 ...
7
votes
2answers
4k 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..
0
votes
1answer
2k views

How to execute a file via adb command line?

I am trying to root my Motorola Xoom. Root checker pro currently tells me that "Executing this file can grant root access!" So I want to try that. the file is located in system/bin and is called su. ...