Here's a breakdown of the most common commands you'll find yourself using:
adb devices - lists devices detected by the Android Debug Bridge
adb push <local> <remote> - push the file at "local" to "remote" on your phone, remote can be a directory or a file, in the latter you can have it change the file's name too. Example: adb push test.txt /sdcard/foo.html
adb reboot [bootloader¦recovery] - reboots the phone into bootloader or recovery
dd if=source of=output - Probably one of the most useful commands, the dd command copies and converts data from "source" to "output", common example (from shift 2.2 root): dd if=/sdcard/hboot_eng.nb0 of=/dev/block/mmcblk0p18. That example replaces the built in bootloader with the ENG bootloader to obtain "S-OFF"
cd - change directory. Example (current directory is C:\android\): cd root-utility (now inside C:\android\root-utility, "cd.." takes you into the directory right above)
Example 2 (current dir is C:\temp\linux): cd.. (dir is now C:\temp)
adb shell - runs a shell from your computer, basically a remote terminal that lets you run commands from your computer that are then executed on your phone. Using the syntax "adb shell <command>" opens a shell, runs "command" and then closes the shell. Example: adb shell cd /sdcard/downloads
su - equivalent to "sudo" on a computer running Linux, but no additional verification. Example:
Code:
Running on a shell (adb shell from computer or terminal emulator on phone)
$ dd if=/sdcard/hboot_eng.nb0 of=/dev/block/mmcblk0p18
permission denied: read-only file system
$ su //changes sign to #, now have elevated privileges
# dd if=/sdcard/hboot_eng.nb0 of=/dev/block/mmcblk0p18
20468+0 records in
20468+0 records out 40936 bytes copied 1.2 MB copied, 0.362 seconds