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

1
vote
1answer
28 views

How to check my phone hardware specs on Android terminal emulator

I was wondering if there is a command to check the hardware specs of my phone. I just installed the Android terminal emulator. I've tried the 'lshw' but it does not work. Thanks in advance.
0
votes
0answers
19 views

there is a malware on android, how do i delete it? can`t delete by root access

i have root access in my device but there is a malware in /system/app/ that i can't delete. i'm using adb shell & i have tried root explorer in android Dr.WEB also can'n delete it this ...
15
votes
2answers
15k 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 ...
1
vote
0answers
20 views

ADB- Cannot get the Path variable to work for ADB

I am unable to execute ADB from CMD after adding it to the Path Variable. I am able to launch it from the folder when I open a Command Prompt there. But I am unable to launch ADB straight from CMD ...
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
0answers
18 views

TTS speech from console

Can I synthesize arbitrary text strings with TTS from the Android's console? To give the idea, on Debian I would do: festival --tts <(echo Buongiorno signore) The TTS engine needs to be always ...
3
votes
1answer
53 views

Disable touchscreen input via console

I'm looking for a way to disable and enable the phone's touchscreen via console, and possibly the physical buttons, so to prevent finger touches from being processed. The phone is a Samsung Galaxy ...
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 ...
0
votes
1answer
60 views

DNSCrypt error: could not load library “libsodium.so”, on Asus Zenfone 2 running Android 5.0

I tried installing DNSCrypt on my Asus Zenfone 2 device. But when I try to run it it gives me this: root@Z008_1:/ # dnscrypt enable Enabling dnscrypt... iptables: No chain/target/match by that name. ...
0
votes
1answer
1k 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?
1
vote
1answer
44 views

How do I screen pin an app in Android Lollipop using command-line?

I'm aware that I can go to Settings → Security → Screen pinning → On, and then tap Overview → touch the pin icon on the app listed there and it would be pinned, effectively putting ...
1
vote
0answers
40 views

Cannot install Google Camera on Nexus 5 running CM 12, neither from Play Store, nor with ADB

I need to reinstall Google Camera, and I tried to remove it via Settings -> Applications. Everything went fine, but when I tried to install it back via Play Store, it said: Unknown error code ...
1
vote
1answer
506 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 ...
6
votes
3answers
983 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 ...
0
votes
0answers
191 views

How to permanently disable mediaserver service?

I am trying to permanently disable the notorious power hogging mediascanserver or mediaserver (whatever it's better known) service on a rooted Jiayu S3. Here are my ADB commands: su pm disable ...
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
2answers
266 views

Fastboot poweroff command

Is there a way to shutdown my Mate7 from fastboot? Long pressing the power button makes the phone restart again. I need to shut it down so I can recharge it then restore to stock.
4
votes
1answer
590 views

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
1k 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 ...
3
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
58 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
66 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
1k 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
7k 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?
2
votes
2answers
10k 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 ...
13
votes
3answers
11k 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
150 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
45 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
24 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
57 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
264 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
22 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 ...
2
votes
2answers
304 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
13k 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
37k 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
97 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 ...
12
votes
3answers
13k 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 ...
0
votes
1answer
417 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
405 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
820 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
494 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 ...
3
votes
0answers
312 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
215 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 ...
13
votes
2answers
6k 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
901 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
969 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
31k 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 ...
2
votes
1answer
4k 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
28 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
21k 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 ...