Commit Graph

530 Commits

Author SHA1 Message Date
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
LoveSy cb0c24deb4
Post CI build to tg discussion as well 2022-11-07 17:18:10 +08:00
Nullptr 9c951bdbb6
Better signature bypass 2022-11-05 22:58:45 +08:00
Nullptr 5876d4a0a0
Update dependencies & Fix UI previewing 2022-11-05 12:00:25 +08:00
Howard Wu 41c67b5cd3
Change jdk distribution to `temurin` (#125)
AdoptOpenJDK got moved to Eclipse Temurin
2022-10-27 19:30:33 +08:00
Nullptr 7391df7fd3
Update MIN_ROLLING_VERSION_CODE 2022-10-24 01:12:27 +08:00
Nullptr 0bc6407caf
Further fix for Android 13 2022-10-24 00:41:32 +08:00
Nullptr f6c09a0ba0
Bump to 0.5 2022-10-24 00:00:41 +08:00
XposedBot 1574405276
[translation] Update translation from Crowdin (#121)
* New translations strings.xml
2022-10-23 23:59:35 +08:00
Nullptr 1f23d8a995
Fix opening module settings 2022-10-21 20:11:37 +08:00
Nullptr 667ac6282f
Fix coroutine stuck 2022-10-21 19:57:24 +08:00
Nullptr 5db7ecf7bd
No need to add loader dex and so for local mode 2022-10-21 19:26:08 +08:00
Howard Wu fbd327dadf
Update CI deps (#119) 2022-10-21 19:09:51 +08:00
Nullptr f8888b81e8
Support bootstrapping loader dynamically for local mode (#118) 2022-10-21 15:24:16 +08:00
Nullptr 91b038ac16
Fix Android 13 install 2022-10-21 00:02:34 +08:00
Nullptr edea4552a2
Support fake signatures for other lspatched apps 2022-10-20 18:36:41 +08:00
Nullptr 918ab4eda4
Update dependencies 2022-10-20 16:03:03 +08:00
Bob Pan 030e1e54bc
replace PackageInfo.CREATOR to hook creation of PackageInfo in all Parcel api (#117)
* replace PackageInfo.CREATOR to hook creation of PackageInfo in all Parcel api

* also clear Parcel.sPairedCreators
2022-10-14 21:31:58 +08:00
方块君 eb870b593d
Fix Android 9 crash (#114) 2022-10-03 20:39:53 +08:00
Nullptr 2c7444b581
Bump to 0.4 2022-09-27 09:34:43 +08:00
XposedBot 47ba5167fe
[translation] Update translation from Crowdin (#112)
* New translations strings.xml (Romanian)

* New translations strings.xml (Chinese Traditional)

* New translations strings.xml (Portuguese)

* New translations strings.xml (Russian)

* New translations strings.xml (Swedish)

* New translations strings.xml (Turkish)

* New translations strings.xml (Ukrainian)

* New translations strings.xml (Chinese Simplified)

* New translations strings.xml (Urdu (Pakistan))

* New translations strings.xml (Norwegian)

* New translations strings.xml (Vietnamese)

* New translations strings.xml (Portuguese, Brazilian)

* New translations strings.xml (Indonesian)

* New translations strings.xml (Persian)

* New translations strings.xml (Bengali)

* New translations strings.xml (Thai)

* New translations strings.xml (Hindi)

* New translations strings.xml (Polish)

* New translations strings.xml (Dutch)

* New translations strings.xml (French)

* New translations strings.xml (German)

* New translations strings.xml (Spanish)

* New translations strings.xml (Afrikaans)

* New translations strings.xml (Arabic)

* New translations strings.xml (Bulgarian)

* New translations strings.xml (Catalan)

* New translations strings.xml (Czech)

* New translations strings.xml (Danish)

* New translations strings.xml (Greek)

* New translations strings.xml (Lithuanian)

* New translations strings.xml (Finnish)

* New translations strings.xml (Hebrew)

* New translations strings.xml (Hungarian)

* New translations strings.xml (Italian)

* New translations strings.xml (Japanese)

* New translations strings.xml (Korean)

* New translations strings.xml (Kurdish)

* New translations strings.xml (Chinese Traditional, Hong Kong)
2022-09-26 10:07:02 +08:00
Nullptr 415f434d08
Add starting modules from manager 2022-09-23 00:04:25 +08:00
Nullptr f7c6af53ec
Update Compose & Fix apkPaths null 2022-09-22 23:12:51 +08:00
LoveSy 0d1f937457
Update deps 2022-09-22 17:52:59 +08:00