mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-28 05:33:38 -08:00
run module uninstall.sh on Magisk uninstallation
This commit is contained in:
@@ -23,7 +23,7 @@ Options:
|
||||
-v print running daemon version
|
||||
-V print running daemon version code
|
||||
--list list all available applets
|
||||
--remove-modules remove all modules and reboot
|
||||
--remove-modules [-n] remove all modules, reboot if -n is not provided
|
||||
--install-module ZIP install a module zip file
|
||||
|
||||
Advanced Options (Internal APIs):
|
||||
@@ -114,7 +114,17 @@ int magisk_main(int argc, char *argv[]) {
|
||||
printf("%s\n", res.data());
|
||||
}
|
||||
} else if (argv[1] == "--remove-modules"sv) {
|
||||
int do_reboot;
|
||||
if (argc == 3 && argv[2] == "-n"sv) {
|
||||
do_reboot = 0;
|
||||
} else if (argc == 2) {
|
||||
do_reboot = 1;
|
||||
} else {
|
||||
usage();
|
||||
exit(1);
|
||||
}
|
||||
int fd = connect_daemon(MainRequest::REMOVE_MODULES);
|
||||
write_int(fd, do_reboot);
|
||||
return read_int(fd);
|
||||
} else if (argv[1] == "--path"sv) {
|
||||
int fd = connect_daemon(MainRequest::GET_PATH);
|
||||
|
||||
Reference in New Issue
Block a user