Closed imknown closed 8 years ago
"The commit 227f79c should be able to extract dex for android N. (Tested with emulator, only an error when deodex apache-xml.dex) I did not upload last snapshot build because N is not formal release yet. To have a try, just pull the latest code and build with command in the readme."
So:
1) git clone https://github.com/testwhat/SmaliEx.git
2) go to SmaliEx (look at README.md) and type:
gradlew -b smaliex/build.gradle dist
3) You should find the oat2dex.jar
in smaliex-bin/ directory
Thank you. I tried it.
java -jar oat2dex.jar smali xxxx.odex
Above cmd worked, but the below still goes wrong.
java -jar oat2dex.jar boot boot.oat
Exception:
08-12 17:07:00:917 Output raw dex: D:\TryDeodex\odex\core-oj.dex
08-12 17:07:01:011 Art version=79 (boot.oat)
08-12 17:07:01:015 De-optimizing /system/framework/core-oj.jar
#addred# public abstract java.lang.String toString()
#addred# public abstract java.lang.String toString()
...
#addred# public abstract java.lang.String toString()
#addred# public abstract java.lang.String toString()
#addred# public default java.util.Spliterator spliterator()
#addred# public default java.util.Spliterator spliterator()
#addred# public abstract java.lang.String toString()
#addred# public abstract java.lang.String toString()
...
#addred# public abstract java.lang.String toString()
#addred# public abstract java.lang.String toString()
08-12 17:07:02:662 Failed to re-construct dex org.jf.dexlib2.analysis.UnresolvedClassException: Could not resolve class Ldalvik/system/BaseDexClassLoader;
08-12 17:07:02:662 convertToDex: skip /system/framework/core-oj.jar
Try to find on Your device / emulator folder like x86 or x86_64 than pull from your device the whole directory and run something like:
java -jar oat2dex.jar boot x86
If you are using device with arm the directory You are searching for would be arm/ instead of the two above. Directory location, e.g. /system/framework/x86
EDIT: As @testwhat wrote in https://github.com/testwhat/SmaliEx/commit/227f79ca11a29979f2cb34d69aa0be0ed17e857f "Android N separates boot oat files ". I tried to run the above and it "worked"...
... here is my question to @testwhat, if a may... after running the command above I've got two directories:
x86_64-odex/ contains a dex file wich I am trying to convert to .jar...
I've tried to do it with
[... x86_64-odex]$ sh path/to/dex2jar-2.0/d2j-dex2jar.sh one_of_the_dex_file.dex
but I get:
dex2jar one_of_the_dex_filedex -> ./one_of_the_dex_file.jar
com.googlecode.d2j.DexException: not support version.
at com.googlecode.d2j.reader.DexFileReader.<init>(DexFileReader.java:151)
at com.googlecode.d2j.reader.DexFileReader.<init>(DexFileReader.java:211)
at com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:104)
at com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288)
at com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32)
any suggestions would be appreciated :)
Edit: Android API: 24
Very nice! Worked~ I get the dex format now~
These cmd helped me as you said:
java -jar oat2dex.jar boot system\framework\arm64
java -jar oat2dex.jar xxxx.odex system\framework\arm64-odex
Thank you alot~ :laughing: Btw, my phone is arm64-v8a.
CLI throws several exceptions, but itself still succeeds.
I have seen the issue #19 , but it still throws Exception: