Git Product home page Git Product logo

service's Introduction

service

This repository consists of the communication interface between Xposed framework and module app noumena.

service's People

Contributors

5ec1cff avatar dr-tsng avatar howard20181 avatar yujincheng08 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

service's Issues

[Proposal] Implementation

We are working on this API with @canyie and @tiann.

Description

We are proposing an API that allows Xposed modules to communicate with the Xposed framework. For modules to this API, they have to implementation-ly depend on us.

We will provide an aidl interface for modules to RPC framework's methods. Modules can get an implementation of such an aidl interface by calling a static method. Let say its name is IXpoedService getService(), where we will grab the binder from the framework.

Framework Implementation

Root Framework

Two options to get the binder for root frameworks:

  • Most modules will hook themselves to get the hook status. So for the root framework, putting the binder to a static field of modules' classloader is a stable way. And getService can directly return the binder.
  • Or, we can hook getService to return the binder.

Non-root framework

To get the binder from another app, the only way is to use ContentProvider. Thus, for non-root frameworks to provide such an API, they have to register a content provider with a certain authority: say io.github.xposed-service. Then we can get the content provider can use call to binder from the framework.
HOWEVER, using a content provider requires context, which is not available before binding the application. For non-root frameworks, I supposed they are loading framework after Application is created.

To sum up, the getService should look like:

IXPosedService getService() {
    if (sService != null) return sService; // For the first option of root framework, it should always be the case.
    sService = getFromContentProvider(); // For non-root framework, get it from content provider.
    return sService;
}

API Implementation

A brief aidl API is proposed as:

parcelable Application {
    String packageName;
    int userId;
}

interface IXposedService {
    const String FEATURE_X = "xposed.feature.x"; // some constants

    int getXposedApi(); // 89 for example
    String getFrameworkName(); // LSPosed for example
    String getFrameworkVersionName(); // v1 for example
    int getFrameworkVersionCode(); // 233 for example
    
    List<String> getSupportedFeatures(); // ["x"] for example. Should match predefined constants
    bool isFeatureSupported(String); // pass predefined constants to it
 
    XRemoteSharedPreference getRemoteSharedPreference(String name); // An alternative to XSharedPreference

    List<Application> getScope(); // Scopes of the modules. ["android", "com.android.systemui"] for example.
                                            // How about returning PackageInfo instead?
    bool setScope(List<Application>); // Set scopes to provided package names. Futher user confirm is required.
                                                  // return false only if framework fails to pop confirm windows.
                                                  // Should a callback provided?
    // For modules targeting API 30+, it's hard for them to query all packages from all users.
    // Maybe we can provide an interface to help them?


    // Other interface suggestions are welcome.
}

Hello, why can't I index this library in Android Studio?

@yujincheng08
Hello, why can't I index this library in Android Studio?

The previous Could not find io.github.libxposed:api:100 also had a similar error, but I found the warehouse file in the actions of https://github.com/libxposed/api and downloaded it to my local warehouse. I don't know how to solve the problem of io.github.libxposed:service-interface:100, hope to get your reply!

Error message:
Configuration cache state could not be cached: field importDirs of task :daemon:compileDebugAidl of type com.android.build.gradle.tasks.AidlCompile: error writing value of type 'org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection'

Could not resolve all files for configuration ':daemon:debugCompileClasspath'.
Could not find io.github.libxposed:service-interface:100.
Required by:
project :daemon

Can not implement the Xposed Interface in the project on Android Studio

Description
When we use the android studio to build the project that throws out an error about Xposed Interface can not be resolved, please look at the screenshot below:
image

I'm a beginner on about the java language, that would be grateful if you guys can figure it out for me please with this project.
Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.