1766 Commits

Author SHA1 Message Date
Ben Gruver
e8760aa46b Add support for method handle and call site references in ReferenceUtil 2018-05-23 13:34:16 -07:00
Ben Gruver
d82252e4d6 Make sure to close the writer after dumping 2018-05-23 13:34:16 -07:00
Ben Gruver
ba7a653fdf Add support for invoke-custom and related structures in the tree walker 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
9ccda3a1bf Add support for invoke-custom and related structures in the parser and lexer 2018-05-23 13:34:16 -07:00
Ben Gruver
c7036da909 Make method_prototype rule build and return a MethodProtoReference 2018-05-23 13:34:16 -07:00
Ben Gruver
0a8839663b "occured" -> "occurred" in SmaliTestUtils 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
2d227a7349 Fix nullable issue in annotations rule 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
dfdde5ee21 Bump the version to 2.2.3 2018-03-07 16:22:53 -08:00
Ben Gruver
1fed67b820 Don't use java 1.6 for release.
It's becoming non-trivial to even get a 1.6 JDK these days.

Releases will be done with 1.8 instead
2018-03-07 16:19:45 -08:00
Ben Gruver
37eb703409 Make smali file iteration more deterministic
In some cases, even when running in single threaded mode (-j 1), smali
could produce slightly different results if files are not listed in
a consistent order.

This ensures that we assemble a given set of smali files in a consistent
order when running in single-threaded mode, regardless of the order
they are listed in.
2018-02-28 16:22:47 -08:00
Andreas Gampe
681222d391 Fix NaN comparison
Use Float.isNaN/Double.isNaN to correctly detect NaN.

Detected by errorprone.
2018-01-23 11:56:02 -08:00
Ben Gruver
948c0205b8 Bump the version to 2.2.2 2017-10-30 15:34:58 -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
Ben Gruver
93a4373023 Bump the version to 2.2.1 2017-05-17 11:32:05 -07:00
Daniel Bali
d4702a45a7 Add basic support for ODEX instructions 2017-05-17 11:20:30 -07:00
Ben Gruver
dd22a795d8 Add an option to baksmali to allow disassembling odex opcodes
These instructions should never be present in a dex file, only in odex/oat
files. However, it's sometimes useful to be able to disassemble an otherwise
valid dex file that happens to contain odex instructions.
2017-05-15 17:01:44 -07:00
Frieder Bluemle
58a4809720 Update Gradle wrapper to 3.5 2017-05-15 15:46:58 -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
Ben Gruver
76d69c7466 Bump smalidea version to v0.05 2017-03-31 17:06:53 -07:00
Ben Gruver
10fd792f59 Correctly calculate the offset for switch targets in smalidea
This fixes an issue where watches on registers (among other things) don't
work inside a method containing a switch statement, due to a failure
analyzing the method.
2017-03-31 17:06:53 -07:00
Ben Gruver
cef72530bb Merge pull request #504 from Furniel/master
Fixed Android M and N deodexing(Fixes #503)
2017-03-29 10:07:49 -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
bda4477bae Update version to 2.2.0 2017-03-22 00:15:14 -07:00
Ben Gruver
e72e07fc2e Update version to 0.04 2017-03-21 23:53:11 -07:00
Ben Gruver
8ed2f18601 Add Project argument to SmaliClassFinder constructor
In some cases, scope.getProject() may be null. Apparently, IDEA will
automatically pass in the project if you specify one in the constructor.
See, e.g. MigrationElementFinder in the IDEA source.
2017-03-21 23:26:06 -07:00
Ben Gruver
a15fc84ace Add missing read actions in SmaliPositionManager 2017-03-21 22:03:42 -07:00
Ben Gruver
fa13b13bbd Update linked version of IDEA to 2016.3.5 2017-03-21 21:59:02 -07:00
Ben Gruver
1390c6cff6 getStubOrPsiParent() -> getParentByStub() 2017-03-21 21:22:29 -07:00
Ben Gruver
75fdec6e1d Use newer jcommander version for release
The newer version has some fixes we need, but we should still ensure
that we can compile against the old version, since that's the version
currently in AOSP.
2017-03-21 21:22:06 -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
961c21be98 Fix possible NPE when generating accessor comments 2017-03-11 13:29:14 -08:00
Ben Gruver
152250d900 Fix missing format argument 2017-03-11 13:20:23 -08:00
Ben Gruver
cd1e5c5068 Fix download link in README.md 2017-02-22 17:05:01 -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