@@ -9,37 +9,18 @@ import app.revanced.patcher.PatcherResult
9
9
import java.io.File
10
10
import java.util.logging.Logger
11
11
12
+ @Suppress(" MemberVisibilityCanBePrivate" , " unused" )
12
13
object ApkUtils {
13
14
private val logger = Logger .getLogger(ApkUtils ::class .java.name)
14
15
15
- /* *
16
- * Aligns and signs the apk at [apkFile] and writes it to [outputFile].
17
- *
18
- * @param apkFile The apk to align and sign.
19
- * @param outputFile The apk to write the aligned and signed apk to.
20
- * @param signingOptions The options to use for signing.
21
- * @param patchedEntriesSource The result of the patcher to add the patched dex files and resources.
22
- */
23
- fun alignAndSign (
24
- apkFile : File ,
25
- outputFile : File ,
26
- signingOptions : SigningOptions ,
27
- patchedEntriesSource : PatcherResult
28
- ) {
29
- if (outputFile.exists()) outputFile.delete()
30
-
31
- align(apkFile, outputFile, patchedEntriesSource)
32
- sign(outputFile, outputFile, signingOptions)
33
- }
34
-
35
16
/* *
36
17
* Creates a new apk from [apkFile] and [patchedEntriesSource] and writes it to [outputFile].
37
18
*
38
19
* @param apkFile The apk to copy entries from.
39
20
* @param outputFile The apk to write the new entries to.
40
21
* @param patchedEntriesSource The result of the patcher to add the patched dex files and resources.
41
22
*/
42
- private fun align (apkFile : File , outputFile : File , patchedEntriesSource : PatcherResult ) {
23
+ fun align (apkFile : File , outputFile : File , patchedEntriesSource : PatcherResult ) {
43
24
logger.info(" Aligning ${apkFile.name} " )
44
25
45
26
ZipFile (outputFile).use { file ->
@@ -72,7 +53,7 @@ object ApkUtils {
72
53
* @param output The apk to write the signed apk to.
73
54
* @param signingOptions The options to use for signing.
74
55
*/
75
- private fun sign (
56
+ fun sign (
76
57
apk : File ,
77
58
output : File ,
78
59
signingOptions : SigningOptions ,
0 commit comments