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
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 ...
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
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 ...
2
votes
0answers
33 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 ...
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
549 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 ...
3
votes
2answers
19k 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 ...
4
votes
1answer
4k 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?
8
votes
5answers
35k 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 ...
3
votes
2answers
8k views

'android' and 'emulator' commands not found

I have installed android-sdk-linux on my ubuntu 12.04 netbook and I see that the commands android (which opens the AVD Manager) and emulator (to which on appending the name of a specific AVD, the AVD ...
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 ...
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 ...
6
votes
1answer
61k views

Turn on USB debugging using command-line

I have a Samsung Galaxy S2 and a PC running Debian 8. How can I turn on USB debugging using command-line on my PC without touching the phone?
0
votes
0answers
40 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
36 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
99 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....
1
vote
0answers
78 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
1answer
952 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 ...
14
votes
2answers
9k views

Start an Android application via a shell script?

Is it possible to start an actual Android application from the command line in Android? For example, say I'd simply like to start/bring to the front my calendar. Is there a way that I can do this like:...
0
votes
0answers
18 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 ...
13
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 ...
26
votes
1answer
14k views

pm hide VS pm disable — the identity crisis

What's the need of pm disable when pm hide already does its job? I've compiled some information based on my search and research: click here to see the table (edited). As you can see, pm hide can ...
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/...
0
votes
1answer
24 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
2answers
5k 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
347 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:...
4
votes
4answers
27k 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 ...
3
votes
1answer
610 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 ...
4
votes
1answer
665 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 ...
2
votes
1answer
389 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 ...
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 ...
12
votes
6answers
67k views

A Real Terminal (Root or No-Root)

I use KUBUNTU on my laptop, but this goes for any Linux distro. I can open a terminal window and type in things like sudo apt-get update, sudo apt-get install packagename. Is there a terminal that can ...
2
votes
1answer
260 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 ...
3
votes
1answer
398 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 ...
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.
15
votes
4answers
114k views

Why can't I get root access from shell?

> adb shell sh-4.1$ su Permission denied I have rooted my phone successfully. I know this because I'm able to install apps on SD card and I have a program called SD Maid that is able to operate ...
9
votes
2answers
41k views

Enter recovery mode from command line

Does anyone know if there's a way to get an Android phone to reboot into recovery mode, from the Android command line? Note: I do NOT have adb access. I do NOT know the magic power-on sequence to ...
2
votes
1answer
563 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
3k 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
459 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
14 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
176 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
614 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
5k 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 ...
3
votes
2answers
9k 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 ...
1
vote
1answer
68 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
198 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 ...
0
votes
0answers
57 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 ...
24
votes
6answers
33k 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 ...

1
2 3 4 5