Welcome back.
In this video, we will start our installation series.
And yes, those installation videos are most of the time a little bit boring.
But if you're new to Android app hacking, this might be very helpful for you because at the beginning
there are a lot of things which might be a little bit confusing.
The Android studio, the virtual device manager, the SDK, those platform supports and more.
So therefore, I would like to include it over here in case if you already have experience in Android
app hacking, you might want to skip this right now, maybe have a quick look at the emulator path because
at the second half there might be some new stuff, but otherwise feel free to skip this in case if you
haven't done the installation of an Android studio before then, this video series is dedicated for
you.
So therefore let's go.
Okay, so here we are now back on our whole system.
And first of all, let's insert some music because with music, it isn't that boring anymore.
All right.
And then let's hit up our visualization of choice.
All right.
We start by setting up our hacking system and this one will be in basic Ubuntu VM because all of these
tools are working probably fine on this Ubuntu VM.
So therefore we go into our virtualization of choice will VirtualBox VM player or whatever you you want
to use.
And then we create a new virtual machine, we select Ubuntu 64 bit and then legacy wave and we create
a new virtual disk.
All right.
We save those settings to virtual machine and name this Android app hacking.
And now we want to modify a few settings.
And first of all, we definitely want to increase the RAM of this virtual machine because this is maybe
the most important aspect of our VM.
So we go into processor and memory and here we increase it to at least 8000.
So in my case, I'm choosing 8128.
All right.
Beside the RAM, I also increase the processor cores to four OC.
And then let's see, at this point you also want to increase your hard disk.
I have forgotten this point unfortunately right now, but that's not a big deal.
In the emulator part, I will show you how you can easily extend it afterwards.
So that's that's really no problem.
But if you have the choice right now, then please do it right now.
So I would suggest 60 gigabyte because the Android studio, those Android images and the virtual device
manager, they require a lot of disk space.
So 20 gigabyte will be easily full and later on we will also install some additional tools.
So therefore I recommend 60 gigabyte.
This should be absolutely fine.
All right.
Okay.
Back to this one.
All right.
One thing we definitely want to make sure is that our USB and Bluetooth settings and support USB three.
Later on, we will connect a real smartphones and also additional devices regarding to our man in the
middle setup.
And some of them require a USB three connection.
So this is something we definitely want to make sure.
Therefore we go into use P and Bluetooth, we click on advanced USB options and then we select the USB
3.1.
So this is very important step.
Okay.
All right.
Now we've got incompatibility to USB three.
Right now we want to proceed with installing our operating system.
So therefore we need to insert it as an S in virtual disk into our virtual machine.
And therefore we have to download this ISO first.
To do this, we simply open our web engine of choice and then we are searching for open to ISO 2004
and here we can see we've got it over here on Ubuntu dot com.
So that's an trustworthy site and we will download it from here.
2004 simply means this one has been released in April and 2020 and you might think right now, isn't
this a little bit outdated?
Well, not at all, because we can see this stands for long term support, which means five years.
So we can talk about this in 2025.
All right.
So let's click on this one and then we hit this download button.
And let's see.
Yes, the download is now being started and we can see we are downloading the 24 desktop AMD 64, which
means 64 bit version.
This is exactly what we want to have.
So now we need to wait until this download has been finished.
And this might take a while.
Let's see.
Yes, 4 minutes.
I mean, it's okay regarding to this internet connection.
So I'm not complaining too much about this, but nevertheless, relax a little bit, get some coffee
and tea and then I will see you after the download has been finished.
All righty.
So see you in just a moment.
Download has been finished.
Back to this phone.
So now we go into CD, then we select our virtual disk, and then we select the ISO, which we have
downloaded just right before.
Over here.
Please make sure that connect CD DVD drive is being enabled, otherwise the virtual machine would not
have an drive and we couldn't start from this one.
Afterwards, we start the system and yes, we can immediately see that the system is now booting from
the CD.
So from our Ubuntu iso, we wait until the boot process has been finished and there we have it.
So now we've got the desktop and we can use try ubuntu which means we we try the system out or we can
simply install it now of case we want to install it.
So I click install ubuntu then we select the language here.
We want to make sure that we have the minimal installation because otherwise the system gets blown up
with a lot of trash software.
And we also want to make sure that install third party software is being enabled here.
We can see right now the graphics is being resized.
So now we've gotten better resolution.
We click on Continue and we want to make sure that we select erase disk and install Ubuntu OC.
Then we click install now and then we get a warning or an information that all those data will be deleted.
But that's perfectly fine because we haven't any data on the system right now.
So we click continue, we select our timezone and now we need to define our username.
So in this case app the system name will be hacking.
The username is EBP and we have to provide a password.
All right.
And that's all.
So the system is now being installed and this might take a while, so we have to wait until the process
has been finished.
So you will definitely have some time to grab some tea or coffee and turn back to this one.
Okay.
I will fast forward this process right now.
There we go.
Installation complete.
Now we can click restart now and the system will reboot.
After the system has been rebooted, there should be this logging screen.
There we have it.
Now we enter our credentials and this is our system.
So we have set up our Ubuntu VM.
The first time we run our system, we get a bunch of pop ups, for example, connect online accounts.
This is something we definitely want to skip.
Then we've got live pictures, we click next, then we've got some stats, but we do not want to send
anything out there.
So we simply click, No don't, and then we click next privacy.
No Location Services Enabled.
Perfect next and that's it.
So here we've got now ready to go and some recommended software packages from the Ubuntu side.
We will install some of them but we will do this via the command line so therefore we can click done.
Okay.
The first thing we want to do is updating our repository.
So those packages that we fetched in newest versions of them, therefore we open a new terminal and
we are running sudo update update we insert the user credentials and now we can install some additional
software.
So by updating it before we can make sure that we are fetching the newest repositories.
So for now at least I want to have settings h git and vim enabled.
So let's install all of them.
Okay.
We click.
Yes, now we have them installed.
And next I want to have an a nicer terminal view.
So I like the all my set this h a template for this one.
So let's open Firefox.
Okay.
And let's search for all mites at this age.
You have to get a repository.
And if you scroll down, we can find the basic installation part within cur command.
Let's simply copy this cur command inserting it in our terminal over here and oh well, I haven't gotten
inside yet, so therefore let's do this right now.
Upgrading.
Getting cur oc.
Now we can use the upper hierarchy to repeat the last command, this one.
And now we can see that this edge is being installed.
Over here, we can see.
Do you want to change your default channel to set an edge?
And this is something we want to have because our default shell is the bash and now we want to have
this set as H.
All right.
We insert our credentials and here we have it.
This is now set this h with the almighty set of H template.
Okay, let's tune some settings in this terminal.
So within preferences colors, let's play around with the background.
So we start maybe with a solar stack and then make it a little bit more dark, the text terminal, a
little bit more upright, so a little bit white.
And then we also change all these other colors.
So we want to have them a little bit lighter right now and then be enabled, transparent a little bit.
Just a little bit.
There we go.
And this looks this looks nice right now and perfect.
Let's also change the desktop background.
And I do not know why they have disabled it, but we cannot choose an solid color anymore.
Therefore we simply make a screenshot of the black box, drag it on to our Ubuntu VM and then choose
select this as background and here we have it.
The last thing I want to add and then we have the basic configuration done is an shortcut for our terminal.
So opening this on the left side with the mouse is a little bit annoying and we will use quite a lot
of terminals.
Therefore we create an shortcut within settings, we go into keyboard and shortcuts and here we are
searching for terminal and this one already has one.
But we change this to control and at least for my preference, and choose whatever you like.
But now I simply can start a new terminal by hitting control.
T We can see that this HRC has not been selected yet.
We can run this manually within settings h here we can see yes, it's working, but if you want to have
it right now, we could restart or simply lock off from this current user account and then we will start
a new session and everything should be fine.
So let's do this.
We look out.
We lock in again and let's open a new terminal control key.
There we have it.
So this is working.
Perfect.
Now we can move on with installing the Android studio to install the Android studio.
We simply open the Firefox which has been already installed on the system, but feel free to install
the browser of your choice.
And then we are typing Android studio into Google.
Then we click on the link https developer dot android dot com.
So this is our trustworthy source, but we want to download the Android studio and here we have it.
Download the Android studio.
All right.
After what we have to read carefully through those terms and conditions and in case if we agree, we
hit this checkbox and download the Android studio safe file.
And there we go.
All right.
The studio is now being downloaded and it's about one gigabyte large, so this might take a while.
I will fast forward this process that we do not lose any time on this one.
All right.
The studio has been downloaded.
Would be absolutely nice if it's always that fast.
So by simply clicking on this, those files will be decompressed.
This might take once again a little bit of time.
And here we have it.
Now we select this one extract and we select, for example, just downloads directory.
All right.
These files are now being extracted.
These are now two gigabyte large.
So we can see our disk space needs to be really big.
So once again, let's fast forward this process.
Now we can click on Show the Files.
So this is now our Android studio with all these binaries.
Okay, let's create a new directory within our home directory, but we can put it in afterwards.
So within the home directory, we create a new one.
We name these tools and then we simply drag and drop it into this one.
All right.
We do a little bit of cleanup because we do not want to waste one gigabyte in our downloads directory
right now.
And then we want to proceed installing the Android studio.
So we simply go into these tools Android studio directory and we can now do a little bit of a trick.
We can do right click open a new terminal.
This will open a new terminal in this current directory.
So we do not have to change this path until we end up in this one over here.
That's that's super handy.
Okay, then we go into this bin directory and we launch the studio by typing in bash studio dot stage
and then we go.
So the Android studio is now being launched.
We can see we can import existing settings, but we have not installed yet, so we do not have any existing
settings.
Okay.
We click on next.
All right.
Now the installation process finally begins.
Data sharing?
Nope, don't send any data.
Next here, we want to choose custom because we want to be in charge of what is being installed and
what not.
So therefore we choose custom next.
Here we can now define an Java runtime environment.
So regarding to Java, this is a little bit ridiculous.
If we have an application written in Java, it needs an runtime environment, so we need to have Java
installed on our system.
So far so good.
But regarding to new Java versions, there will be also new classes and old ones gets removed.
So it could be the case that our travel runtime environment is not compatible to the Android studio
runtime environment, and therefore the Android studio is shipping its own environment where the developers
of Android studio make sure that everything works perfectly fine.
So in this case, we definitely want to use the Java runtime environment which can ship and not the
ones which might have been already installed on our system.
All right so we leave this edit is and simply hit next that's that's definitely the best option.
All right and now we have to make this difficult choice, that color or light.
I mean, for you, there might be only one choice available, but I choose light because within the
light version, we can see certain buttons or text a little bit better, so it's easier to follow them.
And then clicking next.
And here we have now the SDK component set up.
So we can see the Android SDK is already being checked and please make sure that that's also the case
for you.
It's about 300 and and that's the most important part in our Android studio right now.
So these are all the tools which we will need to access our device and play around with this one.
That's the SDK.
Then we can see there's also an SDK platform support for API version 32.
We leave this checked and later on we will also install some older version platform support, for example,
for Android version ten, nine, eight, seven and things like this that we have some pretty good backwards
compatibility.
For now we have only this one and that's good to go.
Last but not least, we've got the Android virtual device.
In my case, it's already been installed with the Android studio.
I guess this happens if we install the newest version of the Android studio.
If this is not being checked, then please check it.
If you forget it at this point right now, don't worry.
We can also install it later on.
All right.
So we simply have those two enabled.
This, by the way, the Android SDK platform.
This box cannot be checked.
So the check is within this app 32 and then we click next and we've got an overview of what is being
installed.
After clicking next, once again we can see license agreement.
So we have to read carefully through this license agreement for the SDHC and accept it.
And we also have to read carefully through the Android SDK, build to its license and accept it.
Then we click Finish and now all these things are being downloaded once again.
This might take a while.
So I will I will boost up my Internet connection that it's pretty fast and fast forward this process
right now.
Okay.
Unzipping here, we have to finish screen.
Perfect.
Let's click finish.
And now we've got the Android studio up and running.
But we are not done yet.
We want to install some additional tools, so therefore we go into more actions.
SDK Manager.
And if you have now some additional platform support.
So if you want to write applications, then it's good to have an Yeah far backwards compatibility in
case if you are using any device which is Android version seven, for example, you want to make sure
that you have some platform support for Android nougat enabled here.
Right now I will only enable 12 and 11.
Afterwards, we will install the additional ones, for example, ten up to Marshmallow, which is version
six.
And then you have the comparison against the disk size, how much space this requires right now.
So that's the only relevant factor.
In case if you have enough disk space, you can also enable them down to Android Marshmallow right now.
All righty then we go into the SDK tools.
And here we want to enable, indicate, indicate this is the native development kit, which means our
Android applications are normally written in Java.
We will have several videos on this later on, but Java might be a little bit slow regarding to certain
actions, for example, in mobile games, graphics, rendering and things like this.
Therefore, we need native code C, C++ code and having this indicate Xbox enabled means the Android
studio will also fetch this native development kit, which means we are able to write in C C++ code.
But this requires a certain toolchain which is this nndc over here.
So having this box indicate enabled over here means the Android studio is fetching this native development
kit and afterwards we will be able to write our own C C++ code.
So this one will be compiled afterwards into a certain library.
But these are things we will have a look into later in this course.
Right now, we simply want to make sure that the box is enabled, that we have this type of support.
Okay, then we want to definitely check the Android SDK command line tools.
So this is maybe the most important part.
These are the command line tools.
For example, the ADB, which will be used to interact with this device, or FASTBOOT, which will be
used to interact with the bootloader of this device.
So that's the most important tools we will have in our Android studio.
All right.
Last but not least, we also enabled C MEC.
So this makes the compilation of certain parts of an Android project a little bit easier.
For example, we can check out the Android Open Source Project and compile certain projects out of this
one.
All right.
And then let's see, the rest can be skipped.
SDK update sites.
Nothing interesting over here.
All right.
I guess we're good to go.
So these are the panels we want to install.
We simply click apply.
And here we can see the estimated download size is about one gigabyte.
But if we extract those files, we will require four gigabyte of disk space.
And now you know why 20 gigabyte might not be sufficient enough right now.
Okay, then we click.
Okay, and I will boost up my internet connection once again.
All right.
Download has been finished.
So let's click on Finish.
And now I also enable a platform support, let's say up till marshmallow.
All right, here we can see the estimated disk size is four gigabytes.
So having a platform support back to marshmallow just requires four gigabytes.
I guess that's in fact you're right now.
So click on okay and once again boosting up those these Internet connection.
Okay.
And then we can click finish, apply and och, och.
And that's the installation process of this Android studio.
So now we can start writing our own applications or play around with existing ones.
But to do this, we have to do a little bit of setup first.
By the way, over here we've got things like the plug ins which we will use later on in this course.
I mean, I'm not using much of them, but a few are pretty awesome.
But we will perform the installation when we require them.
For now we are done installing the Android studio.
Okay, let's close this one.
So as already mentioned, within our home directory, there's now a new directory, the Android directory,
and this one has this SDK toolset being downloaded and installed.
Over here you will find all these binaries which we're going to use during this course.
For example, in platform tools, we've got this ADB binary.
This is maybe one of the most important ones over here.
If you want to run this binary, we would assume that we simply can open a new terminal type in ADB
and we're good to go.
But here we can see the command has not been found, which means the ADB binary is not visible for our
terminal right now.
If you want to start this, we have to provide the full path for this binary and we can do this by performing
and right click open new terminal PWT to get this current directory.
Then we copy this be inserted over here and then we append ADB.
All right, here we can see the ADB shell is being started, but this is super inconvenient to memorize.
Also, if you're using later on some scripts, we have to insert this this path in all of our scripts
and this is something we do not want to have.
What we can do is we can include this directory in our path variable, which means if you run an command,
for example, ADB afterwards, the path variable is looking into all these directories which are listed
in this path variable and searching for an ADB binary in case if it finds one, it will execute it and
in case if there is not, we get this command not found like we have seen before.
By having this included in the path variable, we do not need to insert your whole path all the time.
We can simply run ADB from our terminal wherever we are right now.
And this is super convenient, right?
Absolutely.
So let's do this.
The things we need to do is we need to copy this path.
Then we are opening the set of HRC.
I'm using VIM, but you can also use non or tree edit results to do code at the door, whatever you
like.
All right then within this file, we scroll down.
And now we insert export path, which means we will export a new path variable and we have to include
the existing ones.
Otherwise we will overwrite all the existing directories which has been already included in this path
variable.
All right, this looks a little bit crazy, but what we are doing over here is we are exporting this
existing path variable to a new variable, which is the same name.
But now we can extend additional directories and therefore we are hitting colon slash and now we are
inserting the path which has been copied before.
But we need to make sure that we are including this directory and not this this binary.
So we need to delete this ADB and there we go.
So what this line over here does is the following.
We're taking the existing path, variable dollar path.
Then we append our new directory, the platform tools directory to it, and then we export all of them
into a new variable named path, which is identical regarding to the old one, which means we simply
append or extend this variable by the platform tools directory.
All right.
Doing this will give us access to all these binaries in this platform tools directory right now, which
means we can open a new terminal and simply run ADB from this new terminal.
And everything works perfectly fine.
Nice, isn't it?
But before we do this, let's also append another directory which has some useful binaries in there,
and this one is within the SDK directory.
Build tools and then 30 200 all right, once again, right click open the new terminal p.w dx copying
this path and please make sure that there are some columns separating those two.
So this is the separator for our path variable and then we simply insert it directly afterwards appending
and slash and we are good to go.
All right, so then let's close this file and we can do this by hitting src colon w.
Q Yes, that's the way to leave them absolutely crazy.
And now let's try if everything works.
So by typing in ADB, we should get what command not found.
Yes.
Because this path variable has not been updated for this current terminal yet.
If we open a new terminal, it would work so we could simply open a new one and then type in ADB.
Or we can simply update this path variable for the terminal we have already opened.
We can do this by simply running source and this one on set is HRC, which means the set is HRC will
be refreshed for this terminal and this means the path variable will be extended with the two directories
we have inserted before.
All right, so let's see, running ADB and there we go.
So here we can see we can now start ADB wherever we like.
So we do not need to mesmerize this whole path or going into this directory first.
All righty.
Okay.
And this is all so we can close everything and finish this installation video over here.
Okay, so this installation video did become quite long, and I'm not sure what happened over here.
So if this was your first time, then I guess it's really helpful to have this view into the SDK tools,
setting these path variables and stuff like this.
I guess the other installation videos won't take that long.
In case of any questions, please drop me a message underneath this video and otherwise.
I'm looking forward to see you in the next one.