I haven't seen a simple ADB COMMANDS tutorial here so here it goes
Motorola Drivers: if you don't have it installed already get it here:
USB and PC Charging Drivers - Motorola USA
First you need the Google's Android SDK download it here:
Android SDK | Android Developers
put the contents of the zipped file in C:/android/
it should look like this:

Now, set your PATH environment variable by right click on My Computer, and select Properties. Under the Advanced tab, hit the Environment Variables button, and in the dialog that comes up, double-click on Path under System Variables. at the end of the line add a semicolon then the full path to the tools directory to the path, in this case, it is: C:\android\tools
Then click OK , OK , OK.
I am running Win7 so XP and vista might look a bit different:

Make sure you have USBDebugging checked on your phone:
Menu>settings>Application Settings>Development>USB DEBUGGING
The long drawn out way to Mount your system
To Mount as Read-Write:
JUST FOUND OUT ABOUT THIS AND IT DOESN'T REQUIRE A SCRIPT
OR THE LONG WAY
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
To Mount as Read-Only
THE LONG WAY
Code:
mount -o ro,remount -t yaffs2 /dev/block/mtdblock4 /system
IT GOT OLD QUICK
I found out about scripts and found a couple to make my life easier (down load the attached zip and push to the same directory you have busybox installed /system/xbin OR /system/bin/)
**use the mount command above in order to do this.**
sysrw = mounts the system as read-write
and
sysro= mounts the system as read-only
then came root explorer great it mounts for you and makes copying files easy,
but then I ended up connecting to the computer,
clicking mount USB
copy files to sdcard ,
unmount USB,
copy file from the sdcard to the Droid.
blah time consuming and since my usb was already connected why not use the ADB....
well with the ability to ADB PULL / ADB PUSH I can quickly and easily move files from the droid to the pc or sdcard with ease.
Commands:
change to android tools directory: its a good idea to keep it simply mine is located in c:/androind/tools
Code:
cd c:android/tools/
now you can run your ADB commands
Mount the system as Read-Write:
this will mount your system as Read-Write using the script you placed in your /system/xbin/ directory. you can then push and pull files from your DROID
adb pull: to be done from the directory your tools are in
example c:/android/tools/>adb pull
Code:
adb pull /system/framework-res.apk framework-res.apk
this pulled the framework-res.apk from /system/framework/ to your adk tools directory you can make changes to it and push it back
adb push:to be done from the directory your tools are in
example c:/android/tools/>adb push
**these are case sensitive so Launcher2.apk does not equal launcher2.apk
Gmail.apk does not = gmail.apk Phone.apk does not = phone.apk**
get my drift?
Disclaimer: when pushing framework-res.apk while not in recovery mode it MIGHT cause boot loops. it doesn't for me, but had for others so if you push framework-res.apk and get boot loops, boot into recovery and push it again.
Code:
adb push framework-res.apk /system/framework/framework-res.apk
this pushed back the framework-res.apk
Mount the system as Read-Only:
this will mount your system as Read only and sync using the scripts you placed in /system/bin/ directory
Rebooting:
Rebooting is easy
to be done from adb shell
Code:
adb shell
su
reboot
OR
Code:
adb shell
su
reboot recovery
OR
to be done in tools directory
c:/android/tools/>
Code:
adb reboot
adb reboot recovery
Screen Capture: to be done from Tools directory
example
Code:
c:/android/tools/>ddms.bat
to quickly open the screen capture tool type ddms.bat
click on the image of a phone on the left and click the Device menu then screen cap or press Ctrl+S
EXAMPLES OF USING ADB TO:
Boot Animations: download your boot animation and place in tools folder it can be called what ever you want because the file will be be changed when we push it.
adb shell
su
sysrw
exit
exit
adb push thekickassbootanimation-goes-here.zip /data/local/bootanimation.zip
adb shell
su
sysro
reboot
you mounted as read-write exited out of abd shell into your tools folder and pushed your oddly named boot animation to /data/local/ and renamed to bootanimation.zip
Pull a file and push it back:
I will pull my launcher2.apk change the app drawer handle and push it back with my new app drawer images
Code:
adb shell
su
sysrw
exit
exit
adb pull /system/app/Launcher2.apk Launcher2.apk
we pulled launcher2.apk from /system/app/ and name it Launcher2.apk and put it in the tools folder on the computer. make your changes to the apk so you can push it back
Code:
adb push Launcher2.apk /system/app/Launcher2.apk
adb shell
su
sysro
reboot
I pushed the new launcher2.apk back to /system/app/ mounted the system as read only and sync'd and rebooted.
Changing Directory from ADB SHELL:
not you need to have a forward slash in front of the directory
Code:
adb shell
su
cd /sdcard
cd /system/app/
cd /data/app/
Now maybe you want to see what files are residing in that directory to do that we we the ls command:
Code:
adb shell
su
cd /system/xbin/
ls
This will return a list of all the files in the "xbin" directory
Removing stock Apps: email, corp cal,amazon.mp3
these reside inside or /system/app/
Code:
su
sysrw
cd /system/app/
ls
this now shows you what apps are inside of there note you need to type the name exactly as displayed as it is case sensitive
rm com.Email.apk
rm com.CorpCal.apk
sync
reboot
Removing left over data from the APKS:
menu>settings>applications>manage applications
these will usually start with "com" just type the file name as it is on the droid I did with with my droid on so I could see the file names.
Code:
su
sysrw
pm uninstall com.motorola.calendar
pm uninstall com.android.email
pm uninstall com.android.mms
*must be done after removing the APK, you will get "Sucess" message after it removed it*
I can update the OP if I missed some stuff, but im at work and want to get home to my family and enjoy some pints of beer
-=Jason=-