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

4
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?
0
votes
0answers
18 views

SD card root access

Hey I just wanted to ask how it is possible to access my sdcard data with command lines on a rooted phone ? I tried to ls in /sdcard, also in /mnt/sdcard/ but my files are never displayed, yet a ...
1
vote
0answers
86 views

I can't remount /system as rw. I get an error message: mount: Read-only file system

I'm using a rooted Huawei G7 and i'm trying to install BusyBox, but I keep getting an error. I'm 100% sure this error is because there is some weird write protection on /system. I know this because ...
0
votes
0answers
11 views

adb syntax not proper

I want to root, change bootloader and install TWRP on my wife's LG LH410. I found out script to do this on xda-developers. But after unpack zip file, I notice that bat file contains such lines (...
3
votes
2answers
4k 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 ...
6
votes
3answers
15k 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 ...
0
votes
0answers
45 views

Download from Comand Line

Is there any command in Android to download some file from internet using the command line. I tried wget but it's not available on my android device.
0
votes
2answers
6k 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
54 views

How to open an URL in Chrome Incognito Tab by launching the Incognito Activity?

Is there any way to open a link in Google Chrome's Incognito Mode from the Terminal ? I tried this but it didn't work: am start -n com.android.chrome/com.google.android.apps.chrome.document....
10
votes
2answers
4k views

Where to find description of all “/system/bin/service” calls?

In one answer I was adviced to use service call phone 2 s16 "$number". It works, but in service list I see other useful things I don't know how to use and can't easily find the information on the ...
1
vote
0answers
24 views

Run Android on Android?

We know it is possible to use chroot to run full Linux on android, also support Xserver (GUI).So, it should also be possible run another android on an exist android ? for example, using chroot to run ...
1
vote
0answers
41 views

adb devices -l not showing USB qualifiers?

I've read in several places that calling adb devices -l will return the both the serial numbers and USB qualifiers for the attached devices. However, when I issue the command I only get the ...
-1
votes
1answer
87 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 ...
17
votes
3answers
17k 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 ...
3
votes
0answers
35 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
4k 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 ...
4
votes
2answers
5k 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
38k 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 ...
-1
votes
3answers
3k 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
144 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
196 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
12k 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?
10
votes
0answers
776 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
18k 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
23k 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
5k 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
60 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
6k 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
90 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: C:\Users\Mole\Downloads\LG_Root\...
0
votes
0answers
103 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
52 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
206 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
103 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
746 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 system/...
3
votes
0answers
219 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
3k 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
724 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
83 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
637 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
12k 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
187 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
2k 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
1k 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
86 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
1k 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
682 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
738 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 ...