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.
239 questions
5
votes
2
answers
537
views
Using ADB, how can I shut Android down gracefully without root access?
What are the ADB command(s) to shut down Android as gracefully as possible, without root access?
Please assume I'm using whatever Android version is current at the time you read this.
Thanks & ...
1
vote
0
answers
382
views
How can I launch a camera app from the command line, and have it stored somewhere predictable on android?
Basically... I am writing a script on Termux and I need to take and store a photography. I tried to start "android.media.action.IMAGE_CAPTURE" via am supplying it with the uri of both a non ...
2
votes
1
answer
431
views
Termux: am command - start intent without activity class
I'm trying to launch an intent to a shortcut of a flow on Automate (by Llamalabs) using the am command supplied by Termux, but the am command needs the Activity Class parameter to run the shortcut and ...
-2
votes
1
answer
2k
views
Navigate through device's folders via ADB
I have connected and verified ADB on my phone:
adb start-server
adb devices
And then I wanted to go to DCIM folder in my storage to see, if there are any pictures to fetch.
However this has failed:
...
0
votes
0
answers
200
views
What does the "sm forget" command do?
What does the forget subcommand of the sm command do?
For reference, here's the help output for sm:
usage: sm list-disks [adoptable]
sm list-volumes [public|private|emulated|stub|all]
sm ...
1
vote
0
answers
128
views
The jq utility for Android, or some other command-line-based JSON parser?
We are writing some scripts to be run from the command line in Android, and JSON parsing is necessary. In Linux and other non-Android OS's, there's the jq utility, and we're trying to find something ...
2
votes
1
answer
2k
views
Clearing an app's *cache* and not the app's *data* via pm (or other CLI utility)?
I'm running Android 13 in a rooted environment, and I want to use pm or some other Android command-line utility to clear an app's cache. If I do pm clear package.name, it clears the app's data, and ...
1
vote
1
answer
316
views
How to auto switch on/off precise location automatically, programmatically for Google Maps?
Is there an am command line or similar that permits do turn off/on Google Maps precise location?
Ideally, could be a wrapper script in shell to enable precise mode, then when quitting maps, setting ...
1
vote
0
answers
258
views
Find `MainActivity` for `com.google.android.dialer`
I have a Xiaomi POCO X5 5G, running MIUI Global 14.0.4.
There is a problem where (in the Global ROM) the Google Phone app (as a system app) seems to be killed, even with MIUI Battery Optimization ...
0
votes
0
answers
487
views
How to find the RAM type in command prompt in Android?
I am trying to find out what the memory type of my Android phone is, i.e. if the device is LP4 or LP5 type.
On Windows PC, there is wmic command to get this system information. However, I can't find ...
0
votes
0
answers
114
views
Run avdmanager with sudo
I am running avdmanager create avd from my python script that I start with sudo -E to make my script be able to do priveldged stuff. But for some reason avdmanager created AVD inside /root/.android/...
1
vote
0
answers
220
views
How to download all Android SDK platforms using sdkmanager from terminal without Android Studio?
Need to automate downloading of all available Android SDK Platforms using the sdkmanager from terminal. For example, an Android SDK Platform 19 can be installed using sdkmanager "platforms;...
0
votes
0
answers
70
views
How to know apps which boots with system using commands in Android terminal?
I need commands for Android 4-6. How to know via Android terminal and command which apps loading on the system's start?
While I tried 2nd command from here.
0
votes
0
answers
32
views
How to get titles of installed apps on device? [duplicate]
I connected Android device to desktop with Windows using USB. I need to get titles of installed apps. What command for Windows command line to complete the task? I used ADB for other tasks, but while ...
2
votes
0
answers
648
views
Force USB tethering on an Android
I am using a Windows system and I want to add my old tablet (Acer Iconia A1-810 without LTE) as a second monitor. It is running Android 4.4.2 Kitkat, and I found an app for Android called spacedesk to ...