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
0
votes
0answers
20 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 ...
2
votes
1answer
34 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
61 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
46 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
55 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
45 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 ...
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
169 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
32 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
103 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
1answer
201 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
88 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
95 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
339 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
67 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
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
389 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
317 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
284 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
63 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
230 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
387 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
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 ...
1
vote
1answer
360 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
124 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
639 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
378 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
233 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
624 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 (...
0
votes
1answer
159 views

How to store 'adb devices -l' output to a text file?

Is there any way to store the output of adb devices -l command to a text file? Note: output of adb devices -l command is List of devices attached 1101530abd5a234b device product:j1pop3hjv ...
0
votes
1answer
429 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 ...
2
votes
1answer
1k views

Manually trigger MediaScanner to scan files on Internal Storage on Nougat/Oreo

I often manage my files in Termux with scripts that use the mv command to move or rename them. I want to manually trigger MediaProvider to scan my internal stroage (/storage/emulated/0) or a given ...
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
418 views

Does Xposed Framework require to be buillt specifically for the device or just the Android version?

When installing the Xposed framework do I need the device specific binary (like custom recovery or ROM) or just the app that works for Android (4.4.4 in my case). The device is Galaxy Tab E T560. ...
1
vote
1answer
987 views

How to pass commands to ADB shell?

I am trying to create a script to automatize a few repeated things I need to do with adb. I can run most of the commands on my local bash. But at one step, I need to find the list of some files. I ...
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 ...
1
vote
1answer
10k views

Backup boot.img via terminal one-line command

I am trying to make an image backup of boot. The script must work on any android. I think on any Android the boot location is /dev/block/platform/???/by-name/boot My command line find /dev/block/...
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 ...
1
vote
0answers
302 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 ...
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 ...
0
votes
0answers
148 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
1answer
554 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 ...
0
votes
1answer
98 views

Calling adb through command line ignored

So the problem I am having after a Windows reinstall, is that whenever I call ADB, it just gets ignored. Calling adb from my custom tools seems to be working (have a d.bat file, that calls python, ...