Android Debug Bridge (ADB) Setup Guide
Setting up ADB
Windows
- Obtain the ADB Platform Tools from the official Android developer website.
- Unzip the
platform-tools-latest-windows.zip
file and navigate to the extracted folder. - Within the folder, access the Command Prompt by typing
cmd
in the File Explorer’s address bar and pressing Enter.
Note: Direct navigation to the folder is required unless you have added the directory to your Environment Variables, which is detailed later in this guide.
Android
- Enable Developer Options:
- Navigate to
Settings > About phone
. - Tap
Build number
seven times until the message “You are now a developer!” appears.
- Navigate to
- Activate USB/Wireless Debugging:
- Access
Developer Options
. - Enable
USB debugging
orWireless debugging
, depending on your preference.
- Access
USB debugging:
- Execute
adb devices
in the Command Prompt. - If prompted on your phone, select “Always allow from this computer” and confirm.
For Multiple Devices:
- Use the device serial number with commands, e.g.,
adb -s <serial-number> pull
.
Wireless debugging:
- In
Developer Options
, selectWireless debugging
and choosePair with a code
. - Execute
adb pair <ip-address>:<port>
using the provided IP address and port. - Enter the pairing code when prompted in the terminal.
Android TV
- Enable
Developer Options
andUSB debugging
. - Locate the option according to your TV manufacturer’s settings.
- Connect via
adb connect <ip-address>
, using the IP address from the TV’s Wi-Fi settings.
Storage Backup & Restore
- Open Command Prompt and run
adb devices
to list connected devices. - Use
adb pull -a /sdcard <destination-path>
to copy the entire internal storage. The-a
flag preserves file attributes. - Set up ADB on the target device and connect it to your computer.
- Push the data using
adb push <source-folder>\. /sdcard
, e.g.,adb push "D:\My phone\sdcard\." /sdcard
. - Upon completion of the necessary
adb
operations, execute the commandadb kill-server
. This will terminate theadb
service.
Installing APK Files
- Use reputable sources like APKMirror, UpToDown, or APKPure to download APK files.
- With the device connected, execute
adb install <apk-filename>
from the directory containingadb.exe
and the APK file. You may also specify the full path to the APK file if it is located in a different directory.
Setting Environment Variables
- Open
Edit the system environment variables
and navigate toEnvironment Variables...
. - Under
System variables
, select thePath
variable and clickEdit
. - Add the directory containing
adb.exe
using theNew
orBrowse
options. - Confirm all dialogs with
Ok
.
Note: This allows you to use ADB commands from any location in the terminal.
For further assistance or advanced configurations, consult the official Android Debug Bridge documentation.
Looking for a maintainer. Please DM me at WildeBeast2521 if you are interested in bringing this guide to its pinnacle.
Also, check out the FMHY Discord to learn, share and connect with the great devs.