• Before registering an account on PlayerSquared you must first agree that you are at least 13 years of age & have read & agree to our Terms & rules & our Privacy policy.

Android APK file contains the following files

SyrenRemix

Reverse Engineer
MOD
October 25, 2020
202
3,060
3,430
Greetings, everyone. I have noticed that NGU phone Modding has not delved into the details of modding apps, so I have decided to create a tutorial to help those who want to learn how to modify apps. I will start with the basics for now, as server-sided apps are a bit more complicated.

Typically, an APK file contains the following files:
  1. AndroidManifest.xml: This file contains the application manifest, including the version number, version name, permissions, application name, application icons, activities, services, broadcasts, and other configuration information. It is like the brain of the app, and can be edited by changing, deleting, or adding elements.
  2. classes.dex: This file contains the Android code of the application. In the development of Android applications, if the developers write Java code, the code will be compiled into many class files, which are combined into the classes.dex file. Most of the Java codes of applications are in this file. Some APKs with bigger sizes may contain multiple dex files, such as classes1.dex and classes2.dex. Essentially, any Activity, Object, or Fragment used within your codebase will be transformed into bytes within a Dex file that can be run as an Android app.
  3. resources.arsc: This file contains the resource configuration, including the string, theme, picture file index, layout file index, and other information. This file is mostly encrypted, but can be viewed through APK editors or converted to res directly.
  4. res/: This folder contains resources such as pictures, layouts, menus, and other files. The indexed files in the resources.arsc are stored in this directory, except for resource confusion.
  5. assets/: This folder contains secondary resource folders, such as lib files, HTML files, pictures, videos, data like games, HTML, CSS, Java, media, fonts, TTF files, binary files, etc. The files inside will not be indexed in resources.arsc.
  6. lib/: This folder contains .so library files that are usually developed by C/C++. These files are used to run an app on a particular architecture device.
  7. META-INF/: This folder is not usually useful, as it is just for storing information about the signature. Certificates of an APK are stored in this folder.

Now, I will explain some important terms in modding:
(a) APK Clone: In the Android system, the package name is the ID of each application. After the application is updated, the name, the picture, and the interface may be changed. Only the package name cannot be changed. For different applications, their package names should be different. Otherwise, they will be considered the same applications. By changing the package name, you can install the same application twice or more on your device.
(b) Zipalign: Zipalign is an archive alignment tool that provides important optimization to Android application (APK) files. The purpose is to ensure that all uncompressed data starts with a particular alignment relative to the start of the file. Specifically, it causes all uncompressed data within the APK, such as images or raw files, to be aligned on 4-byte boundaries. This allows all portions to be accessed directly with mmap() even if they contain binary data with alignment restrictions. The benefit is a reduction in the amount of RAM consumed when running the application. This tool should always be used to align your APK file before distributing it to end-users. The Android build tools can handle this for you. Android Studio automatically aligns your APK.
(c) SAP or Antisplit: SAP means single APK package. Some apps use multiple or split APKs bundled to build a single APK to reduce the size of the app. These cannot be
 
Last edited: