1676 Commits

Author SHA1 Message Date
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
Ben Gruver
bb062e9336 Fix ReflectionUtils.javaToDexName
Fixes the conversion for primitive and array types
2016-09-22 19:50:27 -07:00
Ben Gruver
1aa9df3867 Fix the ordering of methods in the post-default-method vtable calculation 2016-09-22 19:49:29 -07:00
Ben Gruver
b7f98c8758 Use --check-package-private-access by default for oat files 2016-09-19 09:08:54 -07:00
Ben Gruver
ecd89816b3 Fix up some minor issues with --normalize-virtual-methods 2016-09-19 09:08:54 -07:00
Ben Gruver
815f023e4e Use a class reference for interface methods in the vtable 2016-09-19 09:08:54 -07:00
Ben Gruver
41ba26d00a Improve the canNarrowAfterInstanceOf check when using an empty bootclasspath
If the types in question can't be resolved, we just assume that the
narrowing can't happen.
2016-09-19 09:08:54 -07:00
Ben Gruver
12a3d71759 Add the ability to specify an empty bootclasspath 2016-09-19 09:08:54 -07:00
Ben Gruver
1d26e1be09 Rename the list classpath command to list dependencies 2016-09-19 09:08:54 -07:00
Ben Gruver
31ad2bc100 Refactor how classpath loading works 2016-09-19 09:08:53 -07:00
Ben Gruver
4c77ad7617 Minor fixes to OatVersions.txt 2016-09-19 09:08:53 -07:00
Ben Gruver
86459bbb86 Use the specified api level when loading a dex file in the disassemble command 2016-09-19 09:08:53 -07:00
Ben Gruver
fb10b5731c Add AnalysisArguments.loadClassPathForDexFile 2016-09-19 09:08:53 -07:00
Ben Gruver
7e8afc4d8a Clean up DexInputCommand a bit 2016-09-19 09:08:53 -07:00
Ben Gruver
12a3fd2712 Fix an issue when using the list classpath command with an odex file 2016-09-19 09:08:53 -07:00
Ben Gruver
5544281ed6 Clean up some lint in ClassPath/ClassProto 2016-09-19 09:08:53 -07:00
Ben Gruver
db9f86dfdd Make getRegisterType throw AnalysisException instead of ExceptionWithContext
This will cause MethodAnalyzer to print more information when this occurs
2016-09-19 09:08:53 -07:00
Ben Gruver
26a4f1e603 Fix an issue with instance-of type inference
We should only infer the register type after an if-eqz/nez if it has a
single predecessor that is the instance-of instruction.
2016-09-19 09:08:53 -07:00
Ben Gruver
9ec379a561 Add support for vtable generation for post-default method ART
The interfaces are iterated over in a different order when populating the
vtable
2016-09-19 09:08:53 -07:00
Ben Gruver
d13be24e27 Don't propagate a non-narrowing conversion through a move 2016-09-17 21:30:28 -07:00
Ben Gruver
9f794030da Fix how parameter delegates are handled 2016-09-17 21:30:28 -07:00
Ben Gruver
c12b7e6e00 Change the classpath arguments to be split only by a colon 2016-09-17 21:30:28 -07:00
Ben Gruver
c9c8ddb3ef Don't manually split the classes argument for list vtables 2016-09-17 21:30:28 -07:00
Ben Gruver
fbfe388e40 The list dex command should generate an error when used on a non-zip/oat file 2016-09-17 21:30:28 -07:00
Ben Gruver
d7d995cc2d Remove the now-unused experimental opcodes flag/functionality 2016-09-17 21:30:28 -07:00
Ben Gruver
30bdb7fda9 Do a cleanup pass on the various commands/arguments/help text 2016-09-05 10:07:58 -07:00
Ben Gruver
149e989994 The list field offsets command doesn't need the --check-package-private-access parameter 2016-09-04 14:09:15 -07:00
Ben Gruver
e7e58a6996 Fix reading a dex file from a zip file 2016-09-04 14:00:01 -07:00
Ben Gruver
99394b3daf Rework and fix the --resolve-resources parameter 2016-09-04 13:58:54 -07:00
Ben Gruver
fdfb6d10f4 Update OatVersions.txt to version 86 2016-09-04 11:47:04 -07:00
Ben Gruver
763caf1ef6 Add help verbiage for the new syntax for specifying a specific dex entry
This also pulls up dex input parameter into the base DexInputCommand
2016-08-30 22:36:15 -07:00
Ben Gruver
22a2807101 Implement DexFileFactory.loadAllDexFiles 2016-08-30 22:36:15 -07:00
Ben Gruver
3587c6f2a6 Refactor DexFileFactory and implement new syntax for dex entries 2016-08-30 22:36:15 -07:00
Ben Gruver
41a5b4953c Fix the dump command to work with dex files in an oat file 2016-08-30 22:16:16 -07:00