I have an android app (C#, Xamarin) that
- bundles a python environment with its apk.
- extracts the python files into an the app files directory.
- runs python code, by executing the python executable as a sub process.
This worked for years, but now on android 10, I'm getting:
Write fault on path /[Unknown] error (which is likely the Xamarin wrapper of the real error).
I assume this is caused by the following android 10 changes: "Removed execute permission for app home directory"
(Although if I adb in and runas the app user, executing the python executable works fine.)
My testing showed that:
In general running subproccess still works. (eg /system/bin/echo)
But executing any subprocess, that exists in the apps home/files directory generates the Write fault on path /[Unknown] error.
In the android 10 changes file, the suggested alternative approach is to:
Apps should load only the binary code that's embedded within an app's APK file.
As far as I'm aware one can't get a file path to an embedded apk file.
Is there a way of executing (eg. Runtime.exec()) a (binary/native) file embedded in the apk?