ksud: skip Parser when using resetprop as an Subcommand#3315
Closed
AlexLiuDev233 wants to merge 10 commits into
Closed
ksud: skip Parser when using resetprop as an Subcommand#3315AlexLiuDev233 wants to merge 10 commits into
AlexLiuDev233 wants to merge 10 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts how resetprop is invoked from ksud so that ksud resetprop --help shows the real resetprop help output, by avoiding a secondary “pass-through args” parsing layer and instead parsing resetprop options as a normal subcommand.
Changes:
- Refactors
resetpropargument handling to be reusable via a newexecute(Args)entrypoint. - Updates the
ksudCLI to modelresetpropas a typed subcommand (Resetprop(crate::resetprop::Args)) instead of forwarding trailing raw arguments. - Introduces a small dedicated
ResetPropParserfor the standalone/multicallresetprop_mainpath.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| userspace/ksud/src/resetprop.rs | Splits clap parsing from resetprop execution and adds a dedicated multicall parser wrapper. |
| userspace/ksud/src/cli.rs | Switches ksud resetprop from raw-args forwarding to direct clap-parsed resetprop::Args and calls execute. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
6f46759 to
1ab140f
Compare
Signed-off-by: AlexLiuDev233 <wzylin11@outlook.com>
Signed-off-by: AlexLiuDev233 <wzylin11@outlook.com>
Signed-off-by: AlexLiuDev233 <wzylin11@outlook.com>
Signed-off-by: AlexLiuDev233 <wzylin11@outlook.com>
1ab140f to
128f3be
Compare
Signed-off-by: AlexLiuDev233 <wzylin11@outlook.com>
Tools-cx-app
approved these changes
Mar 22, 2026
5ec1cff
added a commit
that referenced
this pull request
Mar 24, 2026
5ec1cff
added a commit
that referenced
this pull request
Mar 24, 2026
- Allows parameter values prefixed with `-` be matched by value, enabling some commands like `resetprop dalvik.vm.dex2oat-flags --inline-max-code-unit=0` to work correctly. - Disables help options for the resetprop subcommand, allowing the `--help` option to be passed from the ksud subcommand to the resetprop command-line tool. Solves #3315.
KOWX712
pushed a commit
to KOWX712/KernelSU
that referenced
this pull request
Mar 24, 2026
- Allows parameter values prefixed with `-` be matched by value, enabling some commands like `resetprop dalvik.vm.dex2oat-flags --inline-max-code-unit=0` to work correctly. - Disables help options for the resetprop subcommand, allowing the `--help` option to be passed from the ksud subcommand to the resetprop command-line tool. Solves tiann#3315.
AlexLiuDev233
added a commit
to ReSukiSU/ReSukiSU
that referenced
this pull request
Mar 28, 2026
- Allows parameter values prefixed with `-` be matched by value, enabling some commands like `resetprop dalvik.vm.dex2oat-flags --inline-max-code-unit=0` to work correctly. - Disables help options for the resetprop subcommand, allowing the `--help` option to be passed from the ksud subcommand to the resetprop command-line tool. Solves tiann/KernelSU#3315. AlexLiuDev233: Reintroduce my rejected pr in upstream to my fork.... From 5ec1cff's say, she don't apply my pr simple because code paths were split But it can be simple fix by move checks to run_from_args() function And it also avoid multiple parse the command line [partially cherry-picked from upstream reject pull request tiann/KernelSU#3315] [cherry-picked from upstream commit tiann/KernelSU@5ce7e08] Co-authored-by: AlexLiuDev233 <wzylin11@outlook.com> Signed-off-by: AlexLiuDev233 <wzylin11@outlook.com>
AlexLiuDev233
added a commit
to ReSukiSU/ReSukiSU
that referenced
this pull request
Mar 28, 2026
- Allows parameter values prefixed with `-` be matched by value, enabling some commands like `resetprop dalvik.vm.dex2oat-flags --inline-max-code-unit=0` to work correctly. - Disables help options for the resetprop subcommand, allowing the `--help` option to be passed from the ksud subcommand to the resetprop command-line tool. Solves tiann/KernelSU#3315. AlexLiuDev233: Reintroduce my rejected pr in upstream to my fork.... From 5ec1cff's say, she don't apply my pr simple because code paths were split But it can be simple fix by move checks to run_from_args() function And it also avoid multiple parse the command line [partially cherry-picked from upstream reject pull request tiann/KernelSU#3315] [cherry-picked from upstream commit tiann/KernelSU@5ce7e08] Co-authored-by: AlexLiuDev233 <wzylin11@outlook.com> Signed-off-by: AlexLiuDev233 <wzylin11@outlook.com>
AlexLiuDev233
added a commit
to ReSukiSU/ReSukiSU
that referenced
this pull request
Mar 29, 2026
- Allows parameter values prefixed with `-` be matched by value, enabling some commands like `resetprop dalvik.vm.dex2oat-flags --inline-max-code-unit=0` to work correctly. - Disables help options for the resetprop subcommand, allowing the `--help` option to be passed from the ksud subcommand to the resetprop command-line tool. Solves tiann/KernelSU#3315. AlexLiuDev233: Reintroduce my rejected pr in upstream to my fork.... From 5ec1cff's say, she don't apply my pr simple because code paths were split But it can be simple fix by move checks to run_from_args() function And it also avoid multiple parse the command line [partially cherry-picked from upstream reject pull request tiann/KernelSU#3315] [cherry-picked from upstream commit tiann/KernelSU@5ce7e08] Co-authored-by: AlexLiuDev233 <wzylin11@outlook.com> Signed-off-by: AlexLiuDev233 <wzylin11@outlook.com>
LeCmnGend
pushed a commit
to LeCmnGend/KernelSU
that referenced
this pull request
Apr 12, 2026
- Allows parameter values prefixed with `-` be matched by value, enabling some commands like `resetprop dalvik.vm.dex2oat-flags --inline-max-code-unit=0` to work correctly. - Disables help options for the resetprop subcommand, allowing the `--help` option to be passed from the ksud subcommand to the resetprop command-line tool. Solves tiann#3315.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Old impl let user pass "args" to ksud resetprop Subcommand, it cause user execute "ksud resetprop --help" are not print the real help information of resetprop command.
This pr let when resetprop work as ksud's subcommand, skip the parser, directly execute logic, it would fix this issue.
Before:
After: