ADB Makes Me Feel Like an Android Hacker, But It’s Super Useful
Android
Quick Links
-
ADB Lets You Do Various Tasks on Your Phone From the Command Line
-
Sideloading Apps With ADB Is More Fun Than Just Clicking Install
-
Removing Bloatware Has Never Been Easier
-
ADB Lets You Pull Photos to Your Computer Without a USB Cable
If you want to feel like a hacker and you have an Android phone, then ADB is the perfect tool for you. It’s simple to use and allows you to do all kinds of things right from your terminal.
ADB Lets You Do Various Tasks on Your Phone From the Command Line
ADB offers a lot of functionality for your Android device. From installing apps to sending terminal commands and much more, ADB really extends what your smartphone, tablet, or other Android-based system can do.
One of the more advanced but awesome features of ADB is being able to trigger a screen recording. This bypasses any UI elements and immediately begins the screen recording, stopping whenever you back out of the running command.
Sideloading Apps With ADB Is More Fun Than Just Clicking Install
Really, one of my favorite things to do with ADB is install apps. Why? Well, you can get an APK from anywhere (like from APK Mirror) and then sideload it. This can be useful if an app is pulled from the Play Store or if a developer is simply distributing the application without paying Google’s fees.
One such example of this is the Epic Games Store. After a long battle, Epic finally released its own games store for mobile so you could get access to titles like Fortnite outside official channels. This allows Epic to distribute directly to the end user (you) and bypass Apple and Google.
If you want to feel more like a hacker, then use ADB to install the Epic Games Store APK on your Android phone.
To do this, start by downloading the APK from the Epic Games Store website. You might have to click “Retry Download” at the bottom of the page to trigger the APK download.
Once the APK is downloaded, simply open your terminal and navigate to wherever the APK is stored. Be sure ADB is connected to your device (I prefer a network connection, but USB works too), then run the command adb install EpicGamesStore.apk. That’s it. You’ve just used ADB to install an app remotely without being plugged into your phone.
Removing Bloatware Has Never Been Easier
Lots of smartphone manufacturers ship their devices with crazy bloatware. Sometimes, this bloatware isn’t user-removable. ADB fixes that.
Once connected to your device, start by running the adb shell command, which opens a terminal into your connected device. Then, run pm list packages | grep ‘<OEM/Carrier/App Name>’. For instance, you could insert “oneplus” there, or “samsung” to see what apps are there from the manufacturer. Be sure to use lowercase to see what’s installed as Linux subsystems, like Android, are case-sensitive.
Once you find an offending app you’d like to uninstall, while still within adb shell, run the command pm uninstall -k –user 0 NameOfPackage. You should be greeted with a “Success” message if ADB successfully uninstalls the app.
Do be careful here, removing core software from your phone could break or brick the device. So, use this method sparingly. But you’ll definitely feel like a hacker using ADB to uninstall apps that aren’t typically able to be removed.
ADB Lets You Pull Photos to Your Computer Without a USB Cable
The last thing that makes me feel like a hacker when using ADB is pulling files to my computer.
Sure, you can plug your phone into the computer to grab some pictures or screenshots from it. If your phone supports microSD, then you could also simply pull the card out and insert it into your computer. But where’s the fun in that?
Instead, use ADB to pull the file. Again, I prefer to connect wirelessly to my phone through ADB and then pull stuff that way. It might be slightly slower than using USB, but I also don’t have to find a cable, so there’s that.
To grab a file from your device, you’ll want first to know the name of the file. You can use the Photos app to find the name of the picture if that’s what you’re pulling. Or use a file browser app to locate the file that way.
If you really can’t figure out the full path, then dive back into adb shell. Here, you can use commands like ls and cd to navigate around the operating system and find the file path.
Once you have that down, simply run the command adb pull /path/to/file path/to/folder, and you’ll pull that file to your computer. You can substitute the final path/to/folder for a period . to have it place the pulled file directly into the folder you’re currently in.
This is a great way to grab a file from your phone. And it even works in reverse. Simply switch the command from adb pull to adb push path/to/file /path/to/folder, and you’ll be sending files to your Android smartphone. Just remember, with this command, the first file path is the local path on your computer, and the second folder path is the remote folder path on your Android device.