1.Go to cmd
2.Go to then directory where adb resides
Command: cd C:\Program Files\Android\android-sdk\tools
3.Then type adb shell
If you set android-sdk\tools your user environment variable. then go cmd and type “adb shell”
If you get ‘#’ after typing adb shell, you are already get root access on the phone, no need to type su. Otherwise if you get ‘$’ , type ’su’ to get root access (only for rooted device).
If we want to see how many command support in android:
# cd /system/bin/
Don’t just randomly try commands. Some delete things so know what you are doing.
ls – lists all files with in a directory try ls – l too.
chmod – give/take rights away from files. The numbers you see in the how-to’s is a little complicated. It has to do with the rights you are assigning the file or folder. http://wiki.linuxquestions.org/wiki/Chmod for further reading.
cat – look at, modify, or combine a file. You can also copy files with this command by “reading” it to another file instead of to the screen.
cd – change from one directory to another
cp – Copy a file from one location to another
dd – copies exact locations to other locations. Can be an entire drive, a folder, etc. dd if= of=. uses an input file and an output file.
exit – exits the shell you are in. When you type su you start up a shell.
mv – Move a file from one location to another. At the same time you can rename a file.
su – Substitute User. We type this to switch to the root user. You need to type this command first to do a lot of the other commands.
tar – creates taped archives. Compresses files like winzip, 7zip, winrar and others tar /? for details.
rm – followed by a file name with delete the file
sync – synchronizes any data on disk with data in memory. We type this before rebooting to ensure we’ve got all data written
Other commands of interest:
df – how much free disk space. In linux you can add a switch “df -h” but the “-h” does nothing for me on Android.
top – like task manager, it displays running processes. in Linux the q key quits. On Android I don’t know how to make it quit other than closing the app.
uptime – displays how long it has been since you last rebooted the system. Interestingly enough the “Menu Key > System > About Phone > Status > Up time” on my phone does not match “uptime” typed in the terminal emulator.
busybox – a tool that combines many linux commands into a single compact file. Typing this displays all the commands at your disposal.
busybox df – a much easier to read display of free diskspace. This display shows how full (use%) each file system is.
You can use adb to install aplication from your local drive into phone.
Command: adb install appname.apk