Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
15 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
284 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
47 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
40 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.
1
vote
0answers
28 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 ...
0
votes
1answer
71 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
57 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
46 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
38 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
96 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
153 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
78 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
159 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
46 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
143 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
278 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
2k 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
211 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
96 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
327 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
256 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
0answers
30 views

Duplicate photos not recognized by Google Photos app

I was writing a script and ran into some perculiar behaviour. For instance, do something like: newDir='/sdcard/Pictures/NewDirectory/' oldDir='/sdcard/Pictures/Screenshots/' newPic='Screenshot_Copy' ...
0
votes
1answer
175 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
337 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
0answers
321 views

How to get USSD response from android mobile to PC through ABD?

When i dial a particular USSD number e. g. *999*012345678901*50*2255# through ADB using windows command prompt, it executes successfully and on my android device it dials the afore mentioned USSD ...
0
votes
1answer
87 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
303 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
34 views

Does 'find' command not exist on non-rooted android 5.0 and below?

Recently i have tested and seen that the "find" command can not be found on android 5.0 and 4.0, but i can not find any post that discusses about this problem. Does anyone know the answer?
2
votes
1answer
987 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
152 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
368 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
717 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
28 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 ...
0
votes
1answer
8k 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
2k 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
285 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
115 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
121 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
454 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
89 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, ...
1
vote
1answer
1k views

(Android) Launch app activity shortcuts from the command line?

I'd like to know how would it be possible to launch an action "shortcut" (like Greenify's auto-hibernation shortcut) through the command line in Android. I'm trying to launch a StrongSwan VPN ...
0
votes
3answers
1k 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 ...
6
votes
1answer
15k views

Launch AVD manager from command line

I'm on Windows 10. Android studio version 2.3.3 How can I launch the AVD Manager with-out opening the Android Studio and creating a project ? I remember it was possible for earlier version of ...
0
votes
0answers
164 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 ...
0
votes
1answer
327 views

How to enable server in hotspot?

I got the error while trying this on command line interface root@sabresd_6dq:/ # hostapd_cli wps_pbc Failed to connect to hostapd - wpa_ctrl_open: No such file or directory How to solve this?
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 ...
0
votes
1answer
140 views

rooted phone su user changes

Is there a way, once rooting is done, and i have customized my phone a bit (a change in one of the config files of linux), to change the user accounts and permissions? To create a new user account and ...
1
vote
1answer
701 views

Android Emulator size issue

I'm having some issues managing/running AVDs from the commandline. Whatever device I create/run seems to get cropped and displayed wrongly (see below). I've tried various devices and settings (-...
1
vote
1answer
210 views

Issue a command to the camera from command line via SSH

If I have an SSH app like SSH Droid, is it possible to issue a command to the camera to take a picture from the command line of a remote SSH client? If so, would you have an example of such a command? ...
1
vote
2answers
271 views

Default terminal emulator/console

There should be at least a console accessible since Android use the linux kernel. Why is there no terminal emulator or console installed by default in Android OS ? Is there a particular reason?