convert odex file to dex file
13,461
Solution 1
As of 2017-06-09 baksmali has changed. It works like this.
java -jar baksmali-2.2.0.jar d SamsungInCallUI.odex -o SamsungInCallUI
Then assemble the dex file.
java -jar smali-2.2.0.jar ass SamsungInCallUI -o SamsungInCallUI.dex
Solution 2
Try this instead:
java -jar baksmali-2.1.2.jar -c boot.oat -d system/framework/arm/boot.oat -x temp.odex
The specific path to your boot.oat might be different.
Also note that baksmali doesn't yet support deodexing the N preview images.
Author by
임선빈
Updated on June 18, 2022Comments
-
임선빈 about 2 years
I would like to covert odex file to dex file. I already pulled framework folder from system. I tried the following command,
java -jar baksmali-2.1.2.jar -d system/framework -x temp.odex
but error was produced - error message is like below.
Error occurred while loading boot class path files. Aborting. org.jf.util.ExceptionWithContext: Cannot locate boot class path file /system/framework/core.jar at org.jf.dexlib2.analysis.ClassPath.loadClassPathEntry(ClassPath.java:277) at org.jf.dexlib2.analysis.ClassPath.fromClassPath(ClassPath.java:182) at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:67) at org.jf.baksmali.main.run(main.java:113) at org.jf.baksmali.main.main(main.java:322)
I could not find "core.jar" in my android system framework folder.
-
임선빈 about 8 yearsI tried it but another error was produced. Error occurred while loading boot class path files. Aborting. org.jf.util.ExceptionWithContext: Cannot locate boot class path file boot.oat at org.jf.dexlib2.analysis.ClassPath.loadClassPathEntry(ClassPath.java:2 77) at org.jf.dexlib2.analysis.ClassPath.fromClassPath(ClassPath.java:182) at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:67) at org.jf.baksmali.main.run(main.java:113) at org.jf.baksmali.main.main(main.java:322)
-
임선빈 about 8 yearsI tried like this. java -jar baksmali-2.1.2.j ar -x -c boot.oat -d system/framework Test.odex -o Test.apk. but error was produced. Error occurred while loading boot class path files. Aborting. org.jf.util.ExceptionWithContext: Cannot locate boot class path file boot.oat at org.jf.dexlib2.analysis.ClassPath.loadClassPathEntry(ClassPath.java:2 77) at org.jf.dexlib2.analysis.ClassPath.fromClassPath(ClassPath.java:182) at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:67) at org.jf.baksmali.main.run(main.java:113) at org.jf.baksmali.main.main(main.java:322)
-
Admin about 8 yearsMake sure the file boot.oat is in system/framework this should be the code
java -jar baksmali-2.1.2.jar -x -c boot.oat -d system/framework temp.odex -o temp
-
JesusFreke about 8 yearsLike I said, the specific path to your boot.oat might be different.
-
임선빈 about 8 yearsI pulled boot.oat from system/framework and retry it. but same error was reproduced.
-
Admin about 8 years
system/framework
is just the path of boot.oat on your PC, if you just pulled system/framework without moving boot.oat then the path would besystem/framework/arm
, you have to make sure this path leads to boot.oat on YOUR PC. Try this codejava -jar baksmali-2.1.2.jar -x -c boot.oat -d system/framework/arm temp.odex -o temp
-
임선빈 about 8 yearsI tried this with oat2dex. but erro was produced. error message is "OAT Hader Checking..: FAIL! OAT2DEX File Check File FAIL".
-
임선빈 about 8 yearsThank you. I successed it for your help.