 Okay, this series is going to be doing some fun rooting stuff with the Motorola G, but really a lot of this applies to a lot of Android devices, and so let's get started. First thing we need to do is enable developer mode. I'm running lollipop here, and if I go into settings on the phone, and I scroll all the way down, I can find down here about the phone, and right here there's the build number, and if you click that seven times, which I've already done that, it's saying that I already have enabled developer mode, but you click it seven times, it'll enable developer mode, and then you can click back, and you can see there's a developers option here, and we're going to want to enable USB debugging, which I have already enabled here. Okay, now that we have that done, let's switch over to our desktop or laptop or whatever device we have connected to our phone or tablet, in this case the Moto G, and let's install some packages we're going to be using, some programs we're going to be using throughout this series. I'm using, I'm running Debian, and I'm going to use aptitude, but use whatever pack manager you want. These packages should be in most distributions, but three packages, Android Tools fastboot, Android Tools ADB, and Aboot IMG. Go ahead and install those, which I already have installed, but I'll run that anyway, as you can see I already have them installed. They may be labeled different things in your repositories, but you want fastboot ADB and Aboot IMG. Today we're mainly going to be using fastboot and a little bit of ADB, which we're going to actually run right now. Now you can to restart your phone into the bootloader mode, there's buttons you can press, but if you haven't hooked to your computer or developer mode, all you have to do is use ADB, and I'm going to run sudo, just because that's how the permissions are set up on my machine. sudo ADB, I'm going to say reboot bootloader, and when I do that, and if you look at the phone, which is screen reserving off, there we go, we're in bootloader mode. Great, so now what we want to do is unlock the bootloader, I want to say first off, you're avoiding your warranty doing this, and second off, back up all your data because when you're unlocking your bootloader, it will wipe out all your personal data on the phone. And that's for security reasons. Think of it like this, on a regular desktop or laptop, if you have whatever operating system, it doesn't matter whether it's an Apple desktop laptop running macOS, if it's you're running Linux, BSD or Windows, if you're running an operating system and you don't have your hard drive encrypted, you can set all the passwords you want in the world, it doesn't matter if someone boots a live CD, they pop in a Linux CD or a USB flash drive, they can boot their own operating system and completely bypass all your passwords, meaning they have access to all your data that's not encrypted. Same thing on the phone, once you unlock a bootloader, you can boot different images just like you would boot a live CD, meaning that if your bootloader is unlocked, it means anyone can hook up to the phone and now they can have access to all your data. So that's why it wipes and also might be a good idea when you're not needing your bootloader unlocked to relock it, although it still is going to be voiding your warranty if you really care about that sort of thing. So what we need to do now to unlock the bootloader is we're going to run this command, it's sudo fastboot oem, and then we're going to get unlocked at, I'm not going to run that on my phone, my phone's already unlocked, but that will give you a key for your phone, and I don't want to share that with everybody. Once you have that key, you can go to this website and I'll try to remember to put a link to this in the description. It's the Motorola site and it's the Motorola site for unlocking your bootloader. They give you information, the warnings, you'll click next, and at this point it will probably ask you to log in or create an account. I've already created an account and logged in, and here it's telling you what I just told you, run fastboot oem, unlock data, and it will give you output that looks something like this, on a Windows or Linux machine, on a Mac machine, I guess it looks like this. What we want is everything after the bootloader lines, so go ahead copy and paste that, so it's all five lines are on one line like this, paste your code into there, and click unlock my device. And at that point, I also want to agree to this, you're going to get an email that's going to have a new key for you. Once you have that key, you go back to your shell, and again I'm writing sudo just to make sure permissions go through here. I'm going to say fastboot, which fastboot is the bootloader on most Android devices. If you have a Samsung device, it's not using fastboot, but most other devices use fastboot. If you are running a Samsung device, you're going to want to look into a program called Hilldale, I think is how you pronounce it. If you're on a Linux or really it's cross-platform, it's an open-source program, or a leaked program called Odin, if you're on Windows, but you can still use Hilldale on Windows. But we're mainly looking at fastboot, because that's the majority of Android devices, so the fastboot program on your phone interacts with the fastboot bootloader on your phone, and here we're going to say OME, and we're going to say unlock, and at this point, you're going to paste in the key that they emailed you. You'll hit enter, and the phone will then tell you that it is unlocked. And that is how you unlock your bootloader on the Motorola G, and really a lot of, well, the website that we went to was specifically for Motorola, it might vary a little bit for other devices, but as far as unlocking, you're still going to be using fastboot if your fastboot is your bootloader, and the unlock command with the key there. So that's it, it's that simple. Again, remember, back up all your personal data beforehand if you have anything, because it will wipe that for security reasons. You don't want people getting your keys for all your logins, on all your website and applications, or seeing anything that's private on your phone. So again, now that we have this unlocked, we're going to continue this series, we're going to be looking at modifying images, making our own custom images that we can boot from or install onto the phone, and that will allow us to do a lot of fun root startup stuff, and we're going to be doing stuff that's similar to booting, again, a live CD on the phone. You can, again, do this completely in RAM, or actually modify the hard drives on the phone. So I thank you for watching. This video was a little boring, a little simple, but something you need to do for the rest of the tutorials to work. So I thank you for watching. Please visit FilmsByChris.com, that's Chris at the K. There should be a link in the description. As always, if you enjoy this tutorial, I hope that you like, share, subscribe, and I hope that you have a great day. Okay, this is an introduction to FilmsByChris.com. I'm Chris, that's Chris at the K. That's me right there. My daughter, Amber, and my wife, Jennifer. We pretty much live in the swamps of Florida. I'm a firefighter by day, as well as by night, we work long hours, but that's not why you're here. You're here about the videos I put up on YouTube. These videos are mainly about computers and programming, which means most of my videos look something like this. And if that's what you're interested in, great. And if not, that's all right. I do videos on other topics too, such as video editing, special effects, photo editing, 3D design, and music creation. If you are one of my viewers and you enjoy my videos, my Patreon page is a place where you can go to help support my videos. So I ask that you take the time to go to my Patreon page and look at different levels of rewards you can receive for different levels of backing. There should be a link in the description of this video if you're watching it on YouTube. Otherwise you can visit patreon.com forward slash metalx1000. And I thank you for your time and your support. Have a great day.