Reputation: 89
I have an (older) Android application which has its targetSDK set to 19, has a few native libraries (.so files) included and runs fine on devices up to API 23.
Running on an Android O device a build with still with targetSdk 19 and practically no code or manifest or any other kind of changes raises this warning:
... which mutates into an error if we attempt to run a build with targetSdk 26.
Now we have been asked to fix this warning and let the app on target 19 for the time being. The problem is our client does not have the source code of this native module so I started looking what these headers are and if it would be possible to change them without having the code and rebuilding the native library. And I found HT editor which allows changing the flags by directly editing the so file:
My question is, what are the repercussions of directly hacking into the binary file, generally I mean, I understand there could be specific problems related to my app maybe.
If the app is found to work fine after a thorough regression testing on more that one device, is there a higher probability of having it crash unexpectedly somewhere sometime because of this hack than because of a regular code change which may produce a bug not detected during testing?
What I am looking for an answer to is this - is this a viable solution for my client to use this application in production in case they are not able to obtain the code or new libraries properly built from the third party developer?
I found a few threads which ask about fixing this warning but none of them has a satisfying answer and none involve editing the binary file directly:
How to fix "W + E load segments are not allowed" in Android O(8.0)
Android N warning against .so file having W+E segments
Thank you for any input.
Upvotes: 1
Views: 993