Menu
For free
Registration
home  /  Education/ AndroZip is a multifunctional archiver program for super users. Download Choosing the best archiver for Android for Android Program for unzipping zip files for Android

AndroZip is a multifunctional archiver program for super users. Download Choosing the best archiver for Android for Android Program for unzipping zip files for Android

ZIP archiver for Android is a program that allows you to unpack and create compressed files on mobile devices. There are many file managers that can partially replace archivers, but their functionality is very limited. The Google Play Store offers a wide range of applications for working with compressed data, and users often find it difficult to choose the best among them. You can download the archiver for Android for free.

Most archivers do a great job of basic packing and unpacking, but not all of them will help you deal with encrypted or split files. In total, we can highlight 5 relatively reliable tools that cope with most tasks.

Best programs

The B1 Free Archiver application can be considered the best among archivers for Android. The program can process any password-protected archives and supports the largest number of formats. It is the only archiver that supports comments in ZIP files and is easy to use.

Many people use B1 Free Archiver as their main file manager. This program runs significantly slower than competing applications. Apart from the slow data processing speed, in all other respects B1 Free Archiver in Russian is an ideal archiver. You can download this program for Android for free from the Google Play store. The APK file can be found on third-party resources and downloaded without registration.

There is another app that claims to be the best decompression tool. ZArchiver allows you to archive noticeably faster than the previous tool, but it cannot cope with encrypted data and does not support the RAR5 format.

Nevertheless, this program can be put in an honorable 2nd place. It is the fastest of all, can create archives in 7Z format and does not ask for a password when you try to delete files from an encrypted ZIP archive. The absence of a password request can be considered a disadvantage, but it significantly speeds up working with archives in some situations.

The application also functions as a file manager, has a user-friendly interface and has an option that allows you to customize compression. The most important advantage of the ZArchiver tool is its large number of settings. The user has the opportunity to customize almost everything according to his preferences.

Other programs

Easy UnRAR, UnZIP & ZIP tool is one of the first archivers that is still popular among Android users. Unfortunately, the full set of features is only available in the paid version. The free assembly of the downloaded application is designed for those users who are accustomed to working only with simple archives that do not cause difficulties.

All advanced features are locked in the free version. But considering the low cost of the program, it can be a good buy. The premium version can handle archives of any complexity. Disadvantages include an outdated interface and low data unpacking speed.

AndroZIP has the same disadvantages as WinZIP, but it's a little faster and can help you manage your files more efficiently. A convenient interface allows simultaneous manipulation of several files, but the ability to unpack a group of archives is not provided. The application looks preferable compared to WinZIP, but is lost compared to other competitors.

The official version of the WinZIP tool on Android turned out to be even worse than the Windows version. Disadvantages include the lack of support for the RAR5 format, problems with non-Latin passwords in RAR files, the inability to display some non-Latin characters in archive names, and the lack of additional functions that could make working with this application easier.

The biggest problem is that WinZIP decompresses files very slowly and does not display a progress bar, which can make it seem like the program is frozen.

Moreover, you will not be able to simply unzip any archive because the application will first open it to view the contents, and only then can it begin to extract the files. In any case, the process takes too long. If you download WinZIP, be prepared to encounter inconveniences.

RAR is a multifunctional archiver for Android devices. This wonderful program from RARLAB is an almost complete copy of the famous WinRAR, and therefore many will like it more than the basic version from Google.

In general, what is an archiver and why is it needed on a smartphone? In fact, for modern Android it is extremely necessary:

  • Firstly, an archive can be used to store a large number of files in one directory. For example, confidential photos are often hidden in it, because everyone knows that it is protected by a strong password and it is almost impossible to hack it.
  • Secondly, RAR and ZIP archive formats are now extremely popular among those who post files on the Internet for public downloading. Many users still do not want to depend on torrent distribution, and therefore file storage continues to be popular.

Features of the RAR program for Android

At the moment, the RAR archiver can do the following:

  • work with all currently known archival formats (RAR, ZIP, TAR, GZ, BZ2, XZ, 7z, ISO, ARJ);
  • create encrypted archives;
  • perform error detection and correction;
  • Fully utilize the processor's multi-core capabilities to increase overall performance.

In general, RAR is a much higher level program than the basic archiver built into a file manager. There is no doubt that he will always help you out in difficult times, and he will do it completely free of charge.

Unpacking and packing ZIP/RAR archives are file operations that Android OS users cannot avoid. Even on a phone, there is a need to archive a folder or extract the contents of a downloaded file. There are quite a lot of archivers on Google Play. However, a small part pleases with its functionality and list of supported formats - unpacking and packaging.

If you are tired of using random software to unzip files onto an SD card, pay attention to the utilities presented. We have selected the best archivers for Android in terms of speed and functionality. They are comfortable and practical. With the help of unpacking programs, you can quickly archive/extract packed files. And without the headaches of wasting disk space and RAM on your mobile device.

Mobile zip and rar archivers for Android. Review participants

So, here is a list of popular archivers for Android OS that can be considered optimal for everyday use on smartphones and tablets:

What are mobile unpackers for Android capable of, and what advantages do they offer mobile device users? Carefully read the review of archivers below.

RAR for Android from RARLAB - a full-fledged WinRar for Android

To date RAR for Android is perhaps the most functional and popular rar archiver for Android, and it’s completely free. The functionality of the application is kept at a high level, as evidenced by reviews on Google Play, as well as the personal experience of the review author.

Using the RAR application, you can create and unpack not only ZIP and RAR archives, but also open files with the following extensions: TAR, GZ, 7z, XZ, BZ2, ARJ. Of course, these formats are much less common on Android, however, sometimes you have to work with them.

WinRAR archiver interface on Android

However, this is not a complete list of the capabilities of the RAR for Android unpacker: for example, Winrar allows you to quickly restore damaged ZIP and RAR files and measure unpacking performance in the Android OS. In general, all the familiar WinRAR functions are at a discount for the fact that we are still dealing with a mobile archiver.

Now let's move directly to the settings of the Winrar archiver, which relate to working with archives. There are certain conveniences when managing archives - for example, you can set archives as priority files in the file manager list - and they will be visible. You can also enable the display of hidden archive files and add archive names to the history, which will undoubtedly speed up access to them in the future. Of particular note is the Path settings section. Here you can specify the default unpacking folder, change the default archive name, etc. For lists of files, you can set a specific encoding and sort.

Despite its high popularity and good functionality, the RAR for Android application has both pros and cons.

Pros of RAR for Android

  • [+] High performance, "Vinrar" quickly responds to commands;
  • [+] Ability to restore damaged files from an archive;
  • [+] At the moment, you can download the RAR for Android archiver for Android completely free of charge, which is good news;

Disadvantages of zip and rar unpacker

  • [-] It is not possible to change the archiver interface: select the color, font;
  • [-] If there is another archive in the archive, the application may complain when unpacking;
  • [-] Temporary folders in RAR for Android are deleted an hour after the archive is closed, so you can forget about privacy

Summary. Overall, the RAR for Android archiver left a positive impression. Working with archives is convenient - there are all the usual options of the popular WinRAR archiver. In addition, a nice dark interface and Russian localization increase the convenience of this archiver. You can download the rar archiver for Android using the link below.

AndroZip archiver - create a zip archive in two clicks!

Program AndroZip is not just a zip archiver for Android OS, but also a full-fledged file manager for the phone. Using the application, you can move, copy, delete, compress and unpack encrypted ZIP and RAR archives. In addition, the program allows you to quickly find and organize files in the Android OS, music, audiobooks, videos and photos of your smartphone.

AndroZip functionality is available in the archiver settings

The AndroZip application is perfectly optimized for unpacking zip and rar archives on phones and tablets running Android OS. It works quickly, no errors occur while unpacking archives. In addition to working with encrypted files, the rar archiver for Android allows you to send packed archive files to your friends and acquaintances, for example, via Skype or email.

This zip archiver includes additional tools that are often useful for Android - a task manager and an application manager. However, this has minimal, if not any, relation to the functions of the archiver.

In the settings of the AndroZip application, the user can change the display mode of folders or archives - a simple or detailed list, icons, line size and other visual settings of the built-in file manager. Similar to the above-mentioned RAR for Android application, you can change the sorting mode and enable the display of hidden content on your smartphone. Regarding the archiver settings, there are practically none. The only option is the compression size of the ZIP archive.

Pros of the AndroZip application:

  • [+] Zip archiver for Android works quickly,
  • [+] does not consume a lot of system resources
  • [+] functionality and multitasking when working with zip archives, packaging and unpacking;
  • [+] AndroZip supports almost all known and popular archive resolutions (see table);

Of the minuses:

  • [-] The interface of this archiver on Android is not the most intuitive; it’s not easy to get used to the application;
  • [-] Sometimes an error appears that does not allow you to copy files to the memory card (this can be solved by restarting the AndroZip application);

Summary. This simple zip packer for Android, on the one hand, impresses with its simplicity: you can compress the archive with two clicks through the context menu. On the other hand, AndroZip's poor toolkit and lack of options still allows you to give preference to other archivers, which all work with ZIP and are more flexible in compression settings.

WinZip - a convenient zip archiver for Android

WinZip is primarily a zip archiver, although there are more decompression formats available. Using this utility, it is convenient to create archives on your phone and send them by mail to other users over the Internet. Similarly, you can save and open packaged files received via the Internet - for example, by email or from an SD card.

Important functions of the WinZip archiver include serious protection and convenient access to files stored in the Google Drive and Dropbox cloud. This way you can package data directly in the cloud.

Key features of the free version of the zip archiver:

  • Creation of Zip/Zipx archives
  • Unpacking in Zip(x), 7z, RAR and CBZ
  • Sending packaged files by mail
  • View image files and text documents using the built-in file manager
  • Unpacking protected Zip/7z archives using AES 128- or 256-bit encryption
  • Automatic unpacking and installation of applications in apk format downloaded from the Application Store (Google Play, etc.)

The premium version of WinZip for Android also offers:

  • Archive protection with encryption - 128- and 256-bit AES
  • Cloud integration with Google Drive and Dropbox cloud for quick access to files on your computer or phone.

B1 Archiver - another zip archiver for Android

B1 Archiver is a free cross-platform file unpacker for Windows/Linux/Mac and, of course, for Android. By the way, the same developers (Catalina Group Ltd.) released B1 File Manager. By the way, this file manager for Android OS is convenient to use in conjunction with an archiver.

So, what is interesting about the B1 Archiver file unpacker and archiver for Android? Here are its main functions:

  • unpacking zip archives, rar, b1 and about 40 formats for Android
  • creating password-protected archives in b1 or zip format (in the paid version the list additionally includes rar and 7z archives)
  • packing files on the phone into multi-volume separated rar and b1 archives with sequential file numbering
  • Convenient navigation through file archives on Android using a special file manager
  • selective unpacking of files on the phone – individual files and folders at the user’s discretion

Summary. Thus, the B1 Archiver zip unpacker can be safely recommended to all Android users who are satisfied with two packaging formats (zip and b1). Don't forget about four dozen possible unpacking formats - this is more than enough, so the archiver for Android B1 Archiver will help you unpack any archive on Android downloaded from the Internet.

ZArchiver - another zip unpacker for Android

This is a lightweight but quite functional archiver for devices running Android OS. It skillfully handles files of any resolution: ZIP, RAR, 7z, Tar, XZ, bzip2 and others. Having this application on board, you can easily compress and decompress archives, view their contents, change and delete them, if necessary.

Immediately when you launch ZArchiver, a user dialog with archiver settings appears: you can specify a design theme, select an icon style and interface language. If Android conflicts with the encoding of archive files, you can change the initial encoding CP866 - Russian DOS is used by the default archiver in Android.

ZIP and RAR archiver ZArchiver

Note that the application supports multi-threaded operation, which significantly reduces the load on the processor. In addition, it perfectly supports UTF-8 encoding, allowing you to quickly and conveniently display all information about files. Of particular note is the built-in explorer, which even implements multi-selection.

Although ZArchiver is a fairly compact archiver, it has many settings, which also relate to archiving itself. You can select your home folder, which will be opened in the ZArchiver archiver first. The behavior of the unpacker is flexibly configured: confirmation of operations, saving, working with ZIP and RAR archives (copy, paste, select) and other subtle aspects of archiving. Regarding the interface, it has already been said - it is configured when ZArchiver is launched.

Most of the useful parameters of this utility for working with archives relate to file compression parameters. Thus, the user has access to such options as the 7Z and ZIP compression level, the number of processor cores, various methods and compression levels.

Among the advantages of the ZArchiver archiver:

  • [+] The application is not resource-intensive when packing and unpacking rar and zip archives; it quickly “manages” archives of any size;
  • [+] ZArchiver developers often update the program: they make it better, add new functions and features;
  • [+] If errors occur, they are quickly corrected, it is possible to customize the application to your liking (change the color scheme, etc.);

Of the minuses:

  • [-] The ZArchiver archiver loads RAM, so other applications may freeze when compressing or decompressing archives

Summary. Still don't know which applications to use to extract ZIP or RAR archives? In this case, you need to quickly download ZArchiver - a zip archiver for Android that will help solve this problem! Please note that each of the presented applications is distributed completely free of charge. There is no need to buy “Pro” or any keys to unlock the full functionality of the archiver. You can download this archiver for Android using the link.

Total Commander (built-in file unpacker)

For those users who do not want to burden themselves with installing a separate unpacker on Android, there is this recipe: use the capabilities of your file manager. Check if it supports archiving and unpacking archives. As a rule, this function is present in file managers initially.

In particular, the mobile version of Total Commander for Android works great with winrar and zip archives, since it has a fairly functional archiver integrated into it. To work with the unpacker, you do not need to install additional modules. Here are just some of the features of the unpacker:

  • Support for ZIP archives larger than 4GB
  • Unpacking ZIP/RAR files to an external SD card
  • Opening and unzipping files placed on an external memory card
  • Customizable compression when packing zip and rar archives

Thus, Total Commander, similar to its desktop version, can be used as an unpacker for Android. This is really convenient: all operations with archives are as convenient as when working with regular files and folders.

If you need more fine-tuning of certain types of archives, then use other, more specialized archivers - the same Winrar for Android. However, most users prefer to use file managers - why install separate archivers for Android if Total Commander takes everything into account?

Built-in ES Explorer unpacker

Another venerable file manager, ES Explorer, handles unpacking archives perfectly out of the box. The built-in archiver is convenient because it is a built-in feature of ES Explorer. That is, to work with archives you do not need to install additional applications. For many users this is the best option.

So, what features can an archiver for Android integrated into ES Explorer offer? Two types of archives are supported - ZIP and RAR, both compression and decompression. In addition, the archiver can restore damaged archives and encrypt ZIP archives with a 256-bit AES key.

In addition to this, ES Explorer supports other archive types, such as 7Z. However, to pack/unpack this format, you need to download a separate add-on from the developer’s page on Google PLay.

Addition. Table of supported packaging and unpacking formats

Table 1. File packaging

RAR ZIP TAR GZ BZ2 XZ 7z B1
RAR for Android + +
AndroZip + + +
B1 Archiver + +
ZArchiver + + + + +
Total Commander +
WinZip +
ES Explorer + + +

Table 2. Unpacking files

RAR ZIP TAR GZ BZ2 XZ 7z ISO ARJ B1 CBZ
RAR for Android + + + + + +
AndroZip + +
B1 Archiver + + + + + + + + + + +
ZArchiver + + + + + + + + +
Total Commander + +
WinZip + + + +
ES Explorer + + +

Sometimes some applications on Android do not suit the user in some way. An example is intrusive advertising. And it also happens that the program is good for everyone, but the translation in it is either crooked or completely absent. Or, for example, the program is a trial, but there is no way to get the full version. How to change the situation?

Introduction

In this article we will talk about how to disassemble an APK package with an application, look at its internal structure, disassemble and decompile the bytecode, and also try to make several changes to the applications that can bring us one benefit or another.

To do all this yourself, you will need at least basic knowledge of the Java language, in which Android applications are written, and the XML language, which is used everywhere in Android - from describing the application itself and its access rights to storing strings that will be displayed on the screen. You will also need the ability to use specialized console software.

So, what is an APK package in which absolutely all Android software is distributed?

Application decompilation

In this article, we only worked with disassembled application code, but if more serious changes are made to large applications, understanding the smali code will be much more difficult. Fortunately, we can decompile the dex code into Java code, which, although not original and not compiled back, is much easier to read and understand the logic of the application. To do this, we will need two tools:

  • dex2jar is a translator of Dalvik bytecode into JVM bytecode, on the basis of which we can obtain code in the Java language;
  • jd-gui is a decompiler itself that allows you to get readable Java code from JVM bytecode. As an alternative, you can use Jad (www.varaneckas.com/jad); Although it is quite old, in some cases it generates more readable code than Jd-gui.

This is how they should be used. First, we launch dex2jar, specifying the path to the apk package as an argument:

% dex2jar.sh mail.apk

As a result, the Java package mail.jar will appear in the current directory, which can already be opened in jd-gui to view the Java code.

Arrangement of APK packages and receiving them

An Android app package is essentially a regular ZIP file that doesn't require any special tools to view its contents or extract it. It is enough to have an archiver - 7zip for Windows or console unzip on Linux. But that's about the wrapper. What's inside? In general, we have the following structure inside:

  • META-INF/- contains a digital certificate of the application, identifying its creator, and checksums of the package files;
  • res/ - various resources that the application uses in its work, such as images, declarative description of the interface, as well as other data;
  • AndroidManifest.xml- description of the application. This includes, for example, a list of required permissions, the required Android version and the required screen resolution;
  • classes.dex- compiled application bytecode for the Dalvik virtual machine;
  • resources.arsc- also resources, but of a different kind - in particular, strings (yes, this file can be used for Russification!).

The listed files and directories are, if not in all, then, perhaps, in the vast majority of APKs. However, there are a few more not so common files/directories worth mentioning:

  • assets- analogue of resources. The main difference is that to access a resource you need to know its identifier, but the list of assets can be obtained dynamically using the AssetManager.list() method in the application code;
  • lib- native Linux libraries written using NDK (Native Development Kit).

This directory is used by game producers who place their game engines written in C/C++ there, as well as by creators of high-performance applications (for example, Google Chrome). We figured out the device. But how do you get the package file of the application you are interested in? Since it is not possible to pick up APK files from the device without root (they are located in the /data/app directory), and rooting is not always advisable, there are at least three ways to get the application file to your computer:

  • APK Downloader extension for Chrome;
  • Real APK Leecher app;
  • various file hosting and Varezniks.

Which one to use is a matter of taste; we prefer to use separate applications, so we will describe the use of Real APK Leecher, especially since it is written in Java and, accordingly, will work in either Windows or Nix.

After starting the program, you need to fill in three fields: Email, Password and Device ID - and select a language. The first two are the e-mail and password of your Google account that you use on the device. The third is the device identifier, and can be obtained by typing the code on the dialer # #8255## and then finding the Device ID line. When filling out, you only need to enter the ID without the android- prefix.

After filling out and saving, the message “Error while connecting to server” often pops up. It has nothing to do with Google Play, so feel free to ignore it and look for packages that interest you.

View and Modify

Let's say you found a package that interests you, downloaded it, unpacked it... and when you tried to view some XML file, you were surprised to discover that the file was not text. How to decompile it and how to work with packages in general? Is it really necessary to install the SDK? No, it is not necessary to install the SDK at all. In fact, all the steps to extract, modify and package APK packages require the following tools:

  • ZIP archiver for unpacking and packing;
  • smali- Dalvik virtual machine bytecode assembler/disassembler (code.google.com/p/smali);
  • aapt- a tool for packaging resources (by default, resources are stored in binary form to optimize application performance). Included in the Android SDK, but can be obtained separately;
  • signer- a tool for digitally signing a modified package (bit.ly/Rmrv4M).

You can use all these tools separately, but this is inconvenient, so it is better to use higher-level software built on their basis. If you work on Linux or Mac OS X, there is a tool called apktool. It allows you to unpack resources in their original form (including binary XML and arsc files), rebuild a package with changed resources, but it does not know how to sign packages, so you will have to run the signer utility manually. Despite the fact that the utility is written in Java, its installation is quite non-standard. First you need to get the jar file itself:

$ cd /tmp $ wget http://bit.ly/WC3OCz $ tar -xjf apktool1.5.1.tar.bz2

$ wget http://bit.ly/WRjEc7 $ tar -xjf apktool-install-linux-r05-ibot.tar.bz2

$ mv apktool.jar ~/bin $ mv apktool-install-linux-r05-ibot/* ~/bin $ export PATH=~/bin:$PATH

If you work on Windows, then there is an excellent tool for it called Virtuous Ten Studio, which also accumulates all these tools (including apktool itself), but instead of a CLI interface it provides the user with an intuitive graphical interface with which you can perform operations for unpacking, disassembling and decompiling in a few clicks. This tool is Donation-ware, that is, sometimes windows appear asking you to get a license, but in the end this can be tolerated. There is no point in describing it, because you can understand the interface in a few minutes. But apktool, due to its console nature, should be discussed in more detail.


Let's look at the apktool options. In short, there are three basic commands: d (decode), b (build) and if (install framework). If everything is clear with the first two commands, then what does the third, conditional statement, do? It unpacks the specified UI framework, which is necessary in cases where you dissect any system package.

Let's look at the most interesting options of the first command:

  • -s- do not disassemble dex files;
  • -r- do not unpack resources;
  • -b- do not insert debugging information into the results of disassembling the dex file;
  • --frame-path- use the specified UI framework instead of the one built into apktool. Now let's look at a couple of options for the b command:
  • -f- forced assembly without checking changes;
  • -a- indicate the path to aapt (a tool for building an APK archive), if for some reason you want to use it from another source.

Using apktool is very simple; to do this, just specify one of the commands and the path to the APK, for example:

$ apktool d mail.apk

After this, all extracted and disassembled files of the package will appear in the mail directory.

Preparation. Disabling advertising

Theory is, of course, good, but why is it needed if we don’t know what to do with the unpacked package? Let's try to apply the theory to our benefit, namely, modify some software so that it does not show us advertising. For example, let it be Virtual Torch - a virtual torch. This software is ideal for us, because it is filled to capacity with annoying advertising and, moreover, is simple enough not to get lost in the jungle of code.


So, using one of the above methods, download the application from the market. If you decide to use Virtuous Ten Studio, simply open the APK file in the application and unzip it, create a project (File -> New project), then select Import File in the project context menu. If your choice fell on apktool, then just run one command:

$ apktool d com.kauf.particle.virtualtorch.apk

After this, a file tree similar to that described in the previous section will appear in the com.kauf.particle.virtualtorch directory, but with an additional smali directory instead of dex files and an apktool.yml file. The first contains disassembled code of the application's executable dex file, the second contains service information necessary for apktool to assemble the package back.

The first place we should look is, of course, AndroidManifest.xml. And here we immediately encounter the following line:

It is not difficult to guess that it is responsible for granting the application permissions to use the Internet connection. In fact, if we just want to get rid of advertising, we will most likely just need to block the application from the Internet. Let's try to do this. We delete the specified line and try to build the software using apktool:

$ apktool b com.kauf.particle.virtualtorch

The resulting APK file will appear in the com.kauf.particle.virtualtorch/build/ directory. However, it will not be possible to install it, since it does not have a digital signature and file checksums (it simply does not have a META-INF/ directory). We must sign the package using the apk-signer utility. Launched. The interface consists of two tabs - on the first (Key Generator) we create keys, on the second (APK Signer) we sign. To create our private key, fill in the following fields:

  • Target File- keystore output file; it usually stores one pair of keys;
  • Password And Confirm- password for the storage;
  • Alias- name of the key in the storage;
  • Alias ​​password And Confirm- secret key password;
  • Validity- validity period (in years). The default value is optimal.

The remaining fields are, in general, optional - but at least one must be filled in.


WARNING

To sign an application using apk-signer, you must install the Android SDK and specify the full path to it in the application settings.

All information is provided for informational purposes only. Neither the editors nor the author are responsible for any possible harm caused by the materials of this article.

Now you can sign the APK with this key. On the APK Signer tab, select the newly generated file, enter the password, key alias and password, then find the APK file and boldly click the “Sign” button. If everything goes well, the package will be signed.

INFO

Since we signed the package with our own key, it will conflict with the original application, which means that when we try to update the software through the market, we will receive an error.

A digital signature is only required for third-party software, so if you are modifying system applications that are installed by copying them to the /system/app/ directory, then you do not need to sign them.

After that, download the package to your smartphone, install it and launch it. Voila, the ad is gone! Instead, however, a message appeared that we do not have the Internet or do not have the appropriate permissions. In theory, this might be enough, but the message looks annoying, and, to be honest, we just got lucky with a stupid application. Normally written software will most likely clarify its credentials or check for an Internet connection and otherwise simply refuse to launch. How to be in this case? Of course, edit the code.

Typically, application authors create special classes for displaying advertisements and call methods of these classes when the application or one of its “activities” (in simple terms, application screens) is launched. Let's try to find these classes. We go to the smali directory, then com (org contains only the open graphic library cocos2d), then kauf (this is where it is, because this is the name of the developer and all his code is there) - and here it is, the marketing directory. Inside we find a bunch of files with the smali extension. These are classes, and the most notable of them is the Ad.smali class, from the name of which it is easy to guess that it is the one that displays advertising.

We could change the logic of its operation, but it would be much easier to simply remove calls to any of its methods from the application itself. Therefore, we leave the marketing directory and go to the adjacent particle directory, and then to virtualtorch. The MainActivity.smali file deserves special attention here. This is a standard Android class that is created by the Android SDK and installed as the entry point to the application (analogous to the main function in C). Open the file for editing.

Inside there is smali code (local assembler). It is quite confusing and difficult to read due to its low-level nature, so we will not study it, but will simply find all references to the Ad class in the code and comment them out. We enter the line “Ad” in the search and get to line 25:

Field private ad:Lcom/kauf/marketing/Ad;

Here an ad field is created to store an Ad class object. We comment by placing a ### sign in front of the line. We continue the search. Line 423:

New-instance v3, Lcom/kauf/marketing/Ad;

This is where the object creation occurs. Let's comment. We continue the search and find in lines 433, 435, 466, 468, 738, 740, 800 and 802 calls to methods of the Ad class. Let's comment. Look like that's it. Save. Now the package needs to be put back together and checked for functionality and the presence of advertising. For the purity of the experiment, we return the line removed from AndroidManifest.xml, assemble the package, sign and install.

Our guinea pig. Advertising visible

Oops! The advertising disappeared only while the application was running, but remained in the main menu, which we see when we launch the software. So, wait, but the entry point is the MainActivity class, and the advertisement disappeared while the application was running, but remained in the main menu, so the entry point is different? To identify the true entry point, reopen the AndroidManifest.xml file. And yes, it contains the following lines:

They tell us (and, more importantly, the android) that an activity named Start should be launched in response to the generation of an intent (event) android.intent.action.MAIN from the android.intent.category.LAUNCHER category. This event is generated when you tap on the application icon in the launcher, so it determines the entry point, namely the Start class. Most likely, the programmer first wrote an application without a main menu, the entry point to which was the standard MainActivity class, and then added a new window (activity) containing the menu and described in the Start class, and manually made it the entry point.

Open the Start.smali file and again look for the line “Ad”, we find in lines 153 and 155 a mention of the FirstAd class. It is also in the source code and, judging by the name, it is responsible for displaying ads on the main screen. Let's look further, there is the creation of an instance of the FirstAd class and an intent that, according to the context, is related to this instance, and then the cond_10 label, the conditional transition to which is carried out exactly before creating an instance of the class:

If-ne p1, v0, :cond_10 .line 74 new-instance v0, Landroid/content/Intent; ... :cond_10

Most likely, the program somehow randomly calculates whether advertising should be shown on the main screen, and, if not, jumps directly to cond_10. Ok, let’s simplify her task and replace the conditional transition with an unconditional one:

#if-ne p1, v0, :cond_10 goto:cond_10

There are no more mentions of FirstAd in the code, so we close the file and reassemble our virtual torch using apktool. Copy it to your smartphone, install it, launch it. Voila, all advertising has disappeared, for which we congratulate all of us.

Results

This article is just a brief introduction to the methods of hacking and modifying Android applications. Many issues remained behind the scenes, such as removing protection, parsing obfuscated code, translating and replacing application resources, as well as modifying applications written using the Android NDK. However, having basic knowledge, it’s only a matter of time to figure it all out.