All righty.
Welcome back.
In this section, we take a look at the classes to text file because this is the file that contains
our Java source code and yet it's compiled into this dalvik executable byte format.
We just dip a little bit into this to give you a preview about what it will be able to understand after
completing this course.
So let's go.
Here we add our Ubuntu VM and we go into the apps directory space pane and here we have this class store
text file.
The first thing I like to do when I deal with unknown files, I open a terminal and I simply run file
on this and here we can see this is in Dalvik text file version 035.
The next thing I like to do is I like to open this in hex editor because here we can see some header
information and here we can also identify if this file is compressed or if we can see some patterns
and maybe some strings or things like this.
Therefore, I use hex, but you can of course choose whatever hex at you like.
You can install it via sudo update install hex.
I have it already installed, so I open this file with g hex right now.
Okay.
We can see the x035, which seems to be the header and this one is the version number that five did
print out.
We can also identify a lot of patterns over here, which means this section is not compressed.
Now we know this file contains our Java source code, so let's find out if we find some strings regarding
to Java in this file right here.
Therefore, I open this menu and I search what java?
You have to put it on the right side because the left is the hex representation of the string if you're
using hex.
So you cannot have Java over there.
We have to use that.
Yeah.
On the right.
And yes, here we can see some travel references and we can also see some strings.
Button has not been started.
Polygon Things like this.
Alien bus explosion, alien bus hit.
So we can identify string references, which seems to be part of the source code.
And this is the amazing part about this Java bytecode because we can reconstruct the source code pretty
close to the original one by compiling this file afterwards.
We do this in a separate section where we learn how to reverse engineer and analyze those files.
Okay, for now, there is much more we can do with Key.
We get a nice view into this file, but we cannot disassemble or decompile it with an hex editor.
Therefore we have to use a different tool and this tool is named text and this one is super amazing.
And it also comes here pre compiled with your Android SDK.
So let me show this quick to you.
Going to close this one and.
Yeah.
Text and number is located at the SDK Build Tools 3003 text.
Um, so I have added this path to my settings h environment.
If you have missed this part, you might want to get back to the installation process.
But I am going to show this quick to you.
So here we can see I have added a 33 directory to the path variable and I did appended with the colon.
So this means if I run text dump from this location over here, the space pink directory, the set is
H is looking into all those directories which are listed there in the path variable this one and tries
to find the text on binary.
And if it's located in one of those directories it simply starts it.
Therefore, I do not have to provide a full path to the text and binary to run this tool.
All right, let me clear this one or let me maximize this first.
Clear it afterwards and then zoom a little bit in.
And now we run text dump.
Here we have the options of text dump.
And this one is the most important one, the dash D option, because text dump is able to disassemble
the code sections of our class's text file, which means we are going to make our first experience with
Smiley.
And Smiley is super amazing and also the main focus in this course because with Smiley you are able
to do everything.
You get unlimited power over this application.
What we do, for example, during this course we write an APK picker, we have two apps and we packed
them into one app and we do this, we append our own debug server in this application and then we have
full memory access over this application.
Even if we do not have root access on the device, which is super great, we can also insert some debug
commands or print out static keys in form of binaries.
We can patch away certificate pinning, routing detections and we can also modify our game, which is
also the main focus of this course because this is the most amazing way to learn smartly by hacking
this application.
And what we do during this course is we will identify how this code looks like and then we will modify
the game that we do not get hit.
We extend our player shot, that we do not have a double shot, we make it 300 shot, for example,
we disable our fire rate that we do not get interrupted during this and all those funny things.
After getting hyped up that much, I'm going to finally show you that smiley that you know what you
have to deal with during this course.
So let's go.
We use text time with the Dash D option and we use it on the class text.
And I'm also going to pipe this through less because then we can browse through this file.
Okay, you ready?
There we go.
Okay.
This is your first impression about the dalvik executable format.
And you might think, wait, what?
We are going to deal with this during this course.
And I can tell you.
Yes, we will.
But let me browse down a little bit because yeah, we get a nice overview about this one.
All right.
Here we have now finally the smiley code.
We've got the byte representation on the left and we've got the smiley code on the right.
And this is the most important part because this is the smiley code which we are going to learn.
And after this course, you will be fully able to read and write this piece of code.
And this is super amazing.
And if you now think, wait, what?
I'm never, ever going to learn this, this is way to complicate it.
Well, I have learned this stuff, and I did it in the most funny way that's possible by hacking this
application.
And I'm also no genius.
So if I can make this, you can make this tool, and I promise you, I will guide you through this course.
At the end, you will be able to understand every single line right here.
I've designed this course to have no requirements to go from 0 to 0, to understand and learn and even
write smiley afterwards.
And this section is designed to give you a quick preview and what you will be able to handle after performing
this course.
Okay, for now, let's simply just take this impression with us and we move on with the course.
Therefore, I'm looking forward to see you in the next section.