Yes there is.
When the community discovered this feature in android 4.1 (the code was exist but has not been declared yet so Google did not open the feature in Settings), I remember playing with this in my Nexus 4.
So, here are some commands that I remember for the android Terminal:
Create new user: pm create-user User_Name
To switch between users: am ...
In order to assign a drive letter to a removable device, that device must support UMS (USB Mass Storage) protocol. Unfortunately most newer Android phones, especially those without a removable SD Card, do not support UMS. Instead, they support MTP (Media Transfer Protocol) and PTP (Picture Transfer Protocol) protocols. In such devices it's not possible to ...
Running the following command as root should enable USB tethering:
service call connectivity 32 i32 1 on Ice Cream Sandwich (4.0)
service call connectivity 33 i32 1 on Jelly Bean (4.1 to 4.3)
service call connectivity 34 i32 1 on KitKat (4.4)
service call connectivity 30 i32 1 on Lollipop (5.0)
service call connectivity 31 i32 1 on Lollipop (5.1) according ...
What is the device doing exactly when I'm pushing the (hardware) power button? I guess that's the most friendly way.
You get to see a dialog with an option to power off the device (stock Android doesn't offer reboot). It appears that ShutdownActivity is called upon when you long press Power button.
Anyhow, this is what you can try, remotely or locally, but ...
You might need to activate adb root from the developer settings menu. If you run adb root from the cmd line you can get:
root access is disabled by system setting - enable in settings -> development options
root access is disabled by system setting - enable in settings -> development options
Once you activate the root option (ADB only or Apps ...
Android is safely shutting down vital parts of the runtime.
The OS is also broadcasting intents to tell apps and services to gracefully close. These, in turn, flush their caches of all data and shared preferences, save what-nots to the sqlite database, et cetera.
In other words, apps and services are given a chance to do their cleanup ...
Summing up from the comments:
First you need to understand that updating apps works different on Android than it does on a "normal" Linux distro: There is no such thing as "apt". Though Android has its own package manager (listening to the pm command), installs/updates are usually dealt with by services/apps like google-play-store or other alternative-...
I was looking for the same answer, i can't find a single command to do this, but i found few options that could be useful in such cases:
A. download the .apk to your computer and install the apk from it (just google 'apk downloder' and find one suitable for you):
adb install com.myapp.apk
B. open playstore app from adb and point it to your package, this ...
Given enough privileges (ADB, root, system application) you can use simple terminal commands to install apps:
On a PC:
Run the simple command
adb install <path to .apk file>
and the app will be installed.
This requires adb to be installed and debugging mode enabled.
The file has to be located on the PC.
In adb shell or a terminal on the device:
There is no way to launch AVD manager from cmdline (It is deprecated)
There is no way to launch AVD from cmd line. But you can use avdmanager cmdline tool to create, delete, move, list & edit your AVD.
The avdmanager tool is provided in the "Android SDK Coommand-line Tools" package and is located in android-sdk\cmdline-tools\latest\bin\...
This will kill the root zygote process and cause a Android system refresh.
This does not restart your phone's hardware, only the Android processes.
By default (in Linux), the kill/killall commands do give the processes a graceful way to shut down, though it depends on the zygote implementation whether this in turn gracefully shuts down your ...
If the question is simply "using the command-line"
Let it be simple (root possibly required):
settings put global development_settings_enabled 1
settings put global adb_enabled 1
And then you need to
echo "mtp,adb" > /data/property/persist.sys.usb.config
If you want to do this without touching your phone
Then I'm feeling interesting because in ...
You can see names and partitions at same time.
If you have an eMMC internal storage :
ls -l /dev/block/platform/msm_sdcc.1/by-name/
or for me :
ls -l /dev/block/platform/7824900.sdhci/by-name
It depends of your phone storage. So you can try to know in which folder you have to search.
Last way to know it, if you have the parted ...
Most shell commands in Android are not GNU versions or a POSIX-compliant implementation, they are either from Toolbox or Busybox and mostly stripped down versions.
A lot of commands in /system/bin are symlinks to /system/toolbox. I haven't found much documentation about it, just the source at https://android.googlesource.com/platform/system/core/+/jb-mr1-...
In Android versions equipped with wm tool, you can use the commands:
adb shell wm size # shows the real size and current size
adb shell wm density # shows the real density and current density
(Click image to enlarge)
I've tested successfully on stock Android 5.x and 6.x. Since wm tool comes with Android 4.3.x and 4.4.x as well, the solution may ...
Alas, the UsbStorageActivity doesn't use an intent to enable and disable USB mass storage, so there's no way to achieve this using am. It instead calls the functions StorageManager.enableUsbMassStorage and `StorageManager.disableUsbMassStorage to do its work. As these functions are hidden in the framework, it's not possible to write an app to do this, either....
Well, you have to do a few commands, as I don't believe it will work in one.
You need to do:
cp /data/path/of/file/copyme /data/local/tmp
chown shell.shell /data/local/tmp/copyme
adb pull /data/local/tmp/copyme /destination/copyme
This works for me every time.
Activity Manager among other things manage Screen pinning. You can invoke the am command to pin an app regardless of the Screen pinning being activated under Settings.
However, know that the pinning wouldn't be fully automated this way i.e. you still would have to confirm on the screen whether to pin the app or not, although I provided a way to interact ...
You can enter getprop to get info about device. Or, you can do cat /system/build.prop
If you've root access then you can enter su and then dumpsys | less to get the name of the services which can give more info about some specific things such as battery. See this answer to know more.
On a non-rooted device, you can do adb shell dumpsys | less provided ...
I installed the Disk Info app and in the options, I enabled Expert mode and Unmounted partitions. It doesn't say "swap", but it shows clearly that it's the only other partition on the SD card and it's the right size, so /dev/block/mmcblk1p2 must be the one:
Swapper 2 is configured to use /dev/block/mmcblk0p3 by default, so I'm glad I didn't go with the ...
fdisk -l works if you pass the whole disk device name explicitly (e.g., fdisk -l /dev/block/mmcblk1); what does not work is automatic discovery of block devices (apparently because Android places block device files under the /dev/block directory, but fdisk expects to see those files directly in /dev). Therefore one option is to collect the list of whole disk ...
On some devices which do support WiFi-Direct, the corresponding binaries come pre-installed (e.g. the wpa_cli command; see also How can I install wpa_cli on my rooted device?). If you have those ready, you can use them on your Android device as you would do on a Linux machine (find a closer description e.g. in the blog post How To : Use wpa_cli To Connect To ...
There is a pretty bad method using adb shell input tap, Get the coordinates for enable tethering and substitute
adb shell input tap <x> <y>
Or navigate to enable radio using adb shell input keyevent. Just have a look at,
adb shell input
Again this confines to a particular device.
As existing answers already show, there seems to be no "unique way" to achieve that. So I started combining ideas from allover, joining them into a script (or rather a "script library") to have them checked sequentially (until a good hit was made), and integrated that into my "Device Documentation Tool" named Adebar. Those interested can find it in the lib/...
There is no Fastboot Command that does this.
However you could try holding the power button down until the screen goes blank and then letting go off the power button before the device starts to boot (before the vibrate). This is the only viable way... The list of available Fastboot commands are:
usage: fastboot [ <option> ] <command>