Closed kasptom closed 8 years ago
All operations are doing under Microsoft Windows 10
:
'TryDeodex'
(full address may like D:\TryDeodex
),oat2dex.jar
into the folder./system/framework/
system.img
of Nexus 5X Android 7 DP5 offcial ROM
TryDeodex
,them
from virtual or real device exist filesystem
maybe okay too;cd /D D:\TryDeodex
;java -jar oat2dex.jar boot system\framework\arm64
system\framework\arm64-odex
(full is D:\TryDeodex\system\framework\arm64-odex
);xxx.odex
, which is extracted from ROM
or pulled from virual or real device
via adb
;xxx.odex
in the directory of 'D:\TryDeodex'
noticed above;java -jar oat2dex.jar xxx.odex system\framework\arm64-odex
,xxx.dex
; dex2jar
to get xxx.jar
file, then try to decompile xxx.jar
.bytecode-viewer
on Githubjava
source code from xxx.jar
directly (bytecode-viewer
auto decompiles xxx.jar
).I hope these will help you get the source codes. :ghost:
Thanks I will try it and give a feedback if it worked :smiley:
Unfortunately above method does not work for me.
After running oat2dex
command on Windows 10 I get output that is similar to https://github.com/testwhat/SmaliEx/files/419850/command_output.txt.
I found an image by googling "Nexus 5X Android 7 DP5 offcial ROM" but after extracting the archive I had to use also:
I found on the mounted system.ext4.img image the directory: system\framework\arm64 and got from it arm64-odex using the above oat2dex command
I don't have xxx.odex file. To be precise - file that I want to extract is framework-classes2.dex which is in the generated arm64-odex. On API 23 I just have to use:
java -jar oat2dex.jar boot arm64
- to get arm64-odex/ and arm64-dexsh ../path/to/d2j-dex2jar.sh
to get jar file fom framework-classes.dex (located in arm64-odex)Has the method changed for API 24 images?
@imknown could You send me the link to the exact ROM that You've been using? Using my image I had problem to open system.img file (I had to convert it as I've described above) What tools do You use to extract and mount system.img from archives?
@kasptom Hi, I use ROM Zhushou
to extract google offical system.img
on Windows
.
This tool is easy-to-use
and noob-friendly
for me. :laughing:
Thanks. I will have the possibility to try it for about 10 hours because then I will get to the PC with Windows :)
About dex2jar, try this https://github.com/testwhat/dex2jar/releases/tag/snapshot
@testwhat thanks - it works better but opening it with jd-gui fails for some classes, e.g TextView.class I've got framework-classes2-dex2jar.jar. Command generates also .zip file with an error report framework-classes2-error.zip zipped framework-classes2-dex2jar
@testwhat @imknown thanks for your help. I've managed to get to the sources that I wanted :smile: As you suggested - I've used:
I use Batch Apktool for proper deodexing, just put all files to _system folder and type 01 for deodexing Full log and symlinks are stored in log_deodex.txt (symlinks from Rom Helper will support in Batch Apktool 3.6.1) For updating oat2dex.jar just put latest version to BIN folder
4PDA forum http://4pda.ru/forum/index.php?showtopic=557858 Direct download link https://yadi.sk/d/h0kXdksftzdbf
I was trying to extract from the emulator dex files from files in (interchangeably):
I've pulled them from the device and then tried to convert boot directory --> .dex using command, e.g:
[...]$ java -jar ../oat2dex.jar boot x86_64
I've got x86_64-odex and x86_64-dex directories but CLI output suggests that it did not succeed in 100%. From one of the dex files in *-odex I wanted to get .jar so I've used dex2jar tool.
[...]$ sh ../dex2jar-2.0/d2j-dex2jar.sh -d toconvert.dex > output_dex2jar.txt
result:Above method works for emulators with API 23 but NOT for API 24 I attach output from: java -jar ../oat2dex.jar boot x86_64 command_output.txt
Using release version of oat2dex did not succeed at all, so -like it is written in #19- I've obtained oat2dex from sources.
36
EDIT: Emulator that I've used: emulator_details.txt