mirror of
https://github.com/revanced/revanced-cli.git
synced 2024-12-05 01:42:54 +01:00
fix: Sign APKs correctly
This commit is contained in:
parent
f0f3e5614b
commit
5ff105cf6b
@ -262,12 +262,13 @@ internal object PatchCommand : Runnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// endregion
|
// endregion
|
||||||
|
val patcherTemporaryFilesPath = temporaryFilesPath.resolve("patcher")
|
||||||
val (packageName, patcherResult) = Patcher(
|
val (packageName, patcherResult) = Patcher(
|
||||||
PatcherConfig(
|
PatcherConfig(
|
||||||
apk,
|
apk,
|
||||||
temporaryFilesPath,
|
patcherTemporaryFilesPath,
|
||||||
aaptBinaryPath?.path,
|
aaptBinaryPath?.path,
|
||||||
temporaryFilesPath.absolutePath,
|
patcherTemporaryFilesPath.absolutePath,
|
||||||
true,
|
true,
|
||||||
),
|
),
|
||||||
).use { patcher ->
|
).use { patcher ->
|
||||||
@ -304,13 +305,13 @@ internal object PatchCommand : Runnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// region Save
|
// region Save
|
||||||
|
apk.copyTo(temporaryFilesPath.resolve(apk.name), overwrite = true).apply {
|
||||||
apk.copyTo(outputFilePath, overwrite = true)
|
patcherResult.applyTo(this)
|
||||||
|
}.let {
|
||||||
patcherResult.applyTo(outputFilePath)
|
|
||||||
|
|
||||||
if (!mount) {
|
if (!mount) {
|
||||||
outputFilePath.sign(
|
sign(
|
||||||
|
it,
|
||||||
|
outputFilePath,
|
||||||
ApkUtils.SigningOptions(
|
ApkUtils.SigningOptions(
|
||||||
keystoreFilePath,
|
keystoreFilePath,
|
||||||
keyStorePassword,
|
keyStorePassword,
|
||||||
@ -320,6 +321,7 @@ internal object PatchCommand : Runnable {
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
logger.info("Saved to $outputFilePath")
|
logger.info("Saved to $outputFilePath")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user