Skip to content

Cli auto#4

Merged
AnatolyJacobs merged 8 commits intomasterfrom
cli_auto
Feb 9, 2026
Merged

Cli auto#4
AnatolyJacobs merged 8 commits intomasterfrom
cli_auto

Conversation

@AnatolyJacobs
Copy link
Copy Markdown
Owner

No description provided.

This commit refactors the experimental CLI to establish a robust and secure foundation for command-line interaction. The previous session-based model was unintuitive, unsuitable for scripting, and has been entirely replaced.

The new design introduces a persistent, file-based PIN and restricts execution to the root user, laying the groundwork for all future CLI development.

Key Changes:

- **Persistent PIN Authentication:**
  - The CLI is now protected by a randomly generated PIN that is stored in LSPosed's configuration, surviving reboots.
  - The complex session timeout and notification-based PIN system has been completely removed.

- **Script-Friendly Credentials:**
  - Authentication is now standard and predictable, using the `--pin` command-line argument or the `LSPOSED_CLI_PIN` environment variable for convenience in scripts.

- **User-Friendly Helper Command:**
  - A `login` command has been added. It verifies the user's PIN and provides a convenient `export` command to set the environment variable for the current shell session.

(cherry picked from commit a9afab6)
A file-based PIN can be easily abused by root users.

In the future, we plan to allow shell users to run the CLI tool directly.

(cherry picked from commit b7a112f)
(cherry picked from commit 46a9674)
(cherry picked from commit 97dd064)
(cherry picked from commit 0292779)
(cherry picked from commit f031cb2)
(cherry picked from commit 40cca34)
It seems that the module application itself is no longer (by default) in its scope list.

(cherry picked from commit c600654)
@AnatolyJacobs AnatolyJacobs merged commit 7465480 into master Feb 9, 2026
1 check failed
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.

2 participants