mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-24 10:35:26 +00:00
Change to applet name to prevent showing magisk.bin
This commit is contained in:
parent
9b41976252
commit
4d5841332a
@ -163,9 +163,11 @@ int magisk_main(int argc, char *argv[]) {
|
|||||||
argc--;
|
argc--;
|
||||||
argv++;
|
argv++;
|
||||||
for (int i = 0; applet[i]; ++i) {
|
for (int i = 0; applet[i]; ++i) {
|
||||||
if (strcmp(basename(argv[0]), applet[i]) == 0)
|
if (strcmp(basename(argv[0]), applet[i]) == 0) {
|
||||||
|
strcpy(argv0, basename(argv[0]));
|
||||||
return (*applet_main[i])(argc, argv);
|
return (*applet_main[i])(argc, argv);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
usage();
|
usage();
|
||||||
return 1;
|
return 1;
|
||||||
@ -184,9 +186,11 @@ int main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
// Applets
|
// Applets
|
||||||
for (int i = 0; applet[i]; ++i) {
|
for (int i = 0; applet[i]; ++i) {
|
||||||
if (strcmp(basename(argv[0]), applet[i]) == 0)
|
if (strcmp(basename(argv[0]), applet[i]) == 0) {
|
||||||
|
strcpy(argv0, basename(argv[0]));
|
||||||
return (*applet_main[i])(argc, argv);
|
return (*applet_main[i])(argc, argv);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Not an applet
|
// Not an applet
|
||||||
return magisk_main(argc, argv);
|
return magisk_main(argc, argv);
|
||||||
|
Loading…
Reference in New Issue
Block a user