Closed RickyDivjakovski closed 6 years ago
Before the .odex file you must write the action you wanna execute. So "d" to disassemble, "x" to deodex
output is
Error occurred while loading class path files. Aborting.
org.jf.dexlib2.analysis.ClassPathResolver$ResolveException: org.jf.dexlib2.analysis.ClassPathResolver$NotFoundException: Could not find classpath entry /system/framework/core.jar
at org.jf.dexlib2.analysis.ClassPathResolver.
See baksmali help classpath
for more information
I think you want something like
java -jar baksmali.jar x system/app/Gallery2/oat/arm64/Gallery2.odex -a 25 -d system/framework/arm64/boot.oat
Exact same result.. tried with multiple versions of baksmali too?
sorry, my command was wrong:
java -jar baksmali.jar x system/app/Gallery2/oat/arm64/Gallery2.odex -a 25 -b system/framework/arm64/boot.oat
(-b, not -d)
Closing due to inactivity. Feel free to reopen if you have more info.
Hi @JesusFreke ! I try your suggestion on stackoverflow
I am facing same issue, and want to know the byte offset of 0x9
$ adb logcat -v brief -s *:E
--------- beginning of crash
E/AndroidRuntime(19726): FATAL EXCEPTION: main
E/AndroidRuntime(19726): Process: com.telkomsel.roli, PID: 19726
E/AndroidRuntime(19726): java.lang.VerifyError: Verifier rejected class com.telkomsel.roli.optin.helpers.RbHelperClass: okhttp3.OkHttpClient com.telkomsel.roli.optin.helpers.RbHelperClass.h0(android.content.Context) failed to verify: okhttp3.OkHttpClient com.telkomsel.roli.optin.helpers.RbHelperClass.h0(android.content.Context): [0x9] 'this' argument 'Reference: android.content.Context' not instance of 'Precise Reference: okhttp3.OkHttpClient$Builder' (declaration of 'com.telkomsel.roli.optin.helpers.RbHelperClass' appears in /data/app/~~vPoOYvv_Tn1HUymmJsfHqw==/com.telkomsel.roli-Lqo9U1OW5Ph8WEX_ifM4Sw==/base.apk!classes5.dex)
$ baksmali d -r ARGS,DEST,FULLMERGE --off classes5.dex -a 31 -c "C:\Android\platforms\android-31\android.jar"
Error occurred while loading class path files. Aborting.
org.jf.dexlib2.analysis.ClassPathResolver$ResolveException: org.jf.dexlib2.analysis.ClassPathResolver$NotFoundException: Could not find classpath entry /system/framework/core-oj.jar
at org.jf.dexlib2.analysis.ClassPathResolver.<init>(ClassPathResolver.java:114)
at org.jf.dexlib2.analysis.ClassPathResolver.<init>(ClassPathResolver.java:154)
at org.jf.baksmali.AnalysisArguments.loadClassPathForDexFile(AnalysisArguments.java:134)
at org.jf.baksmali.AnalysisArguments.loadClassPathForDexFile(AnalysisArguments.java:89)
at org.jf.baksmali.DisassembleCommand.getOptions(DisassembleCommand.java:209)
at org.jf.baksmali.DisassembleCommand.run(DisassembleCommand.java:183)
at org.jf.baksmali.Main.main(Main.java:102)
Caused by: org.jf.dexlib2.analysis.ClassPathResolver$NotFoundException: Could not find classpath entry /system/framework/core-oj.jar
at org.jf.dexlib2.analysis.ClassPathResolver.loadLocalOrDeviceBootClassPathEntry(ClassPathResolver.java:203)
at org.jf.dexlib2.analysis.ClassPathResolver.<init>(ClassPathResolver.java:89)
... 6 more
$ baksmali d -r ARGS,DEST,FULLMERGE --off classes5.dex -a 31 -b "C:\Android\platforms\android-31\android.jar"
Error occurred while loading class path files. Aborting.
org.jf.dexlib2.analysis.ClassPathResolver$ResolveException: org.jf.dexlib2.analysis.ClassPathResolver$NotFoundException: Could not find classpath entry C
at org.jf.dexlib2.analysis.ClassPathResolver.<init>(ClassPathResolver.java:114)
at org.jf.baksmali.AnalysisArguments.loadClassPathForDexFile(AnalysisArguments.java:140)
at org.jf.baksmali.AnalysisArguments.loadClassPathForDexFile(AnalysisArguments.java:89)
at org.jf.baksmali.DisassembleCommand.getOptions(DisassembleCommand.java:209)
at org.jf.baksmali.DisassembleCommand.run(DisassembleCommand.java:183)
at org.jf.baksmali.Main.main(Main.java:102)
Caused by: org.jf.dexlib2.analysis.ClassPathResolver$NotFoundException: Could not find classpath entry C
at org.jf.dexlib2.analysis.ClassPathResolver.loadLocalOrDeviceBootClassPathEntry(ClassPathResolver.java:203)
at org.jf.dexlib2.analysis.ClassPathResolver.<init>(ClassPathResolver.java:89)
... 5 more
I try to disassemble classes5.dex But got an error as shown above 😢
After reading through baksmali help classpath
I followed these instructions and succeeded in generating the disassembled version of classes5.dex
adb pull /system/framework/framework.jar
baksmali d -r ARGS,DEST,FULLMERGE --off classes5.dex -a 31 -b ./framework.jar
in the smali file, does #@9
correspond to 0x9
mentioned in logcat?
Ah! looks like the smali shown in the jadx image is correct, and I installed the apk wrong, I didn't even install the latest apk patches
Please correct me if im doing wrong.. file structure -system --framework ---arm64 ----boot.oat --app ---Gallery2 ----oat -----arm64 ------Gallery2.odex
Executing- java -jar baksmali.jar system/app/Gallery2/oat/arm64/Gallery2.odex -a 25 -x -c /system/framework/arm64/boot.oat -d system/framework
Returns- Exception in thread "main" com.beust.jcommander.MissingCommandException: Expected a command, got system/app/Gallery2/oat/arm64/Gallery2.odex at com.beust.jcommander.JCommander.parseValues(JCommander.java:783) at com.beust.jcommander.JCommander.parse(JCommander.java:282) at com.beust.jcommander.JCommander.parse(JCommander.java:265) at org.jf.baksmali.Main.main(Main.java:90)
What am i doing wrong?
Android 7.1.2 api level 25