Add .apk suffix
This commit is contained in:
parent
e05dde5b20
commit
0ef34fa633
|
|
@ -133,7 +133,7 @@ public class LSPApplication {
|
|||
String originPath = appInfo.dataDir + "/cache/lspatch/origin/";
|
||||
String cacheApkPath;
|
||||
try (ZipFile sourceFile = new ZipFile(appInfo.sourceDir)) {
|
||||
cacheApkPath = originPath + sourceFile.getEntry(ORIGINAL_APK_ASSET_PATH).getCrc();
|
||||
cacheApkPath = originPath + sourceFile.getEntry(ORIGINAL_APK_ASSET_PATH).getCrc() + ".apk";
|
||||
}
|
||||
|
||||
appInfo.sourceDir = cacheApkPath;
|
||||
|
|
@ -317,7 +317,7 @@ public class LSPApplication {
|
|||
if (config.sigBypassLevel >= Constants.SIGBYPASS_LV_PM_OPENAT) {
|
||||
String cacheApkPath;
|
||||
try (ZipFile sourceFile = new ZipFile(context.getPackageResourcePath())) {
|
||||
cacheApkPath = context.getCacheDir() + "/lspatch/origin/" + sourceFile.getEntry(ORIGINAL_APK_ASSET_PATH).getCrc();
|
||||
cacheApkPath = context.getCacheDir() + "/lspatch/origin/" + sourceFile.getEntry(ORIGINAL_APK_ASSET_PATH).getCrc() + ".apk";
|
||||
}
|
||||
SigBypass.enableOpenatHook(context.getPackageResourcePath(), cacheApkPath);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public class LocalApplicationService extends ILSPApplicationService.Stub {
|
|||
String modulePath = context.getCacheDir() + "/lspatch/" + packageName + "/";
|
||||
String cacheApkPath;
|
||||
try (ZipFile sourceFile = new ZipFile(context.getPackageResourcePath())) {
|
||||
cacheApkPath = modulePath + sourceFile.getEntry("assets/lspatch/modules/" + name).getCrc();
|
||||
cacheApkPath = modulePath + sourceFile.getEntry("assets/lspatch/modules/" + name).getCrc() + ".apk";
|
||||
}
|
||||
|
||||
if (!Files.exists(Paths.get(cacheApkPath))) {
|
||||
|
|
|
|||
|
|
@ -345,7 +345,7 @@ public class LSPatch {
|
|||
var manifest = Objects.requireNonNull(ManifestParser.parseManifestFile(xmlIs));
|
||||
var packageName = manifest.packageName;
|
||||
logger.i(" - " + packageName);
|
||||
zFile.add("assets/lspatch/modules/" + packageName + ".bin", fileIs);
|
||||
zFile.add("assets/lspatch/modules/" + packageName + ".apk", fileIs);
|
||||
} catch (NullPointerException | IOException e) {
|
||||
logger.e(module + " does not exist or is not a valid apk file.");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ public class Constants {
|
|||
|
||||
final static public String DEX_ASSET_PATH = "assets/lspatch/lsp.dex";
|
||||
final static public String CONFIG_ASSET_PATH = "assets/lspatch/config.json";
|
||||
final static public String ORIGINAL_APK_ASSET_PATH = "assets/lspatch/origin_apk.bin";
|
||||
final static public String ORIGINAL_APK_ASSET_PATH = "assets/lspatch/origin.apk";
|
||||
|
||||
final static public String PROXY_APP_COMPONENT_FACTORY = "org.lsposed.lspatch.appstub.LSPAppComponentFactoryStub";
|
||||
final static public String MANAGER_PACKAGE_NAME = "org.lsposed.lspatch";
|
||||
|
|
|
|||
Loading…
Reference in New Issue