ADB (Android Debug Bridge) and Fastboot are essential tools for Android developers and enthusiasts. They allow for a wide range of tasks, from installing apps and managing files to unlocking bootloaders and flashing custom ROMs. This article will guide you through installing and using these powerful tools on your Ubuntu or other Linux system.
Installing apps Accessing files on your device Executing shell commands Debugging applications
Unlocking the bootloader Flashing custom ROMs and recovery images Updating firmware
sudo apt install adb fastboot
sudo dnf install android-tools
sudo pacman -S android-tools
adb --version
Open your device's Settings .Navigate to About phone (orSoftware Information ).Locate the Build number (orMIUI version for Xiaomi devices).Tap the Build number repeatedly until you see a message indicating thatDeveloper options have been enabled.Go back to Settings and navigate toSystem >Advanced >Developer options .Enable USB debugging .
Connect your Android device to your Linux system using a USB cable. Launch the ADB server on your computer by running the following command:
sudo adb start-server
Your Android device should display a popup asking if you want to "Allow USB debugging". Click Allow to proceed.To verify that your device is connected, run the following command:
adb devices
adb install <apk_name or path/to/apk>: Installs the specified APK on your device.adb uninstall <apk_name or path/to/apk>: Uninstalls the specified APK from your device.adb shell: Provides access to your device's shell, allowing you to execute shell commands like ls, cd, and pwd.adb shell “pm list packages -u -3”: Lists all uninstallable or removable packages on your device.adb push Filename where/to/send/in/Android: Pushes a file from your computer to your device, for example, adb push sample.txt /storage/emulated/0/.adb pull /path/to/file/in/Android /target: Pulls a file from your device to your computer, for example, adb pull /storage/emulated/0/sample.txt ~/.
0 comments:
Post a Comment