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.

Filter by
Sorted by
Tagged with
2
votes
1answer
54 views

Is it possible to disable USB tethering from command line?

I try to be able to stop USB tethering. I tried: adb shell am stop com.android.settings/.TetherSettings # Unknown command: stop adb shell am kill com.android.settings/.TetherSettings # nothing adb ...
2
votes
0answers
73 views

What is the difference between fastboot oem unlock and fastboot oem unlock-go?

I'm having issues unlocking my Nexus 7 2013 WiFi's bootloader, and it was suggested that I try fastboot oem unlock-go instead of fastboot oem unlock. Both seem to act the same on my device, however ...
0
votes
0answers
32 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
60 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 ...
1
vote
0answers
53 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
1answer
137 views

Terminal emulator on Android device: Can I communicate with with the terminal on my Linux machine over bluetooth?

I am trying to issue a command in my terminal emulator on my Android device over Bluetooth from a Linux machine. The command is meant to launch an app, and looks like this: am start —user 0 -n com....
0
votes
0answers
32 views

Disabling data for specific apps on android

My device is rooted with magisk, and I prefer cli options over apps. My device have android version 10 with stock android. All the firewall apps connect to a vpn (which i don't trust at all) to ...
1
vote
0answers
90 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. ...
0
votes
0answers
19 views

Help searching for unindexed files in Android files with ADB [duplicate]

An mp4 file was deleted accidentally on a Galaxy S9/android 8.0 phone and I'm trying to find it in the Android file system with ADB shell. I'm looking for help with the commands and directories as to ...
0
votes
1answer
28 views

How to launch a pdf from a terminal?

I gain precious time by launching pdf from the terminal in Linux evince ~/mypdf.pdf What is the exact command that allows me to do that on android? This post gives the following template: am start ...
0
votes
1answer
442 views

How to Sending SMS from terminal in background on Android

I'm trying to send text message (sms) from my Android terminal app in background (sim 1 or 2). I can send message in foreground using this command: am start -a android.intent.action.SENDTO -d sms:...
5
votes
1answer
840 views

Obtaining app storage details via ADB

TL;DR: On-device, we can navigate to Settings › Apps, and for each app separately can call up details on storage used: by the app itself, by its data, by its cache. Is it possible to obtain those ...
1
vote
1answer
739 views

Why Android x86 9.0 boots in command line and not in GUI?

i just installed android x86 9.0c and i don't know why it doesn't boot on GUI mode and it boots only in commandline then after some seconds i can only see just a dash appearing and disappearing. I ...
2
votes
1answer
719 views

How to get 2nd IMEI number using adb?

I am currently using this command adb shell "service call iphonesubinfo 1" to get IMEI number, but it only returns 1st one. Does anyone know how I can get the 2nd IMEI number?
2
votes
1answer
297 views

How to stream an encrypted backup of the entire device to remote host?

I have an Android device that has no free space and no SD-card that I can replace (thanks to OnePlus policy). I also have no free space on PC to accommodate the backup so I wanted to upload it to the ...
2
votes
1answer
442 views

Read GPS location from command line via SSH

I am wondering if there's a way to read the current GPS coordinates via SSH using SSHelper as SSH server. I came accross some similar threads: How to detect GPS status through adb shell? A way to ...
2
votes
1answer
2k 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.
0
votes
0answers
557 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 ...
2
votes
1answer
220 views

How can I run chroot on Android?

I have my chroot environment setup (Alpine Linux) in /sdcard/alpine. I try running my chroot with the following commands: su chroot alpine /bin/busybox (busybox is the cli of Alpine) I get the ...
0
votes
2answers
7k views

is it possible to activate usb debugging using adb command line?

i have xiaomi phone and forget mi account. so i try to restore it using factory reset. i try to enabling USB debuging then. but it says "developer option is not avaiable for this user". adb is active. ...
0
votes
1answer
755 views

Enable OTG with a shell command

I'm running Android Pie on a rooted OnePlus 6, and I wanted to know how I can enable OTG with a shell command. I need this in order to automate some tasks. There is a setting that can toggle OTG, ...
1
vote
1answer
69 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
222 views

How to switch between APNs using adb?

Is there any adb or shell command available to switch between different APNs?
1
vote
0answers
54 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
425 views

How to connect to a SSH server from Android client?

I can install and run an SSH server on my Android 6.0 phone (Banana SSH server), and I can run an SSH client on it (Termius), so how do I invoke the client from on the command line that the server ...
0
votes
0answers
676 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/...
1
vote
1answer
134 views

what is the meaning of the output of the users list command

I'm using the cmd user list command and this is the output I'm getting from the shell. UserInfo{0:Owner:13} UserInfo{23:shalevM:20} what does the last variable means? the first one is ...
1
vote
1answer
285 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.
2
votes
0answers
5k 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
1answer
703 views

How to fix “mount: 'remount'->'/system': No such file or directory”?

angler:/ # mount -o rw, remount /system mount: 'remount'->'/system': No such file or directory 1|angler:/ # When I try in Kali Linux in my phone: root@kali:~# mount -o rw, remount /system mount: /...
0
votes
1answer
192 views

Is it possible to install “iproute2” on Android?

I tried to use git clone in googlesource's page but it didn't do much. I want to use the ss command from the package but I don't know how to install it. My phone is ARM 32-bit.
2
votes
0answers
188 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 ...
1
vote
1answer
1k views

How can run native executables compiled for ARM on unrooted Android devices? [duplicate]

Following this tutorial I have compiled a Hello World! ARM binary from C source using gcc. I want to run this program on my unrooted Android phone but I can't figure out an easy way to do it. What I'...
1
vote
1answer
88 views

Linux command 'w' - how is this as command written in Android shell?

I am searching for similiar commands in Android shell - as they are used in Linux like these commands - what can I type in Android terminal for : w who whoami ? Thank you.
1
vote
1answer
185 views

Termux:Widget and Emacs: can't start subprocesses

I have some tasks that I like to do using Emacs on several different operating systems. I have been using Termux so that I can access these tasks on my Android phone. To reduce setting-up typing in ...
3
votes
1answer
622 views

Commands run on terminal but throw errors in shell script

I created a .sh script which sets app permissions on Android devices. If I push the script on /sdcard and run it through adb shell with command sh ./test.sh, the following error occurs on each ...
0
votes
0answers
1k 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
250 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
1k views

Where to find information about WiFi connectivity of the device?

is there a way I can find information about my device's connectivity to WiFi network? I need information like: what network I'm connected too, what is the mac address of the router, how long have I ...
2
votes
1answer
733 views

How to use lsof, netstat and ps commands with complete options on Android?

I tried T-ui and although it has the lsof command, it cannot do lsof -i for example, so I need to go through every single process in Android. My phone is rooted and I wanna know the PID of the process ...
-1
votes
1answer
118 views

Android 4.2 - how execute shell command on system boot? [duplicate]

How do I do that? I have root access and the it's a custom build of AOSP project.
0
votes
1answer
377 views

How do I enable SEANDROID ENFORCING over adb inside TWRP?

When I boot into TWRP Recovery, it says, RECOVERY IS NOT SEANDROID ENFORCING but when I run sestatus, it tells me SELinux status: enabled SELinuxfs mount: /sys/fs/...
1
vote
0answers
558 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 ...
2
votes
0answers
5k 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
1answer
622 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
238 views

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

Is there a command in /system/bin to perform cache clearing?
-1
votes
1answer
1k views

How to take screenshot from terminal

I am writing a python script to process an image. I need to take automated screenshots. How can i do that with some kind of command ? No root acces. I am using termux and terminal emulator.
0
votes
1answer
582 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
312 views

How to fix “Socket creation in UltraProbe…Permission denied” error when using nmap?

I have a pre-compiled nmap binary for Android that was working properly and without error in LineageOS 14.1. The phone is a One Plus One. Since upgrading to Lineage 15.1 (Android 8), the specific ...
0
votes
2answers
1k views

How to do GREP text searching without root?

There is busybox and there are terminal emulators that include grep, but they require root to run. It would be better if they could also run without root but with limited access. I only need to grep (...

1
2 3 4 5