It's because a version of the .apk needs to be available read-only to all
applications, so they can pull things like labels and icons from it.  So to
install a forward-locked app, the real .apk is only readable by its app, and
a fake world-readable .apk is also created that has a copy of the real
.apk's resources.

So enabling forward locking can double the size of your app (at most, if it
contains no code).

Also when installing the code needs to be copied out of the .apk so that it
can be run (and at this point the dalvik code is optimized for the device it
is running on).  This is stored compressed in the .apk, so if there is a lot
of code the actual install size can be significantly larger, regardless of
forward-locking.  Especially if the code compresses well, such as C++ with a
lot of big mangled symbols.

On Fri, Jul 9, 2010 at 2:16 PM, Mark Murphy <[email protected]> wrote:

> On Fri, Jul 9, 2010 at 5:05 PM, John <[email protected]> wrote:
> > Is there a technical reason why it takes up that much space?
>
> As opposed to a non-technical reason? I'm sure there is. Do I know all
> of the details? No.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to Android Development_ Version 3.1 Available!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to