Why apps are so big

The idea for the materials in this series came about after I was asked to analyze the My MTS application. The application seems to be not very complicated, and the volume caused genuine bewilderment. The main consumer of space then turned out to be banal advertising in the form of images and videos. But cases, as you know, are different. So let's see what else can take up precious megabytes inside apk files.

How to get the APK

No matter how trite it sounds, but for this you need to download it. For example, install an app from Google Play. But after that you need to get the installed APK. The easiest way to do this is a file manager (for example, ES Explorer) or another utility that can transfer installed applications (for example, ShareIT).

Why apps are so big Why apps are so big

But if you want something strange, you can copy the APK via TWRP or even try downloading the APK via a browser plugin. At the same time, it is important to make sure that the architecture of the package will be ARM, and not x86 (although if you are interested in analyzing a package for x86, then on the contrary – this architecture is needed).

How to watch

The APK is a zip file, you can simply rename and unzip it. Or use the 'Analyze APK' tool from Android Studio. In this case, the size of the folders will be immediately visible, and it will be possible to understand what is worth analyzing in detail, and what you can ignore.

Why apps are so big

What do folders mean?

  • assets and res / raw are binary resources (there can be anything that looks just like some arbitrary 'file' to the application).
  • lib – native libraries (in C ++), compiled for a specific architecture (ARM, x86).
  • res / drawable and res / mipmap are images. If the folder name contains dpi, then these are images for the specified dpi (for more information on dpi, see the article 'Why large devices are really small').
  • res / layout – screen layouts.
  • classes.dex – a compiled application along with Java libraries.

Of course, you can find many more different files in the APK (and in the res folder there are many different types of resources), but the main ones are listed here.

'Eaters' megabyte

In the case of the My MTS application, everything turned out to be simple: most of the volume is spent on banal advertising in the form of pictures and videos.

Why apps are so big

But there are other megabyte eaters:

  • Internal directories of certain data. In the same application 'My MTS' the tariff guide is 4.6 MB.
  • Libraries. For example, an application developer decided to include the Hyphenate library for chats. And I did not look that the default option with codecs for voice and video calls is offered. As a result, the application receives several tens of megabytes in load.
  • Graphic arts. I once helped a designer participate in a Samsung competition. The application being developed was an offline reference, quite simple from a development point of view (a little animation and simple page turning), but very graphics-intensive. More than a hundred images were drawn in QHD resolution. After one of the intermediate versions (which did not include all the images), it became clear that the application was getting too big. And it was decided to limit the graphics to HD resolution. The designer was satisfied with the evaluation of the result on the target tablet (Galaxy Tab S), and the volume was reduced by almost 4 times.

What's next?

I am planning to do several issues in this section. And in each issue, consider several applications (either from the same manufacturer or the same topic) and tell what causes a large amount of applications in each particular case.

Rate article
About smartphones.
Add a comment