FWIW, that approach scares the bejeezus out of me. That is so undocumented and implementation-dependent that I wouldn't touch it with a 10-meter pole.
On Thu, Oct 21, 2010 at 11:10 AM, Jonathan Pryor <[email protected]> wrote: > I'm writing an application and would like to have some files extracted > from the .apk during _installation_ time, as the files can be quite > large and extracting them from the .apk during the first run results in > a noticeable slowdown which I would prefer to avoid. > > After lots of experimentation, I have found one way to make this work, > but I'm unsure about the "long-term" ramifications of this approach, > specifically: will this actually work in android-9 and later? > > The approach is to name the files I want extracted at installation time > as "lib*.so", and place them into the appropriate lib/ABI folder within > the apk file, e.g. the .apk contains: > > lib/armeabi/libMyLargeFile.dat.so > > and at installation time this is (nicely) installed as: > > $APPDIR/lib/libMyLargeFile.dat.so > > My concern is that 'libMyLargeFile.dat.so' is NOT an ELF shared library. > This approach only works because PackageManagerService only checks for > files matching the `lib/ABI/lib*.so` pattern (which is followed) and > does not check the contents of the extracted file. > > This approach works for Android 1.6 through Android 2.2. I'm wondering > if this will continue to work in the future, or if I need to investigate > an alternate mechanism. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- 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

