• Login:

Welcome to the Xoom Forum - Motorola Xoom Forum.

Register ButtonIf this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.

Basic commands for newcomers to ADB

This is a discussion on Basic commands for newcomers to ADB within the Motorola Xoom Development forums, part of the Motorola Xoom Hacks category; Basic commands for newcomers to ADB **If a line of code includes <xxx> in the first line, then a second line in RED , the ...

+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14
Like Tree6Likes

Thread: Basic commands for newcomers to ADB

  1. #1
    Super Moderator

    Member #
    4076
    Join Date
    Apr 2011
    Location
    Savannah area of Coastal Georgia, USA
    Posts
    2,415
    Liked
    283 times
    Twitter
    fish1552

    Basic commands for newcomers to ADB

    Basic commands for newcomers to ADB

    **If a line of code includes <xxx> in the first line, then a second line in RED, the second line is an example to help you better understand the format.

    ADB stands for "Android Debug Bridge". It comes with the android 2.0 sdk and can be run from the windows command prompt or a mac/linux terminal. For instructions on setting up ADB, please see this thread: Set up ADB. In order to run ADB from your machine, you will need ensure the following in your Android "Settings" is set:
    Settings -> Application Settings -> Development -> Then check the "USB Debugging" box.

    To open a command window/terminal, in Windows go to Start > Run and type "cmd" (no quotes). Prior to using any of these commands, you will need to change the directory to the ADB folder on your machine. If using the default install location for the
    Windows install, this would be C:\Android-SDK-windows and either the /platform-tools or /tools sub-directory, depending which one you copied all the files in. In this example I used the tools sub-directory.
    Code:
    cd C:\android-sdk-windows\tools
    ** - The "cd" part of the command tells the system to "change directory" to path that follows.

    Command/Terminal Window Tips:
    1) Pressing the "Tab" key will get the previous command entered.
    2) You can also use the right arrow key to repeat the previous command, character by character, which can be a time saver if the following lines all start off the same.

    To see /check devices connected to your system (hit return/enter to run command):
    Code:
    adb devices
    In response, adb prints this status information for each instance:

    Serial number — A string created by adb to uniquely identify an emulator/device instance by its console port number. The format of the serial number is

    <type>-<consolePort>.

    State — The connection state of the instance. Two states are supported:
    offline — the instance is not connected to adb or is not responding.
    device — the instance is now connected to the adb server. Note that this state does not imply that the Android system is fully booted and operational, since the instance connects to adb while the system is still booting. However, after boot-up, this is the normal operational state of an emulator/device instance

    If there is no emulator/device running, adb returns "no device".

    REMEMBER!!! You must hit return/enter after each command (or line) to run!
    **If a line of code includes <xxx> in the first line, then a second line in RED, the second line is an example to help you better understand the format.

    Pull/Push/Install Apps & Files:
    To install an app:
    Code:
    adb install <path_to_apk>
    adb install myapp.apk
    To re-install an app, keeping it's data:
    Code:
    adb install -r <path to apk>
    adb install -r myapp.apk
    To push apps from computer to phone
    Code:
    adb push <path to file on phone> <path to location on device>
    adb push test.txt /sdcard/test.txt
    To pull apps from phone to computer
    Code:
    adb pull <path to file on device> <file name for computer>
    adb pull /sdcard/test.txt test.txt
    To clarify the path: In the examples above, the files were placed into the android-sdk/tools folder where ADB defaults to push them, or pull them. So test.txt just means the default path is: C:/android-sdk/tools/test.txt

    Reboot Commands:
    Reboot your device:
    Code:
    adb reboot
    Reboot device into Recovery mode:
    Code:
    adb reboot recovery
    Reboots the device into bootloader mode:
    Code:
    adb reboot bootloader
    Reboots the device into Fastboot mode:
    Code:
    adb reboot fastboot

    View Information:
    Print a list of supported adb commands:
    Code:
    adb help
    Print the ADB version number:
    Code:
    adb version

    Commands helpful in troubleshooting:
    Compile a bug report:
    Code:
    adb bugreport
    Logcat - starts dumping debugging information from your device to the console – useful for debugging (may have to press control+c to exit):
    Code:
    adb logcat
    To output the logcat file to the folder you are running ADB from:
    Code:
    adb logcat > logcat.txt

    Miscellaneous Commands:
    Remount remounts the /system partition as writable (or readonly if it is already writeable):
    Code:
    adb remount

    Shell Commands:
    Shell lets you run an interactive shell (command prompt) on the Android device:
    Code:
    adb shell
    Look at the tasks running on your device:
    Code:
    adb shell top
    Check Memory Usage:
    Code:
    adb shell free
    To fix permissions on your device:
    Code:
    adb shell fix_permissions
    Fastboot Commands:
    List devices currently attached to computers:
    Code:
    fastboot devices
    Unlocks a locked bootloader (must be rebooted into bootloader):
    Code:
    fastboot oem unlock
    To flash a Recovery image file:
    Code:
    fastboot flash recovery recovery.img
    Reboot device while in fastboot:
    Code:
    fastboot reboot
    **Boots a ROM stored on your computer specified by the filename**
    Code:
    fastboot boot <filename>
    **Flashes a ROM stored on your computer, partition can be one of {boot, recovery, system, userdata}**
    Code:
    fastboot flash <partition> <filename>
    ** - WARNING: I have not confirmed these last 2 commands work on the Xoom, but included them in case someone ends up here looking for them. Only use them if you know exactly what you are doing as I cannot confirm what it will do.

    More to be added as the thread expands.
    Last edited by fish1552; 10-22-2011 at 11:04 AM. Reason: added command to output logcat text to file "adb logcat > logcat.txt"
    What is rooting: the advantages/disadvantages | Set-up ADB | Need Help? Post Here | ADB Commands for Newcomers | Boot Animation Requests
    Remember to post the solution that worked to solve your problem so you can help others with their problems later.








  2. # ADS
    Ads


  3. #2
    Super Moderator

    Member #
    4076
    Join Date
    Apr 2011
    Location
    Savannah area of Coastal Georgia, USA
    Posts
    2,415
    Liked
    283 times
    Twitter
    fish1552
    If anyone spots an error, please send me a PM pointing it out so I can fix it.

    Also, please post any commands you feel are missing in a reply in the thread and I will include them in the OP.

    Thanks!
    Last edited by fish1552; 06-24-2011 at 11:32 PM.
    What is rooting: the advantages/disadvantages | Set-up ADB | Need Help? Post Here | ADB Commands for Newcomers | Boot Animation Requests
    Remember to post the solution that worked to solve your problem so you can help others with their problems later.








  4. #3
    Super Moderator

    Member #
    4986
    Join Date
    May 2011
    Location
    West Texas
    Posts
    12,111
    Liked
    451 times
    Twitter
    jblalock77
    Thanks for this.
    Remember: It's not really yours until you've voided the warranty.
    "Battle not with trolls, lest ye become a troll; and if you gaze into the Internet, the Internet gazes also into you."
    Friedrich Nietzsche: A Dynamic Translation

  5. #4
    Super Moderator

    Member #
    392
    Join Date
    Feb 2011
    Location
    Seattle
    Posts
    5,489
    Liked
    522 times
    Twitter
    @Steadyhawkin
    ROMs
    4 Submitted
    Stickied, well done!!!

  6. #5
    Super Moderator

    Member #
    4076
    Join Date
    Apr 2011
    Location
    Savannah area of Coastal Georgia, USA
    Posts
    2,415
    Liked
    283 times
    Twitter
    fish1552
    Quote Originally Posted by Steady Hawkin View Post
    Stickied, well done!!!
    I just noticed I didn't have 3 of the fastboot commands from your rooting guides on the list. So they are now included too.
    What is rooting: the advantages/disadvantages | Set-up ADB | Need Help? Post Here | ADB Commands for Newcomers | Boot Animation Requests
    Remember to post the solution that worked to solve your problem so you can help others with their problems later.








  7. #6
    Xoom Assassin

    Member #
    477
    Join Date
    Mar 2011
    Location
    Dubai
    Posts
    5,252
    Liked
    375 times
    good thread, subscribed!

  8. #7
    Xoom Informant
    Member #
    2824
    Join Date
    Apr 2011
    Posts
    75
    Liked
    2 times
    great resource! thanks!

  9. #8
    Administrator

    Member #
    2101
    Join Date
    Mar 2011
    Location
    Wichita Falls
    Posts
    35,408
    Liked
    2219 times
    Twitter
    mgrant76308
    Great job, been using adb for 2 1/2 years but a refresher is nice.
    n269witu likes this.



    Note 3 - DARTHSTALKER NOTE3 ☆ | VERSiON 7
    LG-G3 Rooted TWRP'ed
    NotePro 12.2 64Gb

  10. #9
    Super Moderator

    Member #
    4076
    Join Date
    Apr 2011
    Location
    Savannah area of Coastal Georgia, USA
    Posts
    2,415
    Liked
    283 times
    Twitter
    fish1552
    Funny thing is, I never really used ADB prior to buying my Xoom because I could always use RSDLite with my Droid - which I still use for boot logo changes. I think I used it 3-4 times to take screenshots on my Droid, so when I wrote this up last week, I really a n00b when compared to many people here. But I learned a lot while gathering all the commands from around the internet to put them all into 1 place.

    When I was working with a Network/Domain Admin for a few years while in the Army, he taught me to make myself a Book of Knowledge. Something that I can refer to when trying to troubleshoot without having to pull it from memory or spend x number of minutes/hours looking for it online. So this is just one of the things in my Android Book of Knowledge text file folder - along with the other 2 guides I've posted.

    Besides, what better way to learn more than to post it where people can help add to and improve it?
    What is rooting: the advantages/disadvantages | Set-up ADB | Need Help? Post Here | ADB Commands for Newcomers | Boot Animation Requests
    Remember to post the solution that worked to solve your problem so you can help others with their problems later.








  11. #10
    Administrator

    Member #
    2101
    Join Date
    Mar 2011
    Location
    Wichita Falls
    Posts
    35,408
    Liked
    2219 times
    Twitter
    mgrant76308
    Quote Originally Posted by fish1552 View Post
    Funny thing is, I never really used ADB prior to buying my Xoom because I could always use RSDLite with my Droid - which I still use for boot logo changes. I think I used it 3-4 times to take screenshots on my Droid, so when I wrote this up last week, I really a n00b when compared to many people here. But I learned a lot while gathering all the commands from around the internet to put them all into 1 place.

    When I was working with a Network/Domain Admin for a few years while in the Army, he taught me to make myself a Book of Knowledge. Something that I can refer to when trying to troubleshoot without having to pull it from memory or spend x number of minutes/hours looking for it online. So this is just one of the things in my Android Book of Knowledge text file folder - along with the other 2 guides I've posted.

    Besides, what better way to learn more than to post it where people can help add to and improve it?
    My phones have all been HTC, the G1, Nexus One and currently the Sensation. I was always glad to use adb instead of RSDLite and Kies - now that I have a Motorola I'm probably going to need to learn something about RSD. I don't have a Book of Knowledge but I do have a word document that I have all the offbeat and normal adb commands in.



    Note 3 - DARTHSTALKER NOTE3 ☆ | VERSiON 7
    LG-G3 Rooted TWRP'ed
    NotePro 12.2 64Gb


 

Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Similar Threads

  1. Android Basics for Newcomers to Honeycomb
    By wicked in forum Motorola Xoom Help
    Replies: 7
    Last Post: 08-29-2011, 01:27 AM
  2. 3g version, how to check balance and send network commands
    By decworld in forum Motorola Xoom General Discussion
    Replies: 4
    Last Post: 06-14-2011, 01:23 PM
  3. GPS Voice commands
    By MichaelinCanada in forum Motorola Xoom General Discussion
    Replies: 6
    Last Post: 05-16-2011, 02:13 PM

Search tags for this page

abd command to fastboot
,
adb command for reboot
,

adb command for recovery mode

,

adb command list

,
adb command recovery mode
,
adb fix permissions
,

adb reboot fastboot

,
adb reboot fastboot command
,
adb reboot recovery
,
adb recovery commands
,

adb recovery mode command

,
adb shell fix permissions
,
android command prompt tricks
,
android fix permissions terminal
,
android terminal fix permissions
,
fix permissions android terminal
,
install recovery mode from adb command
,
list of all fastboot commands
,
reboot recovery command
,
recovery mode adb command
Click on a term to search for related topics.

Tags for this Thread