Ben Gruver
0e773cbe9b
Don't attempt to evaluate an out-of-bounds register
2016-10-23 12:49:19 -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
5401a9cbaa
Bump the version number to v2.2b4
2016-10-16 14:18:56 -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
Ben Gruver
22e85fc3ff
Add a --classes option for disassemble/deodex commands
2016-10-16 13:43:34 -07:00
Albert Gorski
43669ecc6e
Ensure all smali files are closed after the writing is complete
...
This makes sure that all smali files are closed after writing to them by
surrounding the writer code with a try/finally block that closes the output
stream once the writing has completed or when an exception occurs.
2016-10-15 21:12:23 -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
Ben Gruver
f2935deb16
Fix classpath loading for pre-art odex files
2016-10-15 15:39:11 -07:00
Ben Gruver
4eefe294e4
Add a public utility method for verifying dex/odex headers
2016-10-15 15:07:32 -07:00
Ben Gruver
145bc820d3
Add a ClassPath(Iterable<ClassProvider>) constructor
2016-10-15 10:27:10 -07:00
Narayan Kamath
55c33ebb09
Add a placeholder ART version number / api level for aosp/master.
...
Also make invoke-polymorphic conditional on this new art version.
This also fixes a bug where the version was being selected incorrectly
due to a parameter name that shadowed a local variable.
2016-10-07 15:06:07 +01:00
Ben Gruver
615d383320
Make ZipDexContainer more subclass-friendly
2016-10-04 23:05:47 -07:00
Ben Gruver
2996766649
Add MultiDexContainer.getOpcodes()
2016-10-04 23:03:38 -07:00
Ben Gruver
4d59c14ef1
Bump the version number to 2.2b3
2016-10-04 00:11:33 -07:00
Ben Gruver
686d628128
Bad proguard! Don't strip out jcommander classes!
2016-10-04 00:10:46 -07:00
Ben Gruver
331fdcca07
Bump the version number to 2.2b2
2016-10-03 20:09:56 -07:00
Ben Gruver
5d77b13557
Add proguard rule to keep ColonParameterSplitter
2016-10-03 20:01:39 -07:00
Ben Gruver
dcaf46cefc
Specify specific version for mockito dependency
2016-10-02 18:26:17 -07:00
Ben Gruver
458398ff7c
Fix the smalidea build for gradle 3.1
2016-10-02 18:12:22 -07:00
Frieder Bluemle
e231d681d7
Update Gradle wrapper to 3.1
2016-10-02 18:12:22 -07:00
Ben Gruver
17f2abc2f8
bump the version number to 2.2b1
2016-10-02 16:43:59 -07:00
Ben Gruver
2d0f6254b1
Merge branch 'v2.2_WIP'
2016-10-02 16:41:52 -07:00
Ben Gruver
384161e060
Detect and ignore out-of-range debug info offsets
2016-10-02 16:34:41 -07:00
Ben Gruver
219bdff2d1
Properly implement the art <-> api version map
2016-10-02 16:05:22 -07:00
Ben Gruver
c2231759f5
Fix the proguard keep rules for smali/baksmali
2016-10-02 16:04:29 -07:00
Ben Gruver
59256149f1
Add functionality for efficient multi-dex writing with DexPool
...
This adds support to DexPool for mark()/reset(), which can be used to
"rollback" the last added class in case it caused a constant pool overflow.
This also adds a "DexWriter.hasOverflowed()" helper method to determine if
any of the size-constrained pools have overflowed.
2016-10-02 12:18:52 -07:00
Ben Gruver
6f8366a7a3
Fix the default classpath dir for an input file in the current directory
2016-10-02 12:18:52 -07:00
Ben Gruver
af8a063472
Set the minimum oat version for the fixed post-default-method vtable to 87
2016-10-02 12:18:52 -07:00
Ben Gruver
67171366db
Reparent interface methods in a vtable
...
These are now reparented at the point where a invoke-virtual/quick
is being resolved, if needed
2016-10-02 12:18:52 -07:00
Ben Gruver
dbd9db303a
Tweak ZipDexContainer so it doesn't keep an open ZipFile
2016-10-02 12:18:51 -07:00
Ben Gruver
ab20c37fd0
Fix up the post-default interface generation
2016-10-01 17:07:18 -07:00
Ben Gruver
37f5436932
Allow interning classes into a DexPool externally
2016-10-01 17:07:18 -07:00
Ben Gruver
9c039ef1de
Implement ReflectionUtils.dexToJavaName
2016-10-01 17:07:18 -07:00
Ben Gruver
7f20300b92
Change DexInputEntry.loadDexFile to accept an Opcodes object instead of an api
2016-10-01 17:07:18 -07:00
Ben Gruver
8f27f45fb1
Add Opcodes.getDefault
...
This replace various uses of hardcoded Opcodes.forApi() with
Opcodes.getDefault() or other alternatives as applicable
2016-10-01 17:07:18 -07:00
Ben Gruver
0de5ef0ce7
Add support for the buggy post-default method vtable generation
...
This replicates the buggy vtable generation logic for Android 7.0
2016-10-01 17:07:17 -07:00
Ben Gruver
7cb0937324
Add the ability to specify the oat version to use when listing vtables
2016-09-24 18:26:35 -07:00
Ben Gruver
a54523e080
More default method vtable fixes
2016-09-24 18:16:55 -07:00
Ben Gruver
8081311d30
Implement toString for Method/Field/Proto references
2016-09-24 18:15:07 -07:00
Ben Gruver
17054d5c3d
Load oat dependencies by default, if present
2016-09-24 18:11:50 -07:00
Ben Gruver
c3270cf991
Don't attempt to list vtables for interface classes
2016-09-24 18:10:52 -07:00
Ben Gruver
158f6b0b44
Add the directory containing the input file as a classpath search dir by default
2016-09-24 18:10:18 -07:00
Ben Gruver
dcc7a2b806
Remove OatDexFile.getOatFile in favor of getContainer
2016-09-24 18:07:26 -07:00
Albert Gorski
8b309d62f4
Use guava's 'Joiner' instead of 'String.join'
...
This replaces the usage of the Java 8 'String.join' method with guava's
'Joiner' which is Java 6 compatible.
2016-09-22 23:25:11 -07:00