Zackptg5 / Cross-Compiled-Binaries-Android

A collection of (mostly) static cross compiled binaries for android
456 stars 79 forks source link

Detect already installed binaries #35

Closed innateessence closed 3 years ago

innateessence commented 3 years ago

This is a feature request, it'd be really nice if ccbins could examine which binaries exist on the system already, and instead of installing all bins using '1' in the TUI's installer, it would instead attempt to detect any conflicts, and only install non-conflicts.

The typical current behavior where it installs all binaries possible regardless of FS/path conflicts would be a good option for '2' in the TUI's Installer.

It'd be really convenient, and that way I wouldn't have to worry if installing this in my /system/bin directory and overwriting curl would lead to a curl-less system if I ever have the need to remove this, or on the flipside I don't have to muck around with my $PATH

I may make a PR for this that iterates over all the directories specified in $PATH, but I'm not in a huge rush :)

innateessence commented 3 years ago

hmmm, this may be a bit excessive, it's not hard to fix the issue in that event.

Feel free to close this if you don't wanna do this.

P.S. Thanks for making this :)

Zackptg5 commented 3 years ago

So it already does this for binaries in other magisk modules and if you remove it, the original would still be there since magisk modules don't actually modify system at all. The "overriding" of existing binaries is intentional. Most stock android ones, if they exist, are feature limited and replacing them with better ones is one of the goals of this module.

Note that you can change the install path in ccbins options/settings before installing a binary Note that system/bin is one of the first entries in PATH so if you install a binary elsewhere and a crappy one already exists in system/bin, the crappy one would take precedence

innateessence commented 3 years ago

Wait... magisk makes it possible for shell scripts provided by it's modules to be 'systemless' too?

That's awesome.

Sorry for wasting your time

Zackptg5 commented 3 years ago

Haha, no problem. Magisk modules are entirely systemless unless the module dev does something weird. They're located in /data/adb/modules