The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [command-line]

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.

68 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
26
votes
0answers
12k 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 ...
7
votes
0answers
1k 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 ...
4
votes
0answers
467 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 ...
4
votes
1answer
3k 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?
4
votes
1answer
4k views

FFMpeg stream to FFServer from Back Camera

I'm looking for a way to stream my camera video from my Android phone to an FFServer, like I would with FFMpeg from the command line in Linux: ffmpeg -f video4linux2 -i /dev/video0 http://IP:8090/...
3
votes
0answers
7k 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 ...
3
votes
0answers
687 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 Android ...
3
votes
0answers
2k 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 ...
2
votes
0answers
96 views

Shutdown/Reboot Process Hangs Device

Is there any reason a programmatic or command-line shutdown (or reboot) process in Android 7.1 might randomly result in a hard freeze-up, requiring a long (~8 second) press of the power button to ...
2
votes
0answers
3k views

Package installation in Termux

I'm reading this guide that describes how to install the statistical language R on Termux. My installation journey is briefly outlined below. I need to determine why nothing happens at Step #2 ...
2
votes
0answers
29 views

is it possable to install a linux distro ie:- nethunter on a android device

I have been trying to work out how to use my old Android tablet as a stand alone Linux tool for pen-testing and network monitoring and logging. I have it boot straight into the OS without having to ...
2
votes
0answers
167 views

Why does every adb command take several minutes?

I've run adb devices and adb push some-stuff /sdcard, and both commands take several minutes. Once adb push gets started though, it races through the file, so the throughput is fine. It just takes an ...
2
votes
1answer
911 views

Invoke /system/bin/sdcard manually via terminal

I am trying to mount an EXT4 formatted SD card under Cyanogenmod 13.1 (Android 6.0.1). So far, I have setup scripts to mount the card at /mnt/ext_sdcard during boot. My current understanding is that ...
2
votes
0answers
334 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 know ...
2
votes
0answers
337 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
0answers
1k views

How can I easily copy files from an Android device to a computer wirelessly via command line?

I need to copy jpegs from an Android phone's sdcard to a computer, ideally through command line (/storage/sdcard1/*.jpg to a remote location) I've tried Izzy's solution from this post like so: scp -...
1
vote
1answer
17 views

How to set Wi-Fi HTTPS proxy, not HTTP, via adb shell?

For HTTP I found a link: How to set WIFI proxy via adb shell? But I want to setup HTTPS proxy via adb shell.
1
vote
1answer
56 views

“agrep” for Android Terminal?

How can I do this (agrep) in the Android Terminal? This program allows elastic text searching, which means that searchqwery would match searchquery, and searching Android would also match Anfroid or ...
1
vote
0answers
47 views

How to switch between APNs using adb?

Is there any adb or shell command available to switch between different APNs?
1
vote
0answers
46 views

Installing a homebrew/linuxbrew formula on an Android device

How would one go about installing a simple homebrew/linuxbrew formula on an Android device via adb? Specifically, I want to install this formula which contains a cli tool called aamath that translates ...
1
vote
0answers
388 views

Why using ADB command 'settings put global preferred_network_mode' doesn't reflect the changes in Test Settings?

I've been trying to search about changing network mode programmatically which was already answered, but I noticed that when using: settings put global preferred_network_mode x settings put global ...
1
vote
1answer
367 views

How to make adb shell commands wrap single line to multiple lines by default?

Let's say I have this long one-liner command: am force-stop com.example.foo; am force-stop com.example.bar; am force-stop com.example.foo2 am force-stop com.example.bar2; am force-stop com.example....
1
vote
0answers
125 views

Is there a command in /system/bin to wipe cache?

Is there a command in /system/bin to perform cache clearing?
1
vote
0answers
303 views

How to assess what apps or settings are causing high CPU usage from system_server process on Android Nougat?

I am running root Android Nougat on a Nexus 6P. My battery is draining in <3hrs. When I run su -c htop it shows system_server is using >400% CPU. I have now factory reset 3 times and each time this ...
1
vote
1answer
2k views

Does using brightness dimmer (screen filter) really save battery?

We know that the lower the scree light/brightness, the lower the battery consumption. There are some applications which provide ability (without root) to lower the brightness beyond the (default) ...
1
vote
0answers
112 views

Arduino heart rate sensor bluetooth terminal upon event command

I have an Arduino uno r3 set up as a pulse/heart rate monitor, I have a HC 05 bluetooth module set up so i can connect with my android phone, i get the reading on my android phone in a "heart rate is ...
1
vote
0answers
2k 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 ...
1
vote
0answers
99 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
578 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
vote
0answers
1k 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
710 views

ERRORLEVELs in adb push and pull

I need to execute adb commands from DOS batch files, but I need to know if the push and pull commands were successful. Do these commands return an ERRORLEVEL, or some other environment variable to ...
1
vote
1answer
2k 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/...
1
vote
0answers
648 views

AVD Manager runs but android.bat does not

I can create virtual devices using AVD manager. I can run the emulator and create AVDs. But i cannot do the same using "android.bat". I get the following error- ERROR: No suitable Java found. In ...
1
vote
0answers
3k views

Toogle 3G, Bluetooth, and WiFi with Android Linux or ADB commands

Since I have not found an Android command reference list (with meaning and usage of the command), I have some questions: Can I disable/enable 3G? Can I disable/enable bluetooth? Can I switch from one ...
1
vote
1answer
5k 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 found ...
0
votes
0answers
24 views

Enable and disable system overlays with shell command

I'm trying to create an automatic Dark Mode using Tasker, which would work disabling overlays (to get a default light theme) and enabling others (to get a dark mode). For the light theme I run cmd ...
0
votes
0answers
48 views

How will I know what exactly I need to uninstall

I'm on a galaxy s10+ and let me just say, I have OCD really bad lol. So the s10+ came with a lot of bloatware, and currently there's no root method for the phone I have, which leads me to use adb PM ...
0
votes
0answers
181 views

Can't find call log from adb shell

Phone is a Samsung Galaxy E5 SM-E500m (lte, dual chip, codename e5lte). Android version 5.1.1 "lollipop" Stock ROM. I pulled the database file from /data/data/com.android.providers.contacts/databases/...
0
votes
0answers
26 views

LG K20 on metropcs

The hotspot is working 5 to 8 times faster, but the phone no longer has any data on the phone. There is no network on the phone whatsoever no email, no browser, no play store. Not even pics through ...
0
votes
1answer
105 views

Can't chown or chmod files on android phone

Hi there i got some files on my android phone and want to make them executable. Permissions are root:sdcard_rw. I cant remove tha sdcard_rw with chown, and cant make the files executable with chmod.
0
votes
0answers
2k views

Install Split APK Manually

Recently I got to know a thing called split apks, and found the slices as invalid apk files, only the base is. Unfortunately, this means the usual default package installer is unable to handle this, ...
0
votes
0answers
42 views

How to access Wifi connection/disconnection history of up to X months?

I found the following script works but only shows recent activity: adb logcat -v threadtime ConnectivityService:* *:s Can anybody please help on the script, so I can view the connectivity log back ...
0
votes
0answers
399 views

Android Terminal: Vibration command?

Which command in the Android Terminal can be used to vibrate? (for a custom length such as 50 milliseconds) I would like to integrate vibration feedback into a shell script. Maybe I need permission ...
0
votes
1answer
207 views

Send data via Bluetooth to Serial

I have an application running on Win that the JavaScript would capture the string from a webpage and wake up the cmd, cmd would have the parameter as below. bridgetool.exe -c serial -p com1: -b ...
0
votes
1answer
381 views

what is the standard editor in Android?

I'm connecting to this Google phone via adb, I need to change a character inside of a text file, and I would use vi, or maybe sed -i, or even pico if nothing else helps, but I don't find any well ...
0
votes
1answer
432 views

How to run GNU utilities without root?

Is there any way to use GNU utilities like GNU's sed, find, bash, and awk WITHOUT root? Android's utilities that are provided by toolbox and the BusyBox applets provided by one particular application ...
0
votes
0answers
241 views

Running commands operating on files always results in permission denied errors

When I try executing commands operating on files, they always fail. I can't check permissions on the terminal because I'd have to run a command that operates on a file (directory) in order to do so. ...
0
votes
1answer
3k views

How to test internet speed using terminal emulator on Android

I have Termux app installed on my Android phone. Is there a speed test tool that I can install and use from the command line? I have tried speedtest-cli, installed it by: pip install speedtest-cli ...
0
votes
0answers
149 views

Viewing the GPS-location of an Android Device?

So at the moment I'm looking for a way to show the live position of an android device. Mainly for a way to let the device send it's current GPS-position. All apps I've been looking at only allow to ...
0
votes
0answers
175 views

In Ubuntu Desktop my Arduino Uno shows up as /dev/ttyACM0 … where is it in android?

When I connect an Arduino Uno via USB to my Linux Ubuntu Desktop 14.04, the arduino shows up as /dev/ttyACM0 .... When I connect it via usb to an android phone the device is powered and recognized in ...