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
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 ...
2
votes
1answer
1k 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?
5
votes
4answers
9k 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?
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 ...
1
vote
1answer
77 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
44 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
56 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. ...
0
votes
1answer
217 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 ...
1
vote
1answer
75 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, ...
2
votes
2answers
248 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 ...
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?" ...
1
vote
3answers
3k 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 ...
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.
1
vote
1answer
191 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 ...
7
votes
0answers
241 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
37 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 ...
2
votes
1answer
3k 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 ...
13
votes
3answers
14k 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 ...
1
vote
0answers
76 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
1answer
326 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 ...
3
votes
0answers
1k 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 ...
-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
72 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 ...
1
vote
1answer
769 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 ...
19
votes
2answers
19k 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 ...
4
votes
0answers
235 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 ...
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 ...
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 ...
0
votes
0answers
132 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 ...
-1
votes
1answer
2k views

Shutdown phone without root using shell command

Is there a shell command to shutdown and/or restart the phone without root? I need this for an app I'm developing. It's going to be a feature called lockout mode that turns off the phone when it ...
0
votes
1answer
161 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 ...
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, ...
0
votes
0answers
124 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
345 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 ...
5
votes
2answers
24k views

Command to list partitions?

I want to list the partitions on my phone - system, boot, recovery etc. What terminal command should I use? The mount command just lists mount points.
0
votes
0answers
352 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
172 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 ...
5
votes
2answers
15k 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 ...
3
votes
1answer
435 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.
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 ...
2
votes
0answers
120 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 ...
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
231 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
160 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
966 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
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 ...
1
vote
0answers
935 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 ...