user1163782
user1163782

Reputation: 19

How to increase file size of Android App .apk

I have a simple question.

I want to add a little dummy file to my .apk in order to make it a little bigger, since it only has 300 KB or so and that is too less.

Does someone know how to add a little unneccessary code to increase the size of the .apk?

Upvotes: 1

Views: 1928

Answers (4)

Gibolt
Gibolt

Reputation: 47297

Do not add files just to increase size

You are producing this app to be used on people's devices. People have limited resources. If it gets installed 1 million times, think of the total extra network bandwidth to download, total storage space people can't use to store their photos, and electrical power for those steps.

People will not notice that an app is tiny and decide not to use it. They will; however, uninstall the apps taking the most space first or not install in the first place.

While the other answers provide the correct direct answer, I believe they are all incorrect in practice.

Upvotes: 0

Irshad Babar
Irshad Babar

Reputation: 1419

This is really strange as usually people look for reducing the size of application. But if it's your requirement then try the following ways.

  1. Fastest way make a folder(directory) named "raw" under the res folder(directory) and put files of your desired like mp3,images etc, it will be included to the final apk file as raw resource.

  2. You can also put some png images to drawable folder but not sure it would work in release mode, latest version of android studio may give you error while generating signed apk if the size of files is too large

  3. (Not Recommended) Increase your code base like increasing size of java files, adding more number of lines to your xml files etc.

    Note -- If you will put your raw files to somewhere else location then whether android studio will not include in the final apk or it will give error respectively.

Upvotes: 2

nbe_42
nbe_42

Reputation: 1222

I don't understand why you want to do that...

But you can add files in your res/assets folder

Upvotes: 1

keithmaxx
keithmaxx

Reputation: 649

I am curious as to why you need to increase APK file size.

But anyway, to answer your question, why not just slap in some image or sound file in there to artificially increase your file size?

Upvotes: 3

Related Questions