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
70 views

Turn on USB debugging using command-line

I have a Samsung Galaxy S2 and a PC running Debian 8. How can I turn on USB debugging using command-line on my PC without touching the phone?
-1
votes
0answers
43 views

Run ADB commands without using a computer

I want to use adb without a computer to install apps in all accounts and gain unrestricted (Terminal emulator is restricted by app permissions but adb shell is not) shell and create adb backups .I ...
0
votes
0answers
29 views

How to run alsamixer command for android shell

I am trying to configure sound for a specific sound card and I need AlsaMixer to open but I can't find the right command to open it from terminal. Any help would be appreciated
-2
votes
1answer
49 views

Error “Function not implemented” when creating symbolic link

I'm trying to execute this command busybox ln -s "mydir/" "$PWD"/mylink in order to create a symbolic link from mydir; that, I am receiving the following error ln: /mnt/shell/emulated/0/mylink: ...
2
votes
0answers
36 views

Command to re-calibrate magnetic sensor [migrated]

Is there any command through which I can reset the magnetic sensor in an Android device? I tried echo 1 > /sys/class/sensors/proximity_sensor/prox_cal as suggested here but it's not working. ...
1
vote
1answer
70 views

How do I install missing command line tools onto an Android device?

Android installations do not always have all the tools one would expect to have on a Unix-like system. For example, right now I have a problematic device which doesn't have find CLI utility. I mean, ...
0
votes
0answers
16 views

How do I run Mercurial on my Android device?

How do I run the Mercurial version control system on my Android device? (If I'm reading the question "How can I make it so that any user can chmod in my fuse-mounted ext4-formatted /sdcard?" ...
0
votes
1answer
204 views

Error: “Operation not permitted”, when attempting to remove su binary placed by KingoRoot

I rooted my P8-Lite ALE-L21 (Android 5.0.1) with supersu.zip through TWRP recovery. After that I installed KingoRoot and KingoRoot replaced su binary with some other su binary which is obsolete for ...
7
votes
0answers
235 views

Sending a variable value to a Tasker's task using command-line and a method to receive it in task

I've a OnePlus One with rooted Cyanogen OS 12 and Tasker v4.8. I've a bash script in PC which when exiting requires a Tasker's task to be executed. I've seen the question Running a tasker task via ...
0
votes
2answers
34 views

Using command-line to boot into primary and secondary ROM of MultiROM

I've a OnePlus One with unlocked bootloader, modified TWRP v2.8.6, unofficial MultiROM v32k, MultiROM Manager v1.186, Cyanogen OS 12 as primary and several Android 5.1 secondary ROMs. I don't have any ...
1
vote
0answers
75 views

What is the command to encrypt Android rooted phone directly from the command prompt?

I want to encrypt my Android phone which has an engineering/userdebug binary. Generally it takes around 1 hour, but I heard it can be directly encrypted it with the adb command-line tool. So how do ...
-2
votes
2answers
39 views

android command line shell

I have a Nokia X running Android 4.4.4 and I have Terminal Emulator and Busybox 1.24 installed but I can't still find some useful commands to perform several operations with the command line ...
1
vote
1answer
69 views

Acquire Android image using flash drive OTG

In Linux, the dd command is used to pull the image from the smartphone to computer. And of course, the smartphone need to be rooted before the dd command launched. Is there any specific command or ...
2
votes
2answers
242 views

Where should I install Toybox?

I own a rooted Samsung Galaxy S Relay 4G running stock Android 4.1.2. If you have Android 6.0 "Marshmallow" or better, then you have Toybox. This is a package of command-line tools, handy for ...
4
votes
0answers
232 views

pm hide VS pm disable — the identity crisis

What's the need of pm disable when pm hide already does its job? I've compiled some information based on my search and research: click here to see the table (edited). As you can see, pm hide can ...
0
votes
1answer
156 views

Use of the -i argument in fastboot command-line?

I was planning to flash a custom recovery in my Yu Yuphoria. So I searched for it on Google, and found a download link along with a written tutorial. I'm acquainted with the fastboot commands, so I ...
0
votes
0answers
120 views

Any input command on Android 6.0 via SSH outputs “Killed”

I rooted my Lollipop 5.1.1 Nexus 5 and started playing around, like controlling it remotely via SSH doing things like: input keyevent 26 and other stuff like that. I noticed there was a software ...
0
votes
1answer
334 views

Getting mount's usage suggestion when attempting /system remount [duplicate]

I'm trying to remount system on a rooted Samsung GT-S6102 running Android 2.3.6: # mount -o rw,remount,rw /system Usage: mount [-r] [-w] [-o options] [-t type] device directory This is exactly like ...
0
votes
0answers
345 views

Using the Cerberus shell to input commands

I'd like to use the Cerberus shell to input commands like taps, swipes, and text. I know how to do it using the command line and ADB shell, but I don't have USB debugging enabled on my Nexus6, so I'm ...
0
votes
1answer
168 views

Check OpenSSL version in Android with Java runtime or shell command

I have a problem with checking OpenSSL version in Android device. I've tried to grep OpenSSL from system/lib/libssl.so with java runtime.exec, but it doesn't work? Anyone can help me, how to make a ...
0
votes
0answers
129 views

How can I install e2fsprogs on my device?

My phone has the "Monkey Test" virus and there is solution in here, but when I try to execute this command: chattr -iaA providerCertificate.apk I receive the error "chattr : not found". I found a ...
2
votes
0answers
119 views

Enable bluetooth tethering via command line

Is there a way to activate the bluetooth tethering mode in Lollipop using the command line? You can do it for usb tethering by running the command service call connectivity 30 i32 1 Is there a similar ...
3
votes
1answer
424 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.
3
votes
1answer
3k views

How to delete a file (e.g. malware app) that cannot be even removed with root access?

I have root access in my device, but there is a malware in /system/app/ that I can't delete. This malware installs TimeService, MonkeyTest, and also some other apps like DR battery and privacy guard, ...
1
vote
1answer
57 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 ...
0
votes
0answers
82 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 ...
4
votes
1answer
228 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 ...
2
votes
1answer
323 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
1answer
189 views

How can I find which apps/packages reference a given permission using command line?

Given some permission tld.developer.app.permission.PERMISSION how can I use adb/root shell to find all the installed packages that define/depend on it? The permissions are defined in the manifest ...
0
votes
1answer
156 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. ...
1
vote
0answers
915 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 ...
0
votes
0answers
239 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 ...
0
votes
3answers
3k 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.
6
votes
3answers
4k 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 ...
4
votes
1answer
3k 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. ...
0
votes
0answers
294 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, ...
0
votes
1answer
38 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 ...
1
vote
0answers
68 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
80 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
1k 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
67 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 ...
3
votes
1answer
78 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. ...
1
vote
1answer
958 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 ...
1
vote
1answer
765 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
1k 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 ...
3
votes
4answers
2k 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 ...
2
votes
2answers
502 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".
1
vote
1answer
333 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 ...
4
votes
0answers
530 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
2answers
4k 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 ...