Techniques to reverse engineer an Android application

You may need to deal with applications that stand as a barrier to accessing the required information. For instance, take the case of the gallery on a phone that is locked by an AppLock application. In this case, in order to access the pictures and videos stored in the gallery, you first need to enter the passcode to the AppLock. Hence, it would be interesting to know how the AppLock app stores the password on the device. You might look into the SQLite database files. However, if they are encrypted, then it's hard to even tell that it's a password. Reverse engineering applications would be helpful in such cases where you want to better understand the application and how the application stores the data.

To state it in simple terms, reverse engineering is the process of retrieving source code from an executable. Reverse engineering an Android app is done in order to understand the functionality of the app, the data storage, the security mechanisms in place, and more. Before we proceed to learn how to reverse engineer an Android app, here is a quick recap of the Android apps:

  • All the applications that are installed on the Android device are written in the Java programming language.
  • When a Java program is compiled, we get bytecode. This is sent to a dex compiler, which converts it into Dalvik bytecode.
  • Thus, the class files are converted into dex files using a dx tool. Android uses something called Dalvik virtual machine (DVM) to run its applications.
  • JVM's bytecode consists of one or more class files, depending on the number of Java files that are present in an application. Regardless, a Dalvik bytecode is composed of only one dex file.

Thus, the dex files, XML files, and other resources that are required to run an application are packaged into an Android package file (an APK file). These APK files are simply collections of items within ZIP files. Therefore, if you rename an APK extension file to a .zip file, then you will be able to see the contents of the file. However, before you can do this, you need to get access to the APK file of the application that is installed on the phone. Here is how the APK file corresponding to an application can be accessed.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.0.192