You should never place your .so in /system/lib, or as you said it will
never be upgradable. When the initial APK is placed in /system/app the
packager manager is supposed to copy the so into
/data/data/xxx.xxx.xxx/lib. In the past found a couple of terminals
that don't always copy the .so, in those cases it was necessary to
copy the .so into /data/data/xxx.xxx.xxx/ on behalf of the package
manager, Fortunately on most terminals it works ok.
Eurico
> --
> You received this message because you are subscribed to the Google Groups "android-ndk" group.
> To post to this group, send email to andro...@googlegroups.com.
> To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.
>
>
What I have observed in the actual devices is that sometimes the .so
is copied to /data/data/xx.xx.xx/lib, others not, in my code I detect
this and if necessary the .so is copied to /data/data/xx.xx.xx and
loaded from there using absolute path. I thought this to be normal
since /system is in a read-only partition.
Quite frankly never found a device that extracted my .so into /system/lib
Once one device manufacturer placed my .so in /system/lib on their ROM
and I ended up with a native code that could not be updated because
the loader picked the .so from /system/lib and ignored the newer
version on /data/data/xx.xx.xx/lib.
Eurico
> To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
Hi, David
Thanks for your explanation.
But what I see is different from your statement, with testing on both
emulator and some real phone.
First, the .so isn't extracted to the /system/lib directory
automatically during the first boot.
Second, when the updated package
installed, the .so is extracted to the /data/data/xxx/lib as expected.
But the application doesn't link to this new .so but still to the old
one under /system/lib.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
On Wed, Oct 27, 2010 at 2:25 AM, Hendy <hend...@gmail.com> wrote:Hi, David
Thanks for your explanation.
But what I see is different from your statement, with testing on both
emulator and some real phone.
First, the .so isn't extracted to the /system/lib directory
automatically during the first boot.I never said, quite the contrary, please read my post. What I said was that the librarieshad to be placed under /system/lib, which is done when building the system image, not at boot time.Second, when the updated package
installed, the .so is extracted to the /data/data/xxx/lib as expected.
But the application doesn't link to this new .so but still to the old
one under /system/lib.
Apparently, this is a bug. I thought it had been fixed in Froyo, but I was probably mistaken.
>> Quite frankly never found a device that extracted my .so into /system/lib
>
> On production devices, /system is mounted read-only, so attempting to
> extract a file there wouldn't make sense.
>
Precisely that's why on 1st boot the .so is extracted from
/system/app/xxx.apk into /data/data/xxx.xxx.xxx/lib
and not into /system/lib (well most times, there are buggy devices out there)
Eurico