Thanks for the reply.
I tried many things:
1) Having the libraries in /system/lib does not work (crashes when it tries to run them as x86 when they are ARM)
2) Having the libraries in /system/arm/lib does not work (it looks for them on /system/lib)
3) I tried putting the apk in /system/app/theApp/theApp.apk. This does not work. If its an x86 APK it works, but fails on arm APKs.
If I get the package manager info on the APK (on option 3) I get primaryCpuAbi and secondaryCpuAbi as null.
If I force an install of that APK (pm install -r /system/app/theApp/theApp.apk) It goes into data, and If I get the package info again, the primaryCpuAbi is properly filled with armeabi. So when its executed it brings houdini into play.
The problem seems to be that I can't set that primaryCpuAbi during the build. I tried many options on LOCAL_DEX_PREOPT but does not have any effect.
Is there any