Skip to content

Commit

Permalink
#24 Instruct dx/baksmali to use Android API version 28
Browse files Browse the repository at this point in the history
This will prevent dx from failing with SimException messages and allows baksmali to use a wider set of opcodes
ollide committed Apr 25, 2021
1 parent bcc4082 commit 8cb83ac
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/main/kotlin/org/ollide/java2smali/Class2DexHelper.kt
Original file line number Diff line number Diff line change
@@ -23,6 +23,7 @@ object Class2DexHelper {
arguments.outName = outputDexPath
arguments.strictNameCheck = false
arguments.fileNames = inputClassFilePaths
arguments.minSdkVersion = 28

return try {
val returnCode = Main(dxContext).runDx(arguments)
2 changes: 1 addition & 1 deletion src/main/kotlin/org/ollide/java2smali/Dex2SmaliHelper.kt
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ object Dex2SmaliHelper {
*/
@Throws(IOException::class)
fun disassembleDexFile(dexFilePath: String, outputDir: String) {
val opCodes = Opcodes.getDefault()
val opCodes = Opcodes.forApi(28)
val dexBackedDexFile = DexFileFactory.loadDexFile(dexFilePath, opCodes)

val options = BaksmaliOptions()

0 comments on commit 8cb83ac

Please sign in to comment.