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
votes
1answer
29 views

Auto refreshing the signal

When we go to the area where signal is not reachable, we experience "Emergency calls only" or "No service". But after coming-out from that area we sometime found phone is not receiving signal and ...
16
votes
3answers
16k views

Is it possible to activate the “USB Tethering” Android setting 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
2answers
5k 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 ...
3
votes
1answer
2k 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?
6
votes
3answers
14k 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 ...
3
votes
0answers
25 views

What represents 'bootloader' in the possible outputs of `adb get-state`?

I recently employed the use of adb get-state and decided to know further about it. Running adb inter alia shows: adb get-state - prints: offline | bootloader | device I intend to ...
2
votes
3answers
3k 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 ...
-1
votes
0answers
39 views

How to gain access to the fm radio on my phone with root access?

Android is based on a Linux Kernel, and is therefore a variant of Unix. As such I would expect some sort of command console/command prompt to be accessible. According to this site and this site, most ...
4
votes
2answers
4k 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. ...
20
votes
13answers
37k 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 ...
3
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 ...
-1
votes
3answers
2k 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 ...
8
votes
2answers
12k 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
0answers
89 views

How to get to know via command-line/adb where boot process hangs?

Question: (How) is it possible to get to know via adb where exactly a booting-up android device is hanging? My problem/ background information: I recently did changes on the automatic display ...
3
votes
3answers
2k 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 ...
0
votes
1answer
118 views

Why 'am start PACKAGE' cannot launch some apps and shows an error?

I keep having an error trying to start some apps using am start command. It works for many, but for some apps I get the same error mentioned below: #adb shell am start com.amazon.venezia Starting: ...
5
votes
4answers
10k 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?
7
votes
1answer
1k 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?
9
votes
0answers
543 views

How to send a variable value to and receive it in a 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 ...
8
votes
2answers
17k 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 ...
21
votes
3answers
21k 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
4answers
4k 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 ...
-3
votes
1answer
42 views

When using a terminal emulator why are there so many normal Linux commands that to not work?

There are a lot of standard Linux commands that do not work from a Terminal Emulator in Android. I thought Android is based on the Linux kernel, but it lacks so many functions, like man groups find ...
0
votes
4answers
5k 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.
0
votes
0answers
48 views

Problems rooting lg risio/leon from laptop [closed]

I have H343 LG Risio/Leon that I was manually rooting with PC but I get stuck in CMD at UNLK : after typing code and pressing enter. At which point I get this message: ...
0
votes
0answers
74 views

Can someone help me finish rooting LG Leon/Risio 5.1.1

I have H343 LG Risio/Leon that I was manually rooting with PC but I get stuck in CMD at UNLK : after typing code:Push_file.exe\.\COM3 busybox tmp/busybox and hitting enter. At which point I get this ...
0
votes
1answer
42 views

Is it normal for a USB OTG converter to show in lsusb

When running lsusb (not as root) with an OTG adapter plugged in without anything plugged into it I get : u0_a83@flounder:/ $ lsusb Bus 001 Device 001: ID 1d6b:0002 Bus 002 Device 001: ID 1d6b:0002 ...
1
vote
0answers
144 views

How to restart a system app from the command line?

After deploying a new APK for a system app, is there a way to restart the app process without rebooting the device? Non-system apps are managed with the Activity Manager through the am command. There ...
1
vote
0answers
71 views

Get package name of an app given its displayed name using ADB commands

I'm trying to: Get the package names of all apps on my device (none of them are mine so sadly I can't get it from the Manifest) and put it into a file to save for a class project. I also want to get ...
1
vote
1answer
722 views

Get common name of an app given its package name

I'm interested in a way to go from the package name (e.g. com.android.providers.telephony) to its common name (Phone). I'd like to know if there's ADB/shell command (from the phone), or any ...
3
votes
0answers
202 views

Cause and solution of “Error: Unknown operation string: <OP>”

First of all, the following command works perfectly fine on Android 5.1.1 (CM, PA and Tesla ROM builds): adb shell su -c 'appops set android SYSTEM_ALERT_WINDOW deny' The said command blocks ...
3
votes
1answer
2k 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
1answer
585 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
63 views

How do I investigate the memory Usage?

I've a Micromax A74 with (rooted) Android 4.2.2. Recently I've faced the crashing of some application and started to analyze the usage of RAM. Settings>Apps>Running is not helpful: Sometimes I ...
2
votes
1answer
249 views

Trigger Setup Wizard at next boot using command-line

I am looking for a way to use ADB to trigger Setup Wizard at next boot. I know I can run the following command and get it to pop up. However, I can't figure out what triggers it to start at boot. adb ...
9
votes
2answers
11k 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 ...
0
votes
1answer
151 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 ...
1
vote
1answer
837 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
286 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?
0
votes
0answers
63 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
-3
votes
1answer
795 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: ...
1
vote
1answer
306 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, ...
3
votes
2answers
583 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
34 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?" ...
2
votes
1answer
553 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
2answers
87 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
301 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 ...
3
votes
0answers
2k 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
69 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
116 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 ...