[Interest] Deploy custom binary with APK

Assam Boudjelthia assam.boudjelthia at qt.io
Tue Dec 22 10:00:12 CET 2020


Hi,

Can this file be copied to the android-build/assets folder? it would packaged with apk, then you could get it's path using the assets system as "assets:/path_to_asset_file"

Best regards,
Assam
________________________________
From: Interest <interest-bounces at qt-project.org> on behalf of Alexander Dyagilev <alervdvcw at gmail.com>
Sent: Wednesday, December 16, 2020 8:40:46 AM
To: interest <Interest at qt-project.org>
Subject: [Interest] Deploy custom binary with APK


Hello,

I was using the following scheme:

1. Add it to assets.

mybinary.path = /assets

mybinary.files += $$PWD/../mybinary-build/prebuilt/android/$$ANDROID_TARGET_ARCH/bin/mybinary


INSTALLS += mybinary


2. At app first start, copy it to the cache folder and run it from there.

Since Android 10, this scheme is not working anymore (https://developer.android.com/about/versions/10/behavior-changes-10#execute-permission):

"Untrusted apps that target Android 10 cannot invoke exec() on files within the app's home directory. This execution of files from the writable app home directory is a W^X violation<https://en.wikipedia.org/wiki/W%5EX>. Apps should load only the binary code that's embedded within an app's APK file."

So, is there a way to include it into APK so I can launch it from there? I'm using Qt 5.12.10.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20201222/e0e1e1f0/attachment.html>


More information about the Interest mailing list