Hey what's up everybody it's Dallas with Gadget Hacks.
And today I'm gonna show you how to send ADB commands to your own phone.
So you might be wondering what the heck I'm doing out here in nature.
Well, I just wanted to show you this is legit ADB on the go.
ADB is like that half step in between standard user privileges and root.
If you're using the ADB shell, you get slightly more access to the Android system.
The drawback, though, has always been how hard it is to use
and how finicky the process can be to get your phone and computer connected.
But now, thanks to a new feature added in Android 9,
you don't need a computer to use ADB anymore.
And you don't need to be rooted, either.
Let's get started...
So first, and again this requires Android 9 or higher,
you'll need to enable Developer Options.
So head to Settings, then About Phone,
and on some phones you may have to tap "Software Information," too,
then just quickly tap the "Build number" entry seven times.
You'll be asked to enter your lock screen password,
and upon doing so,
head to Settings –> System –> Advanced,
or, on Samsung, just scroll down to the bottom of Settings
to find "Developer Options."
In here, you'll need to scroll down to the Debugging section,
which isn't too far down,
and there, you'll need to turn on the "Wireless Debugging" feature.
This is the one that was added in Android 9 and makes this all possible.
But I should note that starting with Android 11,
you'll need to be connected to a Wi-Fi network to use this feature.
Now, basically what you'll need to do is create a local ADB server on the phone
and use it to connect to that wireless debugging feature.
You can do that manually with basically any ADB shell app,
like Remote ADB Shell, for example,
but there's an app that was purpose-built for this feature.
It's called LADB, as in local ADB,
and it's available for $2.99 on the Play Store.
And if you're not cool with that price,
the developer, Tyler Nijmeh, has the app hosted on GitHub for free,
but you'll have to compile it from source manually.
If you ask me, though, that 3 bucks is more than worth
the time saved not having to compile it yourself,
plus it will be a lot easier to update in the future if you get it from the Play Store.
But regardless of how you get it installed, go ahead and open it up.
If you're on Android 9 or 10, this next part will be easy.
Just tick the box next to "Always Allow,"
then press "Allow" on the prompt.
But if you're on Android 11 or higher, it's a little harder...
When you open the app for the first time, it'll ask you to enter a port number and pairing code.
You can get this info from the Wireless Debugging submenu in Developer Options,
but the thing is, as soon as you close the popup that shows it,
the port number and pairing code change.
So what you'll need to do is head to your multitasking view,
then tap LADB's icon at the top of its card and choose "Split Screen."
Now, it's just a matter of putting the Settings app on the other half of the split screen,
then going to Developer Options.
Here, what you'll want to do is tap the actual "Wireless Debugging" text,
not the toggle, to open a submenu.
From there, scroll down and tap "Pair device with pairing code."
On this popup, you'll see your phone's local IP address, then a colon, then another number.
This is the port number.
So now, it's just a matter of copying that and the pairing code into the popup in LADB.
Once you do that, make sure to tap "Okay,"
and then wait until it connects before closing split screen view.
Regardless of which Android version you're on,
you'll know you're good to go when you see a notification saying
"Wireless Debugging Connected."
Now, all you have to do is type your ADB command into the provided field
and it'll run just like you were connected to a computer.
There are a couple of caveats, though.
First, this only works with ADB *shell* commands,
so anything that would normally start with the words "adb" and "shell."
The other thing is, you shouldn't actually include the "adb shell" part of the command,
since you're interfacing directly with the shell already.
So for example,
a common use for this is granting the secure settings permission to an app
so it can modify low level Android features.
Normally, you'd send something like "adb shell pm grant com.abc.xyz" and so on.
But with this, you start with the "pm grant" part instead.
So "pm grant" then the app's package name,
then the name of the permission you want to give it.
Two apps I'd recommend trying that with are Tasker
and SystemUI Tuner by Zachary Wander.
Once they have elevated permissions, you can do quite a bit with them.
And then there's the other major use case:
You can now uninstall any bloatware app
without using a computer or a root app.
It's really groundbreaking, and it's all due to this new feature.
I have a full article dedicated to just that aspect of this
over on GadgetHacks.com
So make sure to check that out
in the link in the description below.
As always, though, we'd appreciate it
if you would like and comment on this video and subscribe to our channel.
So we'll see you again next time, folks, but until then...
Happy Gadget Hacking!