Skip to main content

What is ADB?


Many users are not familiar with Android SDK or ADB commands, this thread is created with an intention to help them!




Look at any tutorial for rooting an Android device, and one set of initials is sure to come up: ADB. Veterans to Google’s mobile platform will let it roll off their tongues as if it’s everyday language, but those new to Android hacking can get a little tripped up. What the $%#@ is ADB? Let’s take a look.

Introduction:-
Android Debug Bridge (adb) is a versatile command line tool that lets you communicate with an emulator instance or connected Android-powered device.

ADB is a tool that allows you to talk with your device and accomplish a host of different tasks from your computer, such as transferring data, recording the screen's output to a video file, and running powerful shell commands.In simple words. it’s a “bridge” for developers to work out bugs in their Android applications. This is done by connecting a device that runs the software through a PC, and feeding it terminal commands. ADB lets you modify your device (or device’s software) via a PC command line.

If command line syntax confuses or intimidates you, have no fear. For most average users, the only time you’ll need to use ADB is when you have step-by-step instructions in front of you.

Installing Android SDK i.e. ADB:


Aside from ADB, the other set of initials that you see with Android hacking is SDK. This stands for Software Development Kit. So yes, in order to root most devices, you’ll need to download the entire platform that developers use to create apps.

To get started, pick up the version of Android SDK for your platform:

Windows [zip file]
Mac os X [zip file]
Linux

Once downloading, extract the file to an easy-to-remember place on your PC. On Windows, we’d recommend installing it in your root (c
:) drive, in order to make it easier to navigate there via command line.
 

Now you’ll want to open the folder that you extracted the SDK into, and launch the SDK Manager (on OS X, you do this by executing the program ‘Android,’ which is located in the ‘Tools’ folder in the SDK).


After launching SDK Manager, you’ll see a list of optional packages to download and install. Find the one that says “Android SDK Platform Tools” (you may need to expand the “Tools” entry to find it). Once you locate it, check its box to indicate that you want to install it (choose “accept”). Unless you want to develop apps, it’s safe to uncheck everything else (choose “reject”).

After choosing “Install,” Platform Tools will be automatically downloaded, and you’ll be (almost) ready to use ADB.


Using ADB:

Though I am not hear to teach you Linux programming, it will help you to know a few basic methods to using ADB.

First, you need to enable developer options on your device. This is done by going to Settings -> About phone and tapping the Build number 7 times.
You will now have Developer options available in the Settings menu. Enter Developer options and click the check box that says USB Debugging. A popup box will appear that asks you to confirm your choice.
Next, attach your device to your computer via a USB cable. At this point you should get a popup that asks you if you would like to allow USB debugging from this computer. It will display your computer's RSA key fingerprint. Check the "Always allow from this computer" box and tap OK.
The most important thing to know is simply how to get to your ADB folder via the command line.
  • Go to the directory where SDK is located
  • Open "platform-tools" folder
  • Hold "Shift" and "Right Click"
  • Select "Open command window here"
  • Done
Basic ADB Commands:
Now that ADB is installed and working properly, let's see what it can do.


Pushing Files

adb push PATH_TO_FILE_ON_HOST PATH_TO_CLIENT_DIRECTORY

Pulling Files

adb pull PATH_TO_FILE_ON_CLIENT PATH_TO_HOST_DIRECTORY

Uninstalling Apps

adb shell pm uninstall [PACKAGE.NAME]

Note~Replace  package name with package id

Logging

adb logcat

Advanced Techniques
Here are a couple of advanced ADB commands that you can use to do some really cool things.

Enter Your Device's Shell

adb shell <command>


adb shell dumpsys set battery level 15

using this command to reset your battery status use cmd.

adb shell dumpsys battery reset


These are just a couple of very basic examples—when it comes to the shell, the sky's the limit and people are constantly coming up with new uses for this functionality.

Recording Your Screen's Output to a Video File
This feature is new to Android 4.4 KitKat. It allows users to record screen activity to an MPEG-4 file, which you can then download.
adb shell screenrecord <path-on-device-to-save-video-to>
adb shell screenrecord /mnt/sdcard/Download/test.mp4

Conclusion
Now that you know what ADB is, and what you can do with it, go out and conquer the command line with confidence.

Disclamer : This information was sources from various websites.

                   Thanks for Reading


Follow us on -

Instagram                Twitter

Contact & Feedback-

Whatsapp                  Telegram


Comments

Post a Comment

Popular posts from this blog

What is DNS?

A domain name system, or 'dns', is a system of addresses used to organize networks of computers.

What's About Affiliate marketing?

Affiliate marketing is a strategy where businesses reward individual affiliates (people or organizations outside the business) for bringing in new customers or visitors through ads or content on the affiliate’s website. Affiliates receive payments or product discounts based on the number of customers they generate. These are exceptionally common on personal or lifestyle sites, where you might notice that the product recommended has a link with a bunch of additional stuff tracked on. That means that if you buy the product, the blog or site that lead you there will make some percentage of that sale.

What is Bugs?

Bugs are coding mistakes or unwanted pieces of code that keep a website or program from working properly.