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
1
vote
1answer
2k 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, ...
0
votes
1answer
1k 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 -...
1
vote
1answer
608 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-...
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/...
1
vote
1answer
340 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 ...
1
vote
1answer
3k 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
6k 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
793 views

ERRORLEVELs in adb push and pull

I need to execute adb commands from DOS batch files, but I need to know if the push and pull commands were successful. Do these commands return an ERRORLEVEL, or some other environment variable to ...
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
2answers
3k views

How do you capture video from the command-line on an Android device?

How do you capture video from the camera on command-line of a rooted Android mobile device?
0
votes
2answers
851 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?
1
vote
0answers
28 views

How to change disable read write permission

How to disable read write permission for an running app without close the app.i am trying to disable read write permission on a running app without close the running app when I am execute this command ...
1
vote
1answer
934 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 ...
5
votes
1answer
2k 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 ...
0
votes
0answers
21 views

How to block tcp connection without iptables command

I have an app, a replica of a shooter game in Android. It is just for experimental use only, me and my friends are testing it. I need to block all TCP connections without iptables command so I can ...
1
vote
0answers
50 views

Disable “system call” in rooted android

how to disable system calls in android.I am trying to disable all system calls in rooted android device,i am found some code for build.prop "bootstrap.system_call= false" but its not working,...
3
votes
1answer
98 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 ...
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?
14
votes
1answer
22k 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 ...
-3
votes
1answer
110 views

When using a terminal emulator, why are there so many normal Linux commands that do not work?

There are a lot of standard Linux commands that do not work from a Terminal Emulator in Android. I thought Android is based on the Linux kernel, but it lacks so many functions like man, groups, find, ...
3
votes
1answer
794 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 ...
1
vote
0answers
76 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 ...
3
votes
0answers
6k 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
2answers
3k 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 ...
6
votes
3answers
6k 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 ...
1
vote
1answer
366 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 …...
12
votes
4answers
9k views

Where to find description of all “/system/bin/service” calls?

In one answer I was adviced to use service call phone 2 s16 "$number". It works, but in service list I see other useful things I don't know how to use and can't easily find the information on the ...
0
votes
1answer
5k 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 ...
9
votes
5answers
39k views

Need one-line adb shell su push & pull to access /data from Windows batch file

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 botched the adb commands because I was running "...
6
votes
6answers
72k views

Fastboot poweroff command

Is there a way to shutdown my Mate7 from fastboot? Long pressing the power button makes the phone restart again. I need to shut it down so I can recharge it then restore to stock.
0
votes
1answer
2k views

Why Does Not My File Explorer See A Mounted Folder?

Why can't i see a mounted folder into my file explorer (checked ES file explorer and RootBrowser) , but i can see it from a terminal? I'm mounting a folder (/mnt/sdcard/Source) into other folder (/mnt/...
0
votes
0answers
28 views

Turning off sensors on Android devices that doesn't support turning off sensors from system settings

Turning off all sensors is possible on devices running Android 10 and higher from the system settings. I have a 2016 Mediatek phone running Android 5.1.1 with root privilege. I was wondering if it was ...
2
votes
1answer
5k 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 ...
1
vote
0answers
138 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 ...
0
votes
0answers
85 views

Is it possible to use dd command to re-write the entire /system partition

Phone: Mediatek Symphony V32(root privilleged) My /system partition is messed up, I accidently deleted some system apps, and also some bin files. Although it's functioning properly, I pretty much want ...
0
votes
0answers
68 views

ADB hangs, listed as defunct. What is keeping it from working?

When I try any of: adb devices, adb shell, adb kill-server -- anything but 'adb version' and 'adb help' -- it just hangs. Nothing happens even after several minutes. Only ^C does anything, killing ...
0
votes
1answer
394 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 ...
1
vote
0answers
70 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 ...
11
votes
4answers
54k views

Turn phone on with ADB or Fastboot?

My power button seems to have busted, is there a way I can boot my phone using ADB or Fastboot or some other command line interface?
24
votes
7answers
35k 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 ...
2
votes
1answer
240 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 ...
1
vote
1answer
18k 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/...
3
votes
2answers
21k 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
10k 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
46 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
37 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 ...
7
votes
1answer
68k 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
214 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
295 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
0answers
357 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. ...

1
2 3 4 5