Welcome to the Grok Shop! In today's video I'm going to be talking about the
ADB Android debug bridge and the reason for that is I'm gonna have some videos
that use the ADB to help you get some things done on your phone whether you're
having problems or you just want to do something a little different a little
more power user mode. I'll put the link to this down below but it's
developer.android.com so for those who might not know the ADB is basically a
way to talk to your phone through a command-line interface or CLI. You can
use it over network or USB interface. I'll be using the USB interface in this
video. so assuming you're not a developer with the SDK manager click the download
it here link to get the Android SDK platform tools download page open.
next click the appropriate link for your platform
Now you just want to unzip the archive to your tools area I use C:\tools in my case.
So, I actually have an older version on here just to show how much changes
there's been in about six months time. there's been some changes going on so
it's definitely worth getting the latest version.
okay next we're going to want to get the USB Driver for your specific device. back at that same page there's a
link to install OEM USB drivers ("original equipment manufacturer") and then there's
a link I'll put the link to this page and then you click on OEM drivers find
your manufacturer and go to their page. so for example if you have a Samsung
Galaxy you would go to the Samsung link there, end up at the Samsung site and
click on mobile and phones in this case and in Galaxy S and then select your
particular model
in this case they want you to also select your carrier ...
and you just click download and install the driver just like any other driver
in my case I've already installed this driver so it's saying do you want to
reinstall? I'm not gonna do that here
okay next we want to fire up a terminal if you're on Mac or Linux or command
line if you're on Windows you can type CMD and go to cmd.exe there at the top
or for me I have a command prompt that's already formatted a special way for me
so I'll go there
you can either add the folder you extracted to to your path or just
navigate to that folder directly which is what I'm going to do here. so if you
just type adb usage and whatnot there's a lot of stuff in there we're not gonna
get into right now but adb space devices will show you if you have
anything attached. So see right now there's nothing. so now you want to plug in
your device and on my Android seven Samsung Galaxy S6 this is what it
currently looks like. different Android versions and phones will have... sometimes
you'll just get a notification you got to go to the notification area but you
do want to allow USB debugging and you want to allow access to device data now
of course you want to have developer mode turned on I've got a video for that
so check that out if you don't have developer mode turned on and then you
should see with ADB devices your device listed and that means you'll be able to
communicate with it.
okay so just to illustrate a possible failure mode you might see in case you don't have one of these two options enabled...
first I will revoke USB debugging authorization and interestingly that
doesn't take effect until the USB debugging is turned off and back on so
I'll go ahead and do that now
so first just turning USB debugging off you'll see it's back to not showing any
devices at all
so now if you have USB debugging enabled but you don't authorize the RSA key
fingerprint you'll see it's there but it's unauthorized so you do need to have
both of those allowed. okay and then getting those back allowed again we can
proceed. ok so now if you type adb shell it'll actually open up a shell onto the
device so now you actually have a command prompt shell open on the device
itself and so example of one command you can do is top and here I do top, the top
20 processes with top -m 20 and you can see like for example if your
phone's running very slow what's causing it to run slow the busiest processes are
at the top you can see 3% they're used by my VNC nothing really heavy running
on my phone at this point but that's that's just one example of something you
can do another example of something you can do would be direct file transfer you
can see here opening up a file explorer on my phone the path to the folders on
the device aren't always so obvious so I like to open this up and show you what
the actual path would be to for example photos and movies from my camera taken
recently what I'm going to do is I'm going to grab everything from my camera
folder and transfer it locally and to do that you do ADB pull and then put the
path from the phone and then your local path so I'm just going to put it locally
so I'll put a dot which means put it locally
so after 48 seconds it looks like it pulled about 1.3 gigabytes and averaging
26.1 megabytes per second so that's a wrap for your adb intro thanks for
watching stay tuned for some more interesting applications of the adb
interface that's how it's done