Skip to content

fix: Make ShellCommandRunner run without root#101

Merged
oSumAtrIX merged 2 commits intodevfrom
fix/adbshell-root-issue
Feb 25, 2026
Merged

fix: Make ShellCommandRunner run without root#101
oSumAtrIX merged 2 commits intodevfrom
fix/adbshell-root-issue

Conversation

@oSumAtrIX
Copy link
Copy Markdown
Member

Currently, every command run by a ShellCommandRunner will be run with su (root required). With this PR, root will only be required from a RootInstaller. Also remove latest \n from shell output

Currently, every command run by a ShellCommandRunner will be run with su (root required). With this PR, root will only be required from a RootInstaller.
Also remove latest \n from shell output
@oSumAtrIX oSumAtrIX linked an issue Dec 21, 2025 that may be closed by this pull request
3 tasks
@playday3008
Copy link
Copy Markdown

Related: #81

@oSumAtrIX
Copy link
Copy Markdown
Member Author

how come?

@playday3008
Copy link
Copy Markdown

playday3008 commented Feb 25, 2026

how come?

Wdym, how?

shellCommandRunner(GET_SDK_VERSION) ->
    shellCommandRunner("getprop ro.build.version.sdk") ->
        runCommand("su -c \'getprop ro.build.version.sdk\'")

or in better words


val sdkVersion = shellCommandRunner(GET_SDK_VERSION).output.toInt()


internal operator fun invoke(
command: String,
) = runCommand("su -c \'$command\'")

@oSumAtrIX
Copy link
Copy Markdown
Member Author

What does this mean, is root required for the command?

@playday3008
Copy link
Copy Markdown

What does this mean, is root required for the command?

No, it's not required, but it still tries to, that's the problem

@oSumAtrIX
Copy link
Copy Markdown
Member Author

oSumAtrIX commented Feb 25, 2026

Does this PR as it currently is fix that issue

@playday3008
Copy link
Copy Markdown

Yes, this fixes it

@oSumAtrIX oSumAtrIX linked an issue Feb 25, 2026 that may be closed by this pull request
3 tasks
@oSumAtrIX oSumAtrIX marked this pull request as ready for review February 25, 2026 20:47
@oSumAtrIX oSumAtrIX merged commit eb483ca into dev Feb 25, 2026
1 check passed
@oSumAtrIX oSumAtrIX deleted the fix/adbshell-root-issue branch February 25, 2026 20:47
github-actions bot pushed a commit that referenced this pull request Feb 25, 2026
## [4.0.1-dev.1](v4.0.0...v4.0.1-dev.1) (2026-02-25)

### Bug Fixes

* Correctly attest artifact provenance ([93482dc](93482dc))
* Make ShellCommandRunner run without root ([#101](#101)) ([eb483ca](eb483ca))
github-actions bot pushed a commit that referenced this pull request Feb 25, 2026
## [4.0.1](v4.0.0...v4.0.1) (2026-02-25)

### Bug Fixes

* Correctly attest artifact provenance ([93482dc](93482dc))
* Make ShellCommandRunner run without root ([#101](#101)) ([eb483ca](eb483ca))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Installation fails if --install does not include device id bug: CLI can not install over wi-fi via wireless debugging

3 participants