mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-14 00:04:34 -05:00
Utility function
This commit is contained in:
@@ -32,6 +32,7 @@ import javax.xml.parsers.DocumentBuilderFactory
|
|||||||
import kotlin.io.path.Path
|
import kotlin.io.path.Path
|
||||||
import kotlin.io.path.absolutePathString
|
import kotlin.io.path.absolutePathString
|
||||||
import kotlin.io.path.nameWithoutExtension
|
import kotlin.io.path.nameWithoutExtension
|
||||||
|
import kotlin.io.path.readBytes
|
||||||
import kotlin.io.path.relativeTo
|
import kotlin.io.path.relativeTo
|
||||||
|
|
||||||
object PackageTools {
|
object PackageTools {
|
||||||
@@ -60,7 +61,7 @@ object PackageTools {
|
|||||||
// adopted from com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine
|
// adopted from com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine
|
||||||
// source at: https://github.com/DexPatcher/dex2jar/tree/v2.1-20190905-lanchon/dex-tools/src/main/java/com/googlecode/dex2jar/tools/Dex2jarCmd.java
|
// source at: https://github.com/DexPatcher/dex2jar/tree/v2.1-20190905-lanchon/dex-tools/src/main/java/com/googlecode/dex2jar/tools/Dex2jarCmd.java
|
||||||
|
|
||||||
val reader = MultiDexFileReader.open(Files.readAllBytes(dexFile))
|
val reader = MultiDexFileReader.open(dexFile.readBytes())
|
||||||
val handler = BaksmaliBaseDexExceptionHandler()
|
val handler = BaksmaliBaseDexExceptionHandler()
|
||||||
Dex2jar
|
Dex2jar
|
||||||
.from(reader)
|
.from(reader)
|
||||||
|
|||||||
Reference in New Issue
Block a user