Skip to content

Package binaries into native libs directory to make busybox work on non-rooted phones, too #34

@rubenpgrady

Description

@rubenpgrady

Hello there, Sunil!

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.

Source: https://issuetracker.google.com/issues/128554619

Would it be possible for you to package the busybox and ssl_helper binaries into the app as a native library? I think there are a few rules regarding naming the file beginning lib and ending in .so, but that's it. After installing the APK, due to extractNativeLibs=true, the file will be available under something like /data/app/<package name>/lib/arm/libbusybox.so to the whole system. No root required! Users can then symlink to that file or write shell scripts which include it.

Please let me know what you think. I'd appreciate it if you'd consider adding this feature.

Cheers
Ruben

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions