Comments (7)
@katzdan after I get the brisket going on the smoker, I will post a detailed explanation. I deleted my far too simple reply (im just waking up and was being a bit lazy). I do think there is something else going on here too, but I need to run them through my disassembler to look closer.
but yes, there is a lot of duplicate data in a dex file, and a lot of data is pointed to with pointers/offsets.
For example, if two classes have identical debug sections, both can point to the same data for their debug section.
from smali.
post the before/after dex and ill take a look
from smali.
I'm attaching one example here. The size increase is about 40% in this case.
classes.zip
from smali.
Hi, I'm following this issue as well.
Not sure what you mean by "modern optimizing compiler". Is there a way to reduce the changes in size between the initial dex file and the one written?
Thanks
from smali.
The after file is 3322156 bytes longer
the debug section accounts for 46276 of those bytes
TLDR: at least a good chunk of the difference is because smali does not employ some of the space saving tricks that some compilers do, by not writing duplicate data, and by pointing multiple references at the same data
from smali.
Is there any hope to get a reduction in the size of a Dex in the future? as an optimization feature?
from smali.
@katzdan there are a number of ways to do that, it would be fairly easy.
Easiest route would be to just write a script to parse the smali files and remove debug information and dead code
from smali.
Related Issues (20)
- Ive been Hacked please help me HOT 6
- Parsing smali methode HOT 1
- The Fields do not keep their initial values if they're default value
- odex error
- Error while writing instruction at code offset 0x8
- How to calculate the contribution of each class to the dex HOT 2
- missing EOF at '.class'
- any method to replace one String with modifiedString in StringIds section of dex file using dexlib2? HOT 3
- How to create a new method using dexlib2 HOT 2
- Try to run examples/BracketedMemberNames HOT 1
- how to copy class to new dex using dexlib2 HOT 4
- Smali patcher does not support Dex version 039 HOT 1
- java.lang.NoSuchMethodError when calling DexPool.internClass
- smali report error
- how to move the useless classes to a new dex using dexlib2? HOT 1
- [Feature Request] Could we support dex v41? HOT 3
- Won't build under Debian WSL
- Regenerate correct boot.oat/.art/.vdex files after a recompile
- dexlib2 cannot open dex file extracted from framework.jar (/system/framework/framework.jar)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smali.