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.

75 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
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 ...
5
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/...
4
votes
0answers
6k 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, ...
4
votes
0answers
534 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
4k 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?
3
votes
0answers
6k 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 ...
3
votes
2answers
1k 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 ...
3
votes
0answers
11k 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
856 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
236 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
1answer
789 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....
2
votes
0answers
31 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
262 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
0answers
364 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
0answers
32 views

How to change disable read write permission

How to disable read write permission for an running app without close the app.i am trying to disable read write permission on a running app without close the running app when I am execute this command ...
1
vote
0answers
58 views

Disable “system call” in rooted android

how to disable system calls in android.I am trying to disable all system calls in rooted android device,i am found some code for build.prop "bootstrap.system_call= false" but its not working,...
1
vote
0answers
79 views

Cant' mount loop device

After I format the loop.img (formatted as ext4) I can mount it no problem. But when I'm trying to remount loop.img from external sdcard to /data/data/com.termux/home/ubuntu20-fs/ always throw invalid ...
1
vote
1answer
390 views

Termux (Terminal) tsu is adding “(unreachable)” to my current working path

When I run tsu (which is Termux's version of su), my current working directory gets prefixed with "(unreachable)", as you can see from the transcript of my session. [u0_a116 …/~]$ tsu [root …...
1
vote
0answers
146 views

Stop ActivityManager killing background Termux processes

I've been trying to run a ssh and a http server on my non-rooted Android phone using Termux. I've installed Termux:Boot and termux-services to run them. The server processes run for a while after I ...
1
vote
0answers
71 views

Bind command on ADB to Android Emulator problem

im sorry.. im new here.. i don't know where to start. i want to run some command in emulator (android). im running certain apps, and i need it to run and not to be detectable in emulator instead as ...
1
vote
0answers
303 views

please explain the: >“adb shell sm partition disk:179,64 mixed 80” command

it is taken from I want to split one MicroSD card into two parts: part adoptable storage, and part normal storage. How can I do this? what is 80 at the end? 80%? I ran that on an Adoptable Storage ...
1
vote
0answers
375 views

how to connect and disconnect from WiFi using ADB (not a root user)?

I found this project which allows me to connect to a WiFi through ADB commands not being a root user. I was wondering if anyone knows how to disconnect also from ADB and not being a root user. ...
1
vote
1answer
73 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
396 views

How to switch between APNs using adb?

Is there any adb or shell command available to switch between different APNs?
1
vote
0answers
65 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
1answer
371 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.
1
vote
0answers
643 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
0answers
307 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
363 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
948 views

Can I run a Linux executable on Android?

I wondered if it is possible to run a Linux executable on Android so I made a simple console application in Code::Blocks in C++ (I am using Ubuntu Linux), built it in release mode and copied it into a ...
1
vote
1answer
3k 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
119 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
111 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
731 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
2k 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
795 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
189 views

netcat listening on nexus 4 doesn't seem to respond

I have a Nexus 4 on my wifi network along with a laptop. I would like to establish a connection using netcat from my laptop to my phone. On my phone, I can run uname -a | nc <LAPTOP IP> <...
1
vote
0answers
673 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
7k 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

How to block tcp connection without iptables command

I have an app, a replica of a shooter game in Android. It is just for experimental use only, me and my friends are testing it. I need to block all TCP connections without iptables command so I can ...
0
votes
0answers
29 views

Turning off sensors on Android devices that doesn't support turning off sensors from system settings

Turning off all sensors is possible on devices running Android 10 and higher from the system settings. I have a 2016 Mediatek phone running Android 5.1.1 with root privilege. I was wondering if it was ...
0
votes
0answers
96 views

Is it possible to use dd command to re-write the entire /system partition

Phone: Mediatek Symphony V32(root privilleged) My /system partition is messed up, I accidently deleted some system apps, and also some bin files. Although it's functioning properly, I pretty much want ...
0
votes
0answers
76 views

ADB hangs, listed as defunct. What is keeping it from working?

When I try any of: adb devices, adb shell, adb kill-server -- anything but 'adb version' and 'adb help' -- it just hangs. Nothing happens even after several minutes. Only ^C does anything, killing ...
0
votes
0answers
37 views

How to make phone say something from commandline

I want to send a command which makes the phone say something. Is there any way I can install such a command, or is there one that I don't know about? The phone is rooted so I have full access to it ...
0
votes
0answers
219 views

How to disable user input (touchscreen) from command line without root

In the android command line, I need to disable the touchscreen user inputs. I do not want to use root because I want it to be universal instead of device-specific (root is obviously not as widespread ...