-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]: Support secondary users via binary patching and extra slashes #2734
Comments
To summarize my thoughts in #2765 :
Personally I suggest something like In case it's installed as a secondary Android user (userId=10), the path should then be modified into |
I installed all required packages for home assistant (python, clang, rust, etc ...) Moved termux to /data/local/tmp/termu Hexpatched /data/data/com.termux -> /data/local/tmp/termu (with magiskboot hexpatch) Then I installed home assistant without problems. |
As a long-term everyday Termux user and Debian maintainer, I came across this topic and decided to share some thoughts about the idea:
|
Feature description
A better way to support secondary users than the ones proposed so far could be to set the prefix to something like /data/////////data/ or /data/././././data, with enough slashes or /.s to be able to binary patch all instances of it in files of the package upon package installation to /data/user/NN/ for all practical values of NN without changing the string length (looking into any gzip/bz2/xz/zip archives if any, with special handling of checksummed files if any).
While somewhat inelegant, it seems to me this is likely to work, with the exception of any non-standard compressed files or files with checksums (both of these are rare or nonexistent in common Linux packages and can be handled with ad-hoc code), or anything that doesn't like the paths not being canonical (also probably rare or non-existent, since due to the /usr merge everything is accessible via both / and /usr in common Linux distributions).
The few applications that might not work, if any, can be patched.
Unlike other solutions, it doesn't have any performance or functionality downside, although it might have some slight aesthetic downside and there's a small risk of breaking compatibility in existing installation (but it's possible to build all packages twice, once like now and once with this scheme).
Additional information
Yes for secondary users support. None known for binary patching.
The text was updated successfully, but these errors were encountered: