Translate

Indonesian English French German Spain Italian Russian Portuguese Japanese Dutch Arabic Chinese Simplified

Android:shell Command

Monday, July 5, 2010

Shell is a program that acts as an intermediary between the user's operating system. Users can run programs, create a pipeline of the process and save the output to a file and run more than one program within a same time.command contained in the android operating system can be seen in the directory / system / bin.

akmd
am
app_process
cat
chmod
cmp
dalvikvm
date
dbus-daemon
dd
debug_tool
debuggerd
dexopt
df
dhcpcd
dmesg
dumpcrash
dumpstate
dumpsys
dvz
fillup
flash_image
getevent
getprop
hciattach
hcid
hd
hostapd
hostapd_cli
htclogkernel
id
ifconfig
iftop
input
insmod
installd
ioctl
itr
kill
linker
ln
log
logcat
logwrapper
ls
lsmod
mediaserver
mkdir
mkdosfs
monkey
mount
mountd
mv
netcfg
netstat
notify
ping
playmp3
pm
printenv
ps
qemud
radiooptions
reboot
renice
rild
rm
rmdir
rmmod
route
schedtop
sdptool
sdutil
sendevent
service
servicemanager
setconsole
setprop
sh
sleep
smd
ssltest
start
stop
surfaceflinger
svc
sync
system_server
telnetd
toolbox
top
umount
vmstat
watchprops
wipe
wlan_loader
wpa_cli
wpa_supplicant

To enter the shell in android operating system can use the command 'adb shell' command prompt on the computer or go to the emulator developers through Dev Tools menu and select the terminal emulator
a. Command
• ls is used to display a list of the contents of a directory
syntax: ls: shows the content of the active directory
ls filename / direktoriname: displays the filename (if the file exists) or the contents of direktoriname
ls-l: displays the contents of a directory in long format
• cd is used to move to a directory
syntax: cd namadirektori: move to namadirektori
cd .. : Move to upper directory
• echo to display text to standard output
syntax: echo 'abc': display text to the screen abc
b. Diversion
Allows the transfer facility to store the output of a process to a file.
• The command> filename
So that the output from these commands will be stored in the file filename. Shell plans to create a file if the files have not been there or rewrite the file if the file already exists so that the contents of the old file will be deleted.
• The command>> filename
The difference with the previous syntax is the output of the command is not re-written to the file but added to the file so that the contents of the file is not deleted.
c. Background Process
If the command followed by the characters '&' then the subshell will be created to run the command in background processes.
Syntax: command &

1 comment:

Murat Sezgin said...

I am running the below commands in the shell.

DIR=/dir

if [ "$DIR" != "" ]; then
echo "something"
fi

But I get this error:

[: not found

It seems Android's shell doesn't support brackets. How can I run this command? What should I use instead of brackets?

Post a Comment

 
Theme by New wp themes | Bloggerized by Dhampire