You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since Android 10 and the introduction of the W^X policy, it's not permitted to run binaries from an application's home directory in /data/user/0 (i.e. /data/data). That's why root is necessary for this app to install the busybox binaries to /system/xbin to make them available system-wide. Unfortunately, oftentimes it's not an option to users to root their phone due to various reasons. However, as far as I understand, there is an alternative solution for non-rooted phones:
While exec() no longer works on files within the application home directory, it continues to be supported for files within the read-only /data/app directory. In particular, it should be possible to package the binaries into your application's native libs directory and enable android:extractNativeLibs=true, and then call exec() on the /data/app artifacts.
As far as I understand, you're already packaging the busybox binaries into the app as native librares libbusybox.so and libssl_helper.so. The files will be available under something like /data/app/<package id for ru.meefik.busybox>/lib/arm/libbusybox.so to the whole system. No further installation required, and no root required! Users can then symlink to that file or write shell scripts which include it.
However, the package id in the library path is unknown. As far as I understand, there is no straight forward way to find the library path of another app. Therefore, your app would have to include this feature itself: Would it be possible for you to display the path to the native libraries in the app, so users can copy that path? The SDK provides getApplicationInfo().nativeLibraryDir for example.
Please let me know what you think. I'd appreciate it if you'd consider adding this feature.
Cheers
Ruben
The text was updated successfully, but these errors were encountered:
Hello there, Anton!
Since Android 10 and the introduction of the W^X policy, it's not permitted to run binaries from an application's home directory in
/data/user/0
(i.e./data/data
). That's why root is necessary for this app to install the busybox binaries to/system/xbin
to make them available system-wide. Unfortunately, oftentimes it's not an option to users to root their phone due to various reasons. However, as far as I understand, there is an alternative solution for non-rooted phones:Source: https://issuetracker.google.com/issues/128554619
As far as I understand, you're already packaging the busybox binaries into the app as native librares
libbusybox.so
andlibssl_helper.so
. The files will be available under something like/data/app/<package id for ru.meefik.busybox>/lib/arm/libbusybox.so
to the whole system. No further installation required, and no root required! Users can then symlink to that file or write shell scripts which include it.However, the package id in the library path is unknown. As far as I understand, there is no straight forward way to find the library path of another app. Therefore, your app would have to include this feature itself: Would it be possible for you to display the path to the native libraries in the app, so users can copy that path? The SDK provides
getApplicationInfo().nativeLibraryDir
for example.Please let me know what you think. I'd appreciate it if you'd consider adding this feature.
Cheers
Ruben
The text was updated successfully, but these errors were encountered: