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
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
vote
1answer
380 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
547 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
2k 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
277 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
509 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
1k 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
30 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
14k 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
4k 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
334 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
230 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
178 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
703 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
105 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
2k 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
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 ...
12
votes
1answer
19k 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
195 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
350 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
150 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
1k 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
264 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
377 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?
0
votes
1answer
5k views

Termux - help installing a package

I am trying to install TeX Live 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 ...
10
votes
1answer
30k views

How to install app from command line (terminal)?

How to install app from command line (terminal)? I would like to start a terminal window and do the apk installation from command line (shell script) EDIT1: within the phone. Also is it possible ...
0
votes
0answers
752 views

Making executable files in GNURoot

I have recently installed GNURoot Debian and I really enjoy having Bash on my phone and access to the vast repository for various other GNU/Linux programs. But when I tried downloading a package ...
0
votes
0answers
148 views

Eject SD card via ADB

Is it possible to emulate physical eject/cut power supply for SD card in Android via ADB terminal? What I'm looking for is something similar to the functionality achieved on GNU/Linux for USB devices ...
0
votes
1answer
282 views

Bootanimation command not recognized without root

I am thoroughly confused. In a terminal, without root, when I run bootanimation, it says /system/bin/sh: bootanimation: not found. But when I am root, and run it, it works. Why is this? I attached a ...
3
votes
2answers
18k 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 ...
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 ...
1
vote
1answer
762 views

How can I check if a device is booted into safe mode from adb?

Is it possible to use adb to detect whether a device is booted into "Safe Mode" or normal mode? I've looked through the output of getprop and other command-line tools and haven't found any good ...
3
votes
2answers
3k views

How to create a wifi hotspot from the terminal?

How would you suggest to create a hotspot from a root terminal? I would need to create hidden hotspot hotspot without password I am looking for an equivalent of create_ap for android. Here is the ...
-3
votes
1answer
999 views

Can I use Linux commands on Android? [duplicate]

Android is a kind of Linux. So I would be able to use the commands. Can I use Linux commands on Android? If I can, how do I?
6
votes
3answers
4k views

Fastboot freezes on Mac OS Sierra

I just got a new MacBook 2016 with Mac OS Sierra installed, after setting up my complete development environment and all required tools via Android Studio, I tried to flash a new Android Wear release ...
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
52 views

How can I list all files in a directory with timestamps (in a touch compatible format) on Android

For starters, I am on a Nexus 5, on Android 6.0.1 and I am rooted. Normally, I'd just do this find /path -maxdepth 1 -type f -printf '%TY%Tm%Td%TH%TM%Ts %p\n' However, it appears that busybox, ...
0
votes
1answer
778 views

Batch file for android that runs at startup

On my windows laptop, I have a batch file which checks for a specific file and deletes it. My question is, is this possible on android, to make a file that runs at startup (without root), checks for ...
0
votes
2answers
732 views

sending AT command with NCK code unlock sim?

I need information. How can I send the NCK unlock code network using AT commands? Or is there any other ways?
0
votes
0answers
537 views

Ffmpeg on non-rooted Android?

I've set several places where I can get a ffmpeg binary for Android, but I cannot seem to run it. I use the . command to run shell scripts, but not ffmpeg. Is there any way at all I can run ffmpeg ...
1
vote
0answers
116 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 ...
0
votes
0answers
884 views

How to access GNURoot Debian executables from outside the app?

I've just setup GNURoot Debian and I could install Python 2.7. However, I'd like to run Python 2.7 outside of the GNURoot Debian Terminal Window. For example, if I ssh into the device, I'd like to be ...
0
votes
1answer
431 views

SD card root access

Hey I just wanted to ask how it is possible to access my sdcard data with command lines on a rooted phone ? I tried to ls in /sdcard, also in /mnt/sdcard/ but my files are never displayed, yet a ...
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 ...
0
votes
1answer
1k views

How to open an URL in Chrome Incognito Tab by launching the Incognito Activity?

Is there any way to open a link in Google Chrome's Incognito Mode from the Terminal ? I tried this but it didn't work: am start -n com.android.chrome/com.google.android.apps.chrome.document....
1
vote
0answers
107 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
645 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
votes
1answer
955 views

Auto refreshing the signal

When we go to the area where signal is not reachable, we experience "Emergency calls only" or "No service". But after coming-out from that area we sometime found phone is not receiving signal and ...
3
votes
1answer
391 views

What represents 'bootloader' in the possible outputs of `adb get-state`?

I recently employed the use of adb get-state and decided to know further about it. Running adb inter alia shows: adb get-state - prints: offline | bootloader | device I intend to know ...