Home

Awesome

Introduction

This is a library used to load xposed module files.

Features

Usage

1. Add dependency to build.gradle file

This tool is published on Maven Central.

allprojects {
    repositories {
        mavenCentral()
    }
}
android {
    defaultConfig {
        ndk {
            abiFilters 'armeabi-v7a', 'arm64-v8a'
        }
    }
}

dependencies {
    implementation 'io.github.windysha:xposed_module_loader:1.0.4'
}

2. Add init code to the Application file.

    @Override
    protected void attachBaseContext(Context base) {
        List<String> list = new ArrayList<String>() {
            {
                add("/mnt/sdcard/xposed_module.apk");  // app need to hava permission read files in the sdcard.
                add("/data/data/com.storm.wind.xposed/files/xposed_module.apk");
            }
        };
        XposedModuleEntry.init(base, list);
        super.attachBaseContext(base);
    }
    @Override
    protected void attachBaseContext(Context base) {
        // all xposed module files in the dir /data/data/package_name/ will be loaded.
        XposedModuleEntry.init(base, "/data/data/package_name/");
        super.attachBaseContext(base);
    }
    @Override
    protected void attachBaseContext(Context base) {
        XposedModuleEntry.init(base);
        super.attachBaseContext(base);
    }
    @Override
    protected void attachBaseContext(Context base) {
        XposedModuleEntry.init(base, null, false);
        super.attachBaseContext(base);
    }

Applied

Early version of Xpatch use this library to load xposed modules。

Reference

SandHook

License

Copyright 2021 WindySha

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.