ADB (Android Debug Bridge) is a useful tool for managing Android devices. Below are a few simple yet useful commands I frequently use (which have proved especially useful after borking some functionality on my ereader, but that’s how we learn).
Rebooting & Package Management
adb devices– Lists connected Android devices.
adb shell pm uninstall -k --user 0 <package_to_disable>– Uninstalls an existing package from user (can be reenabled with “install-existing” and “enable” commands below.
adb shell pm disable-user --user 0 <package_to_disable>– Disable a package from the device. Typically cant be reenabled from the device without using ADB.
adb shell pm list packages -f– Lists all installed user and system packages. It’s helpful to pipe the output into a text file by appending
> <text_file_name>to the end of this command.
adb shell pm enable <package_to_enable>– Enables a previously disabled packaged.
adb shell cmd package install-existing <package_name>– Reinstall a package that was previously uninstalled. You will also need to run the “enable” command above.
adb reboot– Reboots device.
adb reboot fastboot– Reboot connected device into fastboot mode.
adb reboot recovery– Reboot connected device into recovery mode.
Managing files is very similar to managing files in the Linux command line, however you need to include
adb shell before using commands like ls, mv, cp, etc. Transfering files between your computer and the Android device can be done with the following.
adb pull /sdcard/<location_of_file_on_device> <destination_location_on_machine>– Pulling a file from the Android device to your local computer.
adb push <location_of_file_on_machine> <destination>– Push file from your local computer to the Android device.
Thanks for reading. Feel free to send comments, questions, or recommendations to firstname.lastname@example.org.