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

Learn Ethical hacking with practical language.

Types of hackers A Hacker is a person who finds and exploits the weakness in computer systems and/or networks to gain access. Hackers are usually skilled computer programmers with knowledge of computer security. Ethical Hacker (White hat): A hacker who gains access to systems with a view to fix the identified weaknesses Cracker (Black hat): A hacker who gains unauthorized access to computer systems for personal gain. The intent is usually to steal corporate data, violate privacy rights, transfer funds from bank accounts etc. Grey hat: A hacker who is in between ethical and black hat hackers. He/she breaks into computer systems without authority with a view to identify weaknesses and reveal them to the system owner. Script kiddies: A non-skilled person who gains access to computer systems using already made tools. #intermediate Getting started with Nmap Nmap is the world's leading port scanner. Nmap, as an online port scanner, can scan your perimeter network ...

How to recognize a Scam?

Check Scam Adviser Before You Buy  Click Here As the influence of the internet rises, so does the prevalence of online scams. There are fraudsters making all kinds of claims to trap victims online - from fake investment opportunities to online stores - and the internet allows them to operate from any part of the world with anonymity. The ability to spot online scams is an important skill to have as the virtual world is increasingly becoming a part of every facet of our lives. The below tips will help you identify the signs which can indicate that a website could be a scam. Common Sense: Too Good To Be True When looking for goods online, a great deal can be very enticing. A Gucci bag or a new iPhone for half the price? Who wouldn’t want to grab such a deal? Scammers know this too and try to take advantage of the fact.If an online deal looks too good to be true, think twice and double-check things. The easiest way to do this is to simply check out the same product at compe...

What are Ports?

On a TCP/IP network every device must have an IP address. However an IP address alone is not sufficient for running network applications, as a computer can run multiple applications and/or services. Just as the IP address identifies the computer, The network port identifies the application or service running on the computer. • Analogy If you use a house or apartment block analogy the IP address corresponds to the street address. All of the apartments share the same street address. However each apartment also has an apartment number which corresponds to the Port number.