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
1 answer
29 views

How to list suspended apps?

You can "suspend" user apps via cmd package suspend <packageName> (which acts kind of like pm disable; the differences are explained in this answer by @Firelord), and later unsuspend ...
user avatar
  • 89.1k
0 votes
0 answers
40 views

Why can't I get similar performance degradation with Monkey in different experiments?

I have configured experiments to test which among 10 launched apps impacts performance the most. But I can't make an objective comparison, because if I launch the experiment twice with the same ...
user avatar
  • 1
0 votes
0 answers
38 views

Why doesn't Monkey generate the same sequence of events?

I'm running stress tests on Android using Monkey to generate the workload. For the type of analysis I have to do, I need to generate the same sequence of events for each experiment. So, in every ...
user avatar
  • 1
0 votes
0 answers
49 views

Is it possible to control my android phone with my pc?

My phone is currently stuck on the boot menu and my power button doesn't work. Is there some way where I can use my computer to select the «reboot system now» option on the boot menu?
user avatar
  • 1
0 votes
0 answers
135 views

Add dynamic Contacts to android emulator or device from command line

We want to add specific contacts to our android emulator/device so that we can run tests particularly invites on those contacts. The contacts would be generated as pre-script before running tests. As ...
user avatar
0 votes
0 answers
169 views

What does the -g global flag do when using pm install -g

I'm trying to get google play store to work on a proprietary custom ROM. I was given a hack to do this with my device. It's very hit or miss but I can get it working sometimes. When I install Google ...
user avatar
0 votes
0 answers
89 views

Create and edit a bash script in an USB connected smartphone

The question explains it all. I am using Ubuntu 20.04 LTS. I have connected an android smartphone to pc using USB. Changed directory to internal storage using: cd /run/user/*/gvfs/*/'Internal Shared ...
user avatar
1 vote
0 answers
111 views

Read input from stdin when using `pm install`

I would like to install an application using pm install but not provide the APK path and rather provide application data using stdin as shown in the documentation below: install [-rtfdgw] [-i PACKAGE] ...
user avatar
1 vote
0 answers
41 views

Command line to remontly shutdown the display and power on

I'm using a digital signage CMS and app to control an Android tablet with root access. I can "reboot" it with this simple command, but I haven't found a command line to put the display to ...
user avatar
  • 11
4 votes
1 answer
1k views

Verifying a (custom) ROM signature

Android ROMs and also Android custom ROMs are typically cryptographically signed. Most users will only recognize this if they try to install a ROM and the signature verification on-device fails. For ...
user avatar
  • 15.8k
1 vote
1 answer
4k views

adb sideload lineage.zip yields adb: failed to read command: No error

TL;DR Trying to sideload Lineage, I hit a brick wall getting the following error: D:\Setups\XXXXX\Lineage FP3\platform-tools_28.0.2(ADB_1.0.41)> adb sideload lineage-17.1-20210104-nightly-FP3-...
user avatar
  • 149
1 vote
1 answer
5k views

ADB server version (40) doesn't match this client (41) {Not using Genymotion}

Disclaimer: this is not a duplicate to this SO question as the source of the question is different and the answers don't apply.* I hope, it is correctly placed in AE and that the note about not using ...
user avatar
  • 149
1 vote
0 answers
196 views

Cant' mount loop device

After I format the loop.img (formatted as ext4) I can mount it no problem. But when I'm trying to remount loop.img from external sdcard to /data/data/com.termux/home/ubuntu20-fs/ always throw invalid ...
user avatar
  • 151
1 vote
2 answers
1k views

Termux (Terminal) tsu is adding "(unreachable)" to my current working path

When I run tsu (which is Termux's version of su), my current working directory gets prefixed with "(unreachable)", as you can see from the transcript of my session. [u0_a116 …/~]$ tsu [root …...
user avatar
1 vote
0 answers
343 views

Stop ActivityManager killing background Termux processes

I've been trying to run a ssh and a http server on my non-rooted Android phone using Termux. I've installed Termux:Boot and termux-services to run them. The server processes run for a while after I ...
user avatar
  • 191
1 vote
0 answers
153 views

Bind command on ADB to Android Emulator problem

im sorry.. im new here.. i don't know where to start. i want to run some command in emulator (android). im running certain apps, and i need it to run and not to be detectable in emulator instead as ...
user avatar
2 votes
1 answer
654 views

Is it possible to disable USB tethering from command line?

I try to be able to stop USB tethering. I tried: adb shell am stop com.android.settings/.TetherSettings # Unknown command: stop adb shell am kill com.android.settings/.TetherSettings # nothing adb ...
user avatar
4 votes
1 answer
2k 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 ...
user avatar
  • 151
0 votes
0 answers
45 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 ...
user avatar
0 votes
0 answers
353 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 ...
user avatar
1 vote
0 answers
857 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 ...
user avatar
  • 11
0 votes
0 answers
315 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 ...
user avatar
  • 109
1 vote
0 answers
986 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. ...
user avatar
  • 27
0 votes
1 answer
43 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 ...
user avatar
0 votes
1 answer
2k views

How to send 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:121 -...
user avatar
  • 1
5 votes
1 answer
5k 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 ...
user avatar
  • 89.1k
2 votes
2 answers
9k 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 ...
user avatar
2 votes
1 answer
3k 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?
user avatar
2 votes
1 answer
836 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 ...
user avatar
  • 155
2 votes
1 answer
2k 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 ...
user avatar
2 votes
1 answer
7k 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.
user avatar
  • 21
0 votes
0 answers
2k 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 ...
user avatar
2 votes
1 answer
2k 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 ...
user avatar
  • 21
1 vote
2 answers
16k 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. ...
user avatar
1 vote
1 answer
4k 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, ...
user avatar
1 vote
1 answer
84 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 ...
user avatar
1 vote
0 answers
827 views

How to switch between APNs using adb?

Is there any adb or shell command available to switch between different APNs?
user avatar
  • 111
1 vote
0 answers
81 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 ...
user avatar
1 vote
1 answer
917 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 ...
user avatar
0 votes
0 answers
2k 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/...
user avatar
  • 424
1 vote
1 answer
355 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 ...
user avatar
1 vote
1 answer
549 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.
user avatar
5 votes
0 answers
8k 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, ...
user avatar
0 votes
1 answer
2k 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: /...
user avatar
0 votes
1 answer
456 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.
user avatar
  • 37
2 votes
0 answers
289 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 ...
user avatar
  • 21
2 votes
1 answer
3k 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'...
user avatar
  • 235
2 votes
1 answer
158 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.
user avatar
1 vote
1 answer
247 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 ...
user avatar
  • 121
3 votes
1 answer
882 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 ...
user avatar
  • 33

1
2 3 4 5