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
  • Loading branch information
ollide committed Apr 25, 2021
1 parent bcc4082 commit 8cb83ac
Show file tree
Hide file tree
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
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/org/ollide/java2smali/Dex2SmaliHelper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 8cb83ac

Please sign in to comment.