What's new
DroidForums.net | Android Forum & News

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Let's talk adb.

pc747

Regular Member
Rescue Squad
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.





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>. 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.
$ adb devices
List of devices attached
emulator-5554 device
emulator-5556 device
emulator-5558 device
 
Last edited:
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 install <path_to_apk>
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.
 
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.

[video=youtube;oKPSe12YDxQ]http://www.youtube.com/watch?v=oKPSe12YDxQ&annotation_id=annotation_331575&feature=iv]YouTube - How to Root the HTC Thunderbolt, Setting up ADB - Step 1[/video]


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).
 
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
 
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
 
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



Actually just put it on sd card and either

adb reboot bootloader

or just unplug phone and do power off. Then power on + volume down.
 
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
 
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
 
ADB for dummies was perfect for me when I rooted my TB a few weeks ago, glad you linked to it.
 
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 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.

Can I use this same command for zip files? For example

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


EDIT by t0ast3d;175483

Here is a thread to help the new people with ADB

1. Turn on ADB

Go to Menu > Settings > Applications > Development > USB Debugging


2. Running ADB

To run ADB, downolad the newest Android SDK and place it in C: and rename it AndroidSDK

SDK Link: Download the Android SDK | Android Developers

Open up command prompt and type
cd c:\AndroidSDK/tools

You are now in


3. Basic ADB commands

ADB push (sends files to your phone) -- adb push c:\example.apk /sdcard/example.apk

ADB pull (Receives files from your phone) -- adb pull /system/app/example.apk c:\example.apk

ADB install (installs application) -- adb install c:\example.apk

adb shell (Begins shell connection with phone)

adb reboot (reboots phone)

adb reboot recovery (reboots phone into recovery)

adb reboot bootloader (reboots the phone into bootloader/the white screen)

adb remount (remounts the system)


4. Commands to run while in ADB Shell

cd (changes directories) -- cd /system/app

ls (lists all files in the directory) -- cd /system/app

rm (removes files) -- rm /system/app/example.apk

cp (copies files) similar to cat -- cp /system/app/example.apk /sdcard/example.apk

cat (copies files) -- cat /system/app/example.apk > /sdcard/example.apk

exit (exits shell) -- exit


Let me know if I was able to help in any way, or if you want to learn how to do more through adb


Sent from Verizon in Phoenix, AZ, running a rooted Thunderbolt, with Lightning Rom v3.3.1 / Adrynalyne 4.4.3
 
Last edited:
Back
Top