1118 Commits

Author SHA1 Message Date
Izzat Bahadirov
d3ac72fd67 Introduced getInterfacesFull() method to ensure that all interfaces are resolved when creating a vtable. 2013-05-01 17:58:58 -04:00
Izzat Bahadirov
89b28308db Throwing UnresolvedClassException if interfaces weren't fully resolved. 2013-05-01 17:35:31 -04:00
Izzat Bahadirov
5c2353878c Sorting virtual methods when adding them. 2013-04-29 17:04:46 -04:00
Izzat Bahadirov
0f61ce9a6f Fix for broken tests. 2013-04-29 17:02:14 -04:00
Izzat Bahadirov
6a2a627d3b Fixed formatting. 2013-04-29 16:36:13 -04:00
Izzat Bahadirov
03b8247850 Renamed getVersion() to getOdexVersion() in DexBackedOdexFile. 2013-04-29 16:27:45 -04:00
Izzat Bahadirov
64898161b3 Added API level check to adding methods to vtable. 2013-04-29 16:09:36 -04:00
Izzat Bahadirov
2206c7638b Adding @Nonnull's and removing unnecessary null checks. 2013-04-29 15:58:35 -04:00
Izzat Bahadirov
e3b5efd7d8 Unified interface table creation logic. No more duplication. 2013-04-28 17:30:11 -04:00
Izzat Bahadirov
389c3a6afa Fix for invoke-virtual/range with no register range. 2013-04-27 23:19:17 -04:00
Izzat Bahadirov
d4e3ab3fd5 Fixed querying for odex version. 2013-04-22 17:20:26 -04:00
Izzat Bahadirov
6cf22f1eac Object register value now lives in register C, not D. 2013-04-22 16:12:48 -04:00
Izzat Bahadirov
9c72df65f7 Using standard InlineMethodResolver if no custom one is provided. 2013-04-22 14:00:49 -04:00
Izzat Bahadirov
d6737943e1 Fixed alignment. 2013-04-19 17:44:54 -04:00
Izzat Bahadirov
ea4ee3e8de Better wording for dump usage printout. 2013-04-19 17:43:14 -04:00
Izzat Bahadirov
10fdd19778 Moving to ClassDef.getVirtualMethods() API. 2013-04-19 17:31:05 -04:00
Izzat Bahadirov
b2ce899471 Getting instance fields by offset and methods by vtable index.
- Dump utilities
2013-04-19 17:31:05 -04:00
Ben Gruver
f939e912b5 Fix issue with out-of-order iteration of virtual methods 2013-04-19 14:29:07 -07:00
Ben Gruver
b6435e7a47 Add support to smali for a .source directive with no source file 2013-04-18 00:27:16 -07:00
Ben Gruver
3e4e5ec7a4 Change .param and .local syntax, to be able to handle empty name/type/signature 2013-04-18 00:17:34 -07:00
Ben Gruver
aa860984c0 Get rid of unneeded TODO 2013-04-17 22:33:11 -07:00
Ben Gruver
83f77f51aa Refactor how api specific Opcodes work (make them non-static) 2013-04-17 22:32:08 -07:00
Ben Gruver
9062640179 Fix issue with interning proto_id_items while writing dex file 2013-04-17 00:25:05 -07:00
Ben Gruver
3d5423ed2b Tweak how hashCode and equals works for MethodReferences
This fixes an issue where method references weren't being properly
interned when generating a dex file
2013-04-17 00:13:12 -07:00
Ben Gruver
dda097947f Fix implementation of equals for BaseTypeReference
This fixes the implementation so it matches what is described in the
documentation for the TypeReference interface. Specifically, it allows
for comparison to a CharSequence
2013-04-17 00:12:20 -07:00
Ben Gruver
36b6a31685 Fix issue with empty superclass when dumping a Ljava/lang/Object; class 2013-04-16 23:19:06 -07:00
Ben Gruver
e591eaf779 Fix issue with .param directive when there are parameters of type D 2013-04-16 22:55:40 -07:00
Ben Gruver
450cdd6c7a Tweak the syntax for the .array-data structure
Now each number is an individual element, instead of the weird
"re-interpret numbers as bytes, concatenate, and then re-interpret
as numbers based on element width" thing that was going on before

Also, only element widths 1, 2, 4 and 8 are allowed
2013-04-16 22:47:21 -07:00
Ben Gruver
d9c50f3f36 Fix IndentingWriter.printUnsignedLongAsHex and printSignedIntAsDec
A previous change had introduced a regression where they were printing
numbers backwards.
2013-04-16 00:26:24 -07:00
Ben Gruver
ec28400394 Switch to new parameter syntax
The new syntax is:
.param p1, firstParamName

which is closer to the existing local syntax:
.local v0, someLocal:I
2013-04-16 00:24:46 -07:00
Ben Gruver
4a2b9ef40c Change totalmethodRegisters and methodParameterRegisters to scoped method attributes 2013-04-15 22:05:07 -07:00
Ben Gruver
dcd5df117a Add token+text for I_LINE imaginary token 2013-04-15 22:05:07 -07:00
Ben Gruver
feed0d1b84 Change syntax of const/high16 and const-wide/16
The literal is now specified as the post-shifted literal value, rather
than the pre-shifted 16 bits
2013-04-15 22:05:03 -07:00
Ben Gruver
38d0921bbb Fix the line number on instruction errors 2013-04-15 21:03:57 -07:00
Ben Gruver
87c1c0e054 Split out the build rule for the parser and tree walker 2013-04-15 20:47:53 -07:00
Ben Gruver
0dceb148f3 Update to latest antlr3/string template 2013-04-15 20:47:53 -07:00
Ben Gruver
6c15046f2b Refactor smali to use dexlib2
Array data instructions aren't working yet
2013-04-15 20:47:00 -07:00
Ben Gruver
ab73502b60 Massage the try blocks before writing them out to a dex file 2013-04-14 18:36:05 -07:00
Ben Gruver
8c3d16b7ee Add logic to TryListBuilder to merge contiguous try blocks with identical handlers 2013-04-14 18:14:06 -07:00
Ben Gruver
5916df9999 Port TryListBuilder from dexlib 2013-04-14 17:17:00 -07:00
Ben Gruver
bddef6af3c Always use one of 2 pre-built ImmutableBooleanEncodedValue instances 2013-04-13 21:44:56 -07:00
Ben Gruver
f24f26738d Add AnnotationVisibility.getVisibility(String) 2013-04-13 21:44:18 -07:00
Ben Gruver
ddf18a996e Add convenience constructor for ImmutableClassDef 2013-04-13 20:19:41 -07:00
Ben Gruver
8979759556 Gracefully handle duplicate fields/methods in baksmali 2013-04-13 18:55:34 -07:00
Ben Gruver
0a18ea7f8b Separate direct/virtual methods and static/instance fields in the ClassDef interface
This is unfortunately required to support not-quite-well-formed dex files
containing duplicate static/instance fields, or duplicate direct/virtual methods,
which dalvik inadvertently allows.

In cases when there are duplicate fields/methods in the same category, we
unambiguously remove/hide the latter duplicate fields/methods.
2013-04-13 16:25:37 -07:00
Ben Gruver
5b99529feb Remove unneeded TODO 2013-04-12 00:03:41 -07:00
Ben Gruver
2363e6e43c Gracefully handle unknown instructions 2013-04-11 23:58:43 -07:00
Ben Gruver
5fa302678c Add support for custom inline tables 2013-04-10 21:14:46 -07:00
Ben Gruver
a55990c876 Re-enable deodexing in baksmali
It's not quite working yet.
2013-04-09 23:45:48 -07:00
Ben Gruver
fd258ad543 Add support for class path entries that look like dalvik-cache entries 2013-04-09 23:44:06 -07:00