Let's talk adb.

Discussion in 'Thunderbolt Hacks' started by pc747, Apr 24, 2011.

  1. pc747

    pc747 Administrator
    Staff Member Rescue Squad

    Joined:
    Dec 23, 2009
    Messages:
    24,303
    Likes Received:
    5,331
    Trophy Points:
    1,123
    Ratings:
    +5,919
    Any one familiar with the subject feel free to join in. Im will start by talking about the basics of adb and adb commands. If you need to dive into adb right now to root there is a video for how to set it up and how to root using adb (thanks nat3mil) here: http://www.droidforums.net/forum/thunderbolt-hacks/141791-rooting-tbolt-through-adb-step-step-video.html

    So I will get started.







    Android Debug Bridge (adb) is a versatile tool lets you manage the state of an emulator instance or Android-powered device. It is a client-server program that includes three components:
    • A client, which runs on your development machine. You can invoke a client from a shell by issuing an adb command. Other Android tools such as the ADT plugin and DDMS also create adb clients.
    • A server, which runs as a background process on your development machine. The server manages communication between the client and the adb daemon running on an emulator or device.
    • A daemon, which runs as a background process on each emulator or device instance.





    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>. Here's an example serial number: emulator-5554
    • State — The connection state of the instance. Three 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.

     
    #1 pc747, Apr 24, 2011
    Last edited: Apr 25, 2011
  2. pc747

    pc747 Administrator
    Staff Member Rescue Squad

    Joined:
    Dec 23, 2009
    Messages:
    24,303
    Likes Received:
    5,331
    Trophy Points:
    1,123
    Ratings:
    +5,919
    You can use adb to copy an application from your development computer and install it on an emulator/device instance. To do so, use the install command. With the command, you must specify the path to the .apk file that you want to install:
    adb devices: Prints a list of all attached emulator/device instances.adb help: Prints a list of supported adb commands.adb versions: Prints the adb version number. adb shell: Starts a remote shell in the target emulator/device instance.
     
  3. pc747

    pc747 Administrator
    Staff Member Rescue Squad

    Joined:
    Dec 23, 2009
    Messages:
    24,303
    Likes Received:
    5,331
    Trophy Points:
    1,123
    Ratings:
    +5,919
    SO that we can all practice this I will need you to set up adb and this is a good step by step video to get it going.



    here are the links that he link to in his video.

    &bull; View topic - [GUIDE] ADB for "Dummies"

    Android SDK ADB Driver

    ^(the drivers for your tbolt should be set up by now if not then that is how he did it in the video).
     
  4. pc747

    pc747 Administrator
    Staff Member Rescue Squad

    Joined:
    Dec 23, 2009
    Messages:
    24,303
    Likes Received:
    5,331
    Trophy Points:
    1,123
    Ratings:
    +5,919
    Once you get every thing set up you will be able to type in adb commands.

    The first command:

    That should list your device

    That should reboot your phone
     
  5. pc747

    pc747 Administrator
    Staff Member Rescue Squad

    Joined:
    Dec 23, 2009
    Messages:
    24,303
    Likes Received:
    5,331
    Trophy Points:
    1,123
    Ratings:
    +5,919
  6. pc747

    pc747 Administrator
    Staff Member Rescue Squad

    Joined:
    Dec 23, 2009
    Messages:
    24,303
    Likes Received:
    5,331
    Trophy Points:
    1,123
    Ratings:
    +5,919
    For those with adb already set up, we are going to use the current path directory shown in the video: C:\android-sdk-windows\platform-tools
     
  7. Hateslinger

    Hateslinger Member

    Joined:
    Apr 11, 2011
    Messages:
    99
    Likes Received:
    0
    Trophy Points:
    6
    Ratings:
    +0
    I've been looking for a thread like this. Thanks. I'll certainly give adb a chance today. Once I have adb setup, what command would I give it to install a pgimg05 file? Assuming I've already put it at the root of the sd card? Also, what command would I give it exactly, if I were to install a file I would usually flash in cwm? Thanks in advance.


    Sent from Verizon in Phoenix, AZ, running a rooted Thunderbolt, with Lightning Rom v3.3.1 / Adrynalyne 4.4.3
     
  8. pc747

    pc747 Administrator
    Staff Member Rescue Squad

    Joined:
    Dec 23, 2009
    Messages:
    24,303
    Likes Received:
    5,331
    Trophy Points:
    1,123
    Ratings:
    +5,919


    Actually just put it on sd card and either

    or just unplug phone and do power off. Then power on + volume down.
     
  9. Hateslinger

    Hateslinger Member

    Joined:
    Apr 11, 2011
    Messages:
    99
    Likes Received:
    0
    Trophy Points:
    6
    Ratings:
    +0
    Thanks. I'm familiar with hboot on the android but I want to graduate from noob to dangerous and learn adb. Lol. How do I push a zip file I would normally flash in cwm? Adb reboot push backfont. Zip?

    Sent from Verizon in Phoenix, AZ, running a rooted Thunderbolt, with Lightning Rom v3.3.1 / Adrynalyne 4.4.3
     
  10. pc747

    pc747 Administrator
    Staff Member Rescue Squad

    Joined:
    Dec 23, 2009
    Messages:
    24,303
    Likes Received:
    5,331
    Trophy Points:
    1,123
    Ratings:
    +5,919
    Put file on root of sdcard, ie Rom or theme. No need to rename it. Either use Rom manager to reboot into cwr or in and type: adb reboot recovery

    sent from droidforums app
     
  11. Vulcan1600

    Vulcan1600 Super Moderator
    Staff Member Premium Member

    Joined:
    Nov 20, 2009
    Messages:
    5,846
    Likes Received:
    282
    Trophy Points:
    198
    Location:
    Pennsylvania
    Ratings:
    +292
    ADB for dummies was perfect for me when I rooted my TB a few weeks ago, glad you linked to it.
     
  12. Hateslinger

    Hateslinger Member

    Joined:
    Apr 11, 2011
    Messages:
    99
    Likes Received:
    0
    Trophy Points:
    6
    Ratings:
    +0
    Can I use this same command for zip files? For example

    adb install c:\mydocuments\myrom\lightning3.31, zip


    EDIT by t0ast3d;175483


    Sent from Verizon in Phoenix, AZ, running a rooted Thunderbolt, with Lightning Rom v3.3.1 / Adrynalyne 4.4.3
     
    #12 Hateslinger, May 1, 2011
    Last edited: May 1, 2011
Search tags for this page

adb for dummies