Skip to content

Comments

Add getRunningTargets API#13

Open
Dr-TSNG wants to merge 4 commits intomasterfrom
running
Open

Add getRunningTargets API#13
Dr-TSNG wants to merge 4 commits intomasterfrom
running

Conversation

@Dr-TSNG
Copy link
Contributor

@Dr-TSNG Dr-TSNG commented Feb 22, 2026

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new binder API to retrieve currently running hooked target processes from the Xposed framework/service interface.

Changes:

  • Introduce getRunningTargets() to the IXposedService AIDL interface.
  • Add a new AIDL parcelable HookedProcess to represent running process metadata.
  • Expose getRunningTargets() on the XposedService client wrapper.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
service/src/main/java/io/github/libxposed/service/XposedService.java Adds a client-facing wrapper method calling the new binder API.
interface/src/main/aidl/io/github/libxposed/service/IXposedService.aidl Extends the binder interface with getRunningTargets() returning List<HookedProcess>.
interface/src/main/aidl/io/github/libxposed/service/HookedProcess.aidl Introduces a structured parcelable representing a hooked process (package/pid/uid/upToDate).
Comments suppressed due to low confidence (2)

service/src/main/java/io/github/libxposed/service/XposedService.java:273

  • getRunningTargets() is a new public API but it lacks Javadoc, while the surrounding public methods in XposedService are documented. Please add a brief Javadoc describing what a “running target” is, what HookedProcess.upToDate means, and what exceptions/caller expectations are.
    @NonNull
    public List<HookedProcess> getRunningTargets() {
        try {
            return mService.getRunningTargets();
        } catch (RemoteException e) {
            throw new ServiceException(e);
        }
    }

service/src/main/java/io/github/libxposed/service/XposedService.java:270

  • This method is annotated @NonNull but returns the binder result directly without a null check. Since AIDL can return null lists, this can violate the nullness contract and lead to NPEs downstream; either enforce non-null by checking for null and throwing a ServiceException, or mark the method @Nullable.
    public List<HookedProcess> getRunningTargets() {
        try {
            return mService.getRunningTargets();
        } catch (RemoteException e) {

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

1 participant