Commit Graph

3011 Commits

Author SHA1 Message Date
JingMatrix cdc536f10b Adapt LSPosedBridge to convention-based hooker discovery (#534)
We update `LSPosedBridge` to align with upstream API changes, which have replaced annotation-based hooker discovery with a naming convention.

The `doHook` implementation has been refactored to:
- Remove dependencies on the deleted `io.github.libxposed.api.annotations` package (`XposedHooker`, `BeforeInvocation`, `AfterInvocation`).
- Scan for public static methods explicitly named `before` and `after` instead of relying on annotations.
- Enforce validation on these named methods to ensure they match the required signatures.

To adapt to this change, existing Hooker classes are refactored by removing the deprecated annotations and renaming their callback methods to `before` and `after` respectively.

Co-authored-by: frknkrc44 <krc440002@gmail.com>
2026-02-14 16:03:50 +01:00
JingMatrix ea71745430 Implement constructor invocation APIs in LSPosedContext (#533)
Unlike the existing `newInstance` variants which allocate and return a new object, these new APIs execute constructor logic on an existing, pre-allocated instance (`thisObject`). This separation of allocation and initialization allows for invoking original or super constructors within hook callbacks where the object reference is already established.

The implementation leverages the existing JNI `HookBridge` methods, as `invokeOriginalMethod` and `invokeSpecialMethod` already support void-return signatures required for constructor execution.

Co-authored-by: frknkrc44 <krc440002@gmail.com>
2026-02-14 16:02:02 +01:00
JingMatrix aed70305b9 Release LSPosed v1.11.0 2026-01-31 23:41:39 +01:00
JingMatrix 3540f14481
Gracefully handle ENOTSUP in ConfigFileManager.chattr0 (#523)
The `chattr0` method, which attempts to clear special file attributes (like 'i' for immutable) using `ioctl`, can fail with an `ErrnoException` and the error code `ENOTSUP` (Operation not supported) on certain filesystems or Android environments (e.g., noted on a Android 11 device).

When `ioctl` fails with `ENOTSUP`, it means the underlying filesystem does not support the operation of setting/clearing these attributes. In this case, we can safely assume the file/directory is not immutable via this mechanism and treat the operation as a successful non-action.

This commit updates `chattr0` to catch `ErrnoException` specifically and return `true` if the error is `OsConstants.ENOTSUP`, preventing unexpected failures in config file management.
2026-01-31 15:51:03 +01:00
JingMatrix 047ad98c65
Fix dex2oat crash on Android 10 due to architecture mismatch (#521)
Previously, the daemon determined the architecture of the target `dex2oat` binary based on its own process architecture (`Process.is64Bit()`).
On Android 10, `/apex/com.android.runtime/bin/dex2oat` is frequently a 32-bit binary, even on 64-bit devices.

This caused the daemon to incorrectly treat the target as 64-bit and mount the 64-bit wrapper (`bin/dex2oat64`). Consequently, the wrapper attempted to execute the 32-bit binary using `linker64`, resulting in a crash: `error: "/apex/.../dex2oat" is 32-bit instead of 64-bit`

This commit changes the logic to inspect the ELF header of the target binary. We now explicitly check `e_ident[EI_CLASS]` to determine if the file is 32-bit or 64-bit and assign it to the correct mounting slot. This ensures the 32-bit wrapper is mounted over 32-bit targets, preventing the linker mismatch.
2026-01-28 18:07:00 +01:00
JingMatrix 1436f692fb
Refactor dex2oat wrapper to solve long-standing issues (#515)
Manual library path injection via LD_LIBRARY_PATH has become unreliable due to symbol mismatches in core libraries (e.g., `libc++`) between the system and APEX partitions. Recent updates to `liblog` and `libbase` (in Android 16) have resulted in missing symbols like `__hash_memory` or `fmt` when the ART APEX binaries are forced to load system-partition shims.

This commit switches the wrapper to execute the runtime APEX linker directly (e.g., `/apex/com.android.runtime/bin/linker64`). By passing the dex2oat binary to the linker via `/proc/self/fd/`, the linker can properly initialize internal namespaces and resolve dependencies from the correct APEX and bootstrap locations.

Moreover, for the OatHeader hook, a bug introduced in 6703b45350 is now fixed, where the target functions of PLT hooks are overwritten by the our helper functions.

Details of the refactored project are explained in README.
2026-01-25 10:13:57 +01:00
JingMatrix 211bd5f115
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.
2026-01-22 15:13:06 +01:00
JingMatrix e893bb0f28
Add `--system-server-max-retry` argument in service mode (#511)
User reports that system server injection can still fail even when the daemon is started in service mode.

Hence, we add argument `--system-server-max-retry=3` to address this problem.
2026-01-21 23:24:38 +01:00
JingMatrix 4cec46a074 Fix and refactor DexParser implementation (#509)
In the LSPosedDexParser constructor, the methodIds array is allocated correctly, but the loop condition is wrong: its length is divided by 3 twice.

We rewrite this class in Kotlin, marking the first commit of refactoring LSPosed into Vector.

Co-authored-by: Willian Wang <git@willian.wang>
2026-01-21 18:12:25 +01:00
dev 402d3984d3
Add `r--p` fallback pattern lookup of libart.so base for Android 10 (#497)
- When the Step 2 (r-xp) mode is not found, implement the lookup logic to fall back to the first r--p segment
- On android 10 Step 1 to Step 2 doesn't match any pattern, but r--p does have a libart.so address

- Log
findModuleBase(): Found 4 filtered map entries for libart.so:
findModuleBase():   0x70991e8000 r--p /apex/com.android.runtime/lib64/libart.so
findModuleBase():   0x7099327000 --xp /apex/com.android.runtime/lib64/libart.so
findModuleBase():   0x70997de000 rw-p /apex/com.android.runtime/lib64/libart.so
findModuleBase():   0x70997e1000 r--p /apex/com.android.runtime/lib64/libart.so
findModuleBase(): `r--p` -> `r-xp` pattern not found. Falling back to first `r-xp` entry.
findModuleBase(): `r-xp` pattern not found. Falling back to first `r--p` entry.
findModuleBase(): Found first `r--p` block at 0x70991e8000
findModuleBase(): get module base /apex/com.android.runtime/lib64/libart.so: 0x70991e8000
findModuleBase(): update path: /apex/com.android.runtime/lib64/libart.so
2026-01-18 23:56:46 +01:00
JingMatrix b6fb2f7855
[translation] Update translation from Crowdin (#503)
* New translations strings.xml (Japanese)

* New translations strings.xml (Japanese)

* New translations strings.xml (Swedish)
2026-01-15 21:50:16 +01:00
dependabot[bot] e9cb36b267 Update dependencies 2026-01-09 15:45:19 +01:00
JingMatrix 0e457e3247 Start LSPosed daemon in `service.sh`
This reverts partially commit c622d0f1f9.

In my test device (Pixel 6, Android 16 qpr2, KernelSU), calling twice LSPosed daemon results a detection based on `mount_id` values. In `com.reveny.nativecheck` 7.6.1, it is named as `Detected Magic Mount`.
Of course, this naming is incorrect and misleading. We refer to https://github.com/JingMatrix/NeoZygisk/pull/39 for details of this detection point.
2025-12-04 23:59:55 +01:00
JingMatrix f5af5690f5
Add LoadedApk callers to deoptimize list (#414)
This commit attempts to resolve an issue reported by users on recent OnePlus software updates where LSPosed modules are no longer able to hook the `Application#attach` method.

Android Runtime (ART) on these devices has become more aggressive with method inlining. This optimization can cause the relatively small `Application#attach` method to be directly embedded into its (indirect) calling methods, which makes it invisible to the hooking framework.

This approach is adapted from a reportedly successful commit in a community fork (LSPosed-Irena). It identifies `makeApplication` and `makeApplicationInner` within the `android.app.LoadedApk` class as the key callers to deoptimize. By adding these methods to the `BOOT_IMAGE` list, the goal is to prevent ART from inlining them, thus preserving `Application#attach` as a distinct and hookable method.

Co-authored-by: Irena <140869597+re-zero001@users.noreply.github.com>
2025-11-11 09:39:49 +01:00
JingMatrix 487e835559 Properly set SELinux context after reboot
After reboot, the SELinux context labels for files located in `/data/adb` are reset to `u:object_r:adb_data_file:s0`.

To fully address the issue in ed1f61d2, we should always compare the SELinux context and reset it when necessary.
2025-11-08 20:17:05 +01:00
JingMatrix b270bd55df
[translation] Update translation from Crowdin (#343) 2025-11-08 17:24:32 +01:00
JingMatrix ed1f61d26e Fix SELinux context for Xposed API 100
Files in `/data/adb/lspd/modules/` should be accessible via xposed API `openRemoteFile`.
Close #381 and #466 as fixed.
2025-11-08 16:54:34 +01:00
JingMatrix 31e19069e4
Invoke dexopt via command line (#445)
Starting with Android 14 (API level 34), the Android Runtime (ART) Service handles on-device Ahead-Of-Time (AOT) compilation, also known as `dexopt`.
As a result, in Android 16 beta qpr2, the method `performDexOptMode` is removed.

See https://source.android.com/docs/core/runtime/configure/package-manager for details.
2025-11-08 15:58:32 +01:00
JingMatrix c622d0f1f9 Start service daemon in post-fs-data.sh (#429)
For trace cleaning modules to work properly, such as the DenyList feature of NeoZygisk, it is better to execute modules mount (`dex2oat` for the case of LSPosed) at post-fs-data.sh.

Moreover, the `logd` daemon of LSPosed should start as early as possible.

This reverts commit 92cbed418e (pull-request #57).

The original pull-request claimed a `PlayIntegrityFix` break, but was not reproducible on other devices.
2025-11-08 11:59:16 +01:00
JingMatrix e7018a3b87 Collect logs for TEESimulator
Simplify the process of debugging https://github.com/JingMatrix/TEESimulator
2025-11-08 11:59:16 +01:00
JingMatrix 0044a36fcf Update dependencies
When upgrading to gradle 9 +, we remove several unused tasks for development to simplify the process.

Close #385, #441, #445, #448, #462 as merged.
2025-11-08 11:56:08 +01:00
JingMatrix 2666bdad2d
Correct database migration and initialization logic (#236)
Reworks the `initDB` function to resolve critical failures.

- Prevents a "no such table: configs" crash on fresh installs by
  deferring the compilation of CREATE TABLE statements until their
  dependencies are met.
- Fixes a "duplicate column" error by correcting the initial schema
  and letting migration logic add new columns.
- Replaces the fragile fall-through switch and nested transactions with a
  robust, sequential upgrade process inside a single atomic transaction.
2025-09-14 17:21:14 +02:00
JingMatrix 6703b45350
Fix oat_hook for recent Android versions (#387)
We used to hook functions `OatHeader::GetKeyValueStore` and `OatHeader::GetKeyValueStoreSize` to clean the `dex2oat` trace introduced by LSPosed. However, in recent versions of Android, these two functions are no longer exported. Moreover, the `OatHeader` structure has changed, which now sets certain entries to have fixed length by padding zeros.

To address these two changes, we hook `OatHeader::ComputeChecksum` as an entrypoint (fallback), and then employ the header file of `OatHeader` copied from AOSP to precisely locate its fields. Using this strategy, we modify `key_value_store` in memory, depending on whether the entry `dex2oat-cmdline` is padded.
2025-08-09 07:36:44 +02:00
JingMatrix e75b6007b4
Make module base address parsing robust (#376)
Resolves a `SIGSEGV` crash that occurs when co-instrumenting with recent versions of Frida.

The root cause was that the previous parsing logic would select the first memory mapping matching the library name. When Frida is active, it can temporarily create a transient, read-only mapping at a lower address than the real library. This would cause our parser to select the wrong base address.

This commit refactors the `findModuleBase` function to be structurally aware. It now filters all mappings for the target library and specifically searches for the pattern of a read-only (`r--p`) segment immediately followed by an executable (`r-xp`) segment. This allows it to correctly identify the real library mapping and ignore transient artifacts from other instrumentation frameworks.
2025-08-01 20:40:43 +02:00
dependabot[bot] 1e5c3f0ffd Update dependencies
JingMatrix/LSPlant is forced pushed to avoid merging commits from its upstream LSPosed/LSPlant.
2025-08-01 20:38:56 +02:00
Qing_Feng 108149b6b7
Remove WebUI integration (#345)
Having a WebUI simply duplicating the current function of the Action button is unnecessary.

Since most users are migrated to root implementations which realize the Action button feature, we revert commit f8409ad34b to remove the WebUI integration of LSPosed.
2025-07-21 07:37:52 +02:00
Furkan Karcıoğlu 2293acbe27
Fix support for Android 16 QPR Beta 3 (#326)
The function signature of `getUsers` in class `android.os.IUserManager` is changed to `getUsers(Z)Ljava/util/List;` in Android 16 QPR Beta 3.

The corresponding calls to this function are updated to fix this incompatibility, which was initially observed on Android Canary.
2025-07-18 04:42:14 +02:00
JingMatrix 5e040f97e8 Fix typo in update/zygisk.json
Close #347 as completed.
2025-07-13 23:56:24 +02:00
JingMatrix f081aa3899
Fix packaging bugs of LSPosed v1.10.2 (#341)
1. Magisk manager cuts off the full changelog, it is thus better to move my personal note to the end. Add emoji for easier understanding.
2. Fix locating the generated javascript file. In Parcel 2, this file now has prefix `generate`.
3. Fix the author name, use JingMatrix for accuracy.
2025-07-13 01:32:45 +02:00
JingMatrix 06abb8a7bc Release LSPosed v1.10.2 2025-07-12 11:30:46 +02:00
JingMatrix d625e00b6e Update dependencies
1. Parcel 1 is deprecated, see https://www.npmjs.com/package/parcel-bundler.
2. `com.android.application` 8.11.1 requires Gradle 8.13+
2025-07-12 08:07:01 +02:00
JingMatrix 3d9d08cfd3 Update dependencies and CI packages
Merge of pull-requests: #238 #243 #248

Co-authored-by: ugurcan <uurcan70@gmail.com>
2025-04-15 09:36:09 +02:00
JingMatrix 52f84ea24a Update translation from Crowdin (#195) 2025-04-15 09:19:51 +02:00
JingMatrix 8f1ae22905 Deselect all apps when module scope is empty
UI should reflect correctly current module scope.
Fix the problem that after clicking on menu_select_none, recommended apps are still checked even though the scope database is already updated.

This bug was introduced due to the inconsistent designs in 1339fc7d3c and 7be4e66b98.
2025-03-28 10:16:13 +01:00
dependabot[bot] 4271d8d4fe
Bump the maven group across 1 directory with 5 updates (#230)
Bumps the maven group with 5 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| androidx.navigation:navigation-fragment | `2.8.8` | `2.8.9` |
| androidx.navigation:navigation-ui | `2.8.8` | `2.8.9` |
| androidx.navigation.safeargs | `2.8.8` | `2.8.9` |
| [org.jetbrains.kotlin:kotlin-stdlib](https://github.com/JetBrains/kotlin) | `2.1.10` | `2.1.20` |
| [org.jetbrains.kotlin.android](https://github.com/JetBrains/kotlin) | `2.1.10` | `2.1.20` |



Updates `androidx.navigation:navigation-fragment` from 2.8.8 to 2.8.9

Updates `androidx.navigation:navigation-ui` from 2.8.8 to 2.8.9

Updates `androidx.navigation.safeargs` from 2.8.8 to 2.8.9

Updates `androidx.navigation:navigation-ui` from 2.8.8 to 2.8.9

Updates `org.jetbrains.kotlin:kotlin-stdlib` from 2.1.10 to 2.1.20
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v2.1.10...v2.1.20)

Updates `org.jetbrains.kotlin.android` from 2.1.10 to 2.1.20
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v2.1.10...v2.1.20)

Updates `org.jetbrains.kotlin.android` from 2.1.10 to 2.1.20
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v2.1.10...v2.1.20)

Updates `androidx.navigation.safeargs` from 2.8.8 to 2.8.9

---
updated-dependencies:
- dependency-name: androidx.navigation:navigation-fragment
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
- dependency-name: androidx.navigation:navigation-ui
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
- dependency-name: androidx.navigation.safeargs
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
- dependency-name: androidx.navigation:navigation-ui
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
- dependency-name: org.jetbrains.kotlin.android
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
- dependency-name: org.jetbrains.kotlin.android
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
- dependency-name: androidx.navigation.safeargs
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-24 19:38:16 +01:00
Steven Xu 90d3712c6e
Follow system settings of animation scales (#222)
1. Remove animations brought by `smoothScroll` of [TabLayoutMediator](https://developer.android.com/reference/com/google/android/material/tabs/TabLayoutMediator#TabLayoutMediator(com.google.android.material.tabs.TabLayout,%20androidx.viewpager2.widget.ViewPager2,%20boolean,%20boolean,%20com.google.android.material.tabs.TabLayoutMediator.TabConfigurationStrategy)).
2. Use default NavOptions constructor to clear previously defined animations. To navigate without animations, the value for arguments of type @AnimatorRes should be -1.

Co-authored-by: JingMatrix <jingmatrix@gmail.com>
2025-03-14 14:11:41 +01:00
JingMatrix b384321cb2 Adapt to the restructure of lsplant
Update submodule JingMatrix/LSPlant
2025-03-07 07:27:43 +01:00
JingMatrix 165ad94bf9 Adjust logs for dex2oat
1. Log dex2oat for debugging purpose
2. Avoid log formatting warning of type `dev_t` since it could be `%lu`
   or `%u`
3. Reformat changed files
2025-03-07 07:13:35 +01:00
dependabot[bot] 3cdf5ac345 Update dependencies
JingMatrix/LSPlt is updated to sync with upstream.

Bump seanmiddleditch/gha-setup-ninja from 5 to 6 in the actions group (#211)

Bumps the actions group with 1 update: [seanmiddleditch/gha-setup-ninja](https://github.com/seanmiddleditch/gha-setup-ninja).

Updates `seanmiddleditch/gha-setup-ninja` from 5 to 6
- [Release notes](https://github.com/seanmiddleditch/gha-setup-ninja/releases)
- [Commits](https://github.com/seanmiddleditch/gha-setup-ninja/compare/v5...v6)

---
updated-dependencies:
- dependency-name: seanmiddleditch/gha-setup-ninja
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Bump the maven group with 8 updates (#210)

Bumps the maven group with 8 updates:

| Package | From | To |
| --- | --- | --- |
| androidx.activity:activity | `1.10.0` | `1.10.1` |
| androidx.constraintlayout:constraintlayout | `2.2.0` | `2.2.1` |
| androidx.navigation:navigation-fragment | `2.8.7` | `2.8.8` |
| androidx.navigation:navigation-ui | `2.8.7` | `2.8.8` |
| androidx.navigation.safeargs | `2.8.7` | `2.8.8` |
| com.android.tools.build:apksig | `8.8.1` | `8.8.2` |
| com.android.library | `8.8.1` | `8.8.2` |
| com.android.application | `8.8.1` | `8.8.2` |

Updates `androidx.activity:activity` from 1.10.0 to 1.10.1

Updates `androidx.constraintlayout:constraintlayout` from 2.2.0 to 2.2.1

Updates `androidx.navigation:navigation-fragment` from 2.8.7 to 2.8.8

Updates `androidx.navigation:navigation-ui` from 2.8.7 to 2.8.8

Updates `androidx.navigation.safeargs` from 2.8.7 to 2.8.8

Updates `androidx.navigation:navigation-ui` from 2.8.7 to 2.8.8

Updates `com.android.tools.build:apksig` from 8.8.1 to 8.8.2

Updates `com.android.library` from 8.8.1 to 8.8.2

Updates `com.android.application` from 8.8.1 to 8.8.2

Updates `com.android.library` from 8.8.1 to 8.8.2

Updates `com.android.application` from 8.8.1 to 8.8.2

Updates `androidx.navigation.safeargs` from 2.8.7 to 2.8.8

---
updated-dependencies:
- dependency-name: androidx.activity:activity
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
- dependency-name: androidx.constraintlayout:constraintlayout
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
- dependency-name: androidx.navigation:navigation-fragment
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
- dependency-name: androidx.navigation:navigation-ui
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
- dependency-name: androidx.navigation.safeargs
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
- dependency-name: androidx.navigation:navigation-ui
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
- dependency-name: com.android.tools.build:apksig
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
- dependency-name: com.android.library
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
- dependency-name: com.android.application
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
- dependency-name: com.android.library
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
- dependency-name: com.android.application
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
- dependency-name: androidx.navigation.safeargs
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Bump the submodule group with 2 updates (#212)

Bumps the submodule group with 2 updates: [external/fmt](https://github.com/fmtlib/fmt) and [apache/commons-lang](https://github.com/apache/commons-lang).

Updates `external/fmt` from `c9267da` to `577fd3b`
- [Release notes](https://github.com/fmtlib/fmt/releases)
- [Commits](c9267da4df...577fd3be88)

Updates `apache/commons-lang` from `899358b` to `fb42e80`
- [Commits](899358bb3f...fb42e80e92)

---
updated-dependencies:
- dependency-name: external/fmt
  dependency-type: direct:production
  dependency-group: submodule
- dependency-name: apache/commons-lang
  dependency-type: direct:production
  dependency-group: submodule
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

roll back lsplant

Bump the maven group with 3 updates (#216)

Bumps the maven group with 3 updates: com.android.tools.build:apksig, com.android.library and com.android.application.

Updates `com.android.tools.build:apksig` from 8.8.2 to 8.9.0

Updates `com.android.library` from 8.8.2 to 8.9.0

Updates `com.android.application` from 8.8.2 to 8.9.0

Updates `com.android.library` from 8.8.2 to 8.9.0

Updates `com.android.application` from 8.8.2 to 8.9.0

---
updated-dependencies:
- dependency-name: com.android.tools.build:apksig
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: maven
- dependency-name: com.android.library
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: maven
- dependency-name: com.android.application
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: maven
- dependency-name: com.android.library
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: maven
- dependency-name: com.android.application
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: maven
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-07 07:13:34 +01:00
JingMatrix bfa38b0d53 Fix liboat_hook.so inaccessible in some device (#190)
User has reported `dex2oat` failure with SELinux log:

```
W dex2oat64: type=1400 audit(0.0:922): avc: denied { read } for path="/data/adb/modules/zygisk_lsposed/bin/liboat_hook64.so" dev="dm-58" ino=91204 scontext=u:r:dex2oat:s0 tcontext=u:object_r:adb_data_file:s0 tclass=file permissive=0
```

Hence, we now set the SELinux context of `liboat_hook.so` in Dex2OatService.

Moreover, by the pull-request #194, we have to move `putenv` out of the if block by testing.
Indeed, if we call `putenv` inside the if block, then it is no longer valid out of the block.
2025-02-23 09:30:36 +01:00
JingMatrix f8236f607b Update LSPLant (#188)
1. Close #159 as fixed, though it points to the removal of warning `Unsupported class loader`, for which we can do later.
2. Take the commit from JingMatrix/LSPlant to fix the bug https://github.com/JingMatrix/LSPlant/issues/2.
3. Add another commit of JingMatrix/LSPlant in pull-request #203
2025-02-23 09:28:38 +01:00
JingMatrix 669c13f912 Update Issues templates 2025-02-23 09:28:38 +01:00
dependabot[bot] 9747e97a0d Update dependencies
Also fix upstream url for the submodule ManifestEditor, since #176 is pulling updates from WindySha/ManifestEditor.

Bump the maven group across 1 directory with 6 updates (#186)

Bumps the maven group with 6 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| androidx.fragment:fragment | `1.8.5` | `1.8.6` |
| androidx.navigation:navigation-fragment | `2.8.6` | `2.8.7` |
| androidx.navigation:navigation-ui | `2.8.6` | `2.8.7` |
| androidx.navigation.safeargs | `2.8.6` | `2.8.7` |
| androidx.swiperefreshlayout:swiperefreshlayout | `1.2.0-alpha01` | `1.2.0-beta01` |
| [org.lsposed.hiddenapibypass:hiddenapibypass](https://github.com/LSPosed/AndroidHiddenApiBypass) | `6.0` | `6.1` |

Updates `androidx.fragment:fragment` from 1.8.5 to 1.8.6

Updates `androidx.navigation:navigation-fragment` from 2.8.6 to 2.8.7

Updates `androidx.navigation:navigation-ui` from 2.8.6 to 2.8.7

Updates `androidx.navigation.safeargs` from 2.8.6 to 2.8.7

Updates `androidx.navigation:navigation-ui` from 2.8.6 to 2.8.7

Updates `androidx.swiperefreshlayout:swiperefreshlayout` from 1.2.0-alpha01 to 1.2.0-beta01

Updates `org.lsposed.hiddenapibypass:hiddenapibypass` from 6.0 to 6.1
- [Commits](https://github.com/LSPosed/AndroidHiddenApiBypass/compare/v6.0...v6.1)

Updates `androidx.navigation.safeargs` from 2.8.6 to 2.8.7

---
updated-dependencies:
- dependency-name: androidx.fragment:fragment
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
- dependency-name: androidx.navigation:navigation-fragment
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
- dependency-name: androidx.navigation:navigation-ui
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
- dependency-name: androidx.navigation.safeargs
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
- dependency-name: androidx.navigation:navigation-ui
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
- dependency-name: androidx.swiperefreshlayout:swiperefreshlayout
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
- dependency-name: org.lsposed.hiddenapibypass:hiddenapibypass
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: maven
- dependency-name: androidx.navigation.safeargs
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Bump the maven group with 3 updates (#187)

Bumps the maven group with 3 updates: com.android.tools.build:apksig, com.android.library and com.android.application.

Updates `com.android.tools.build:apksig` from 8.8.0 to 8.8.1

Updates `com.android.library` from 8.8.0 to 8.8.1

Updates `com.android.application` from 8.8.0 to 8.8.1

Updates `com.android.library` from 8.8.0 to 8.8.1

Updates `com.android.application` from 8.8.0 to 8.8.1

---
updated-dependencies:
- dependency-name: com.android.tools.build:apksig
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
- dependency-name: com.android.library
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
- dependency-name: com.android.application
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
- dependency-name: com.android.library
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
- dependency-name: com.android.application
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-14 19:55:12 +01:00
JingMatrix 209a5417ec
Allow dex2oat to access files received from sockets (#165)
On some devices `dex2oat` cannot access files (fd) received from sockets due to SELinux restrictions.
Hence, we add a new rule according to the avc logs, which showed that permissions `open` and `getattr` were needed.
2025-01-22 12:01:55 +01:00
JingMatrix c9e11c6770 Update dependencies
Close #156 as merged. Gradle 8.10.2 is required to use agp 8.8.0.

Update manifest-editor to fix manifest parsing issue of LSPatch.
2025-01-18 18:07:47 +01:00
JingMatrix 791f45661d [translation] Update translation from Crowdin (#151)
* New translations strings.xml (Romanian)

* New translations strings.xml (Turkish)
2025-01-18 18:07:02 +01:00
JingMatrix c0478f593e
Hook dex2oat functions to remove LSPosed traces (#152)
We use the env LD_PRELOAD to hook the execution of `dex2oat`, which can be directly set to be a file descriptor.
2025-01-08 07:19:18 +01:00
JingMatrix 7cd98e6d48 Remove topjohnwu/libcxx dependency
John Wu has stopped the development of https://github.com/topjohnwu/libcxx.
LSPosed will now use llvm's static stdc++ library, see https://developer.android.com/ndk/guides/cpp-support.
2025-01-07 20:58:11 +01:00
JingMatrix 2bc0f0c716 Refine SELinux rules for Xposed files (#149)
1. The SELinux context label `magisk_file` is widely used by Zygisk implementation modules. It is improper for LSPosed to abuse this label for its own files. We replace it by `xposed_file`.
2. A new rule added according to the SELinux logs, which is needed to write to the mangaer's SharedPreference.
3. `xposed_data` is a new SELinux context label for XSharedPreference files, it is not meant to provide MAC restricted access but to conform with Android's rule: https://developer.android.com/about/versions/pie/android-9.0-changes-28#per-app-selinux.
4. We add attribute `mlstrustedobject` to ignore the `Multi-Level and Multi-Category Security` enforced on Android.
2025-01-06 16:31:17 +01:00
JingMatrix fba56a9927 Adjust debugging settings
1. Set log buffer size for system
2. Increase buffer size to 128 Kb
3. Record also logs for APatch, KernelSU and SELinux
4. Add installation tasks for APatch
2025-01-03 14:06:28 +01:00