‫Instructor: Hi. Within this lecture we're going to see
‫how we can decompile this APK
‫and reverse engineer it using Apktool.
‫We have already installed Apktool
‫in our Macs
‫or Kali Linux.
‫So if you're on Windows and if you want to work
‫with Kali Linux, make sure you upload this APK
‫to Files FM or any other service
‫and send it to your Kali Linux as a link
‫and download it, so that you can decompile it
‫using your Apktool and JADX later on.
‫So right now I have my emulator over here
‫but it won't do much for me.
‫So I'm going to close this down
‫and I'm going to open my terminal.
‫So the first thing that I want to make sure is
‫that I'm on the same page as my APK.
‫So I believe my APK is in my desktop, as you can see,
‫and I want to go over there as well
‫so that I can actually work with Apktool,
‫because working with Apktool is very easy.
‫All you have to say is Apktool
‫and then the name of the file.
‫But in order to use this,
‫in order to say Apktool and file name
‫you have to be on the same level
‫with this app-debug APK.
‫So if your APK is in the Downloads folder, for example,
‫of course, you will have to just run CD Downloads
‫in order to go into the Downloads folder.
‫Now, I want to use Apktool,
‫and in order to decompile it,
‫I'm going to say Apktool,
‫space D,
‫space, app-debug APK.
‫So that's it.
‫That means that it's going to decompile app-debug APK,
‫and it's going to create some folders and files for me.
‫So if you run this command, you will see a folder appearing
‫on your desktop or in your Downloads,
‫or wherever you are right now.
‫It will try to disassemble this.
‫It will try to decompile this,
‫and you will get the source codes
‫and source files and folders inside of this folder.
‫Okay?
‫So double click on that folder
‫and just see what's inside.
‫So here we go.
‫Let me minimize this
‫and we will just see what's over there.
‫And for example, as you can see, we got the Manifest.
‫So let me open Manifest with some kind of text,
‫edit text or Leafpad,
‫or any text editor that you may think of.
‫You can actually run
‫and see the content of Android Manifest
‫inside of Android Studio as well,
‫but it isn't necessary for us right now.
‫You can actually run it with any text editor,
‫because all we want to see is what kind
‫of information we have here.
‫As you can see
‫we see every information regarding Manifest
‫and some of the build.gradle information as well,
‫like activity names,
‫the launcher activity itself,
‫the versions, minimum SDK version,
‫compiled versions,
‫the icons,
‫and every stuff that you may think of,
‫which is good, right?
‫So this was the Manifest and let's to the original folder.
‫And in the original folder we couldn't find much.
‫Let's go to the Resource folder.
‫Here you go.
‫In Resources, we have all the durables.
‫So remember in Resources
‫we have all the images and stuff
‫like icons,
‫videos,
‫sound files and droppables,
‫images, jpx, PNGs,
‫every kind of thing that you may think of
‫under the Resources file.
‫So for example,
‫you can see the icons that are used in this app over here.
‫If you scroll down a little bit
‫you will see some folders named Values.
‫So for the different names,
‫like this Values, SK Values,
‫SL Values,
‫TR Values UK,
‫so this is for localization.
‫For example, if you come over to one of those,
‫you can see they have some kind
‫of language translations over here,
‫if they have any actually.
‫If they don't have these strings, XML will be empty
‫or will be the same with the real strings XML.
‫So what is strings XML?
‫We're gonna talk about that later on.
‫It's an XML that contains values, contains strings.
‫We're going to see what it is.
‫So let's go to the Smali folder right now.
‫I'm just browsing through.
‫We're not doing much,
‫we're just gathering information
‫in this lecture, okay?
‫It's the first time you run Apktool,
‫and we are trying to get familiarized with the concept,
‫familiarized with the folders and file systems.
‫So in Smali, we will see the bytecodes, Dalvik bytecodes.
‫Okay?
‫So let's go to this folder.
‫As you can see, we have drawables,
‫we have ResultReceivers,
‫but these are not the things that we are looking for.
‫These are the app's own files and folders,
‫the app's own classes, okay?
‫We don't do much with the app's own classes.
‫For example, you see arrays over here.
‫What could possibly come out well in changing arrays?
‫Okay? so these are for Android only.
‫These are for Android's own classes.
‫So we generally find our own classes.
‫For example, developers own classes in Smali classes too,
‫which you can see over here.
‫For example, we see MainActivity.smali,
‫which is the Main Activity Dalvik bytecodes.
‫So if you can just open it with Leafpad
‫or a text editor it one more time to see the content.
‫Here you go.
‫Now this is the Dalvik bytecode of MainActivity.
‫So I'm gonna open it and I'm going to make it full screen
‫so that you can see it better.
‫So this is Dalvik bytecode.
‫This is the first time we are seeing Dalvik bytecode
‫and we are gonna talk about this a little bit
‫so that we can better understand what a Dalvik bytecode is.
‫See you in the next lecture.