Some of the commands are: echo — prints text to stdout. set — - TopicsExpress



          

Some of the commands are: echo — prints text to stdout. set — sets shell variables export — makes shell variables available to command-line programs cd — change the current directory. pwd — print name of the current directory. Commands Quote: To find out what commands you have available to you, use the “ls” command on each of the directories in the PATH variable. Finding documentation for the Android commands. Many of the Android commands are based on standard Linux (or bsd) commands. If you’re curious about a command, you can sometimes learn how it works by using the “man” command on a desktop Linux or OSX (Apple Macintosh) computer. The Linux or OSX version of the command may be different in details, but much of the documentation will still apply to the Android version of the command. Another source of documentation for people without a Linux or OSX machine handy is to use a web browser and use a web search engine to search for the text: “man Linux command-name”. List of commands The following is a list of the commands that are present on a Nexus S phone running an Android 2.3.3 “user-debug” build. Many of these commands are not present on a “user” phone. (They are missing from a “user” phone because they are specific to developing or debugging the Android operating system.) Code: $ ls /data/local/bin /data/local/bin: No such file or directory Notice that by default there is no / data/local/bin directory. You can create this directory using the “mkdir” command if you like. Code: $ ls /sbin opendir failed, Permission denied The /sbin directory exists, but you don’t have permission to access it. You need root access. If you have a developer phone, or otherwise have root access to your phone you can see what’s in this directory. Code: $ su # ls /sbin ueventd adbd # exit $ Quote: Notice that the shell prompt changes from a ‘$’ to a ‘#’ to indicate that you have root access. Notice also that neither of the / sbin commands are useful to the shell — the adb and ueventd files are ‘daemon’ programs used to implement the Android Debugger “adb” program that is used by developers. Code: $ ls /vendor/bin gpsd pvrsrvinit Vendor/bin is where device vendors can put device-specific executables. These files are from a Nexus S. Code: $ ls /system/sbin /system/sbin: No such file or directory This directory does not exist on a Nexus S. Code: $ ls /system/bin am Quote: am is the Android Activity Manager. It’s used to start and stop Android activities (e.g. applications) from the command line. Type am by itself to get a list of options. Code: amix aplay Command line audio file player. Code: app_process applypatch Used to apply patches to android files. Code: arec Command line audio recorder. Code: audioloop bluetoothd BlueTooth daemon Code: bmgr Backup manager – type command by itself to get documentation. Code: bootanimation Draws the boot animation. You may have to reset your phone to get out of this Code: brcm_patchram_plus bugreport cat Copy the contents of a file to standard output. Code: chmod Change the mode of a file (e.g. whether it can be read or written.) Code: chown Change the owner of a file. Code: cmp Compare two files byte-by-byte Code: dalvikvm The dalvik virtual machine. (Used to run Android applications.) Code: date Prints the current date and time Code: dbus-daemon dd Convert and copy a file. By default copies standard in to standard out. Code: debuggerd dexopt df Shows how much space is free on different file systems on your device. Code: dhcpcd dmesg dnsmasq dumpstate dumpsys dvz fsck_msdos gdbserver getevent getprop gzip hciattach hd id ifconfig iftop ime input insmod installd ioctl ionice iptables keystore Send signals to processes. Code: linker ln Used to set up a file system link. Code: log logcat Prints the Android runtime log. Code: logwrapper ls Lists files. Code: lsmod lsof make_ext4fs mediaserver mkdir Make a directory. Code: monkey A program that sends random events, used to test applications. (Like having a monkey playing with the device.) Code: mount mtpd mv Move a file from one directory to another. (Only on the same file system. Use “cat a > b” to copy a file between file systems. Code: nandread ndc netcfg netd netstat newfs_msdos notify omx_tests pand ping pm pppd printenv ps List active processes. Code: qemu-props qemud racoon radiooptions reboot Reboot the device. Code: record renice rild rm Remove a file. Code: rmdir Remove a directory. Code: rmmod route rtp_test run-as schedtest schedtop sdcard sdptool sendevent service servicemanager setconsole setprop setup_fs sh showlease sleep smd stagefright Starts the Android runtime. Code: stop Stops the Android runtime. Code: surfaceflinger svc sync system_server tc testid3 toolbox top Shows which processes are currently using the most CPU time. Code: umount uptime Prints how long your device has been running since it was last booted. Code: vdc vmstat vold watchprops wipe wpa_cli wpa_supplicant $ ls /system/xbin add-property-tag btool check-lost+found dexdump dhdutil hcidump latencytop librank opcontrol oprofiled procmem procrank rawbu Secure copy program. (Used to copy files over the network.) Code: showmap showslab sqlite3 Used to administer SQLite databases. Code: strace System trace command – use to see what system calls a program makes. Code: su Start a shell with root privileges.
Posted on: Fri, 02 Aug 2013 20:42:19 +0000

Trending Topics



Recently Viewed Topics




© 2015