mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-27 20:15:29 +00:00
Add more cmdline options and specify as internal API
This commit is contained in:
parent
ed4df87b57
commit
b3fd79cbb9
@ -25,9 +25,12 @@
|
||||
" --list list all available applets\n"
|
||||
" --daemon manually start magisk daemon\n"
|
||||
" --[init trigger] start service for init trigger\n"
|
||||
"\n"
|
||||
"Advanced Options (Internal APIs):"
|
||||
" --unlock-blocks set BLKROSET flag to OFF for all block devices\n"
|
||||
" --restorecon fix selinux context on Magisk files and folders\n"
|
||||
" --restorecon restore selinux context on Magisk files\n"
|
||||
" --clone-attr SRC DEST clone permission, owner, and selinux context\n"
|
||||
" --clone SRC DEST clone SRC to DEST\n"
|
||||
" --sqlite SQL exec SQL to Magisk database\n"
|
||||
"\n"
|
||||
"Supported init triggers:\n"
|
||||
@ -73,6 +76,10 @@ int magisk_main(int argc, char *argv[]) {
|
||||
if (argc < 4) usage();
|
||||
clone_attr(argv[2], argv[3]);
|
||||
return 0;
|
||||
} else if (strcmp(argv[1], "--clone") == 0) {
|
||||
if (argc < 4) usage();
|
||||
cp_afc(argv[2], argv[3]);
|
||||
return 0;
|
||||
} else if (strcmp(argv[1], "--daemon") == 0) {
|
||||
int fd = connect_daemon();
|
||||
write_int(fd, DO_NOTHING);
|
||||
|
Loading…
Reference in New Issue
Block a user