Lanchon
b9a725e726
MemoryDataStore: Handle weird arguments values correctly
...
Namely:
- Negative arguments to InputStream::skip(n).
- Large arguments to readAt(offset).
2018-06-13 14:11:46 -07:00
Lanchon
c645b9d546
MemoryDataStore: More efficient overridable growth policy
2018-06-13 14:11:46 -07:00
Lanchon
b0a69fce34
MemoryDataStore: Add a data-trimming getData() method
2018-06-13 14:11:46 -07:00
Lanchon
53cdb13acc
MemoryDataStore: Rename the buffer getter method
2018-06-13 14:11:46 -07:00
Lanchon
6917c1fa14
MemoryDataStore: Keep track of actual size of data
2018-06-13 14:11:46 -07:00
Lanchon
d7b389da39
MemoryDataStore: Fix InputStream::read(byte[] b, int off, int len) bug
2018-06-13 14:11:46 -07:00
Lanchon
387299c6e3
MemoryDataStore: Allow overriding of growth policy
2018-06-13 14:11:46 -07:00
Lanchon
ea7c265d12
MemoryDataStore: Fix growth calculation
2018-06-13 14:11:46 -07:00
Albert Gorski
f10643fa43
Handle Changes in OAT Files for Android 8.1 (OAT 131)
...
- The OAT Header has a new field containing the offset to the
entries for the DEX files.
- The change was made in OAT 127.
- All offsets in the header had to be adjusted to account
for this new field.
- The offset to the entries for the DEX files also had to
be adjusted to use this field as they are no longer
right after the key value store.
- The format of the DEX entries also changed in OAT 127 and
again in OAT 131.
- The field containing the offset to the method bss
mapping was added in OAT 127.
- The field containing the offset to the dex sections
layout was added in OAT 131 right before the method
bss mapping offset.
2018-06-12 13:39:43 -07:00
ale5000
ec31f76206
Simplified mapApiToArtVersion
2018-06-12 00:52:27 -07:00
Ben Gruver
2db1dec703
Add support for dex version 39 in dexlib2
2018-05-23 13:34:16 -07:00
Ben Gruver
a198c85a8e
Add support for dumping the new structures
2018-05-23 13:34:16 -07:00
Ben Gruver
077c5c1b91
Let baksmali infer the api level when possible
2018-05-23 13:34:16 -07:00
Ben Gruver
e8760aa46b
Add support for method handle and call site references in ReferenceUtil
2018-05-23 13:34:16 -07:00
Ben Gruver
858d264db9
Change the name of the invoke method handle types
...
Change the names to match the name used in the smali grammar
2018-05-23 13:34:16 -07:00
Ben Gruver
5c5e4ae279
Implement support for new structures in DexWriter
2018-05-23 13:34:16 -07:00
Ben Gruver
cc34359691
Create separate section for encoded arrays
2018-05-23 13:34:16 -07:00
Ben Gruver
fa5d0cc73a
Add Immutable implementations of the new structures
2018-05-23 13:34:16 -07:00
Ben Gruver
8bdb50381d
Fix up a few non-immutable members in immutable encoded value implementations
2018-05-23 13:34:16 -07:00
Ben Gruver
dea793447f
Add DexBacked implementations of the new structures
2018-05-23 13:34:16 -07:00
Ben Gruver
ead2e033d0
Add getItemCount method to EncodedArrayItemIterator
2018-05-23 13:34:16 -07:00
Ben Gruver
2215e031bf
Fix typo in DexBackedMethodEncodedValue
2018-05-23 13:34:16 -07:00
Ben Gruver
88ece20f9f
Move the map item related methods from RawDexfile to DexBackedDexFile
2018-05-23 13:34:16 -07:00
Ben Gruver
e3fd1e8115
StaticInitialValueIterator -> EncodedArrayItemIterator
2018-05-23 13:34:16 -07:00
Ben Gruver
6c054e1b44
Minor javadoc fixes in MethodProtoReference
2018-05-23 13:34:16 -07:00
Ben Gruver
b575410a8a
Add the basic structures necessary to support invoke-custom
2018-05-23 13:34:16 -07:00
Ben Gruver
38f575608f
Fix line_start annotation in debug_info_item
...
line_start can be > 2^31, so we have to use readBigUleb128 instead
of readSmallUleb128
2017-10-02 19:10:31 -07:00
Ben Gruver
20a272dbb9
Fix an issue when writing uleb128 values larger than 2^31
2017-10-02 19:10:31 -07:00
Orion Hodson
b84345935a
Fix out registers for invoke-polymorphic
...
The calculation of the number of output registers for
invoke-polymorphic and invoke-polymorphic-range should be based on the
number of registers provided.
2017-09-12 14:34:56 -07:00
Daniel Bali
d4702a45a7
Add basic support for ODEX instructions
2017-05-17 11:20:30 -07:00
Wojtek Kaliciński
dd11921529
Fix for counting method implementation sizes
2017-04-25 12:02:57 -07:00
Wojtek Kaliciński
b65e942e7e
Add support for getting byte sizes to dex backed references
2017-04-21 13:54:27 -07:00
Furniel
9df7a67273
Fixed Android M and N deodexing( Fixes #503 )
2017-03-29 12:39:44 +03:00
Ben Gruver
48cde6219d
Add initial support for vdex files
...
This is the bare minimum to get deodexing to work with vdex files.
2017-03-25 16:25:49 -07:00
Ben Gruver
9e3e86fda0
Improve the special case logic when propagating register types
...
This improves the logic dealing with initializing uninitialized reference and
narrowing register types after an instance-of
2017-03-12 15:41:14 -07:00
Ben Gruver
152250d900
Fix missing format argument
2017-03-11 13:20:23 -08:00
Ben Gruver
1a83d5a2d0
Propagate sideways conversions after an instance-of + if-eq/if-eqz
...
Previously, we only propagated the conversion if it was a narrowing
conversion, to avoid problems that can occur with member access with
widening conversions.
However, it should be safe to do the conversion for a "sideways"
conversion - one that is neither widening or narrowing.
This can happen if we don't yet have full knowledge of the register types,
or, less likely, if the "true" branch is impossible to reach.
In the first case, we should get better type info as we continue to analyze
the method, and we'll revisit the conversion once we have better type info.
Or, if it really is an impossible conversion, we still want to propagate
the type from the instance-of to the true branch.
2017-01-07 18:11:39 -08:00
Ben Gruver
adb12356c3
Don't perform type narrowing after an instance-of on dalvik
2016-11-12 12:54:02 -08:00
Ben Gruver
5e387e5931
Add better error message for when instruction offset is out of range
2016-11-06 14:25:25 -08:00
Ben Gruver
a0ccd94bf9
Improve the error message for a truncated last instruction
2016-10-23 22:10:11 -07:00
Ben Gruver
8e1afdda32
Clean up how api levels are handled in various places
...
Now that dex files store an associated Opcodes instance, we don't need to
pass the api level around as much.
2016-10-23 22:09:52 -07:00
Ben Gruver
ca0a4bdf37
Remove some unneeded casts in BuilderClassDef
2016-10-23 11:54:50 -07:00
Ben Gruver
fd8a1b4adc
Make BuilderAnnotationSet public
...
It is used as a return type of public api BuilderClassDef.getAnnotations
2016-10-23 11:54:14 -07:00
Ben Gruver
c8e896b984
Add default dependencies for Android N
2016-10-17 16:19:15 -07:00
Ben Gruver
cb14aa7074
Remove obsolete TODO
2016-10-17 16:16:28 -07:00
Ben Gruver
8fa96e2fcd
Resolve odex dependencies to jar files when needed
2016-10-17 16:15:17 -07:00
Ben Gruver
16d4b5656b
Use a BufferedInputStream in ZipDexContainer.isDex
2016-10-16 13:46:42 -07:00
Ben Gruver
a6593575e7
Be more precise about narrowing after an instance-of
...
Only do the additional narrowing when all predecessors of the instance-of
are equivalent move instructions.
2016-10-16 13:45:30 -07:00
Albert Gorski
e75f2b230a
Ensure the ZipFile is closed in isZipFile() of ZipDexContainer
...
When calling isZipFile() in ZipDexContainer, the ZipFile would remain open if
the file was in fact a zip file but the ZipFile object would then go out of
scope thus creating a resource leak. This ensures that the ZipFile is closed
by adding a finally clause containing a close call at the end of the try catch
block.
2016-10-15 21:12:23 -07:00
Ben Gruver
5189797292
Unify how sections are referenced in DexPool and DexBuilder
2016-10-15 20:58:19 -07:00