Why does my app size on device differ than the APK or Play store size
Asked Answered
B

2

13

I have a quite valid question from a user which I'm unable to get to the bottom of trying to understand why the size reported on Google Play store is different than the size reported on the device. My signed release APK size on my PC comes in at 3.8MB. Uploading to Google Play shows a similiar size. Looking at the app manager on the device however shows the following stats:

Total: 6.62MB
App:   6.51MB
Data:   112KB

This is not to do with Google Play enabled copy protection (as other similar questions sugget) as I get the same stats installing the signed APK or development APK.

The APK on the phone under /data/app is again 3.8MB and the files under /data/data/com.my.app come to another 100KB or so (presumably the 'Data' row above).

What is causing the discrepancy in stats?

EDIT: Researching this further, this is a common feature across many applications on my devices. Google Play reports one size and the device reports something generally in the magnitude 2 times greater. So good to know its probably not something I'm doing, but still curious what the reasoning here is as its frustrating to be accused by users of 'doctoring' the install size to appear smaller!

Bell answered 18/1, 2013 at 23:12 Comment(2)
Once I opened the system folder and saw a dex file near each apk file. Maybe it is somehow related.Celestinacelestine
It is Shows the double the size in play store. it is an regular processEnceladus
K
16

When installing an APK in android system, what's installed is the DEX file. Which contains your code, resources etc compiled as binaries. Your dex is generally the same size of your apk, unless you have resources not compiled in assets.

Well, we all know that. What's not widelly spread is that android SAVES your original apk too. Perhaps for reinstalling in case of errors or for some other reasons.

That's why the amount of memory of our apps is the double in system. It's the sum of the size of the original apk and the installed dex.

Krystakrystal answered 23/1, 2013 at 20:4 Comment(1)
How to reduce size of DEX file?Herbalist
P
0

It is like every other software application which will be compressed initially and made as a single file to install and upon installing, it will extract all the files (code, assets i.e, the images, etc) in the phone. This is why your app will be more memory after getting installed in a phone.

In order to prevent this, make your app a server side and ask compulsory permission for Internet so that you can send the data without consuming more memory for the app.

Pavkovic answered 19/8, 2017 at 11:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.