Android Debug Bridge This is the literal meaning of ADB. Though at first glance it doesn’t appear to tell you anything, it actually does. 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.
For example, in our guide to rooting the, we present the following ADB commands. Adb push BurritoRoot2.bin /data/local/ adb shell chmod 777 /data/local/BurritoRoot2.bin adb shell /data/local/BurritoRoot2.bin adb root adb shell id adb remount adb push su /system/xbin/su adb shell chown 0.0 /system/xbin/su adb shell chmod 06755 /system/xbin/su adb remount adb install Superuser.apk Not only do you not need to know what they do, but you don’t even need to type them. Simply copy and paste each individual line into a command prompt or terminal instance. Hardcore Android hackers and developers will insist that it’s good for you to learn what it means. That may be, but not everyone wants to (or has the time to) learn Italian just so he can order from the best restaurant in Venice. A simple set of instructions will do. Installing 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. 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. Drivers Aside from the specific instructions to root your particular device, the next thing you’ll need will be the drivers for your phone or tablet. The easiest way to do this is usually to simply search for your specific device plus ‘drivers.’ So if you have a, you’d search ‘Droid Razr Windows Drivers.’ This will almost always direct you to the best link. Another option, which will only work for stock Android devices, is to download the USB drivers from the SDK. To do this, launch SDK Manager again.
Go to the “Available packages” tab on the left, expand the “Third party add-ons” entry, then expand the “Google Inc add-ons” entry. Finally, check the entry for “Google USB Driver” package.
Google releases two tools called Android Debug Bridge (ADB) and fastboot, both of which are available in a package called Platform Tools. They are tools that let you customize and control your Android phone by sending to it through your computer.
As long as debugging mode is enabled on your phone, you can send ADB commands while the phone is working regularly or even when it's in recovery mode. Plus, the device doesn't even need to be, so you don't have to worry about first. These ADB commands can be used to modify your Android without having to actually touch the device, but there's much more that's possible. With ADB, you can do simple things like install system updates or even deal with things that are normally restricted, like tweaking settings you didn't even know existed, or gaining access to system folders that are normally locked down.
Here are some examples of ADB commands:. adb devices shows which ADB supported devices are connected to your computer. adb reboot restarts your phone. adb backup creates a full backup of your phone and saves it to your computer. adb sideload loads ROMs and other files from your computer onto your Android.
adb pull copies files from the phone to your computer. adb shell allows commands to be run in a terminal on the Android device.
adb reboot -bootloader starts your phone in bootloader mode so that you can run fastboot commands. Fastboot is useful if you need to change your Android phone's or other file system details while it's in bootloader mode, like installing a new boot image.
It's commonly used to install a custom recovery should the phone stop booting normally. Download Platform Tools. Both of these utilities are available through Android.com:. Visit the download page to find the latest version of ADB and fastboot.
Note: They're also included in the full but it's unnecessary to download all of that just for these two tools that you can get them through Platform Tools. Choose the download link that corresponds with your. In other words, if you have Windows, choose the SDK Platform-Tools for Windows one, or the Mac download for macOS, etc. After reading through the terms and conditions, click the box next to I have read and agree with the above terms and conditions. Click DOWNLOAD SDK PLATFORM-TOOLS FOR operating system.
Save the file somewhere memorable because you'll be using it again shortly. The folder where you normally save files is fine as long as you know how to get back there. Note: Since ADB downloads in a ZIP archive, you'll be extracting it before using it, which you can choose a location for in the next step. This means that the location in Step 4 isn't necessarily the permanent location of the program. Extract the Platform Tools ZIP File (Windows 8). Go to whatever folder it is that you saved Platform Tools too, and extract the contents of the ZIP file.
Android Debug Bridge Pull
Your operating system has built-in tools that can do this for you, but some other options include opening the ZIP file with a free file extraction utility. Windows. Right-click platform-tools-latest-windows.zip and choose the extract option. It's called Extract All. in some versions of Windows.
When asked where to save the file, like you see in the image above, pick a folder that's appropriate for ADB to stay, not somewhere temporary like a downloads folder or somewhere that's easily cluttered like the desktop. I've chosen the root of my C: drive, in a folder called ADB. Put a check in the box next to Show extracted files when complete.
Click Extract to save the files there. The folder you chose in Step 1 should open and show the platform-tools folder that was extracted from the ZIP file you downloaded earlier.
And are some third-party programs that can open ZIP files in Windows. MacOS. Double-click platform-tools-latest-darwin.zip to immediately have the contents extracted to the same folder you're in. A new folder should appear called platform-tools. You're welcome to move this folder anywhere you like or you can keep it where it's. If you'd rather, you can instead use or to open the ZIP file. Linux Linux users can use the following Terminal command, replacing destinationfolder with whatever folder you want the platform-tool folder to end up in.
Unzip platform-tools-latest-linux.zip -d destinationfolder The best way to do this is to open Terminal at the folder where the ZIP file resides. If that's not the case, you need to modify the platform-tools-latest-linux.zip path to include the full path to the ZIP file. If the unzip utility isn't installed, run this command: sudo apt-get install unzip Like with Windows, you can use 7-Zip or PeaZip in Linux instead if you'd rather not use these Terminal commands or they're not working for you. Copy the 'platform-tools' Folder Path (Windows 8). Before you start using ADB, you want to make sure that it's easily accessible from the command line. This requires the path to the platform-tools folder from the previous slide to be setup as an. The easiest way to do this is to first copy the path to the folder: Windows.
Open the folder where you extracted the platform-tools folder. Open the platform-tools folder so that you can see the folders and files inside it. At the top of the window, click in an empty space next to the path. You can alternatively hit Alt+D to quickly move the current focus to the navigation bar and automatically highlight the folder path. When the path to the open folder is highlighted, right-click and copy it, or hit Ctrl+C. MacOS. Select the platform-tools folder you extracted.
Hit Command+i to open the Get Info window for that folder. Click and drag to select the path next to 'Where' so that it's highlighted. Hit Command+C to copy the folder path. Linux.
Open the platform-tools folder so that you can see the other folders and files inside it. Hit Ctrl+L to move the focus to the navigation bar.
The path should instantly become highlighted. Copy the path with the Ctrl+C shortcut. Note: Your version of any of these operating systems might be different enough that the steps are not exactly as you see them here, but they should work with most editions of each OS.
Edit the PATH System Variable (Windows 8). Here's how to open the Edit System Variable screen in Windows so that the path you copied can be setup as a PATH system variable:. Search for and open the System. Choose Advanced system settings from the left side.
In the System Properties window, click or tap Environment Variables. at the bottom of the Advanced tab. Locate the bottom area labeled System variables, and find the variable named Path. Click Edit.
Right-click in the Variable value: text box and paste the path to the platform-tools folder. If there are other paths already in the text box, go to the very far right side (hit End on your keyboard to quickly get there) and put a semicolon at the very end.
Without any spaces, right-click and paste your folder path there. See the image above for reference. Click OK a few times until you get out of System Properties. Follow these steps to edit the PATH file in macOS or Linux:. Open Terminal through Spotlight or Applications/Utilities.
Enter this command to open your Bash profile in your default: touch /.bashprofile; open /.bashprofile. Driver support activation key. Move the cursor to the very end of the file and enter the following, replacing folder with the path to the platform-tools folder: export PATH=”$HOME/ folder /bin:$PATH”.
Save the file and exit the text editor. Enter the following Terminal command to run your Bash profile: source /.bashprofile.
Step One: Set Up the Android SDK Head to the and scroll down to “SDK Tools Only”, which is a set of tools that includes ADB. Download the ZIP file for your platform and unzip it wherever you want to store the ADB files–they’re portable, so you can put them anywhere you want.
Start the SDK Manager EXE and deselect everything except “Android SDK Platform-tools”. If you are using a Nexus phone, you may also want to select “Google USB Driver” to download Google’s drivers. Click the Install button. This downloads and installs the platform-tools package, which contains ADB and other utilities. When it’s finished, you can close the SDK manager. Step Two: Enable USB Debugging on Your Phone To use ADB with your Android device, you must enable a feature called USB debugging.
Open your phone’s app drawer, tap the Settings icon, and select “About Phone”. Scroll all the way down and tap the “Build Number” item seven times. You should get a message saying you are now a developer. Head back to the main Settings page, and you should see a new option near the bottom called “Developer Options”. Open that, and enable “USB Debugging”. Later on, when you connect your phone to your computer, you’ll see a popup entitled “Allow USB Debugging?” on your phone. Check the “Always allow from this computer” box and tap OK.
Step Three: Test ADB and Install Your Phone’s Drivers (if Needed) Open the folder that you installed the SDK tools in and open the platform-tools folder. This is where the ADB program is stored.
Hold Shift and right-click inside the folder. Choose “Open Command Window Here”. To test whether ADB is working properly, connect your Android device to your computer using a USB cable and run the following command: adb devices You should see a device in the list. If your device is connected but nothing appears in the list, you’ll need to install the appropriate drivers. Your phone’s manufacturer may provide a downloadable driver package for your device.
So head to their website and find the drivers for your device–Motorola’s are, Samsung’s are, and HTC’s come as part of a suite called. You can also search for driver downloads without the extra software. You can also try installing the Google USB Driver from the Extras folder in the SDK Manager window, as we mentioned in the first step. This will work with some phones including Nexus devices. If you use Google’s USB driver, you may have to force Windows to use the installed drivers for your device.
Open the Device Manager (click Start, type Device Manager, and press Enter), locate your device, right-click it and select Properties. You may see a yellow exclamation mark next to the device if its driver isn’t installed properly. On the Driver tab, click Update Driver. Use the Browse my computer for driver software option. You’ll find the Google USB Driver in the “Extras” folder where you installed your Android SDK files.
Select the google usbdriver folder and click Next. Once you’ve installed your device’s drivers, plug in your phone and try the adb devices command again: adb devices If all went well, you should see your device in the list, and you are ready to start using ADB! Step Four (Optional): Add ADB to Your System PATH. As it stands, you have to navigate to ADB’s folder and open a Command Prompt there whenever you want to use it. However, if you add it to your Windows System PATH, that won’t be necessary–you can just type adb from the Command Prompt to run commands whenever you want, no matter what folder you’re in. The process is a bit different on Windows 7 and 10, so for the steps required to do this. Useful ADB Commands In addition to the variety of tricks that require ADB, ADB offers some useful commands: adb install C: package.apk – Installs the package located at C: package.apk on your computer on your device.
Adb uninstall package.name – Uninstalls the package with package.name from your device. For example, you’d use the name com.rovio.angrybirds to uninstall the Angry Birds app. Adb push C: file /sdcard/file – Pushes a file from your computer to your device. For example, the command here pushes the file located at C: file on your computer to /sdcard/file on your device adb pull /sdcard/file C: file – Pulls a file from your device to your computer – works like adb push, but in reverse. Adb logcat – View your Android device’s log. Can be useful for debugging apps. Adb shell – Gives you an interactive Linux command-line shell on your device.
Adb shell command – Runs the specified shell command on your device. For a full guide to ADB, consult the on Google’s Android Developers site. Image Credit.
Google releases two tools called Android Debug Bridge (ADB) and fastboot, both of which are available in a package called Platform Tools. They are tools that let you customize and control your Android phone by sending to it through your computer. As long as debugging mode is enabled on your phone, you can send ADB commands while the phone is working regularly or even when it's in recovery mode.
Plus, the device doesn't even need to be, so you don't have to worry about first. These ADB commands can be used to modify your Android without having to actually touch the device, but there's much more that's possible. With ADB, you can do simple things like install system updates or even deal with things that are normally restricted, like tweaking settings you didn't even know existed, or gaining access to system folders that are normally locked down. Here are some examples of ADB commands:. Spt 1770 pdf. adb devices shows which ADB supported devices are connected to your computer.
adb reboot restarts your phone. adb backup creates a full backup of your phone and saves it to your computer. adb sideload loads ROMs and other files from your computer onto your Android. adb pull copies files from the phone to your computer.
adb shell allows commands to be run in a terminal on the Android device. adb reboot -bootloader starts your phone in bootloader mode so that you can run fastboot commands. Fastboot is useful if you need to change your Android phone's or other file system details while it's in bootloader mode, like installing a new boot image. It's commonly used to install a custom recovery should the phone stop booting normally.
Download Platform Tools. Both of these utilities are available through Android.com:. Visit the download page to find the latest version of ADB and fastboot. Note: They're also included in the full but it's unnecessary to download all of that just for these two tools that you can get them through Platform Tools. Choose the download link that corresponds with your. In other words, if you have Windows, choose the SDK Platform-Tools for Windows one, or the Mac download for macOS, etc. After reading through the terms and conditions, click the box next to I have read and agree with the above terms and conditions.
Click DOWNLOAD SDK PLATFORM-TOOLS FOR operating system. Save the file somewhere memorable because you'll be using it again shortly. The folder where you normally save files is fine as long as you know how to get back there. Note: Since ADB downloads in a ZIP archive, you'll be extracting it before using it, which you can choose a location for in the next step.
This means that the location in Step 4 isn't necessarily the permanent location of the program. Extract the Platform Tools ZIP File (Windows 8).
Go to whatever folder it is that you saved Platform Tools too, and extract the contents of the ZIP file. Your operating system has built-in tools that can do this for you, but some other options include opening the ZIP file with a free file extraction utility. Windows. Right-click platform-tools-latest-windows.zip and choose the extract option. It's called Extract All. in some versions of Windows.
When asked where to save the file, like you see in the image above, pick a folder that's appropriate for ADB to stay, not somewhere temporary like a downloads folder or somewhere that's easily cluttered like the desktop. I've chosen the root of my C: drive, in a folder called ADB. Put a check in the box next to Show extracted files when complete.
Click Extract to save the files there. The folder you chose in Step 1 should open and show the platform-tools folder that was extracted from the ZIP file you downloaded earlier. And are some third-party programs that can open ZIP files in Windows. MacOS. Double-click platform-tools-latest-darwin.zip to immediately have the contents extracted to the same folder you're in. A new folder should appear called platform-tools.
You're welcome to move this folder anywhere you like or you can keep it where it's. If you'd rather, you can instead use or to open the ZIP file. Linux Linux users can use the following Terminal command, replacing destinationfolder with whatever folder you want the platform-tool folder to end up in. Unzip platform-tools-latest-linux.zip -d destinationfolder The best way to do this is to open Terminal at the folder where the ZIP file resides.
If that's not the case, you need to modify the platform-tools-latest-linux.zip path to include the full path to the ZIP file. If the unzip utility isn't installed, run this command: sudo apt-get install unzip Like with Windows, you can use 7-Zip or PeaZip in Linux instead if you'd rather not use these Terminal commands or they're not working for you. Copy the 'platform-tools' Folder Path (Windows 8). Before you start using ADB, you want to make sure that it's easily accessible from the command line. This requires the path to the platform-tools folder from the previous slide to be setup as an. The easiest way to do this is to first copy the path to the folder: Windows.
Open the folder where you extracted the platform-tools folder. Open the platform-tools folder so that you can see the folders and files inside it. At the top of the window, click in an empty space next to the path. You can alternatively hit Alt+D to quickly move the current focus to the navigation bar and automatically highlight the folder path. When the path to the open folder is highlighted, right-click and copy it, or hit Ctrl+C. MacOS.
Select the platform-tools folder you extracted. Hit Command+i to open the Get Info window for that folder. Click and drag to select the path next to 'Where' so that it's highlighted.
Hit Command+C to copy the folder path. Linux. Open the platform-tools folder so that you can see the other folders and files inside it. Hit Ctrl+L to move the focus to the navigation bar. The path should instantly become highlighted. Copy the path with the Ctrl+C shortcut. Note: Your version of any of these operating systems might be different enough that the steps are not exactly as you see them here, but they should work with most editions of each OS.
Edit the PATH System Variable (Windows 8). Here's how to open the Edit System Variable screen in Windows so that the path you copied can be setup as a PATH system variable:. Search for and open the System. Choose Advanced system settings from the left side. In the System Properties window, click or tap Environment Variables. at the bottom of the Advanced tab.
Locate the bottom area labeled System variables, and find the variable named Path. Click Edit. Right-click in the Variable value: text box and paste the path to the platform-tools folder. If there are other paths already in the text box, go to the very far right side (hit End on your keyboard to quickly get there) and put a semicolon at the very end.
Without any spaces, right-click and paste your folder path there. See the image above for reference. Click OK a few times until you get out of System Properties. Follow these steps to edit the PATH file in macOS or Linux:.
Open Terminal through Spotlight or Applications/Utilities. Enter this command to open your Bash profile in your default: touch /.bashprofile; open /.bashprofile. Move the cursor to the very end of the file and enter the following, replacing folder with the path to the platform-tools folder: export PATH=”$HOME/ folder /bin:$PATH”. Save the file and exit the text editor. Enter the following Terminal command to run your Bash profile: source /.bashprofile.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |