Again, I'm tasked with getting our games to run on android.
Much fun, the NDK is an endless source of weird and wonderful bugs.
Somehow I missed this one, the last time I ported stuff to android, but it is now my "favorite":
https://code.google.com/p/android/issues/detail?id=16391
in system/core/run-as/package.c:
/* This should be large enough to hold the content of the package database file */
#define PACKAGES_LIST_BUFFER_SIZE 8192
Who in their right mind thinks that is a good idea?!
A quick check on a few of my devices does not show a single one with a packages.list file less then 8kb. (my Samsung S6 is about 17kb, and its brand new)
The smallest I've found is about 9kb.
This means if your app happens to be after those 8kb, on any of the affected devices, its impossible to ndk-debug it.
Fan-tas-tic!
Oh. And in some versions, they messed up the rights for packages.list and/or run-as so it is again impossible to ndk-debug until you root your device and fix it.
In 5.0, or possibly 5.1, there seems to be a new run-as bug on samsung devices, since again, its impossible to ndk-debug.
You think upgrading tools might be a good idea? Think again, on r10e (the latest), the ndk-gdb script is broken, so running it is useless until you patch it.
And in any case, if you try build with v21+, it will not run on any device with android version less then 5.0, because they moved location of cstdlib...
I so love to have to debug my tool chain, and can't wait for what weird and wonderful bugs they can come up with for the next release.
Sorry, just had to vent a bit
(And if I post some posts with a bad attitude on any of the other subforums, you now know why... I'll try to avoid it)