ANDROID ADB TUTORIAL getting started and basic commands

ANDROID ADB TUTORIAL getting started and basic commands


This is a tutorial on using ADB on your android phone. 

First: What do you need? 

  • An android phone, version doesnt matter, root is not required.
  • A computer running linux, OSX or windows.
  • Your brain, and some basic android knowledge. 

1. what is ADB? 
ADB is actually ment for developers to debug there phones and applications. But because it has so many useful features, it is often used to manually root, and update phones. It is also possible to bypass the password set by someone. (i might make a tutorial on this later). 

2. Installing ADB on your pc 
LINUX:

Spoiler (Click to Hide)
The ADB package is called "android-tools-adb", you can easily install it by doing:
Code:
sudo apt-get install android-tools-adb
note that this may be different depending on what distro you use.

WINDOWS:

Spoiler (Click to Hide)
Step 1: Head over to this link to download the latest version of Android SDK.

Step 2: Extract the contents of the downloaded file to your hard drive. Within the unzipped �sdk� folder, you�ll find another folder labeled �platform-tools�. Since we�re interested in only ADB and Fastboot, this is the one that we�re looking for.

Step 3: Move the platform-tools folder to a convenient location on your PC. The root of C: drive is usually a good idea. I also recommend renaming the folder to something easier, like C:Android-adb.

Step 4: Right-click the Computer icon on your desktop, and go to Properties.
[Image: vwz5bYU.png]

Step 5: Under System Properties, go to the Advanced tab, and click Environment Variables.

[Image: LX0meje.png]

Step 6: The system variables are contained within the lower pane. Locate �Path� here, highlight it, and click the Edit button.

[Image: C34ovUG.png]

Step 7: There will already be a string of locations here; navigate to the very end, and add the following text (assuming that you have chosen C:Android-adb as the folder; otherwise, enter whatever path you�ve located adb at): 

Code:
;C:Android-adb
Click OK, finally.

[Image: S64VEOv.png]

Your ADB folder is now configured, and you can run both ADB and Fastboot commands from anywhere in command prompt.

3. Enabling ADB on your phone. 
3.1Before we can start using ADB, we need to turn on USB debugging. You might have done that already, if your phone is rooted. If this is not the case, you can allow USB debugging by going to: settings > Developers. If the Developers option is not there yet, go to the bottom of the setting menu, and choose "about" or "about phone" or something like that. Then, find the build number and keep spamming it until it says that you are a developer. Note that this is how you do it on 4.0+ phones. For older phones: go to Settings > Applications > Development, and allow USB debugging there.
3.2 To enter ADB mode on you phone, you need to turn it of completely. Then, press and hold the volume-up + power button. When recovery is opened, choose ADB sideload, or something like that.
Note: This is different on every phone. If volume-up + power button does not work for you, look up how to enter recovery with your phone.

Now that ADB is enabled, you can connect your phone to your computer.


4. Basic ADB commands 4.1 adb devices 
With this command you can see all the connected devices on your pc. If this command doesnt work for you, you must have done something wrong.

Code:
adb devices

4.2 adb shell With this command you open a shell on your phone. You can het root access by typing su. (your phone needs to be rooted).

Code:
adb shell

4.3 adb install With this command you can install apps (.apk) on your phone.

Code:
adb install "path/to/app.apk"

4.4 adb pull If you have a file on your phone that you want to copy to your pc, use this:

Code:
adb pull /file/on/phone.txt ~/Documents/phone.txt

4.5 adb push The opposite of ADB pull, is ADB push. With this command you can copy files from your pc to your phone. The command is used like this:

Code:
adb push /file/on/your/computer.txt /path/to/your/phone/computer.txt

4.6 adb reboot With this command you can reboot your phone into system, recovery or bootloader. 

Code:
adb reboot
adb reboot-recovery
adb reboot-bootloader
download
alternative link download