‫Instructor: Hi. Within this lecture,
‫we are going to try and see
‫if the previous efforts paid out
‫and if we managed to manipulate the app
‫in a way that we want.
‫So I'm going to delete everything
‫other than our app-release folder,
‫which is our apktool folder,
‫because we are going to use that folder
‫to rebuild the app, the manipulated app, okay?
‫So, what I'm going to do,
‫I'm going to run apktool.
‫And this time rather than d,
‫I'm going to say b for built and say app-release.
‫This will compile the app-release folder for me
‫and create a new APK file for me.
‫Since I haven't specified an output folder,
‫most probably, it just generated the APK
‫inside of the build folder or dist folder over here.
‫Yeah, it's in the distribution folder.
‫So make sure you copy and paste
‫the app-release.apk into your desktop
‫because we want to work on that.
‫What we want to do is to sign this APK, right?
‫So I'm going to use the same commands
‫that we have been using so far.
‫I'm going to create a keystore.
‫And you already know how to do this,
‫so I'm going to make it fast.
‫I'm not going to give any of my specifications over here,
‫and I'm going to say yes to create the keystore.
‫And then, I'm going to change the APK name
‫from this command to app-release.apk.
‫And then use this command to sign our app-release.apk.
‫It will ask me for my password that I have just defined.
‫If I give it right,
‫it will just do the job and sign the APK.
‫Now it's time to see the truth.
‫Now let me delete the older one.
‫Let's see.
‫Yeah, here it is, WordGame.
‫I'm going to uninstall this, okay?
‫And I'm just going to drag and drop this
‫to install it on my emulator
‫and see if we managed to hack the game.
‫So let me open the game from here.
‫Okay, here you go.
‫Now, we are inside of Fruits.
‫Category of Fruits, so I'm going to go for a banana
‫to see if we broke it or not.
‫So score is zero right now.
‫So banana works.
‫And let me go for something like Ba.
‫And it still works, as you can see.
‫Now, we managed to hack into the game.
‫Now, if I write something, even gibberish,
‫it will still be okay with it,
‫and it will still increase the score like that.
‫And here you go.
‫Now, we really hacked a game.
‫And as I said before,
‫this method is not only for this game only,
‫you can actually hack into any application
‫using this kind of operation.
‫All you need to do is to define the method,
‫define the variable that you want to manipulate,
‫and find the Dalvik bytecode related to that
‫and try to change it.
‫Of course, there will be like many times
‫that you're going to fail while looking for this,
‫and there will be some much more times
‫that you may succeed as well.
‫So, the more you're capable of writing
‫the Java or Android codes,
‫the more you will understand
‫what's going on behind the curtains,
‫and you can find the related methods to exploit
‫or related methods to change and manipulate.
‫So that's it.
‫I hope you enjoyed this section.
‫Don't worry, we are going to do much more practice later on.
‫See you in the next one.