Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

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
1
vote
1answer
29 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
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
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) ...
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
26 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
8 views

How to create symlink to directory? [duplicate]

AIDE allows app development directly on my tablet. I have Terminal Emulator installed. Problem is AIDE doesn't allow setting the storage folder. It always uses AppProjects. So I tried to set a ...
0
votes
1answer
71 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. ...
3
votes
2answers
13k views

Wget using Termux download directory

I just installed Wget using Termux on my Android. But, when I download a file, I cannot find it's location. Can anyone please tell me where it's located? And how can I change that location to my ...
2
votes
1answer
37 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
1answer
4k views

termux - help installing a package

I am trying to install texlive using termux. It's in the package manager, but unfortunately the package has some faulty instructions. Specifically, the package calls wget with a faulty option. if ...
0
votes
1answer
51 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, ...
5
votes
2answers
4k views

Disable touchscreen input via console

I'm looking for a way to disable and enable the phone's touchscreen via console, and possibly the physical buttons, so to prevent finger touches from being processed. The phone is a Samsung Galaxy ...
2
votes
2answers
8k views

Use of the -i argument in fastboot command-line?

I was planning to flash a custom recovery in my Yu Yuphoria. So I searched for it on Google, and found a download link along with a written tutorial. I'm acquainted with the fastboot commands, so I ...
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?
2
votes
1answer
913 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 ...
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 ...
0
votes
1answer
879 views

How do I create an archive for easy extraction to /data/local/tmp/ in “adb shell”?

Usual shar archives fail to extact in adb shell due to problems with lock directory and temporary files for HERE documents. Zip archives are also not an option. How do I make an archive that can be ...
1
vote
0answers
48 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 ...
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 ...
23
votes
6answers
31k 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 ...
5
votes
6answers
19k 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 ...
1
vote
1answer
79 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
182 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 ...
1
vote
1answer
33 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 ...
0
votes
1answer
106 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
3answers
2k views

How to get tomorrow's date and next week's number for use in Tasker

Based on this answer I am looking for a way how to get tommorow's date and next week number to use in Tasker app, Run Shell Command. I have tried: date -d '+1 day' +"%Y%m%d" and similar, but still ...
4
votes
2answers
6k 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
1answer
92 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.
3
votes
3answers
7k 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
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
1answer
218 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: /...
1
vote
1answer
70 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.
3
votes
2answers
2k views

command on adb waits forever

I can successfully execute ADB commands, but if the command has no output the command line just waits there and does not let me enter a new command until I press ctrl-c, the commands do work however. ...
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 ...
1
vote
1answer
354 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'...
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 ...
13
votes
3answers
35k 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 ...
1
vote
1answer
1k views

Issue with Viewing Netstat Process Info on Android

I am unable to view the PIDs or process names associated with network activity on my android device. I was wondering if there is another way to go about doing that, besides netstat? Or if anyone might ...
4
votes
4answers
24k 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 ...
7
votes
4answers
30k 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 ...
1
vote
1answer
98 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 ...
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
406 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
234 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 ...
12
votes
2answers
12k views

Rooted phone - sending SMS message via command line

I have a rooted Droid (Sholes), with ConnectBot installed. I can ssh into it via dropbear copied to /system/xbin, and/or also the instance of Debian installed on it via the "Linux Installer" ...
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 ...
0
votes
1answer
208 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 ...
18
votes
4answers
29k views

Android Read recent SMS messages from command line

I have recently broken my Android's screen. (Again) Its a T-Mobile G2 Trying to keep up with my busy technology related life is hard enough without losing my link with everyone. I have rooted the ...