Skip to content
This repository was archived by the owner on Dec 13, 2023. It is now read-only.

[Bug] getPackageResourcePath not spoofed #174

@heqyoufree

Description

@heqyoufree

Steps to reproduce/复现步骤

LSPatch detected with following code

val apkPath = getApplicationContext().getPackageResourcePath().toString()
if (!apkPath.endsWith("base.apk") || !apkPath.startsWith("/data/app")) {
    Toast.makeText(getApplicationContext(), "LSPatch!!!", Toast.LENGTH_LONG).show();
} else {
    Toast.makeText(getApplicationContext(), "Safe", Toast.LENGTH_LONG).show();
}

Expected behaviour/预期行为

getPackageResourcePath() should return /data/app/<package-name>/base.apk and operations on apk should be redirected to the original apk.

Actual behaviour/实际行为

getPackageResourcePath() returns /data/user/0/<package-name>/cache/lspatch/origin/<crc>.apk

Xposed Module List/Xposed 模块列表

none

LSPatch version/LSPatch 版本

0.5.1 (368)

Android version/Android 版本

13

Shizuku version/Shizuku 版本

N/A

Version requirement/版本要求

  • I am using latest debug CI version of LSPatch and enable verbose log/我正在使用最新 CI 调试版本且启用详细日志

Apk file/Apk 文件

No response

Logs/日志

No logs needed

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions