Skip to content

Commit 211bd5f

Browse files
authored
Centralize dependencies and migrate to submodules (#512)
Centralize dependencies and migrate to submodules Move `apache` and `axml` modules to a unified `external` directory and migrate libxposed API and service interfaces from Maven dependencies to Git submodules. Included changes: - Updated .gitmodules with new paths. - Simplified core.yml CI workflow. - Updated Gradle project references to use the new directory structure. - Added documentation for external components.
1 parent e893bb0 commit 211bd5f

22 files changed

Lines changed: 77 additions & 71 deletions

.github/workflows/core.yml

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,6 @@ jobs:
4040
echo ${{ secrets.KEY_STORE }} | base64 --decode > key.jks
4141
fi
4242
43-
- name: Checkout libxposed/api
44-
uses: actions/checkout@v6
45-
with:
46-
repository: libxposed/api
47-
path: libxposed/api
48-
ref: 54582730315ba4a3d7cfaf9baf9d23c419e07006
49-
50-
- name: Checkout libxposed/service
51-
uses: actions/checkout@v6
52-
with:
53-
repository: libxposed/service
54-
path: libxposed/service
55-
5643
- name: Setup Java
5744
uses: actions/setup-java@v5
5845
with:
@@ -84,18 +71,6 @@ jobs:
8471
shell: bash
8572
run: rm -rf $ANDROID_HOME/cmake
8673

87-
- name: Build dependencies
88-
working-directory: libxposed
89-
run: |
90-
echo 'org.gradle.caching=true' >> ~/.gradle/gradle.properties
91-
echo 'org.gradle.parallel=true' >> ~/.gradle/gradle.properties
92-
echo 'org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 -XX:+UseParallelGC' >> ~/.gradle/gradle.properties
93-
echo 'android.native.buildOutput=verbose' >> ~/.gradle/gradle.properties
94-
cd api
95-
./gradlew publishToMavenLocal
96-
cd ../service
97-
./gradlew publishToMavenLocal
98-
9974
- name: Build with Gradle
10075
run: |
10176
./gradlew zipAll

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
apache/local/generated
21
.project
32
.settings
43
.cache
@@ -7,6 +6,6 @@ apache/local/generated
76
/local.properties
87
/.idea
98
.DS_Store
10-
/build
9+
build
1110
/captures
1211
bin/

.gitmodules

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,21 @@
77
[submodule "external/fmt"]
88
path = external/fmt
99
url = https://github.com/fmtlib/fmt.git
10-
[submodule "patch/libs/manifest-editor"]
11-
path = axml/libs/manifest-editor
12-
url = https://github.com/JingMatrix/ManifestEditor.git
1310
[submodule "external/xz-embedded"]
1411
path = external/xz-embedded
15-
url = https://github.com/tukaani-project/xz-embedded
16-
[submodule "apache/commons-lang"]
17-
path = apache/commons-lang
18-
url = https://github.com/apache/commons-lang
12+
url = https://github.com/tukaani-project/xz-embedded.git
1913
[submodule "external/lsplt"]
2014
path = external/lsplt
2115
url = https://github.com/JingMatrix/LSPlt
16+
[submodule "services/libxposed"]
17+
path = services/libxposed
18+
url = https://github.com/libxposed/service.git
19+
[submodule "xposed/libxposed"]
20+
path = xposed/libxposed
21+
url = https://github.com/libxposed/api.git
22+
[submodule "external/apache/commons-lang"]
23+
path = external/apache/commons-lang
24+
url = https://github.com/apache/commons-lang.git
25+
[submodule "external/axml/manifest-editor"]
26+
path = external/axml/manifest-editor
27+
url = https://github.com/JingMatrix/ManifestEditor.git

apache/commons-lang

Lines changed: 0 additions & 1 deletion
This file was deleted.

axml/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

axml/libs/manifest-editor

Lines changed: 0 additions & 1 deletion
This file was deleted.

core/build.gradle.kts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,12 @@ copy {
5656
}
5757

5858
dependencies {
59-
api(libs.libxposed.api)
60-
implementation(projects.apache)
61-
implementation(projects.axml)
59+
api(projects.xposed)
60+
implementation(projects.external.apache)
61+
implementation(projects.external.axml)
6262
implementation(projects.hiddenapi.bridge)
6363
implementation(projects.services.daemonService)
6464
implementation(projects.services.managerService)
65-
implementation(projects.xposed)
6665
compileOnly(libs.androidx.annotation)
6766
compileOnly(projects.hiddenapi.stubs)
6867
}

daemon/build.gradle.kts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,8 @@ android.applicationVariants.all {
114114
}
115115

116116
dependencies {
117-
implementation(libs.libxposed.`interface`)
118117
implementation(libs.agp.apksig)
119-
implementation(projects.apache)
118+
implementation(projects.external.apache)
120119
implementation(projects.hiddenapi.bridge)
121120
implementation(projects.services.daemonService)
122121
implementation(projects.services.managerService)

external/CMakeLists.txt

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
project(external)
2-
3-
macro(SET_OPTION option value)
4-
set(${option} ${value} CACHE INTERNAL "" FORCE)
5-
endmacro()
1+
cmake_minimum_required(VERSION 3.10)
62

7-
SET_OPTION(Plugin.SymbolResolver OFF)
8-
SET_OPTION(FMT_INSTALL OFF)
3+
project(external)
94

105
set(XZ_SOURCES
116
xz_crc32.c
@@ -19,7 +14,10 @@ add_library(xz_static STATIC ${XZ_SOURCES})
1914
target_compile_options(xz_static PRIVATE -DXZ_USE_CRC64)
2015
target_include_directories(xz_static PRIVATE ${XZ_INCLUDES})
2116

22-
OPTION(LSPLANT_BUILD_SHARED OFF)
17+
option(LSPLANT_BUILD_SHARED OFF)
18+
option(Plugin.SymbolResolver OFF)
19+
option(FMT_INSTALL OFF)
20+
2321
add_subdirectory(dobby)
2422
add_subdirectory(fmt)
2523
add_subdirectory(lsplant/lsplant/src/main/jni)

external/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# External Dependencies
2+
3+
This directory contains all the external dependencies required to build the Vector framework.
4+
They are included as git submodules to ensure version consistency and timely updating.
5+
6+
## Native dependencies
7+
8+
- [Dobby](https://github.com/JingMatrix/Dobby):
9+
A lightweight, multi-platform inline hooking framework. It serves as the backend for all native function hooking (`HookInline`).
10+
11+
- [fmt](https://github.com/fmtlib/fmt):
12+
A modern formatting library used for high-performance, type-safe logging throughout the native code.
13+
14+
- [LSPlant](https://github.com/JingMatrix/LSPlant):
15+
A hooking framework for the Android Runtime (ART). It provides the core functionality for intercepting and modifying Java methods.
16+
17+
- [xz-embedded](https://github.com/tukaani-project/xz-embedded):
18+
A lightweight data compression library with a small footprint. It is used by the ELF parser to decompress the `.gnu_debugdata` section of stripped native libraries.
19+
20+
- [LSPlt](https://github.com/JingMatrix/LSPlt):
21+
A library for PLT (Procedure Linkage Table) hooking. It is used in the `dex2oat` sub-project to bypass a detection point. **Note:** This is included as a submodule for project convenience but is not compiled into the `external` C++ library itself.
22+
23+
## Java libraries
24+
25+
- [apache/commons-lang](https://github.com/apache/commons-lang):
26+
A package of Java utility classes for the classes that are in java.lang's hierarchy. Some classes are renamed and then used to implement the `XposedHelpers` API.
27+
28+
- [axml/manifest-editor](https://github.com/JingMatrix/ManifestEditor):
29+
A a tool used to modify Android Manifest binary file. It is to parse manifestation files of Xposed modules.
30+

0 commit comments

Comments
 (0)