Most of you may know the Android Debug Bridge or “adb” from one of the millions buy viagra tutorials for Android devices. Indeed, adb is a very useful tool to handle various situations. May it be a fix, or just pushing data to your device. For “advanced users” of Android devices it’s a must and here’s how to use it (Thanks to XDA-Member biggem001 for the basic structure of this guide):
To begin with, there are some steps of preperation to be able to use the Android Debuge Bridge:
1. Download the official Android SDK (here, click!)
Mind that you need to choose the correct link, depending on your operationg system (Windows, MacOS or Linux). Furthermore, the installation requires the Java JDK (download here, click!)
2. Start the SDK (double click “SDK Manager.exe”)
Check the checkboxes next to “Android SDK Platform-tools” (under Tools) and Google USB Driver package (under Extras). Then, click install. Afterwards, “adb.exe” should be located in something like “C:\<your chosen directory\platform-tools\” . That’s it. You got the adb.
3. To access ADB through any command prompt directory change the System Variables
To do so, right click on My Computer and go to => Properties => Advanced System Settings => Advanced (Tab) => Environment Variables => Under Stystem Variables scoll and double click on “Path”, at the end of the variable value line add ” ;C:\<your chosen directory>\platform-tools “. Afterwards you should be able to access the adb everywhere through “cmd.exe“.
4. Make sure you have downloaded the latest drivers of your device.
In order to do so, go to htc.com and download your device’s drivers. Those are usually included when installing HTC Sync.
To use the adb 3 simple steps are required:
Firstly, connect your device to your PC via USB. Secondly, ensure that you have the “USB Debugging Mode” activated on your device (through Settings). As a thirst step, open up your console or “cmd.exe” in Windows.
Following commands are available: Thanks to XDA-Member biggem001 for this list, again.
ADB Devices : This command shows all connected android devices that will respond to an ADB command. It is useful for making sure your device is connected.
ADB Connect [IP:PORT] : This command will connect to your device over personal WIFI connection if your device is setup for ADB over WIFI (Requires root and NOT recommended)
ADB Push [local_file] [remote_file] : This command will push any local file to the device (only if the device is Read/Writable. Stock /system/ folders are only Readable.
ADB Pull [Remote_file or Directory] [Save file or Directory] : This command take files or an entire directory and save it to your desired location. This command only works when directory is read/Writable.
ADB Shell [command] : This command will perform most UNIX commands on the device. Without a command, you can enter several shell commands before you ‘exit’. Most will not work unless SU is applied (# instead of $). Must be rooted for SU. Only play with these commands if they are known by you or exactly copied from instructions.
ADB Logcat [ > file.txt ] : This command will display (or save per > file.txt) a log of what’s happening on the device. If you are receiving errors, turn on logcat, reproduce error, turn off, and send logcat to the developer.
ADB Install [-r][-s] [local_apk] : This command force installs (or reinstalls –r or –s installs on SD-Card) any APK provided.
ADB Uninstall [-k] [APK_Name] : This command uninstalls any APK Name provided (app.apk) and will even keep cache and other data with the –k tag.
ADB start-server : This command will start the server if the server is off or killed. (Normally server will auto-start when ADB command is used)
ADB kill-server : This command will close ADB server. Useful if ADB server is acting up or not connecting to any devices.
ADB remount : This command will mounts the /system/ partition Read/Writable pending the device is allow to. Stock TFP will NOT.
ADB root : This command will restart ADB with root permissions if the build allows for it. Stock TFP will NOT.
ADB usb : This command will restart ADB on device to use USB connection for ADB communication.
ADB tcpip [port] : This command will restart ADB on device to use TCPIP connection for ADB. Standard port is 5555. Again, this connect not recommended for file transfers.
ADB reboot [recovery/bootloader] : This command will restart your device. If either of the two options are given, the device will boot into that mode (sadly TFP does not support the two options.. yet
Something missing? Write me a mail, or comment!