There are questions pertaining to the use of the Android Shell or to finding a documentation of the Shell commands on Android. Since I haven't found anything convenient, I would like to use this thread to compile a list of "useful" Android commands. I am going to add commands as they are posted.
closed as too broad by eldarerathis Mar 24 '14 at 2:53
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
locked by Matthew Read Nov 12 '15 at 16:18
This question exists because it has historical significance, but it is not considered a good, on-topic question for this site so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. See the help center for guidance on writing a good question.
Read more about locked posts here.
Use Android package manager pm
usage: pm [list|path|install|uninstall] pm list packages [-f] pm list permission-groups pm list permissions [-g] [-f] [-d] [-u] [GROUP] pm list instrumentation [-f] [TARGET-PACKAGE] pm list features pm path PACKAGE pm install [-l] [-r] [-t] [-i INSTALLER_PACKAGE_NAME] [-s] [-f] PATH pm uninstall [-k] PACKAGE pm enable PACKAGE_OR_COMPONENT pm disable PACKAGE_OR_COMPONENT pm setInstallLocation [0/auto] [1/internal] [2/external]
Install the package com.twitter.android-1.apk from the SD card
pm install /sdcard/com.twitter.android-1.apk
List installed packages that contain the term twitter
pm list packages | grep twitter
Show the install directory of the twitter package
pm path com.twitter.android
Lists all running processes / apps with live updates showing CPU usage, PID,...
Lists all running processes / apps and allows filtering using grep
ps | grep apps
Lists all running apps on your phone
mount -o rw,remount -t "filesystem" "Device" "Mount Point"
Allows you to remount your partitions for write access or to mount images.
Write access for the root filesystem
mount -o rw,remount -t rootfs /
Write access for your /system partition
mount -o rw,remount -t yaffs2 /dev/block/mtdblock4 /system
Write access for /system using busybox
busybox mount -o remount,rw /system
Mount the contents of
myimage.img, viewable in the folder
mount -o loop /sdcard/myimage.img myimage
getprop can show interesting details from the device configuration, such as DNS servers, gateways, GSM details, running services, build parameters, version info etc.
here is /system/bin
I haven't gone through yet to add documentation though, my apologies.
I have made a google doc where I and some friends plan to put our documentation over spring break. If people want to help out, it would be much appreciated.
Android Shell Commands
uptime vdc vmstat vold watchprops wipe