Commit Graph

403 Commits

Author SHA1 Message Date
LoveSy bbe8d93fb9
Fix typo (#282)
Fix #281
2023-12-13 12:54:48 +08:00
Js0n 2243d010b8
fix: packageInstaller userId (#280)
Package installer now install patched app in current user instead of
main user
2023-12-12 00:35:20 +08:00
Js0n 4bf1371155
feat: launch and install from apk intent (#279)
close #90
2023-12-11 23:38:30 +08:00
南宫雪珊 5bf494400d
Revert "fix: get installed apps failed for some chinese ROM" (#278)
Reverts LSPosed/LSPatch#273
2023-12-10 18:02:37 +08:00
Js0n 2fdf66cd6e
fix: get installed apps failed for some chinese ROM (#273)
refer to
1.
[TAF](http://www.taf.org.cn/StdDetail.aspx?uid=3A7D6656-43B8-4C46-8871-E379A3EA1D48&stdType=TAF)
2. [vivo](https://dev.vivo.com.cn/documentCenter/doc/747)
2023-12-10 12:44:53 +08:00
XposedBot 0b77dde4d7
[translation] Update translation from Crowdin (#268) 2023-11-23 20:48:17 +08:00
Js0n 3674a967ef
Remove keep alive foreground service because bound service won't need it (#262)
Co-authored-by: LoveSy <shana@zju.edu.cn>
2023-11-23 20:32:24 +08:00
Js0n ccc7a7ac7d
bump: version to 0.6 (#260) 2023-11-23 20:12:43 +08:00
XposedBot ebf9397e5d
[translation] Update translation from Crowdin (#267) 2023-11-23 20:12:20 +08:00
Js0n eb2c458dc1
fix(manager): keep alive service crashing in A14 (#259) 2023-11-11 21:05:34 +08:00
Js0n 8b5d06f073
Revert "fix(manager): update loader failed due to outdated origin apk filename" (#257)
Reverts LSPosed/LSPatch#253
2023-11-11 19:12:27 +08:00
5ec1cff 531acdb924
use version catalog (#256) 2023-11-08 02:07:20 +08:00
Js0n 768d335eea
fix(manager): update loader failed due to outdated origin apk filename (#253) 2023-11-02 22:07:10 +08:00
LoveSy c9c5708d2f
Fix getApplicationInfo on non-primary user (#247)
Fix #224
2023-10-12 15:05:23 +08:00
Js0n 8462043963
feat: select module(s) from storage (#225) 2023-10-12 14:10:53 +08:00
Js0n b0fbc7341c
Update core to v1.9.2 (#245) 2023-10-11 23:25:19 +08:00
Howard Wu b35f3c549a
Update core (#234)
v1.9.1
2023-08-31 10:34:30 +08:00
Howard Wu ca5d21c720
[skip ci] Stop sending to TG group (#230) 2023-08-25 20:36:24 +08:00
Js0n 4a67cb210e
fix: `whenTaskAdded` broken in gradle 8.1.0 (#229)
https://issuetracker.google.com/issues/277166577

https://docs.gradle.org/current/userguide/task_configuration_avoidance.html#sec:old_vs_new_configuration_api_overview
2023-08-03 23:11:38 +08:00
Js0n b7069d6329
sync: submodule core (#228)
Fix native hook on arm platform
2023-08-03 20:46:27 +08:00
Js0n 660073c07c
fix: GitHub actions libxposed build (#227) 2023-08-03 20:22:09 +08:00
Howard Wu 6e89dad70b Clearup CI 2023-06-30 08:16:14 +08:00
LoveSy 7d69dbcb66 Fix crash and sync 2023-06-29 10:08:50 +08:00
Howard Wu 941726d559
Core upgrade (#213)
Co-authored-by: LoveSy <shana@zju.edu.cn>
2023-06-29 02:17:00 +08:00
JingMatrix 5d927f1dd2
Fix file permissions for Android 14 (#201)
Dex file should not be writable, otherwise it causes
java.lang.SecurityException.

Here is the related [soucre
code](https://cs.android.com/android/platform/superproject/+/master:art/runtime/native/dalvik_system_DexFile.cc;l=381)
of Android 14.

---------

Co-authored-by: LoveSy <shana@zju.edu.cn>
2023-06-08 00:11:47 +08:00
XposedBot d2b1de7ba5
[translation] Update translation from Crowdin (#204) 2023-06-06 10:12:54 +08:00
南宫雪珊 e79bf0e004
Revert "Handling duplicate System.load calls" (#202)
Reverts LSPosed/LSPatch#200

Let it crash
2023-06-05 14:35:14 +08:00
Harshit Shah f23eb7f32c
Handling duplicate System.load calls (#200)
We have seen apps to be crashing due to multiple System.load calls.
As seen from the log lines:
```
06-01 16:43:41.615 I/LSPosed-Bridge(16031): Caused by: java.lang.UnsatisfiedLinkError: Shared library "/data/app/com.example.sample-some_random_string/base.apk!/assets/lspatch/so/arm64-v8a/liblspatch.so" already opened by ClassLoader 0x1c7(dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.example.sample-some_random_string/base.apk"],nativeLibraryDirectories=[/data/app/com.example.sample-some_random_string/lib/arm64, /data/app/com.example.sample-some_random_string/base.apk!/lib/arm64-v8a, /system/lib64, /product/lib64]]]); can't open in ClassLoader 0x7ffc869ecc(dalvik.system.PathClassLoader[DexPathList[[zip file "/data/user/0/org.houstonmethodist.methodistmobile.debug/cache/lspatch/origin/4198609975.apk", zip file "/data/app/com.example.sample-some_random_string/base.apk"],nativeLibraryDirectories=[/data/app/com.example.sample-some_random_string/lib/arm64, /data/user/0/org.houstonmethodist.methodistmobile.debug/cache/lspatch/origin/4198609975.apk!/lib/arm64-v8a, /system/lib64, /product/lib64]]])
```
Looks like we are trying to load liblspatch.so file even when it was
loaded earlier by the ClassLoader, due to which it is causing the error.

This is similar to this issue:
https://stackoverflow.com/questions/54155086/preventing-duplicate-system-loadlibrary-calls-when-dynamically-loading-reloading

Have added try ... catch block around `System.load` method to handle
exceptions / error raised from it, and have added log line to debug the
issue in cases of actual errors.
2023-06-05 14:14:22 +08:00
Js0n 3acc9086b1
fix: only add QUERY_ALL_PACKAGES permission when useManager is true (#195) 2023-05-10 22:50:51 +08:00
AAGaming e4657377b5
Fix Map.of crash on certain Motorola devices (#186)
Using Map.of here results in compiler optimization generating a class
`a.a` with a method `a` that returns the Map.

The class looks like this (jadx decompilation):
```java
package a;

import java.util.AbstractMap;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
/* loaded from: classes.dex */
public abstract /* synthetic */ class a {
    public static /* synthetic */ Map a() {
        Map.Entry[] entryArr = {new AbstractMap.SimpleEntry("arm", "armeabi-v7a"), new AbstractMap.SimpleEntry("arm64", "arm64-v8a"), new AbstractMap.SimpleEntry("x86", "x86"), new AbstractMap.SimpleEntry("x86_64", "x86_64")};
        HashMap hashMap = new HashMap(4);
        for (int i = 0; i < 4; i++) {
            Map.Entry entry = entryArr[i];
            Object key = entry.getKey();
            Objects.requireNonNull(key);
            Object value = entry.getValue();
            Objects.requireNonNull(value);
            if (hashMap.put(key, value) != null) {
                throw new IllegalArgumentException("duplicate key: " + key);
            }
        }
        return Collections.unmodifiableMap(hashMap);
    }
}
```

For whatever ridiculous reason, on a moto g stylus 5G (2022), when this
method is called in `LSPAppComponentFactoryStub`, the app crashes with
`java.lang.NoSuchMethodError: No static method a()Ljava/util/Map; in
class La/a; or its super classes`. Using a normal HashMap here instead
prevents this optimization from occurring, which prevents the crash.
2023-05-01 23:56:24 +08:00
Harshit Shah 4d8bafd74f
Remove mandatory original signature check (#185)
We are unnecessary fetching original signature even when signature
bypass level is not greater than 0. Due to which some apps which were
not signed were failing to be patched with error "get original signature
failed".
2023-04-21 21:21:25 +08:00
Harshit Shah 5d8645d201
Fixing Manifest Parsing - Shifting from axmlprinter to axmlparser (#180)
**Description:**
Some apps were failing with reason `Failed to parse Manifest file`
Turns out that `AxmlResourceParser` from `android4Me` is very outdated
and does not work well in all cases.
Hence have removed `axmlprinter` and migrated code to use `AxmlParser`
from `ManifestEditor` by `WindySha`.
2023-04-09 22:58:48 +08:00
Howard Wu 7cf2178381
[skip ci] Update bugreport template 2023-01-28 17:59:07 +08:00
Howard Wu 9b02dac020
[skip ci] Update bugreport template
Fix files upload tips
2023-01-28 17:45:04 +08:00
Howard Wu 31fd40e47b
[skip ci] Update bugreport template 2023-01-28 17:37:12 +08:00
Howard20181 0aaa533c67 Fix core version display 2023-01-28 17:08:26 +08:00
Howard Wu 0964a8eece
Update core to 1.8.6 (#168)
With
- update AGP to 7.4.0
- update Android Build Tools to 33.0.1
2023-01-28 11:54:06 +08:00
Js0n e62da55614
feat: set minimum sdk to Android 9 if original value is lower (#167) 2023-01-28 11:53:55 +08:00
Howard Wu 03487577d8
[skip ci] Update badge
Workflow Status with event
2022-12-19 22:43:17 +08:00
Howard Wu b4cd748573
[skip ci] Update badge 2022-12-19 22:30:46 +08:00
LoveSy 9846b3ff97
Update bug_report.yml 2022-12-19 16:56:43 +08:00
Krishna Suravarapu c41be02511
Fix Manifest Parse Failure (#151)
Recently encountered Multiple apps where LSPatch failed to parse
AndroidManifest.xml. Upon further debugging found that we throw an error
when style sizes don't adhere to a 4-byte boundary. We can safely ignore
this and move forward since we are anyways not using `block.m_styles`
anywhere in the code. Have checked multiple other AXML parsers wherein
they too do the same thing
2022-12-15 01:26:59 +08:00
Nullptr 2ace2660b4
Fix modules missing after update loader for integrated mode 2022-11-13 22:43:39 +08:00
XposedBot 010aa7a270
[translation] Update translation from Crowdin (#134) 2022-11-11 21:42:12 +08:00
Nullptr 88855960cb
Bump to 0.5.1 2022-11-11 21:05:32 +08:00
XposedBot eda250c0fc
[translation] Update translation from Crowdin (#133)
* New translations strings.xml
2022-11-11 20:57:13 +08:00
Nullptr b2b542e7cc
Optimize build 2022-11-10 22:55:39 +08:00
Nullptr 319a21f103
Small UI fixes 2022-11-09 14:10:02 +08:00
Nullptr c191397dc0
Add foreground keep alive option 2022-11-09 13:09:50 +08:00
Nullptr 54cf7eed35
Use service instead of content provider to send binder 2022-11-08 02:54:31 +08:00