- Here I've got an Android phone.
But if I selected the Root Checker app,
I can verify that this phone has been rooted.
In this video,
I'm gonna show you how to root an Android phone
in preparation for the installation of software
such as Kali NetHunter.
You need to root your phone
if you want to use the full power
of Kali NetHunter, for example, to attack wifi networks.
(electronic sounds)
Kali can run on many types of devices.
You could run it within a virtual machine.
You could dual boot your computer.
But in this example, we're gonna use a mobile device.
We're going to use NetHunter,
but there are two versions of NetHunter.
We've got NetHunter Pro,
which you would use on a PinePhone.
I'll demonstrate that in a separate video.
In this video,
we're going to look at rooting the Android phone
in preparation for installing NetHunter.
Various phones are supported.
So you could use a Nexus phone as an example, and Nokia,
various other phones.
But the phone that we are using for this demonstration
is a OnePlus Seven T.
So on this device, I'll go to Settings, About Phone.
You can see that it's a OnePlus Seven T.
In this case, we're using Android 11.
And this specific bold number.
Now in this example,
I'm not gonna upgrade the phone
to a later release of Android.
The reason for doing that is I want to get official drivers
for the phone.
I don't wanna install some kind of dodgy software.
On the OnePlus website. For the OnePlus Seven T.
The latest software that I can download is 11.0.9.1.HD65BA.
And that's the version of software running on this phone.
If I look at System,
there is an upgrade to the software.
So I could install Oxygen OS12.
But in my tests that didn't work. So I'm not gonna do that.
I'm gonna stay with this release of Android 11
per this download.
Now you can use the timestamps
to jump to a specific part of this video.
I wanna talk about the reasons that I'm using this phone.
I want to talk about Kali NetHunter,
the different types of Kali NetHunter that you have.
Again, use the timestamps
if you're only interested in certain parts of the video.
Now there are different additions of Kali NetHunter.
You have a Rootless install.
Have a look at this video
if you wanna see how to install Kali NetHunter
using a rootless installation.
That's the simplest installation of all.
There's also NetHunter Lite,
which is a full Nethunter package
for rooted phones without a custom kernel.
And then you have the full NetHunter package
with custom kernel for supported devices.
To be honest, if you want the power of NetHunter,
you need to use a rooted device.
As an example, if you want to use WiFi injection,
you need a rooted device running NetHunter.
If you wanna run HID attacks, you need to use NetHunter,
not NetHunter Lite or NetHunter Rootless.
So again, what I'm gonna show you in this video
is how to root the device in preparation
for the NetHunter installation.
I'll do the actual NetHunter installation
in a separate video.
In this video I just wanna show you how to root this device.
OnePlus devices are my recommended device
if you wanna learn how to root an Android phone.
There are instructions out there
on how to root other devices.
Please let me know in the comments below
if there are any other devices
that you want me to demonstrate.
I will be covering additional devices.
But in this example, we're doing a NetHunter installation
for the OnePlus Seven T, version 11.
So that's the NetHunter software
that I'm going to want to download.
But before I even get to that,
there are various steps that you need to complete.
And to make this easier for you,
my team and I have created a PowerPoint presentation.
So download the PDF below
if you want to have written instructions,
rather than just follow the video.
As always,
do not use the information that I'm showing you here
for illegal activities.
It's only for educational purposes.
What you need to do, this is a Windows 10 or 11 computer.
Now you can use other operating systems.
But because most people use Windows,
I'm gonna be demonstrating this with a Windows computer.
If you want to install Kali NetHunter,
you need a virtual machine as an example running Kali Linux,
so that you can compile the Kali NetHunter kernel.
Again, I'll show you that in a separate video.
You also need a USB-C data cable,
and obviously you need a phone.
So in this example, the OnePlus Seven T.
Okay, so as mentioned,
we're not gonna upgrade the phone to Android 12.
We're gonna use Android 11.
Next step is we need to download the platform tools.
So we go to developer Android.com, studio releases,
Platform Tools, and in this example,
I'm gonna download the SDK Platform Tools for Windows.
You have to agree to the license
and make sure that you read that.
Agree to the license and then download the platform tools.
I'm gonna save that to my desktop
and what I'll do is extract that software.
So I've now got the software extracted.
What we now need to do is unlock the bootloader
on the phone.
So I'm gonna go to Settings once again on the phone.
I'm gonna scroll down to About Phone.
And I'm gonna tap the bold number seven times.
And what we're told now is we've become a developer.
We need developer mode
because what we want to do is go to System Settings,
Developer Options.
And what we want to do is enable OEM unlocking.
And we want to enable USB debugging.
And you need to accept those two options.
So again, we need both OEM unlocking,
as well as USB debugging enabled.
Okay, so the next step is we need to install drivers,
so that if we brick the phone, we can un-brick it.
Some people struggle with this.
What you have to do is hold the up and down volume button
and power button at the same time.
So you might see the volume go up or something else happen,
but basically you just need to hold it
and the phone will reset and we'll go into faster boot mode.
If you have a problem,
make sure up and down volume button held at the same time
as the power button.
Keep holding it until it goes into Fastboot mode.
Okay, so back on Windows,
we're going to go the Windows update.
We're gonna make sure that we check for updates.
Go to Advanced Options, Optional Updates.
And what you wanna see is Google Inc.,
Other hardware, Android BootLoader Interface.
If you don't see that,
make sure that you press those three buttons again.
Volume up and down, power button.
Make sure that you see the Fastboot mode.
Go back into Windows.
Click Check for Updates, Advanced Options, Optional Updates.
And we want to see the software.
Okay, so what we need to do is select the Google Inc.,
Other Hardware, Android Bootloader Interface
and click Download and Install and install that software.
We want that once again,
in case we brick the phone and we need to un-brick it.
Okay, so if I check for updates now, software's up to date.
Now I've had problems if I don't do this.
So the next step is to restart Windows.
(gentle dinging)
Okay, we need to make sure that the phone
is plugged back into the Windows computer.
What I'll do is press the power button
to start the phone again.
Okay, phone has rebooted. I'm gonna allow USB debugging.
In the Platform Tools, I'm gonna open up a terminal.
LS shows us the software.
I'm gonna use the command adb devices
to see if devices are attached.
You can see if this device is attached.
You may see that it says, "Service is starting,"
and you might have to run this again.
You may have to unplug the phone and plug it back in again.
You basically need to have a device attached.
Okay, we need to boot into EDL mode.
So we're gonna use the command, adb, reboot, edl.
Phone reboots now.
So if you don't see that,
make sure that the device is attached.
Reboot your Windows computer if necessary.
Type the right commands to get the phone rebooted.
Okay, we're going to run the Windows update software again.
So Check for Updates, Advanced Options, Optional Updates.
And what you should see now
is that the drivers are displayed.
Again, we need this in case we need to un-brick the phone.
So I'm gonna download and install that.
Okay, Check for Updates, Advanced Options,
nothing available now,
because we've installed the right drivers.
And again, at this point, you may have to reboot Windows.
I've had problems with Windows if I don't reboot it.
Okay, so the next thing I need to do
is hold the up and down volume and power button
at the same time to get it to reboot.
We wanna boot into Fastboot Mode.
Okay, so there you go.
You might just have to hold it. Takes time, okay?
And once that boots,
then you press the power button to get it to boot up.
Phone is now rebooting.
The phone may prompt you to allow USB debugging.
So if you've asked that, then make sure that you permit it.
Okay, in the Platform Tools directory, once again,
I'm gonna open up a terminal.
LS shows us our software.
I'm gonna use the command ADB devices
to see if the device is connected.
Okay, I'm gonna need to allow USB debugging.
You can see that it says device unauthorized
because I had to allow USB debugging.
Now it's showing as a device
because I allowed USB debugging.
Okay, now we're gonna use adb reboot bootloader.
Phone reboots as you can see over there.
And we should see this on the screen.
Make sure that you see something like this,
where we see Start as an example at the top.
And now we can use the command fastboot devices.
So you can see the device is shown as fastboot
and then we're gonna use fastboot OEM unlock.
You should see it says okay,
finished in a certain amount of time.
And now we're going to use the volume button
to move down to unlock the phone.
So we're gonna unlock the bootloader
and then we're gonna press the power to reboot the phone.
Now this wipes the phone, may take it a while.
Wait until you see a Hello message.
It's important that you don't set up any face
or fingerprint or screen lock once the phone restarts.
But you can set up the phone normally
with that caveat or caution.
Okay, so there you go.
The phone has rebooted, Hello's displayed.
I can press start to get started.
Agree to the license agreement.
In this case I'll skip connecting to a mobile network.
But what I'll do is connect to a WiFi network.
I'm not gonna copy apps.
Okay, I need to log in with my Google account.
Click I Agree.
Okay, I'm not gonna enable all the services, click Accept.
Okay, so I'm not gonna enable the assistance,
so I'm gonna do that later.
I'll skip Google Play, I'll accept Co-Creation Labs.
I'll skip the screen lock.
Click Next. Click Next. Click Start.
Do the home screen thing like normal and press Start.
Okay, so now I've set up the phone as normal.
I didn't set up fingerprint or face ID.
Didn't put a pin on the phone.
Next thing I need to do
is get the model information once again.
I'll go to About, Android version is 11.
This is the bold number.
That's really important because I need to download
the right version of software.
So in this example, this phone is a 1903 phone. HD 1903.
That's because it's a European phone.
So I'm gonna download the software from this link.
If you've got a Chinese phone as an example,
you use this link.
If you've got an Indian phone, you'll use this link.
US Global is this link.
And then if it's T-mobile US,
you have to go to the XDA forums
'cause you're gonna have to change that phone
to a global US phone.
So in my example,
this is the version of software that I'm running.
Phone that I've got is a Seven T.
So the version that I want for my example
is this 11.0.9.1.HD65BA.
Make sure that you use the right software
that it matches your phone.
As mentioned previously, I don't wanna upgrade this,
because this is the only version available.
So I'm going to download that software to my computer.
Okay, software is downloaded, it's 2.6 gig in size.
What I'm gonna do is extract the file.
(fast-forwarding sounds)
And there you go. The file is extracted.
Notice we've got a payload.bin file.
What I'm actually gonna do with this file
is copy it to the Platform Tools folder
that we've been using previously.
It's easier for me just to put all the files in one place.
So the payload.bin file has now been copied
to that directory.
So next step is to go to GitHub
and download the payload-dumper tool.
So I'm gonna click on the link in the PowerPoint slide.
I'm gonna go to latest
and I'm gonna download the dumper tool for Windows AMD 64
because that's the operating system that I'm using
and I can't open this.
So I'm gonna download Seven-Zip.
So download the executable and I'll run that software,
install it so I can right click on that tar.gz file.
I'm gonna show more options here.
Seven-Zip extract the files. That is now extracted.
But it's a tar file here,
so I'm gonna have to show more options.
Seven-Zip extract that file.
So now I've got the go-dumper tool.
And what I'm gonna do to make it easier
is I'm gonna copy that file
into my Platform Tools directory.
Okay, so LS in my directory.
I'm gonna use the command payload-dumper.
Path to firmware, which I've put in that directory.
So it's payload bin.
And notice the files are being extracted.
The file we actually want is the boot image file.
Okay, so under extracted now, there's our boot image.
So I'm gonna copy that
and I'm gonna put it in Platform Tools
so that I've got all the files in one directory.
You don't have to do it that way.
I just prefer having the files in one directory.
So back on the phone, go to Settings.
We're gonna go to About Phone,
and then we are going to select Software Version
or bold number, depends on your phone.
But actually, I'm gonna do bold number
and I am now a developer.
Under System Developer options,
I'm gonna enable USB debugging.
Allow that. So I'll clear the screen here.
And now I can use adb push boot image.
And make sure that you get the spelling correct.
So it's sdcard, lowercase.
Download with an uppercase D,
and it's Download, not Downloads.
So we're gonna push that software to the phone
and you can see that the software has now been pushed.
Okay, so on the phone, once again,
open up a browser and I'm gonna search for Magisk on GitHub.
First hit is my GitHub link. So you can see Magisk here.
I'm gonna scroll down to the latest release, which is 25.2.
I'm gonna download the first file, which is the APK file.
I'm gonna click Okay to install it, click Open, Settings.
Allow that to be installed, go back, install the software,
press to open it.
So Magisk is now installed.
I'm gonna select Install, select a patch file,
go to File Manager, go to Download, select Boot Image.
Select Let's Go. Software is now being installed.
Okay, so that's been completed. Now all done, go back.
Go to File Manager. Say Okay, go to Downloads.
Make sure that you take a note of the name of the file
because now back on Windows, we're gonna pull that file.
So in Windows adb, pull, sdcard, Download, Magisk,
patch 25200.
And press Enter.
Okay, so you can see that so many bytes
were copied in so many seconds, so that's good.
So I'll just do a sanity check here.
I'm gonna do LS and make sure that Magisk is shown.
And you can see here
that that file is in my directory on my computer.
So I'm gonna do adb reboot bootloader
to reboot the phone.
As you can see there, the phone is rebooted.
Now we're gonna do fastboot flash boot, Magisk patched file.
So that's the file
that we copied to our Windows computer previously.
And I'm gonna press Enter. That's been sent to the phone.
And you can see that it's now finished.
Now we need to make sure that we're on Start
as we can see there.
And then press the power button. Phone will reboot now.
Okay, phone is now rooted.
I'm gonna allow USB debugging.
Under my apps, I can see Magisk. So Magisk is installed.
So on Magisk, once again,
as you can see now, Magisk is installed.
So in the Play Store,
I'm now gonna search for Root Checker
to check that the phone is actually rooted.
It is rooted at this point,
but I'm gonna install this app to verify that is the case.
So I'm gonna open up the software.
Say Agree. And I'm gonna verify Root Grant access.
And as you can see there, the phone has been rooted.
Okay, congratulations, phone has now been rooted.
I'll put a link below to the next video,
where I'll show you how to install Kali NetHunter
on a rooted phone such as this.