Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump the maven group with 5 updates #24

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 18 additions & 15 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
groups:
actions:
patterns:
- "*"
- package-ecosystem: gitsubmodule
directory: /
schedule:
interval: monthly
groups:
submodule:
patterns:
- "*"
- package-ecosystem: gradle
directory: "/"
directory: /
schedule:
interval: daily
time: "21:00"
target-branch: master
registries:
- maven-google
- gradle-plugin
groups:
maven-dependencies:
maven:
patterns:
- "*"

registries:
maven-google:
type: maven-repository
url: "https://dl.google.com/dl/android/maven2/"
gradle-plugin:
type: maven-repository
url: "https://plugins.gradle.org/m2/"
39 changes: 20 additions & 19 deletions .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: "recursive"
submodules: recursive
fetch-depth: 0

- name: Write key
Expand All @@ -41,38 +41,39 @@ jobs:
fi

- name: Checkout libxposed/api
uses: actions/checkout@main
uses: actions/checkout@v4
with:
repository: libxposed/api
path: libxposed/api
ref: 54582730315ba4a3d7cfaf9baf9d23c419e07006

- name: Checkout libxposed/service
uses: actions/checkout@main
uses: actions/checkout@v4
with:
repository: libxposed/service
path: libxposed/service

- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "21"
distribution: temurin
java-version: 21

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true
uses: gradle/actions/setup-gradle@v4

- name: Grant Execute Permission for gradlew
run: chmod +x gradlew

- name: Setup ninja
uses: seanmiddleditch/gha-setup-ninja@master
uses: seanmiddleditch/gha-setup-ninja@v5
with:
version: 1.12.0
version: 1.12.1

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
version: latest

- name: Setup ccache
uses: hendrikmuhs/[email protected]
Expand Down Expand Up @@ -116,39 +117,39 @@ jobs:
unzip magisk-loader/release/LSPosed-v*-zygisk-debug.zip -d LSPosed-zygisk-debug

- name: Upload riru release
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ steps.prepareArtifact.outputs.riruReleaseName }}
path: "./LSPosed-riru-release/*"

- name: Upload riru debug
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ steps.prepareArtifact.outputs.riruDebugName }}
path: "./LSPosed-riru-debug/*"

- name: Upload zygisk release
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ steps.prepareArtifact.outputs.zygiskReleaseName }}
path: "./LSPosed-zygisk-release/*"

- name: Upload zygisk debug
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ steps.prepareArtifact.outputs.zygiskDebugName }}
path: "./LSPosed-zygisk-debug/*"

- name: Upload mappings
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: mappings
path: |
magisk-loader/build/outputs/mapping
app/build/outputs/mapping

- name: Upload symbols
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: symbols
path: build/symbols
Expand Down
8 changes: 7 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
[submodule "external/lsplant"]
path = external/lsplant
url = https://github.com/JingMatrix/LSPlant.git
[submodule "external/dobby"]
path = external/dobby
url = https://github.com/JingMatrix/Dobby.git
[submodule "external/lsplt"]
path = external/lsplt
url = https://github.com/LSPosed/LSPlt
url = https://github.com/LSPosed/LSPlt.git
[submodule "external/fmt"]
path = external/fmt
url = https://github.com/fmtlib/fmt.git
Expand All @@ -13,3 +16,6 @@
[submodule "patch/libs/manifest-editor"]
path = axml/libs/manifest-editor
url = https://github.com/WindySha/ManifestEditor.git
[submodule "external/xz-embedded"]
path = external/xz-embedded
url = https://github.com/tukaani-project/xz-embedded
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,11 @@ You can contribute translation [here](https://crowdin.com/project/lsposed_jingma
- [Magisk](https://github.com/topjohnwu/Magisk/): makes all these possible
- [Riru](https://github.com/RikkaApps/Riru): provides a way to inject code into zygote process
- [XposedBridge](https://github.com/rovo89/XposedBridge): the OG Xposed framework APIs
- [LSPlt](https://github.com/LSPosed/LSPlt): used for inline hooking
- [LSPlt](https://github.com/LSPosed/LSPlt): used for (Android 15) `libart` inline hooking
- [Dobby](https://github.com/JingMatrix/Dobby): used for fallback and `native_api` inline hooking
- [LSPlant](https://github.com/JingMatrix/LSPlant): the core ART hooking framework
- [EdXposed](https://github.com/ElderDrivers/EdXposed): fork source
- ~[Dobby](https://github.com/chiteroman/Dobby): used for inline hooking~
- [xz-embedded](https://github.com/tukaani-project/xz-embedded): decompress `.gnu_debugdata` header section of stripped `libart.so`
- ~[SandHook](https://github.com/ganyao114/SandHook/): ART hooking framework for SandHook variant~
- ~[YAHFA](https://github.com/rk700/YAHFA): previous ART hooking framework~
- ~[dexmaker](https://github.com/linkedin/dexmaker) and [dalvikdx](https://github.com/JakeWharton/dalvik-dx): to dynamically generate YAHFA hooker classes~
Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ subprojects {

externalNativeBuild {
cmake {
version = "3.28.1+"
version = "3.29.8+"
buildStagingDirectory = layout.buildDirectory.get().asFile
}
}
Expand Down Expand Up @@ -119,4 +119,4 @@ subprojects {
targetCompatibility = androidTargetCompatibility
}
}
}
}
4 changes: 2 additions & 2 deletions core/src/main/jni/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ aux_source_directory(src/xz SRC_LIST)
add_library(${PROJECT_NAME} STATIC ${SRC_LIST})

target_include_directories(${PROJECT_NAME} PUBLIC include)
target_include_directories(${PROJECT_NAME} PRIVATE src)
target_include_directories(${PROJECT_NAME} PRIVATE src ${EXTERNAL_ROOT}/xz-embedded/linux/include)

target_link_libraries(${PROJECT_NAME} PUBLIC lsplt_static lsplant_static log fmt-header-only)
target_link_libraries(${PROJECT_NAME} PUBLIC dobby_static lsplant_static lsplt_static xz_static log fmt-header-only)
target_link_libraries(${PROJECT_NAME} PRIVATE dex_builder_static)
1 change: 0 additions & 1 deletion core/src/main/jni/include/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ namespace lspd {

//#define LOG_DISABLED
//#define DEBUG
using lsplant::operator""_tstr;

inline bool constexpr Is64() {
#if defined(__LP64__)
Expand Down
4 changes: 4 additions & 0 deletions core/src/main/jni/include/elf_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ namespace SandHook {
return base != nullptr;
}

bool isStripped() const {
return debugdata_offset != 0 && debugdata_size != 0;
}

const std::string name() const {
return elf;
}
Expand Down
32 changes: 9 additions & 23 deletions core/src/main/jni/include/framework/androidfw/resource_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,31 +142,19 @@ namespace android {

using stringAtRet = expected<StringPiece16, NullOrIOError>;

CREATE_MEM_FUNC_SYMBOL_ENTRY(stringAtRet, stringAtS, void *thiz, size_t idx) {
if (stringAtSSym) {
return stringAtSSym(thiz, idx);
}
return {.var_ = unexpected<NullOrIOError>{.val_ = std::nullopt}};

};
inline static lsplant::MemberFunction<{"_ZNK7android13ResStringPool8stringAtEjPj",
"_ZNK7android13ResStringPool8stringAtEmPm"}, ResStringPool, stringAtRet (size_t)> stringAtS_;

CREATE_MEM_FUNC_SYMBOL_ENTRY(const char16_t*, stringAt, void *thiz, size_t idx,
size_t *u16len) {
if (stringAtSym) {
return stringAtSym(thiz, idx, u16len);
} else {
*u16len = 0u;
return nullptr;
}
};
inline static lsplant::MemberFunction<{"_ZNK7android13ResStringPool8stringAtEj",
"_ZNK7android13ResStringPool8stringAtEm"}, ResStringPool, const char16_t* (size_t, size_t *)> stringAt_;

StringPiece16 stringAt(size_t idx) const {
if (stringAtSym) {
if (stringAt_) {
size_t len;
const char16_t *str = stringAt(const_cast<ResStringPool *>(this), idx, &len);
const char16_t *str = stringAt_(const_cast<ResStringPool *>(this), idx, &len);
return {str, len};
} else if (stringAtSSym) {
auto str = stringAtS(const_cast<ResStringPool *>(this), idx);
} else if (stringAtS_) {
auto str = stringAtS_(const_cast<ResStringPool *>(this), idx);
if (str.has_value()) {
return {str->data_, str->length_};
}
Expand All @@ -175,9 +163,7 @@ namespace android {
}

static bool setup(const lsplant::HookHandler &handler) {
RETRIEVE_MEM_FUNC_SYMBOL(stringAt, LP_SELECT("_ZNK7android13ResStringPool8stringAtEjPj", "_ZNK7android13ResStringPool8stringAtEmPm"));
RETRIEVE_MEM_FUNC_SYMBOL(stringAtS, LP_SELECT("_ZNK7android13ResStringPool8stringAtEj", "_ZNK7android13ResStringPool8stringAtEm"));
return !stringAtSym || !stringAtSSym;
return handler.dlsym(stringAt_) || handler.dlsym(stringAtS_);
}
};

Expand Down
Loading