[Tool] (v5.0) Fully automated tool for create deodex from ART (Nougat support)

Search This thread

_riddle

Member
Dec 19, 2014
9
48
Taoyuan
Surprise to see my patch appears here...
Thanks to baksmali/smali author jesusfreke, the source has nice structure that is easy to extend.

For who may interest about the oat file format:
(Actually it is elf, oat header start from 4k address)
androidxref.com/5.0.0_r2/xref/art/compiler/oat_writer.h#34

The dex in oat file should be odex (not the same as dalvik) format.
Reference: androidxref.com/5.0.0_r2/xref/art/compiler/dex/dex_to_dex_compiler.cc
As below sample, optimized dex uses vtable offset to save function resolving time.

Correct(source) content
Code:
    .line 76
    const-class v1, [I
    invoke-virtual {v1}, Ljava/lang/Class;->getComponentType()Ljava/lang/Class;
    move-result-object v1
    sput-object v1, TYPE:Ljava/lang/Class;

Odex content (Only extract from oat will get this)
Code:
    .line 76
    const-class v1, [I
    invoke-virtual/range-quick {v1}, vtable@20
    move-result-object v1
    sput-object v1, TYPE:Ljava/lang/Class;

Use original baksmali to force convert art's odex will get wrong instruction.
Pack these content to device will result unexpected runtime error.
Code:
    .line 76
    const-class v1, [I
    iput-wide-volatile v0, v1, Landroid/system/OsConstants;->CAP_DAC_READ_SEARCH:I
    move v0, v0
    move-result-object v1
    sput-object v1, TYPE:Ljava/lang/Class;

About the purpose of the tools I made.
It is to convert oat to legacy dex that allow original baksmali without patch can deassemble it correctly.

For example: SystemUI.odex (Actually it is an oat file)
1. Get odex/dex boot class
Code:
java -jar oat2dex.jar boot boot.oat

2. Deodex application (The parameter "odex" is folder path from step 1)
As dalvik, deodex application's odex will need to reference boot class to resolve what vtable mapping to.
Code:
java -jar oat2dex.jar SystemUI.odex odex

3. Deassemble the output of step 2 by original baksmali.

I only test on AOSP version, I am not sure whether manufacturer modified their own format.
If it does not work correctly, I have no idea without detail information (provide file, error message...).
 

Attachments

  • oat2dex.jar
    921.1 KB · Views: 570

tdunham

Inactive Recognized Contributor
Jun 21, 2008
13,686
36,465
TampaBay
1. Get odex/dex boot class
Code:
java -jar oat2dex.jar boot boot.oat
@_riddle
Step 1 provides java.io.FileNotFoundException: boot (The system cannot find not find the file specified). Boot.oat file is placed in same work folder that I am running command prompt for commanline functions (under MS Windows).
And I think it is a necessary requisite before attempting #2 correct?

---------- Post added at 10:21 PM ---------- Previous post was at 09:47 PM ----------

Ok, I think step 1 is to get bootclasspath but no success there with boot.oat file.

---------- Post added at 10:26 PM ---------- Previous post was at 10:21 PM ----------

To get bootclasspath with ADB:
adb shell set > d:/bootclasspath.txt
(the '> d:/bootclasspath.txt' was to redirect display output to a text file for use later, otherwise it just displays on the screen)

---------- Post added at 10:29 PM ---------- Previous post was at 10:26 PM ----------

Raw output. Paths will need to be edited for use for deodexing.
Code:
BOOTCLASSPATH=/system/framework/core-libart.jar:/system/framework/conscrypt.jar:/system/framework/okhttp.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/apache-xml.jar:/system/framework/sec_edm.jar:/system/framework/timakeystore.jar:/system/framework/seccamera.jar:/system/framework/scrollpause.jar:/system/framework/stayrotation.jar:/system/framework/smartfaceservice.jar:/system/framework/commonimsinterface.jar:/system/framework/imsmanager.jar:/system/framework/sprengine.jar:/system/framework/smartbondingservice.jar:/system/framework/secocsp.jar:/system/framework/secEmailBC.jar:/system/framework/simageis.jar:/system/framework/qcmediaplayer.jar:/system/framework/WfdCommon.jar:/system/framework/oem-services.jar:/system/framework/org.codeauro
Here is a really good guide explaining about deodexing, api levels, commandline, bootclasspaths etc...

[GUIDE] Deodexing APKs Manually
 
Last edited:

_riddle

Member
Dec 19, 2014
9
48
Taoyuan
@_riddle
Step 1 provides java.io.FileNotFoundException: boot (The system cannot find not find the file specified). Boot.oat file is placed in same work folder that I am running command prompt for commanline functions (under MS Windows).
From the error message, it looks like the input file name is "boot".
Did you miss the file extension ("boot.oat" or "boot")?

And in art, it is not necessary to get bootclasspath manually.
boot.oat is compiled with all boot class path jars.
Once extract all dex from it, we have all boot classes.
 
  • Like
Reactions: Golv

Golv

Recognized Developer
Jan 17, 2012
2,275
4,767
HTC U11
OnePlus 10 Pro
@_riddle
Thx for your great work!
Could I need deassemble with baksmali output files from boot from /odex/*.dex or from /dex/*.dex for correct deoxed framework's *.jar?
Files from which folder do I need deassemble?

.......
boot.oat is compiled with all boot class path jars.
Once extract all dex from it, we have all boot classes.

Or can I rename each of the files in /dex/*.dex to classes.dex and to add this classes.dex in matching * .jar?
For example:
after successful:
Code:
java -jar oat2dex.jar boot boot.oat
/dex/android.policy.dex rename -> classes.dex and pack into android.policy.jar (with 7za)
Is that correct?

---------- Post added at 03:16 ---------- Previous post was at 02:35 ----------

@_riddle
I deodexed 1 file - SystemUI.apk and added it to the odex system for verification. Phone booted successfully and runs without errors (HTC One M7 with Google Play edition Android 5.0.1)
THANK YOU !!!
Now I need to check all odexed jar's from framework and all jar's from framework with odex from framework/boot.oat (That was my question in a previous post ...) ...
 

Golv

Recognized Developer
Jan 17, 2012
2,275
4,767
HTC U11
OnePlus 10 Pro
Only one of all Odex files (from framework, app and priv-app) with error:

g:\oat2dex>java -jar oat2dex.jar Launcher2.odex odex
12-21 07:55:01:793 Preparing bootclasspath from odex
12-21 07:55:03:088 De-optimizing /system/priv-app/Launcher2/Launcher2.apk
Exception in thread "main" org.jf.util.ExceptionWithContext: Unsupported instruction format: Format22cs
at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1008)
at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:769)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:222)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:200)
at org.jf.dexlib2.writer.pool.DexPool.writeTo(DexPool.java:99)
at dext.OatUtil.extractToDex(OatUtil.java:271)
at dext.OatUtil.oat2dex(OatUtil.java:140)
at dext.OatUtil.main(OatUtil.java:160)

Odex original and apk - attached here: Launcher2.rar
@_riddle Could you see this app and odex? Why the error occurred and what can be done?
THX!!!
 

Golv

Recognized Developer
Jan 17, 2012
2,275
4,767
HTC U11
OnePlus 10 Pro
Cheers!
I've my full DEODEXed ROM now, except Launcher2.apk (with Launcher2.odex)
Ffirst I was left in the /system /priv-app only odex Launcer.apk and /arm/Launcher.odex and removed from the /system/framework all /arm folder.
Phone successfully loaded, but gave error Laucher.
Then I added into /system/framework/arm folder two files: boot.oat and boot.art
The phone has successfully boot WITHOUT any errors. As a result, there is only one odex Launcher2.apk in the system. But I think it's no problem! Everything will be decided in the future!
Great respect @_riddle and other for their great work!
 
Last edited:

svadev

Senior Member
Dec 13, 2014
133
481
Surprise to see my patch appears here...
Thanks to baksmali/smali author jesusfreke, the source has nice structure that is easy to extend.

For who may interest about the oat file format:
(Actually it is elf, oat header start from 4k address)
androidxref.com/5.0.0_r2/xref/art/compiler/oat_writer.h#34

The dex in oat file should be odex (not the same as dalvik) format.
Reference: androidxref.com/5.0.0_r2/xref/art/compiler/dex/dex_to_dex_compiler.cc
As below sample, optimized dex uses vtable offset to save function resolving time.

Correct(source) content
Code:
    .line 76
    const-class v1, [I
    invoke-virtual {v1}, Ljava/lang/Class;->getComponentType()Ljava/lang/Class;
    move-result-object v1
    sput-object v1, TYPE:Ljava/lang/Class;
Odex content (Only extract from oat will get this)
Code:
    .line 76
    const-class v1, [I
    invoke-virtual/range-quick {v1}, vtable@20
    move-result-object v1
    sput-object v1, TYPE:Ljava/lang/Class;
Use original baksmali to force convert art's odex will get wrong instruction.
Pack these content to device will result unexpected runtime error.
Code:
    .line 76
    const-class v1, [I
    iput-wide-volatile v0, v1, Landroid/system/OsConstants;->CAP_DAC_READ_SEARCH:I
    move v0, v0
    move-result-object v1
    sput-object v1, TYPE:Ljava/lang/Class;
About the purpose of the tools I made.
It is to convert oat to legacy dex that allow original baksmali without patch can deassemble it correctly.

For example: SystemUI.odex (Actually it is an oat file)
1. Get odex/dex boot class
Code:
java -jar oat2dex.jar boot boot.oat
2. Deodex application (The parameter "odex" is folder path from step 1)
As dalvik, deodex application's odex will need to reference boot class to resolve what vtable mapping to.
Code:
java -jar oat2dex.jar SystemUI.odex odex
3. Deassemble the output of step 2 by original baksmali.

I only test on AOSP version, I am not sure whether manufacturer modified their own format.
If it does not work correctly, I have no idea without detail information (provide file, error message...).
@_riddle:
I try to use your tool for Samsung S5 and have get error.
Here is error, boot.oat, SystemUI.odex : ftp://79.120.63.235/err_oat2dex.zip

Added:
in Samsung boot.oat - oat header contains two additional fields:
oat_create_commands_info_size : uint32; // length of oat create command in bytes
oat_create_command:[FONT=&quot] ubyte[[/FONT][FONT=&quot]oat_create_commands_info_size] ; // aot create command command

and only after this follow dex files headers
[/FONT]
 
Last edited:
  • Like
Reactions: _alexndr

_riddle

Member
Dec 19, 2014
9
48
Taoyuan
@_riddle:
I try to use your tool for Samsung S5 and have get error.
Here is error, boot.oat, SystemUI.odex : ftp://79.120.63.235/err_oat2dex.zip

Added:
in Samsung boot.oat - oat header contains two additional fields:
oat_create_commands_info_size : uint32; // length of oat create command in bytes
oat_create_command:[FONT=&quot] ubyte[[/FONT][FONT=&quot]oat_create_commands_info_size] ; // aot create command command

and only after this follow dex files headers
[/FONT]
@svadev
Thanks for the information.
Finally I add a rough workaround to compatible with Samsung's format:
Read more 4 bytes as methods_offsets_ of structure OatDexFile when read unreasonable dex size.
Please try the attachment.
 

Attachments

  • oat2dex.jar
    921.3 KB · Views: 228
Last edited:
  • Like
Reactions: _alexndr and svadev

_riddle

Member
Dec 19, 2014
9
48
Taoyuan
@_riddle
Thx for your great work!
Could I need deassemble with baksmali output files from boot from /odex/*.dex or from /dex/*.dex for correct deoxed framework's *.jar?
Files from which folder do I need deassemble?
The output odex folder is just temporary. It can be deleted once dex files were generated.
To deopt application, use "java -jar oat2dex.jar app.odex dex" will also work.

I added a easier function to get deodexed jars, but currently only include boot jars.
java -jar oat2dex_v03.jar auto
It will get all boot jar related files and generate deodexed jars to folder "result-jar".
(It will need to connect device and adb executable in environment path or same folder to work.)
 

Attachments

  • oat2dex_v03.jar
    1 MB · Views: 164

svadev

Senior Member
Dec 13, 2014
133
481
The output odex folder is just temporary. It can be deleted once dex files were generated.
To deopt application, use "java -jar oat2dex.jar app.odex dex" will also work.

I added a easier function to get deodexed jars, but currently only include boot jars.
java -jar oat2dex_v03.jar auto
It will get all boot jar related files and generate deodexed jars to folder "result-jar".
(It will need to connect device and adb executable in environment path or same folder to work.)
@_riddle
Can you also make so that you can specify the folder /system on the disk so it took the files and not from the device
 

Golv

Recognized Developer
Jan 17, 2012
2,275
4,767
HTC U11
OnePlus 10 Pro
Thank you for the new version, but the previous works fine for me except for error with file, which I wrote and gave a link. For myself, I wrote script for dos for automatic decompile and deodex all apk and jar or only selected app. Everything from deodexed rom is working fine all this day. Only issue with the above file. If you will be able to see it - it would be great! I can upload boot.oat, if you need..
Code:
g:\oat2dex>java -jar oat2dex.jar Launcher2.odex odex
12-21 07:55:01:793 Preparing bootclasspath from odex
12-21 07:55:03:088 De-optimizing /system/priv-app/Launcher2/Launcher2.apk
Exception in thread "main" org.jf.util.ExceptionWithContext: Unsupported instruction format: Format22cs
at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexW riter.java:1008)
at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeI tems(DexWriter.java:769)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter. java:222)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter. java:200)
at org.jf.dexlib2.writer.pool.DexPool.writeTo(DexPool .java:99)
at dext.OatUtil.extractToDex(OatUtil.java:271)
at dext.OatUtil.oat2dex(OatUtil.java:140)
at dext.OatUtil.main(OatUtil.java:160)
 
Last edited:

_riddle

Member
Dec 19, 2014
9
48
Taoyuan
@svadev
try: java -jar oat2dex_v04.jar auto <system-folder>
@Golv
Try Launcher again.
In this case, I print some messages like below, but it should be ok.
Risky resolved field from debug info. class=Lcom/android/launcher2/AppsCustomizePagedView; method=syncWidgetPageItems field-type=Landroid/content/pm/ResolveInfo; instruction-address=345

Due to check-cast is optimized out to 2 nop, and v21 is assigned by java/lang/Object, v14 has no information to refer its type that caused error.
[odex content of com.android.launcher2.AppsCustomizePagedView :: syncWidgetPageItems]

.line 1192
invoke-virtual {v9, v13}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v21
...
move-object/from16 v14, v21
.line 1214
nop
nop
.line 1215
.local v14, "info":Landroid/content/pm/ResolveInfo;
new-instance v12, Lcom/android/launcher2/PendingAddShortcutInfo;
.end local v12 # "createItemInfo":Lcom/android/launcher2/PendingAddItemInfo;
iget-object-quick v2, v14, field@0x8

After recover it from debug info, it looks correct.
[deodexed content]
...
new-instance v12, Lcom/android/launcher2/PendingAddShortcutInfo;
.end local v12 # "createItemInfo":Lcom/android/launcher2/PendingAddItemInfo;
iget-object v2, v14, Landroid/content/pm/ResolveInfo;->activityInfo:Landroid/content/pm/ActivityInfo;
 

Attachments

  • oat2dex_v04.jar
    1 MB · Views: 111

Golv

Recognized Developer
Jan 17, 2012
2,275
4,767
HTC U11
OnePlus 10 Pro
@svadev
try: java -jar oat2dex_v04.jar auto <system-folder>

@Golv
Try Launcher again.
In this case, I print some messages like below, but it should be ok.
Risky resolved field from debug info. class=Lcom/android/launcher2/AppsCustomizePagedView; method=syncWidgetPageItems field-type=Landroid/content/pm/ResolveInfo; instruction-address=345

Due to check-cast is optimized out to 2 nop, and v21 is assigned by java/lang/Object, v14 has no information to refer its type that caused error.
[odex content of com.android.launcher2.AppsCustomizePagedView :: syncWidgetPageItems]

.line 1192
invoke-virtual {v9, v13}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v21
...
move-object/from16 v14, v21
.line 1214
nop
nop
.line 1215
.local v14, "info":Landroid/content/pm/ResolveInfo;
new-instance v12, Lcom/android/launcher2/PendingAddShortcutInfo;
.end local v12 # "createItemInfo":Lcom/android/launcher2/PendingAddItemInfo;
iget-object-quick v2, v14, field@0x8

After recover it from debug info, it looks correct.
[deodexed content]
...
new-instance v12, Lcom/android/launcher2/PendingAddShortcutInfo;
.end local v12 # "createItemInfo":Lcom/android/launcher2/PendingAddItemInfo;
iget-object v2, v14, Landroid/content/pm/ResolveInfo;->activityInfo:Landroid/content/pm/ActivityInfo;

@_riddle
With this version oat2dex_v04.jar - all is OK for Launcher2.apk.
This app was deodexed and after that ALL deodexed system works!
THANK YOU for great work!!! :good:
 

svadev

Senior Member
Dec 13, 2014
133
481
Four files de-optimazing with error

@svadev
try: java -jar oat2dex_v04.jar auto <system-folder>
@_riddle

Big thanks for your work!

In last oat2dex and previous for four files (maps.odex, Music2.odex, DocumentService.odex, SamsungLinkPlatform.odex) de-optimazing with error.
But in last v4 (oat2dex_v04.jar) still many others files (books.odex, chaton, drive.odex, drivelink.odex, flipboard.odex, headlines.odex...) de-optimazing with error and
errorlevel with java -jar oat2dex-v04.jar boot boot.oat is 1 and in folder DEX only 6 files (bouncycastle.dex, conscrypt.dex, core-junit.dex, core-libart.dex, ext.dex, okhttp.dex). And v4 work very long.
Please, correct it and return to v2. auto param not needed, because it works only with boot.oat, but not with all /system folder.
We can write batch code for oat2dex.jar which will work with whole /system folder.

Big thanks to you!

Here is these four files: ftp://79.120.63.235/for_file_with_error.zip

Code:
H:\deodex>java -jar oat2dex.jar Maps.odex odex
12-23 09:05:13:025 Preparing bootclasspath from odex
12-23 09:05:13:228 De-optimizing /system/app/Maps/Maps.apk
12-23 09:05:16:181 Analysis error in class=Lcom/google/android/apps/gmm/map/util/d; method=<clinit>
12-23 09:05:16:181 org.jf.dexlib2.analysis.AnalysisException: Could not resolve the field in class Lcom/google/android/apps/gmm/map/util/e; at offset 24 in <clinit>
        at org.jf.dexlib2.analysis.MethodAnalyzer.analyzeIputIgetQuick(MethodAnalyzer.java:1561)
        at org.jf.dexlib2.analysis.MethodAnalyzer.analyzeInstruction(MethodAnalyzer.java:968)
        at org.jf.dexlib2.analysis.MethodAnalyzer.analyze(MethodAnalyzer.java:205)
        at org.jf.dexlib2.analysis.MethodAnalyzer.<init>(MethodAnalyzer.java:140)
        at dext.OatUtil$OatDexRewriter$1$1.getInstructions(OatUtil.java:596)
        at org.jf.dexlib2.writer.pool.ClassPool.internCode(ClassPool.java:143)
        at org.jf.dexlib2.writer.pool.ClassPool.intern(ClassPool.java:125)
        at org.jf.dexlib2.writer.pool.DexPool.writeTo(DexPool.java:97)
        at dext.OatUtil.extractToDex(OatUtil.java:322)
        at dext.OatUtil.oat2dex(OatUtil.java:195)
        at dext.OatUtil.main(OatUtil.java:71)
opcode: iget-quick
code address: 1492
method: Lcom/google/android/apps/gmm/map/util/d;-><clinit>()V


Exception in thread "main" org.jf.util.ExceptionWithContext: Unsupported instruction format: Format22cs
        at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1008)
        at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:769)
        at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:222)
        at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:200)
        at org.jf.dexlib2.writer.pool.DexPool.writeTo(DexPool.java:99)
        at dext.OatUtil.extractToDex(OatUtil.java:322)
        at dext.OatUtil.oat2dex(OatUtil.java:195)
        at dext.OatUtil.main(OatUtil.java:71)




H:\deodex>java -jar oat2dex.jar Music2.odex odex
12-23 09:07:10:915 Preparing bootclasspath from odex
12-23 09:07:11:103 De-optimizing /system/app/Music2/Music2.apk
vtableIndex=76 vtable.size()=75
vtableIndex=75 vtable.size()=75
vtableIndex=76 vtable.size()=75
vtableIndex=83 vtable.size()=75
vtableIndex=83 vtable.size()=75
vtableIndex=83 vtable.size()=75
vtableIndex=90 vtable.size()=75
12-23 09:07:16:462 Analysis error in class=Lcom/google/android/music/utils/MusicUtils; method=getSongListRadioMixDescrip
tor
12-23 09:07:16:509 org.jf.dexlib2.analysis.AnalysisException: Could not resolve the method in class Lcom/google/android/
music/medialist/SongList; at index 90
        at org.jf.dexlib2.analysis.MethodAnalyzer.analyzeInvokeVirtualQuick(MethodAnalyzer.java:1659)
        at org.jf.dexlib2.analysis.MethodAnalyzer.analyzeInstruction(MethodAnalyzer.java:976)
        at org.jf.dexlib2.analysis.MethodAnalyzer.analyze(MethodAnalyzer.java:205)
        at org.jf.dexlib2.analysis.MethodAnalyzer.<init>(MethodAnalyzer.java:140)
        at dext.OatUtil$OatDexRewriter$1$1.getInstructions(OatUtil.java:596)
        at org.jf.dexlib2.writer.pool.ClassPool.internCode(ClassPool.java:143)
        at org.jf.dexlib2.writer.pool.ClassPool.intern(ClassPool.java:125)
        at org.jf.dexlib2.writer.pool.DexPool.writeTo(DexPool.java:97)
        at dext.OatUtil.extractToDex(OatUtil.java:322)
        at dext.OatUtil.oat2dex(OatUtil.java:195)
        at dext.OatUtil.main(OatUtil.java:71)
opcode: invoke-virtual/range-quick
code address: 247
method: Lcom/google/android/music/utils/MusicUtils;->getSongListRadioMixDescriptor(Landroid/content/Context;Lcom/google/
android/music/medialist/SongList;Z)Lcom/google/android/music/mix/MixDescriptor;


Exception in thread "main" org.jf.util.ExceptionWithContext: Unsupported instruction format: Format35ms
        at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1008)
        at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:769)
        at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:222)
        at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:200)
        at org.jf.dexlib2.writer.pool.DexPool.writeTo(DexPool.java:99)
        at dext.OatUtil.extractToDex(OatUtil.java:322)
        at dext.OatUtil.oat2dex(OatUtil.java:195)
        at dext.OatUtil.main(OatUtil.java:71)






H:\deodex>java -jar oat2dex.jar DocumentService.odex  odex
12-23 09:08:39:650 Preparing bootclasspath from odex
12-23 09:08:39:837 De-optimizing /system/priv-app/DocumentService/DocumentService.apk
12-23 09:08:41:634 Analysis error in class=Lorg/apache/index/poi/hslf/record/RecordTypes; method=<clinit>
12-23 09:08:41:634 org.jf.dexlib2.analysis.AnalysisException: Could not resolve the field in class Ljava/lang/Object; at
 offset 8 in <clinit>
        at org.jf.dexlib2.analysis.MethodAnalyzer.analyzeIputIgetQuick(MethodAnalyzer.java:1561)
        at org.jf.dexlib2.analysis.MethodAnalyzer.analyzeInstruction(MethodAnalyzer.java:968)
        at org.jf.dexlib2.analysis.MethodAnalyzer.analyze(MethodAnalyzer.java:205)
        at org.jf.dexlib2.analysis.MethodAnalyzer.<init>(MethodAnalyzer.java:140)
        at dext.OatUtil$OatDexRewriter$1$1.getInstructions(OatUtil.java:596)
        at org.jf.dexlib2.writer.pool.ClassPool.internCode(ClassPool.java:143)
        at org.jf.dexlib2.writer.pool.ClassPool.intern(ClassPool.java:125)
        at org.jf.dexlib2.writer.pool.DexPool.writeTo(DexPool.java:97)
        at dext.OatUtil.extractToDex(OatUtil.java:322)
        at dext.OatUtil.oat2dex(OatUtil.java:195)
        at dext.OatUtil.main(OatUtil.java:71)
opcode: iget-object-quick
code address: 1132
method: Lorg/apache/index/poi/hslf/record/RecordTypes;-><clinit>()V


12-23 09:08:42:322 Analysis error in class=Lorg/apache/poi/hslf/record/RecordTypes; method=<clinit>
12-23 09:08:42:322 org.jf.dexlib2.analysis.AnalysisException: Could not resolve the field in class Ljava/lang/Object; at
 offset 8 in <clinit>
        at org.jf.dexlib2.analysis.MethodAnalyzer.analyzeIputIgetQuick(MethodAnalyzer.java:1561)
        at org.jf.dexlib2.analysis.MethodAnalyzer.analyzeInstruction(MethodAnalyzer.java:968)
        at org.jf.dexlib2.analysis.MethodAnalyzer.analyze(MethodAnalyzer.java:205)
        at org.jf.dexlib2.analysis.MethodAnalyzer.<init>(MethodAnalyzer.java:140)
        at dext.OatUtil$OatDexRewriter$1$1.getInstructions(OatUtil.java:596)
        at org.jf.dexlib2.writer.pool.ClassPool.internCode(ClassPool.java:143)
        at org.jf.dexlib2.writer.pool.ClassPool.intern(ClassPool.java:125)
        at org.jf.dexlib2.writer.pool.DexPool.writeTo(DexPool.java:97)
        at dext.OatUtil.extractToDex(OatUtil.java:322)
        at dext.OatUtil.oat2dex(OatUtil.java:195)
        at dext.OatUtil.main(OatUtil.java:71)
opcode: iget-object-quick
code address: 1385
method: Lorg/apache/poi/hslf/record/RecordTypes;-><clinit>()V


Exception in thread "main" org.jf.util.ExceptionWithContext: Unsupported instruction format: Format22cs
        at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1008)
        at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:769)
        at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:222)
        at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:200)
        at org.jf.dexlib2.writer.pool.DexPool.writeTo(DexPool.java:99)
        at dext.OatUtil.extractToDex(OatUtil.java:322)
        at dext.OatUtil.oat2dex(OatUtil.java:195)
        at dext.OatUtil.main(OatUtil.java:71)




H:\deodex>java -jar oat2dex.jar SamsungLinkPlatform.odex odex
12-23 09:10:08:025 Preparing bootclasspath from odex
12-23 09:10:08:212 De-optimizing /system/priv-app/SamsungLinkPlatform/SamsungLinkPlatform.apk
Exception in thread "main" org.jf.util.ExceptionWithContext: Unsupported instruction format: Format35ms
        at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1008)
        at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:769)
        at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:222)
        at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:200)
        at org.jf.dexlib2.writer.pool.DexPool.writeTo(DexPool.java:99)
        at dext.OatUtil.extractToDex(OatUtil.java:322)
        at dext.OatUtil.oat2dex(OatUtil.java:195)
        at dext.OatUtil.main(OatUtil.java:71)
 
Last edited:
  • Like
Reactions: Golv

svadev

Senior Member
Dec 13, 2014
133
481
@svadev
Try to run in command line:
Code:
 java -Xmx1024m -jar oat2dex-v04.jar boot boot.oat

Thanks, with command line and -Xmx1024m v04 works.
But for four files (maps.odex, Music2.odex, DocumentService.odex, SamsungLinkPlatform.odex) de-optimazing still done with errors.

New version of tool (now fully worked) posted in post #1.
Big thanks @_riddle!
 
Last edited:
  • Like
Reactions: _alexndr

svadev

Senior Member
Dec 13, 2014
133
481
Tested

Thanks :D but most of apps in /app and /priv-app does not contain classes.dex inside after passing the whole procedure... (e.g. SamsungCamera3.apk, SecMms_Candy.apk ...)

Now i tested tool with 5.0 (L7) for S5 - all work finely, except -
maps.odex, Music2.odex, DocumentService.odex, SamsungLinkPlatform.odex - de-optimazing still done with errors.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 172
    This Toolkit for creating deodex firmware from android runtime (ART).

    Changelog (v5.5) from 21/04/2017:


    1. SamsungInCallUI.apk deodexing without errors. For it i developed and implemented the method of heavy deodexing for SamsungInCallUI.apk
    2. You must specify the path to the full stock /system directory to create script commands for all symlinks, not just for libraries.
    3. Full support Android Lollipop/Marsmallow/Nougat. Automatic detection android version (Lollipop/Marsmallow/Nougat)
    4. More optimizations
    5. Detected and fixed small errors
    New version v5.5 here






    Changelog (v5.0) from 08/12/2016:

    1. Support Android Lollipop/Marsmallow/Nougat
    2. Automatic detection android version (Lollipop/Marsmallow/Nougat)
    3. More optimizations
    4. Fixed errors
    Version v5.0 here




    SVADeodexerForArt.jpg

    New version v4.1 here

    Changelog (v4.1) from 09/03/2016:
    Fixed a bug in the processing of non-standard sequence file build.prop

    Changelog (v4.0) from 23/11/2015:


    1. Added full support for Android M
    2. More optimizations


    Changelog (v3.5) from 20/07/2015:

    1. Added full support for processor architectures:


    • arm
    • arm64
    • x86
    • x64
    • mips
    • mips64
    2. More optimizations


    Archive changelog:

    Changelog (v3.2) from 02/07/2015:

    1. Fixed copy folders without .apk, like mcRegistry to result folder (app, priv-app)
    2. New oat2dex.jar v0.83 with full support Android 5.1.1 (thanks @_riddle) and with last smali/baksmali

    Changelog (v3.1) from 26/04/2015:

    1. For 64-bit stock only added checkbox "Copy to result, not deodexed arm folders, if any, in addition to deodexed arm64 folders".
    If user checked it, then arm folders for framework and apks, that have arm and arm64 will be copied to result.
    2.
    mcRegistry folder and file such FFFFFFFF000000000000000000000001.drbin now copied to result
    3. Checkbox "copy only real libs" - deleted

    Changelog (v3.0) from 25/04/2015:

    1. Added full support arm64
    2.
    The program has become even more intelligent and gives a more correct result(see example of log)

    Changelog (v2.6):

    1. Added support arm64
    2.
    New oat2dex.jar (v07) with smali/baksmali v2.0.5


    Changelog
    (v2.5):


    1. You may drag and drop /system folder from Windows Explorer to SVADeodexerForArt.exe form.
    2. If you double click on "select path to stock /system directory" combobox, then tool will be search all /system folders of stock Lollipop firmwares on computer (use carefully - it may take 4-5 minutes)
    3. Fixed small errors (for example: tool now will see links to libs with "systemfile" attr).

    Improved performance, the program has become more intelligent and gives a more correct result.
    And in the log contains information that will be useful for developers.


    Example of log
    SVADeodexerForArt.exe

    Code:
    64-bit Deodexer for Android Runtime  (Version 3.5 от 20/07/2015)  © Valery Studenikin, 2015
    
    Path to stock /system directory: F:\TEMP\S6 Duos\G9200\firmware\G9200ZCU1AOFE_G9200CHC1AOFE_CHC\system
    Android 5.0.2: SM-G9200, LRX22G.G9200ZCU1AOFE, changelist 4635752, Sun Jun 28 20:45:21 KST 2015
    Processor architecture: \arm64\
    Files deodexed succesfully: 365,   with errors: 0.   CPU time: 00:05:57 (357,134 sec.)
    
    
    
    The necessary links for applications libraries:
    
        symlink("/system/lib/libaed.so", "/system/app/AdvSoundDetector2015/lib/arm/libaed.so");
        symlink("/system/lib/libfdb.so", "/system/app/AdvSoundDetector2015/lib/arm/libfdb.so");
        symlink("/system/lib/libSamsungBCPP.so", "/system/app/AdvSoundDetector2015/lib/arm/libSamsungBCPP.so");
        symlink("/system/lib/libasf_fileshare.so", "/system/app/AllshareFileShare/lib/arm/libasf_fileshare.so");
        symlink("/system/lib/libasf_fileshareserver.so", "/system/app/AllshareFileShareServer/lib/arm/libasf_fileshareserver.so");
        symlink("/system/lib/libasf_mediashare.so", "/system/app/AllshareMediaShare/lib/arm/libasf_mediashare.so");
        symlink("/system/lib/libbluetooth_jni.so", "/system/app/Bluetooth/lib/arm/libbluetooth_jni.so");
        symlink("/system/lib64/libnfc_nci_jni.so", "/system/app/NfcNci/lib/arm64/libnfc_nci_jni.so");
        symlink("/system/lib64/libjni_pacprocessor.so", "/system/app/PacProcessor/lib/arm64/libjni_pacprocessor.so");
        symlink("/system/lib/libmorpho_panorama_wa_for_viewer.so", "/system/app/Panorama360Viewer_Zero/lib/arm/libmorpho_panorama_wa_for_viewer.so");
        symlink("/system/lib/libmorpho_sensor_fusion_for_viewer.so", "/system/app/Panorama360Viewer_Zero/lib/arm/libmorpho_sensor_fusion_for_viewer.so");
        symlink("/system/lib/libcommonpawrapper.so", "/system/app/RootPA/lib/arm/libcommonpawrapper.so");
        symlink("/system/lib/libnmsp_sk_speex.so", "/system/app/SamsungChineseIMEv9/lib/arm/libnmsp_sk_speex.so");
        symlink("/system/lib/libapa_jni.so", "/system/app/SapaMonitor/lib/arm/libapa_jni.so");
        symlink("/system/lib64/libgkdp_sv_engine.so", "/system/app/SCService/lib/arm64/libgkdp_sv_engine.so");
        symlink("/system/lib64/libscservice_jni.so", "/system/app/SCService/lib/arm64/libscservice_jni.so");
        symlink("/system/lib/libDioDict3EngineNativeFrame.so", "/system/app/SecDict2Zero/lib/arm/libDioDict3EngineNativeFrame.so");
        symlink("/system/lib/libdioiculemma.so", "/system/app/SecDict2Zero/lib/arm/libdioiculemma.so");
        symlink("/system/lib/libjma.so", "/system/app/SecDict2Zero/lib/arm/libjma.so");
        symlink("/system/lib/libnltk.so", "/system/app/SecDict2Zero/lib/arm/libnltk.so");
        symlink("/system/lib/libstlport_shared.so", "/system/app/SecDict2Zero/lib/arm/libstlport_shared.so");
        symlink("/system/lib64/libprintspooler_jni.so", "/system/app/SPrintSpooler/lib/arm64/libprintspooler_jni.so");
        symlink("/system/lib/libTui.so", "/system/app/TuiService/lib/arm/libTui.so");
        symlink("/system/lib64/libdefcontainer_jni.so", "/system/priv-app/DefaultContainerService/lib/arm64/libdefcontainer_jni.so");
        symlink("/system/lib64/libPlatformStrings.so", "/system/priv-app/HealthService/lib/arm64/libPlatformStrings.so");
        symlink("/system/lib64/libSensorNativeProtocol.so", "/system/priv-app/HealthService/lib/arm64/libSensorNativeProtocol.so");
        symlink("/system/lib/libsecipx.so", "/system/priv-app/OutOfFocusViewer_WQHD_K/lib/arm/libsecipx.so");
        symlink("/system/lib/libSisoJpegCodec.so", "/system/priv-app/OutOfFocusViewer_WQHD_K/lib/arm/libSisoJpegCodec.so");
        symlink("/system/lib/libSRIB_FocusShot.so", "/system/priv-app/OutOfFocusViewer_WQHD_K/lib/arm/libSRIB_FocusShot.so");
        symlink("/system/lib64/libPedometer.so", "/system/priv-app/SHealth4/lib/arm64/libPedometer.so");
        symlink("/system/lib64/libPlatformStrings.so", "/system/priv-app/SHealth4/lib/arm64/libPlatformStrings.so");
        symlink("/system/lib64/libsaiv.so", "/system/priv-app/SHealth4/lib/arm64/libsaiv.so");
        symlink("/system/lib64/libSensorNativeProtocol.so", "/system/priv-app/SHealth4/lib/arm64/libSensorNativeProtocol.so");
        symlink("/system/lib64/lib_stressanalyzer_v03_jni.so", "/system/priv-app/SHealth4/lib/arm64/lib_stressanalyzer_v03_jni.so");
        symlink("/system/lib/libCreateSceneMap.so", "/system/priv-app/VirtualTourViewer_WQHD_lightTheme/lib/arm/libCreateSceneMap.so");
        symlink("/system/lib/libqjpeg_secvision.so", "/system/priv-app/VirtualTourViewer_WQHD_lightTheme/lib/arm/libqjpeg_secvision.so");
    
    
    Attention: framework deodexed only for 64-bit (32-bit version not deodexed and not was copied to result)
    
    List of apks that have 32-bit and 64-bit versions (deodexed only for 64-bit):
    
        /system/app/WebViewGoogle.apk
    
    
    List of deodexed apks that have only 32-bit version (don't have 64-bit):
    
        /system/app/AdvSoundDetector2015.apk
        /system/app/AllshareFileShare.apk
        /system/app/AllshareFileShareServer.apk
        /system/app/AllshareMediaShare.apk
        /system/app/Bluetooth.apk
        /system/app/Panorama360Viewer_Zero.apk
        /system/app/RootPA.apk
        /system/app/SamsungChineseIMEv9.apk
        /system/app/SapaMonitor.apk
        /system/app/SBrowser_3.0.38.apk
        /system/app/SCONE_Android_ProxyService_Lib.apk
        /system/app/SecDict2Zero.apk
        /system/app/TuiService.apk
        /system/priv-app/ChineseLanguagePack.apk
        /system/priv-app/EnglishLanguagePack.apk
        /system/priv-app/KoreanLanguagePack.apk
        /system/priv-app/OutOfFocusViewer_WQHD_K.apk
        /system/priv-app/S-Voice_Android_new.apk
        /system/priv-app/SVoice_PLM_Service.apk
        /system/priv-app/TouchWizHome_ZERO.apk
        /system/priv-app/VirtualTourViewer_WQHD_lightTheme.apk
        /system/priv-app/VoiceWakeUp.apk
    
    
    List of originally deodexed (within stock firmware) files, are left as they were originally:
    
        /system/framework/cneapiclient.jar
        /system/framework/com.qti.dpmframework.jar
        /system/framework/com.quicinc.cne.jar
        /system/framework/com.samsung.device.jar
        /system/framework/dpmapi.jar
        /system/app/FactoryCamera_FB.apk
        /system/app/minimode-res.apk
        /system/app/MirrorLink.apk
        /system/app/SecFactoryPhoneTest.apk
        /system/app/secvisualeffect-res.apk
        /system/priv-app/AutomationTest_FB.apk
        /system/priv-app/AutoPreconfig.apk
        /system/priv-app/DeviceKeystring.apk
        /system/priv-app/DeviceTest.apk
        /system/priv-app/HwModuleTest.apk
        /system/priv-app/KLMSAgent.apk
        /system/priv-app/serviceModeApp_FB.apk
        /system/priv-app/ServiceModeApp_RIL.apk
        /system/priv-app/SMCore.apk
        /system/framework/core-libart.jar
    1. Download for 32-bit systems (v3.5 from 20-07-2015): View attachment SVADeodexerForArtx32.zip
    2. Download for 64-bit systems (v3.5 from 20-07-2015): View attachment SVADeodexerForArtx64.zip

    This tool uses oat2dex.jar (v0.83) (thanks @_riddle).
    If _riddle issues new version of oat2dex.jar - you must change it in zip archive and rename as oat2dex.jar.
    47
    New version - 4.1

    SVADeodexerForArt.jpg

    Changelog (v4.1) from 09/03/2016:

    Fixed a bug in the processing of non-standard sequence file build.prop


    1. Download for 32-bit systems (v4.1 from 09-03-2016): View attachment SVADeodexerForArtx32.zip
    2. Download for 64-bit systems (v
    4.1 from 09-03-2016): View attachment SVADeodexerForArtx64.zip

    Example of log SVADeodexerForArt.exe for huawei Android 6.0
    Code:
    64-bit Deodexer for Android Runtime  (Version 4.1 от 09/03/2016)  © Valery Studenikin, 2016
    
    Path to stock /system directory: F:\TEMP\1\system\system
    Android 6.0: PLK, PLK-L01C432B320, changelist , Sun Jan 24 06:36:33 CST 2016
    Processor architecture: \oat\arm64\
    Files deodexed succesfully: 164,   with errors: 0.   CPU time: 00:02:37 (157,321 sec.)
    
    
    
    Attention: framework deodexed only for 64-bit (32-bit version not deodexed and not was copied to result)
    
    List of apks that have 32-bit and 64-bit versions (deodexed only for 64-bit):
    
        /system/app/HwDeskClock.apk
        /system/app/HwFileManager.apk
        /system/app/HwFMRadio.apk
        /system/priv-app/Calendar.apk
        /system/priv-app/Contacts.apk
        /system/priv-app/Gallery2.apk
        /system/priv-app/HwNotePad.apk
        /system/priv-app/HwSystemManager.apk
    
    
    List of deodexed apks that have only 32-bit version (don't have 64-bit):
    
        /system/app/Bluetooth.apk
        /system/app/Galaxy4.apk
        /system/app/HoloSpiralWallpaper.apk
        /system/app/HwMultiScreenShot.apk
        /system/app/HwOUC.apk
        /system/app/HwSoundRecorder.apk
        /system/app/HwVAssistant.apk
        /system/app/NoiseField.apk
        /system/app/PhaseBeam.apk
        /system/priv-app/HwCamera.apk
        /system/priv-app/HwVPlayer.apk
    
    
    List of originally deodexed (within stock firmware) files, are left as they were originally:
    
        /system/app/Books.apk
        /system/app/Chrome.apk
        /system/app/Drive.apk
        /system/app/Gmail2.apk
        /system/app/GoogleCalendarSyncAdapter.apk
        /system/app/GoogleContactsSyncAdapter.apk
        /system/app/GoogleTTS.apk
        /system/app/Hangouts.apk
        /system/app/Maps.apk
        /system/app/Music2.apk
        /system/app/Newsstand.apk
        /system/app/Photos.apk
        /system/app/PlayGames.apk
        /system/app/PlusOne.apk
        /system/app/talkback.apk
        /system/app/Videos.apk
        /system/app/WebViewGoogle.apk
        /system/app/YouTube.apk
        /system/priv-app/ConfigUpdater.apk
        /system/priv-app/Exchange2.apk
        /system/priv-app/GmsCore.apk
        /system/priv-app/GoogleBackupTransport.apk
        /system/priv-app/GoogleFeedback.apk
        /system/priv-app/GoogleLoginService.apk
        /system/priv-app/GoogleOneTimeInitializer.apk
        /system/priv-app/GooglePackageInstaller.apk
        /system/priv-app/GooglePartnerSetup.apk
        /system/priv-app/GoogleServicesFramework.apk
        /system/priv-app/Phonesky.apk
        /system/priv-app/SetupWizard.apk
        /system/priv-app/Velvet.apk
    39
    SVADeodexerForArt_v4.jpg

    Changelog (v4.0) from 23/11/2015:


    1. Added full support for Android M
    2. More optimizations

    1. Download for 32-bit systems (v4.0 from 23-11-2015): View attachment SVADeodexerForArtx32_v4.zip
    2. Download for 64-bit systems (v
    4.0 from 23-11-2015): View attachment SVADeodexerForArtx64_v4.zip
    35
    New version - v5.5

    SVADeodexerForArt.jpg

    Changelog (v5.5) from 21/04/2017:



    1. SamsungInCallUI.apk deodexing without errors. For it i developed and implemented the method of heavy deodexing for SamsungInCallUI.apk
    2. You must specify the path to the full stock /system directory to create script commands for all symlinks, not just for libraries.
    3. Full support Android Lollipop/Marsmallow/Nougat. Automatic detection android version (Lollipop/Marsmallow/Nougat)
    4. More optimizations
    5. Detected and fixed small errors

    1. Download for 32-bit systems (v5.5 from 21-04-2017): View attachment SVADeodexerForArt_v5-5_32.zip
    2. Download for 64-bit systems (
    v5.5 from 21-04-2017): View attachment SVADeodexerForArt_v5-5_64.zip


    Example of log SVADeodexerForArt.exe for Android 7.0
    64-bit Deodexer for Android Runtime (Version 5.5 от 21/04/2017) © Valery Studenikin, 2017

    Path to stock /system directory: F:\Temp\S8+\G955FXXU1AQDD\system
    Android 7.0 (SDK 24): SM-G955F, NRD90M.G955FXXU1AQDD, changelist 11168760, Tue Apr 11 22:35:33 KST 2017
    Processor architecture: \oat\arm64\
    Files deodexed succesfully: 142, with errors: 0. CPU time: 00:03:15 (194,610 sec.)



    The necessary symlinks:

    symlink("toybox", "/system/bin/acpi");
    symlink("app_process64", "/system/bin/app_process");
    symlink("toybox", "/system/bin/base64");
    symlink("toybox", "/system/bin/basename");
    symlink("toybox", "/system/bin/blockdev");
    symlink("toybox", "/system/bin/bzcat");
    symlink("toybox", "/system/bin/cal");
    symlink("toybox", "/system/bin/cat");
    symlink("toybox", "/system/bin/chcon");
    symlink("toybox", "/system/bin/chgrp");
    symlink("toybox", "/system/bin/chmod");
    symlink("toybox", "/system/bin/chown");
    symlink("toybox", "/system/bin/chroot");
    symlink("toybox", "/system/bin/cksum");
    symlink("toybox", "/system/bin/clear");
    symlink("toybox", "/system/bin/cmp");
    symlink("toybox", "/system/bin/comm");
    symlink("toybox", "/system/bin/cp");
    symlink("toybox", "/system/bin/cpio");
    symlink("toybox", "/system/bin/cut");
    symlink("dalvikvm64", "/system/bin/dalvikvm");
    symlink("toybox", "/system/bin/date");
    symlink("toolbox", "/system/bin/dd");
    symlink("toybox", "/system/bin/df");
    symlink("toybox", "/system/bin/dirname");
    symlink("toybox", "/system/bin/dmesg");
    symlink("toybox", "/system/bin/dos2unix");
    symlink("toybox", "/system/bin/du");
    symlink("toybox", "/system/bin/echo");
    symlink("grep", "/system/bin/egrep");
    symlink("toybox", "/system/bin/env");
    symlink("toybox", "/system/bin/expand");
    symlink("toybox", "/system/bin/expr");
    symlink("toybox", "/system/bin/fallocate");
    symlink("toybox", "/system/bin/false");
    symlink("grep", "/system/bin/fgrep");
    symlink("toybox", "/system/bin/find");
    symlink("toybox", "/system/bin/flock");
    symlink("toybox", "/system/bin/free");
    symlink("toybox", "/system/bin/getenforce");
    symlink("toolbox", "/system/bin/getevent");
    symlink("toybox", "/system/bin/getprop");
    symlink("toybox", "/system/bin/groups");
    symlink("toybox", "/system/bin/head");
    symlink("toybox", "/system/bin/hostname");
    symlink("toybox", "/system/bin/hwclock");
    symlink("toybox", "/system/bin/id");
    symlink("toybox", "/system/bin/ifconfig");
    symlink("toolbox", "/system/bin/iftop");
    symlink("toybox", "/system/bin/inotifyd");
    symlink("toybox", "/system/bin/insmod");
    symlink("toolbox", "/system/bin/ioctl");
    symlink("toybox", "/system/bin/ionice");
    symlink("toybox", "/system/bin/iorenice");
    symlink("ip6tables", "/system/bin/ip6tables-restore");
    symlink("ip6tables", "/system/bin/ip6tables-save");
    symlink("iptables", "/system/bin/iptables-restore");
    symlink("iptables", "/system/bin/iptables-save");
    symlink("toybox", "/system/bin/kill");
    symlink("toybox", "/system/bin/killall");
    symlink("toybox", "/system/bin/ln");
    symlink("toybox", "/system/bin/load_policy");
    symlink("toolbox", "/system/bin/log");
    symlink("toybox", "/system/bin/logname");
    symlink("toybox", "/system/bin/losetup");
    symlink("toybox", "/system/bin/ls");
    symlink("toybox", "/system/bin/lsmod");
    symlink("toybox", "/system/bin/lsof");
    symlink("toybox", "/system/bin/lsusb");
    symlink("toybox", "/system/bin/md5sum");
    symlink("toybox", "/system/bin/mkdir");
    symlink("toybox", "/system/bin/mknod");
    symlink("toybox", "/system/bin/mkswap");
    symlink("toybox", "/system/bin/mktemp");
    symlink("toybox", "/system/bin/modinfo");
    symlink("toybox", "/system/bin/more");
    symlink("toybox", "/system/bin/mount");
    symlink("toybox", "/system/bin/mountpoint");
    symlink("toybox", "/system/bin/mv");
    symlink("toolbox", "/system/bin/nandread");
    symlink("toybox", "/system/bin/netstat");
    symlink("toolbox", "/system/bin/newfs_msdos");
    symlink("toybox", "/system/bin/nice");
    symlink("toybox", "/system/bin/nl");
    symlink("toybox", "/system/bin/nohup");
    symlink("toybox", "/system/bin/od");
    symlink("toybox", "/system/bin/paste");
    symlink("toybox", "/system/bin/patch");
    symlink("toybox", "/system/bin/pgrep");
    symlink("toybox", "/system/bin/pidof");
    symlink("toybox", "/system/bin/pkill");
    symlink("toybox", "/system/bin/pmap");
    symlink("toybox", "/system/bin/printenv");
    symlink("toybox", "/system/bin/printf");
    symlink("toolbox", "/system/bin/prlimit");
    symlink("toolbox", "/system/bin/ps");
    symlink("toybox", "/system/bin/pwd");
    symlink("toybox", "/system/bin/readlink");
    symlink("toybox", "/system/bin/realpath");
    symlink("toybox", "/system/bin/renice");
    symlink("toybox", "/system/bin/restorecon");
    symlink("toybox", "/system/bin/rm");
    symlink("toybox", "/system/bin/rmdir");
    symlink("toybox", "/system/bin/rmmod");
    symlink("toybox", "/system/bin/route");
    symlink("toybox", "/system/bin/runcon");
    symlink("toybox", "/system/bin/sed");
    symlink("toolbox", "/system/bin/sendevent");
    symlink("toybox", "/system/bin/seq");
    symlink("toybox", "/system/bin/setenforce");
    symlink("toybox", "/system/bin/setprop");
    symlink("toybox", "/system/bin/setsid");
    symlink("toybox", "/system/bin/sha1sum");
    symlink("toybox", "/system/bin/sleep");
    symlink("toybox", "/system/bin/sort");
    symlink("toybox", "/system/bin/split");
    symlink("toolbox", "/system/bin/start");
    symlink("toybox", "/system/bin/stat");
    symlink("toolbox", "/system/bin/stop");
    symlink("toybox", "/system/bin/strings");
    symlink("toybox", "/system/bin/swapoff");
    symlink("toybox", "/system/bin/swapon");
    symlink("toybox", "/system/bin/sync");
    symlink("toybox", "/system/bin/sysctl");
    symlink("toybox", "/system/bin/tac");
    symlink("toybox", "/system/bin/tail");
    symlink("toybox", "/system/bin/tar");
    symlink("toybox", "/system/bin/taskset");
    symlink("toybox", "/system/bin/tee");
    symlink("toybox", "/system/bin/time");
    symlink("toybox", "/system/bin/timeout");
    symlink("toolbox", "/system/bin/top");
    symlink("toybox", "/system/bin/touch");
    symlink("toybox", "/system/bin/tr");
    symlink("toybox", "/system/bin/true");
    symlink("toybox", "/system/bin/truncate");
    symlink("toybox", "/system/bin/tty");
    symlink("toybox", "/system/bin/ulimit");
    symlink("toybox", "/system/bin/umount");
    symlink("toybox", "/system/bin/uname");
    symlink("toybox", "/system/bin/uniq");
    symlink("toybox", "/system/bin/unix2dos");
    symlink("toybox", "/system/bin/uptime");
    symlink("toybox", "/system/bin/usleep");
    symlink("toybox", "/system/bin/vmstat");
    symlink("toybox", "/system/bin/wc");
    symlink("toybox", "/system/bin/which");
    symlink("toybox", "/system/bin/whoami");
    symlink("toybox", "/system/bin/xargs");
    symlink("toybox", "/system/bin/xxd");
    symlink("toybox", "/system/bin/yes");


    symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
    symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
    symlink("Roboto-Medium.ttf", "/system/fonts/SECRobotoLight-Bold.ttf");
    symlink("Roboto-Regular.ttf", "/system/fonts/SECRobotoLight-Regular.ttf");
    symlink("/vendor/lib64/egl/libGLES_mali.so", "/system/vendor/lib64/hw/vulkan.exynos5.so");
    symlink("/vendor/lib/egl/libGLES_mali.so", "/system/vendor/lib/hw/vulkan.exynos5.so");


    The necessary links for applications libraries:

    symlink("/system/lib64/libaed.so", "/system/app/AdvSoundDetector2015/lib/arm64/libaed.so");
    symlink("/system/lib64/libfdb.so", "/system/app/AdvSoundDetector2015/lib/arm64/libfdb.so");
    symlink("/system/lib64/libSamsungBCPP.so", "/system/app/AdvSoundDetector2015/lib/arm64/libSamsungBCPP.so");
    symlink("/system/lib/libasf_fileshare.so", "/system/app/AllshareFileShare/lib/arm/libasf_fileshare.so");
    symlink("/system/lib/libasf_fileshareserver.so", "/system/app/AllshareFileShare/lib/arm/libasf_fileshareserver.so");
    symlink("/system/lib/libasf_mediashare.so", "/system/app/AllshareMediaShare/lib/arm/libasf_mediashare.so");
    symlink("/system/lib/libbluetooth_jni.so", "/system/app/Bluetooth/lib/arm/libbluetooth_jni.so");
    symlink("/system/lib64/libgen_def_certdks.so", "/system/app/DownloadableKeystore/lib/arm64/libgen_def_certdks.so");
    symlink("/system/lib64/libMCVendorTlc.so", "/system/app/DownloadableKeystore/lib/arm64/libMCVendorTlc.so");
    symlink("/system/lib64/libtlc64serviceappnative.so", "/system/app/DownloadableKeystore/lib/arm64/libtlc64serviceappnative.so");
    symlink("/system/lib64/libtlc_tz_ccm_inapptwo.so", "/system/app/DownloadableKeystore/lib/arm64/libtlc_tz_ccm_inapptwo.so");
    symlink("/system/lib64/libVendorTlc.so", "/system/app/DownloadableKeystore/lib/arm64/libVendorTlc.so");
    symlink("/system/lib64/libnfc_nci_jni.so", "/system/app/NfcNci/lib/arm64/libnfc_nci_jni.so");
    symlink("/system/lib64/libjni_pacprocessor.so", "/system/app/PacProcessor/lib/arm64/libjni_pacprocessor.so");
    symlink("/system/lib64/libmorpho_panorama_wa_for_viewer.so", "/system/app/Panorama360Viewer/lib/arm64/libmorpho_panorama_wa_for_viewer.so");
    symlink("/system/lib64/libmorpho_sensor_fusion_for_viewer.so", "/system/app/Panorama360Viewer/lib/arm64/libmorpho_sensor_fusion_for_viewer.so");
    symlink("/system/lib/libcommonpawrapper.so", "/system/app/RootPA/lib/arm/libcommonpawrapper.so");
    symlink("/system/lib64/libprintspooler_jni7.so", "/system/app/SPrintSpooler7/lib/arm64/libprintspooler_jni7.so");
    symlink("/system/lib64/libPSI.so", "/system/app/sveservice/lib/arm64/libPSI.so");
    symlink("/system/lib64/librtp.so", "/system/app/sveservice/lib/arm64/librtp.so");
    symlink("/system/lib64/librtppayload.so", "/system/app/sveservice/lib/arm64/librtppayload.so");
    symlink("/system/lib64/libsamsung_videoengine_7_0.so", "/system/app/sveservice/lib/arm64/libsamsung_videoengine_7_0.so");
    symlink("/system/lib64/libsisosrtp.so", "/system/app/sveservice/lib/arm64/libsisosrtp.so");
    symlink("/system/lib64/libsvejni.so", "/system/app/sveservice/lib/arm64/libsvejni.so");
    symlink("/system/lib64/libTui.so", "/system/app/TuiService/lib/arm64/libTui.so");
    symlink("/system/lib64/libdefcontainer_jni.so", "/system/priv-app/DefaultContainerService/lib/arm64/libdefcontainer_jni.so");
    symlink("/system/lib64/libappfuse_jni.so", "/system/priv-app/MtpDocumentsProvider/lib/arm64/libappfuse_jni.so");
    symlink("/system/lib64/libQualityWrapper_Wallpaper.so", "/system/priv-app/ODTCFactoryService/lib/arm64/libQualityWrapper_Wallpaper.so");
    symlink("/system/lib/libsvoicedll.so", "/system/priv-app/SVoicePLM/lib/arm/libsvoicedll.so");


    Attention: framework deodexed only for 64-bit (32-bit version not deodexed and not was copied to result)

    List of originally deodexed (within stock firmware) files, are left as they were originally:

    /system/app/AASAservice.apk
    /system/app/AdvSoundDetector2015.apk
    /system/app/AllshareFileShare.apk
    /system/app/AllshareMediaShare.apk
    /system/app/AntHalService.apk
    /system/app/ANTPlusPlugins.apk
    /system/app/ANTPlusTest.apk
    /system/app/ApexService.apk
    /system/app/AppLinker.apk
    /system/app/BasicDreams.apk
    /system/app/BBCAgent.apk
    /system/app/BCService.apk
    /system/app/BeamService.apk
    /system/app/Bluetooth.apk
    /system/app/BluetoothMidiService.apk
    /system/app/BluetoothTest.apk
    /system/app/BookmarkProvider.apk
    /system/app/CaptivePortalLogin.apk
    /system/app/CarmodeStub.apk
    /system/app/CertInstaller.apk
    /system/app/ChocoEUKor.apk
    /system/app/Chrome.apk
    /system/app/ChromeCustomizations.apk
    /system/app/ClipboardEdge.apk
    /system/app/ClipboardSaveService.apk
    /system/app/ClipboardUIService.apk
    /system/app/ClockPackage_N.apk
    /system/app/CloudGateway2017.apk
    /system/app/CnnPanel.apk
    /system/app/CocktailQuickTool.apk
    /system/app/CoolEUKor.apk
    /system/app/CoreApps_SDK_2017.apk
    /system/app/CtsShimPrebuilt.apk
    /system/app/DictDiotek_update.apk
    /system/app/DownloadableKeystore.apk
    /system/app/DownloadProviderUi.apk
    /system/app/DRParser.apk
    /system/app/EasterEgg.apk
    /system/app/EasymodeContactsWidget81.apk
    /system/app/EasyOneHand3.apk
    /system/app/EdmSimPinService.apk
    /system/app/EdmVpnServices.apk
    /system/app/EmergencyLauncher.apk
    /system/app/EmergencyModeService.apk
    /system/app/EmergencyProvider.apk
    /system/app/ESEServiceAgent.apk
    /system/app/Facebook_stub.apk
    /system/app/FactoryCameraFB.apk
    /system/app/FBAppManager_NS.apk
    /system/app/FilterInstaller.apk
    /system/app/FilterProvider.apk
    /system/app/FlashAnnotate.apk
    /system/app/FlipboardBriefing.apk
    /system/app/Foundation.apk
    /system/app/GameOptimizer.apk
    /system/app/GearManagerStub.apk
    /system/app/Gmail2.apk
    /system/app/GoogleCalendarSyncAdapter.apk
    /system/app/GoogleContactsSyncAdapter.apk
    /system/app/GooglePrintRecommendationService.apk
    /system/app/GoogleTTS.apk
    /system/app/HandwritingService.apk
    /system/app/Hs20Provider.apk
    /system/app/InteractivePanoramaViewer_WQHD.apk
    /system/app/KeyChain.apk
    /system/app/KnoxAppsUpdateAgent.apk
    /system/app/KnoxAttestationAgent.apk
    /system/app/KnoxFolderContainer2.apk
    /system/app/KnoxRemoteContentsProvider.apk
    /system/app/KnoxSetupWizardClient.apk
    /system/app/Maps.apk
    /system/app/MDMApp.apk
    /system/app/MhdrService.apk
    /system/app/MirrorLink.apk
    /system/app/mldapchecker.apk
    /system/app/MotionPanoramaViewer.apk
    /system/app/MSSkype_stub.apk
    /system/app/NaverV_N.apk
    /system/app/NfcNci.apk
    /system/app/Omc.apk
    /system/app/PacProcessor.apk
    /system/app/Panorama360Viewer.apk
    /system/app/PartnerBookmarksProvider.apk
    /system/app/Personalization.apk
    /system/app/PhotoTable.apk
    /system/app/PlayAutoInstallConfig.apk
    /system/app/Preconfig.apk
    /system/app/RootPA.apk
    /system/app/RoseEUKor.apk
    /system/app/SafetyInformation.apk
    /system/app/SamsungCalendar_Stable_4012.apk
    /system/app/SamsungConnect.apk
    /system/app/SamsungDLPService.apk
    /system/app/SamsungTTS.apk
    /system/app/SapaAudioConnectionService.apk
    /system/app/SapaMonitor.apk
    /system/app/SBrowserEdge.apk
    /system/app/SCPMClient_N.apk
    /system/app/ScrollCapture.apk
    /system/app/SecHTMLViewer.apk
    /system/app/SecureFolderSetupPage.apk
    /system/app/SecurityLogAgent.apk
    /system/app/SecurityProviderSEC.apk
    /system/app/SelfMotionPanoramaViewer.apk
    /system/app/ShareLink_2017.apk
    /system/app/SilentLog.apk
    /system/app/SimSettingMgr.apk
    /system/app/SLocation.apk
    /system/app/SlowMotion_Dream_N.apk
    /system/app/SmartCallProvider.apk
    /system/app/SmartClipEdgeService.apk
    /system/app/SmartFittingService.apk
    /system/app/SmartMirroring.apk
    /system/app/SmartReminder.apk
    /system/app/SmartSwitchAgent.apk
    /system/app/SnsImageCache_N.apk
    /system/app/SPdfNote.apk
    /system/app/SplitSoundService.apk
    /system/app/SPrintSpooler7.apk
    /system/app/STalkback.apk
    /system/app/Stk.apk
    /system/app/Stk2.apk
    /system/app/StoryEditor_Dream_N.apk
    /system/app/SysScope.apk
    /system/app/TasksProvider.apk
    /system/app/TetheringAutomation.apk
    /system/app/TFunLock.apk
    /system/app/TuiService.apk
    /system/app/UniversalMDMClient.apk
    /system/app/UniversalSwitch.apk
    /system/app/UPSMTheme.apk
    /system/app/USBSettings.apk
    /system/app/UserDictionaryProvider.apk
    /system/app/VideoEditorLite_Dream_N.apk
    /system/app/VideoTrimmer_Dream.apk
    /system/app/VirtualTour_N_OS.apk
    /system/app/VisionIntelligence.apk
    /system/app/WallpaperBackup.apk
    /system/app/Weather2017.apk
    /system/app/WeatherWidget2017.apk
    /system/app/WebManual.apk
    /system/app/WebViewGoogle.apk
    /system/app/WfdBroker.apk
    /system/app/withTV.apk
    /system/app/WlanTest.apk
    /system/app/YahooEdgeFinance.apk
    /system/app/YahooEdgeSports.apk
    /system/app/YouTube.apk
    /system/priv-app/AccessControl_N.apk
    /system/priv-app/ANTRadioService.apk
    /system/priv-app/AODService_v25.apk
    /system/priv-app/AppsEdgePanel_v3.apk
    /system/priv-app/AssistantMenu_N.apk
    /system/priv-app/AuthFramework.apk
    /system/priv-app/AuthService_v2.apk
    /system/priv-app/AutomationTest_FB.apk
    /system/priv-app/AutoPreconfig.apk
    /system/priv-app/BackupRestoreConfirmation.apk
    /system/priv-app/BadgeProvider_N.apk
    /system/priv-app/BeaconManager.apk
    /system/priv-app/BioFaceService.apk
    /system/priv-app/Bixby.apk
    /system/priv-app/BixbyAgentDummy.apk
    /system/priv-app/BixbyGlobalAction.apk
    /system/priv-app/BixbyPLMSync.apk
    /system/priv-app/BixbyVoiceInput.apk
    /system/priv-app/BlockedNumberProvider.apk
    /system/priv-app/BlueLightFilter.apk
    /system/priv-app/CallLogBackup.apk
    /system/priv-app/CarrierConfig.apk
    /system/priv-app/CMHProvider.apk
    /system/priv-app/CocktailBarService_v3.apk
    /system/priv-app/ColorBlind_N.apk
    /system/priv-app/ConfigUpdater.apk
    /system/priv-app/ContextProvider.apk
    /system/priv-app/Crane.apk
    /system/priv-app/CSC.apk
    /system/priv-app/CtsShimPrivPrebuilt.apk
    /system/priv-app/DayLite.apk
    /system/priv-app/DCMService.apk
    /system/priv-app/DeviceHealthReporter.apk
    /system/priv-app/DeviceKeystring.apk
    /system/priv-app/DeviceQualityAgent.apk
    /system/priv-app/DeviceTest.apk
    /system/priv-app/DiagMonAgent.apk
    /system/priv-app/DocumentsUI.apk
    /system/priv-app/EasySetup.apk
    /system/priv-app/EmergencyInfo.apk
    /system/priv-app/EnhanceService.apk
    /system/priv-app/Excel_SamsungStub.apk
    /system/priv-app/ExternalStorageProvider.apk
    /system/priv-app/FaceService.apk
    /system/priv-app/FBInstaller_NS.apk
    /system/priv-app/Finder_v7.apk
    /system/priv-app/FingerprintService2.apk
    /system/priv-app/Fmm.apk
    /system/priv-app/FotaAgent.apk
    /system/priv-app/Fresco_1.0.apk
    /system/priv-app/GalaxyAppsWidget_Phone_Dream.apk
    /system/priv-app/GalaxyApps_3xh.apk
    /system/priv-app/GameHome_Dream.apk
    /system/priv-app/GameTools_Dream.apk
    /system/priv-app/Gear360Editor_WQHD_Dream.apk
    /system/priv-app/GmsCore.apk
    /system/priv-app/GoogleBackupTransport.apk
    /system/priv-app/GoogleFeedback.apk
    /system/priv-app/GoogleLoginService.apk
    /system/priv-app/GoogleOneTimeInitializer.apk
    /system/priv-app/GooglePartnerSetup.apk
    /system/priv-app/GoogleServicesFramework.apk
    /system/priv-app/GPUDriver-S8MaliG71_70.apk
    /system/priv-app/HealthService.apk
    /system/priv-app/Hearingdro_V6.apk
    /system/priv-app/HwModuleTest.apk
    /system/priv-app/ImsLogger+.apk
    /system/priv-app/intelligenceservice2.apk
    /system/priv-app/IPService.apk
    /system/priv-app/IrisUserTest.apk
    /system/priv-app/KeyguardWallpaperUpdator.apk
    /system/priv-app/KLMSAgent.apk
    /system/priv-app/KnoxDesktopLauncher.apk
    /system/priv-app/LedCoverAppDream.apk
    /system/priv-app/LedCoverService.apk
    /system/priv-app/LTETest.apk
    /system/priv-app/ManagedProvisioning.apk
    /system/priv-app/MateAgent.apk
    /system/priv-app/Messaging_SEP81.apk
    /system/priv-app/ModemServiceMode.apk
    /system/priv-app/MsgCommService.apk
    /system/priv-app/MtpApplication.apk
    /system/priv-app/MtpDocumentsProvider.apk
    /system/priv-app/NetworkDiagnostic.apk
    /system/priv-app/ODTCFactoryService.apk
    /system/priv-app/OmaCP.apk
    /system/priv-app/OMCAgent.apk
    /system/priv-app/OneDrive_Samsung_v2.apk
    /system/priv-app/PaymentFramework.apk
    /system/priv-app/PeopleStripe.apk
    /system/priv-app/Phonesky.apk
    /system/priv-app/PhotoStudio_WQHD_Dream.apk
    /system/priv-app/PowerPoint_SamsungStub.apk
    /system/priv-app/PreloadInstaller.apk
    /system/priv-app/RadioBasedLocation.apk
    /system/priv-app/ringtoneBR.apk
    /system/priv-app/Rlc.apk
    /system/priv-app/RNB.apk
    /system/priv-app/RNBShell.apk
    /system/priv-app/Rubin.apk
    /system/priv-app/SamsungAccount_Dream.apk
    /system/priv-app/SamsungBilling.apk
    /system/priv-app/SamsungCamera7.apk
    /system/priv-app/SamsungCloudDreamNewIcon.apk
    /system/priv-app/SamsungContacts81.apk
    /system/priv-app/SamsungMagnifier3.apk
    /system/priv-app/SamsungMultiWindow.apk
    /system/priv-app/SamsungPass_1.1.apk
    /system/priv-app/SamsungThemes.apk
    /system/priv-app/SamsungVideoPlayer2016.apk
    /system/priv-app/SecCalendarProvider_NOTSTICKER.apk
    /system/priv-app/SecContactsProvider.apk
    /system/priv-app/SecDownloadProvider.apk
    /system/priv-app/SecGallery2015.apk
    /system/priv-app/SecIrisService.apk
    /system/priv-app/SecLiveWallpapersPicker.apk
    /system/priv-app/SecMediaProvider.apk
    /system/priv-app/SecMyFiles2017.apk
    /system/priv-app/SecSetupWizard2015.apk
    /system/priv-app/SelectiveFocusViewer.apk
    /system/priv-app/SEMFactoryApp.apk
    /system/priv-app/SendHelpMessage.apk
    /system/priv-app/serviceModeApp_FB.apk
    /system/priv-app/SetupWizard.apk
    /system/priv-app/SharedStorageBackup.apk
    /system/priv-app/ShootingModeProvider2.apk
    /system/priv-app/SKMSAgent.apk
    /system/priv-app/SmartcardManager.apk
    /system/priv-app/SmartEpdgTestApp.apk
    /system/priv-app/smartfaceservice.apk
    /system/priv-app/SmartManager_v5.apk
    /system/priv-app/SmartManager_v5_DeviceSecurity.apk
    /system/priv-app/SMusicPicker.apk
    /system/priv-app/SNS_v2_N.apk
    /system/priv-app/SOAgent.apk
    /system/priv-app/SoundAlive_51.apk
    /system/priv-app/SPDClient.apk
    /system/priv-app/SPPPushClient_Prod.apk
    /system/priv-app/StatementService.apk
    /system/priv-app/StickerFaceAR.apk
    /system/priv-app/StickerProvider.apk
    /system/priv-app/StickerStamp.apk
    /system/priv-app/StoryService.apk
    /system/priv-app/SVCAgent.apk
    /system/priv-app/SVoicePLM.apk
    /system/priv-app/Tag.apk
    /system/priv-app/TaskEdgePanel_v3.apk
    /system/priv-app/ThemeCenter.apk
    /system/priv-app/TouchWizHome_2017.apk
    /system/priv-app/TransmitPowerService.apk
    /system/priv-app/TzDataUpdater.apk
    /system/priv-app/UIBCVirtualSoftkey.apk
    /system/priv-app/UnifiedProfile.apk
    /system/priv-app/Upday.apk
    /system/priv-app/Velvet.apk
    /system/priv-app/VisionCloudAgent.apk
    /system/priv-app/VoiceServiceFramework.apk
    /system/priv-app/VoiceWakeUp.apk
    /system/priv-app/VoWifiSPG.apk
    /system/priv-app/VpnDialogs.apk
    /system/priv-app/VRSetupWizardStub.apk
    /system/priv-app/WallpaperCropper.apk
    /system/priv-app/WallpaperCropper2.apk
    /system/priv-app/Word_SamsungStub.apk
    /system/priv-app/wssyncmlnps2.apk
    /system/framework/com.samsung.device.jar
    /system/framework/com.sec.android.app.minimode.jar
    /system/framework/com.sec.android.app.multiwindow.jar
    /system/framework/com.sec.android.visualeffect.jar
    /system/framework/seccamera.jar
    /system/framework/sechardware.jar
    /system/framework/secmediarecorder.jar
    /system/framework/secvision.jar
    /system/framework/sws.jar
    /system/framework/touchwiz.jar
    /system/app/GoogleExtShared.apk
    /system/priv-app/GoogleExtServices.apk
    /system/priv-app/GooglePackageInstaller.apk
    31
    New version - Nougat support

    SVADeodexerForArt.jpg
    This version is a gift to You for the New Year, my dear friends!


    Changelog (v5.0) from 08/12/2016:


    1. Support Android Lollipop/Marsmallow/Nougat
    2. Automatic detection android version (Lollipop/Marsmallow/Nougat)
    3. More optimizations
    4. Fixed errors

    This version works correctly with versions from Lollipop to Nougat.
    For Nougat version oat2dex.jar still beta, but the program tries to work around what is not working and , in most cases, bypasses.
    For example, in the latest beta version for Samsung Galaxy S7 edge with error deodexed only one application "SamsungCalendar.odex". The rest is all correct.
    Therefore, those applications that failed to deodex, you can deodexed using baksmali/smali (with last version) or wait corrected version oat2dex.
    And yet, the program does not re-sign, deodexed applications, so you need to make changes appropriate to disable signature verification. This task is not the task of deodexing and don't ask me how it's done - search on xda.

    1. Download for 32-bit systems (v5.0 from 08-12-2016): View attachment SVADeodexerForArt_v5_32.zip
    2. Download for 64-bit systems (v
    5.0 from 08-12-2016): View attachment SVADeodexerForArt_v5_64.zip


    Example of log SVADeodexerForArt.exe for Android 7.0

    32-bit Deodexer for Android Runtime (Version 5.0 от 08/12/2016) © Valery Studenikin, 2016

    Path to stock /system directory: F:\Temp\ZPLN\BETA-6.G93xF.XXU1ZPLN\system
    Android 7.0 (SDK 24): SM-G935F, BETA6.G935FXXU1ZPLN-v6.0, changelist 10211359, Fri Dec 23 19:49:07 KST 2016
    Processor architecture: \oat\arm64\
    Files deodexed succesfully: 334, with errors: 1. CPU time: 00:06:00 (359,532 sec.)

    Extracting and de-optimizing was terminated with errors for:

    F:\SVA\WIN\SVADeodexerForArt\SamsungCalendar.odex


    Finded errors saved to file: F:\SVA\WIN\SVADeodexerForArt\LogLines.log

    =============================> begin errors for F:\SVA\WIN\SVADeodexerForArt\SamsungCalendar.odex
    12-31 09:45:20:337 Art version=79 (F:\SVA\WIN\SVADeodexerForArt\SamsungCalendar.odex)
    12-31 09:45:20:345 De-optimizing /system/app/SamsungCalendar/SamsungCalendar.apk

    12-31 09:45:22:037 Analysis error in class=Lcom/b/cx; method=b
    Method: Lcom/b/cx;->b(Landroid/content/Context;I)Ljava/util/ArrayList;
    Near line: -1 (address 38)
    Instructions:
    [19] const/4 regA=1
    [20] if-eqz regA=0
    [21] invoke-virtual-quick regC=1 <-----
    [22] move-result regA=2
    [23] if-eqz regA=2

    12-31 09:45:22:037 org.jf.dexlib2.analysis.AnalysisException: Could not resolve the method in class unknown at index 51, objReg=1
    at org.jf.dexlib2.analysis.MethodAnalyzer.analyzeInvokeVirtualQuick(MethodAnalyzer.java:2612)
    at org.jf.dexlib2.analysis.MethodAnalyzer.analyzeInstruction(MethodAnalyzer.java:1248)
    at org.jf.dexlib2.analysis.MethodAnalyzer.analyze(MethodAnalyzer.java:259)
    at org.jf.dexlib2.analysis.MethodAnalyzer.<init>(MethodAnalyzer.java:190)
    at org.rh.smaliex.DexUtil$ODexRewriterModule$1$1.getInstructions(DexUtil.java:505)
    ...(Skip 24 traces)
    at org.rh.smaliex.OatUtil.convertToDex(OatUtil.java:321)
    at org.rh.smaliex.OatUtil.convertDexFromBootOat(OatUtil.java:244)
    at org.rh.smaliex.OatUtil.oat2dex(OatUtil.java:146)
    at org.rh.smaliex.Main.mainImpl(Main.java:122)
    at org.rh.smaliex.Main.main(Main.java:42)

    12-31 09:45:22:037 Failed to re-construct dex java.lang.ClassCastException: org.jf.dexlib2.analysis.UnresolvedOdexInstruction cannot be cast to org.jf.dexlib2.iface.instruction.formats.Instruction35ms
    12-31 09:45:22:037 convertToDex: skip /system/app/SamsungCalendar/SamsungCalendar.apk
    =============================> end errors for F:\SVA\WIN\SVADeodexerForArt\SamsungCalendar.odex



    Attention: framework deodexed only for 64-bit (32-bit version not deodexed and not was copied to result)

    List of apks that have 32-bit and 64-bit versions (deodexed only for 64-bit):

    /system/priv-app/AuthService.apk
    /system/priv-app/HealthService.apk


    List of deodexed apks that have only 32-bit version (don't have 64-bit):

    /system/app/AllshareFileShare.apk
    /system/app/AllshareMediaShare.apk
    /system/app/Bluetooth.apk
    /system/app/DictDiotek.apk
    /system/app/FlashAnnotate.apk
    /system/app/SapaMonitor.apk
    /system/priv-app/PhotoStudio_WQHD_Grace.apk
    /system/priv-app/SelectiveFocusViewer.apk
    /system/priv-app/VoiceNote_5.0.apk


    List of originally deodexed (within stock firmware) files, are left as they were originally:

    /system/framework/services.jar
    /system/app/ANTPlusPlugins.apk
    /system/app/CloudGateway2016.apk
    /system/app/CnnPanel.apk
    /system/app/CoreApps_SDK.apk
    /system/app/CtsShimPrebuilt.apk
    /system/app/FlipboardBriefing.apk
    /system/app/GoogleCalendarSyncAdapter.apk
    /system/app/GoogleContactsSyncAdapter.apk
    /system/app/GoogleExtShared.apk
    /system/app/GooglePrintRecommendationService.apk
    /system/app/GoogleTTS.apk
    /system/app/hwlogcollector.apk
    /system/app/MirrorLink.apk
    /system/app/NetworkDiagnostic.apk
    /system/app/RootPA.apk
    /system/app/SamsungIMEv4.apk
    /system/app/SBrowser_5.0.apk
    /system/app/SecMemo3.apk
    /system/app/UPSMTheme.apk
    /system/app/WebViewGoogle.apk
    /system/priv-app/ANTRadioService.apk
    /system/priv-app/AxelSpringer.apk
    /system/priv-app/ConfigUpdater.apk
    /system/priv-app/Crane.apk
    /system/priv-app/CtsShimPrivPrebuilt.apk
    /system/priv-app/FBInstaller.apk
    /system/priv-app/GalaxyAppsWidget_Phone_Hero.apk
    /system/priv-app/GalaxyApps_3xh.apk
    /system/priv-app/GalaxyThemes.apk
    /system/priv-app/GameHome.apk
    /system/priv-app/GameTools.apk
    /system/priv-app/GmsCore.apk
    /system/priv-app/GoogleBackupTransport.apk
    /system/priv-app/GoogleExtServices.apk
    /system/priv-app/GoogleFeedback.apk
    /system/priv-app/GoogleLoginService.apk
    /system/priv-app/GoogleOneTimeInitializer.apk
    /system/priv-app/GooglePackageInstaller.apk
    /system/priv-app/GooglePartnerSetup.apk
    /system/priv-app/GoogleServicesFramework.apk
    /system/priv-app/ImsLogger+.apk
    /system/priv-app/imsservice.apk
    /system/priv-app/Messaging_Common.apk
    /system/priv-app/Phonesky.apk
    /system/priv-app/QuickAssist.apk
    /system/priv-app/RadioBasedLocation.apk
    /system/priv-app/SamsungAccount_Dream.apk
    /system/priv-app/SamsungBilling.apk
    /system/priv-app/SamsungCloud.apk
    /system/priv-app/SamsungInCallUI.apk
    /system/priv-app/SecEmail_N.apk
    /system/priv-app/SecGallery2015.apk
    /system/priv-app/SecSettings2.apk
    /system/priv-app/SEMFactoryApp.apk
    /system/priv-app/SetupWizard.apk
    /system/priv-app/SHealth5.apk
    /system/priv-app/SNS_v2_N.apk
    /system/priv-app/SPPPushClient_Prod.apk
    /system/priv-app/SVoice.apk
    /system/priv-app/SVoicePLM.apk
    /system/priv-app/SystemUI.apk
    /system/priv-app/TeleService.apk
    /system/priv-app/Velvet.apk
    /system/priv-app/VoiceWakeUp.apk
    /system/framework/com.samsung.device.jar
    /system/framework/com.sec.android.app.minimode.jar
    /system/framework/com.sec.android.app.multiwindow.jar
    /system/framework/com.sec.android.visualeffect.jar
    /system/framework/seccamera.jar
    /system/framework/sechardware.jar
    /system/framework/secmediarecorder.jar
    /system/framework/secvision.jar
    /system/framework/sws.jar
    /system/framework/touchwiz.jar