Ben Gruver
398630dde5
Infer the register type based on the result of an instance-of instruction
...
In oat files, it's possible that a check-cast is removed based on the
register being provably of the type being cast to, based on the result
of an instance-of check.
Supporting this in general would require more sophisticated static analysis
than is currently done. Instead, this adds a special-case specifically
for the case of an instance-of followed immediately by an if-eqz
2015-10-13 21:59:47 -07:00
Ben Gruver
d6b17b9935
Don't add an empty .param annotation when not writing debug info
2015-10-13 18:46:13 -07:00
Ben Gruver
7844089286
Add support for alternate field ordering starting at oat version 67
2015-10-01 22:50:35 -07:00
Ben Gruver
d6043955f5
Fix minor issue in DisassemblyTest
2015-10-01 19:03:23 -07:00
Ben Gruver
827e2db34d
Add support for normalizing virtual methods
...
This is useful, for example, when comparing the result of deodexing with
the original dex file, to remove the "false" differences caused by the
different potential ways to reference a given virtual method.
2015-09-30 20:36:12 -07:00
Ben Gruver
64785d79a3
Add support for using an oat file as the boot class path
2015-09-30 20:36:12 -07:00
Ben Gruver
8920228819
Add oat support in DexFileFactory
2015-09-30 20:36:12 -07:00
Ben Gruver
3ff884b1c3
Add art-specific opcodes and opcode values
2015-09-29 23:41:30 -07:00
Alex Light
c456c55c40
Make smali respect order of implements
...
Previously smali would reorder implements directives to be
alphabetical in the dex file. In the Java 8 Language the order of
interfaces may affect the order of initializer invocation when using
default methods. Therefore we will preserve this order in
smali/baksmai.
Bug: 24338722
Change-Id: I6851b02a5402c7d4cd4b60af54052c320e48d0bf
2015-09-24 13:04:30 -07:00
Rover12421
c55bef3604
DuplicateTest FAILED fix
2015-04-10 11:56:44 +08:00
Ben Gruver
b742c40263
Comment out unused switch payload instructions
2015-03-20 16:38:19 -07:00
Ben Gruver
2a0e4657ea
Don't wrap a large (>32k) register count in a register directive
2015-03-18 20:13:02 -07:00
Ben Gruver
bd6385f062
Duplicate a switch payload that is refered to multiple times
2015-03-18 20:01:49 -07:00
Ben Gruver
1aad736c20
Ensure that sparse switch items are written out in the correct order
2015-03-17 21:18:19 -07:00
Ben Gruver
d4bce2e768
Don't propagate exceptions from RoundtripTest.runTest()
2015-03-17 21:14:24 -07:00
Ben Gruver
1e0677617c
Extract out a base RoundtripTest and IdenticalRoundtripTest class
2015-03-17 20:41:20 -07:00
Igor Murashkin
144951a9e9
Add lambda experimental dalvik opcodes
...
* Add new -X/--experimental flag to [dis]assemble opcodes not in art yet
* Add new opcodes liberate-variable, box-lambda, unbox-lambda,
capture-variable, create-lambda, invoke-lambda
* Add support for encoding 25x instructions
* Adds LambdaTest to check new opcodes assemble/disassemble properly
TODO: invoke-lambda-range
Change-Id: I5c8bcbfa8b6cb9a13ef2017fce2d1b7fda6e11c3
2015-03-16 11:40:58 -07:00
Ben Gruver
f0c481a7a1
Use single-quotes in build.gradle files when double-quotes aren't needed
2015-03-01 22:30:33 -08:00
Ben Gruver
900ad6ea87
Use the proguard plugin for gradle
2015-03-01 19:51:34 -08:00
Ben Gruver
f5d3fc4a6d
Switch the default for implicit references
2015-01-20 19:01:18 -08:00
Ben Gruver
e778f7b865
Make the checkPackagePrivateAccess functionality an option
...
This is only needed for 4.2.0, but not 4.2.1. Both are api 17, so we can't
tie this functionality to an api level.
2014-12-28 15:03:02 -08:00
yyjdelete
d1dbf6b14b
Use options.checkPackagePrivateAccess
2014-11-14 21:59:08 +08:00
Connor Tumbleson
6811d13935
Implement dex entry for non classes.dex files
2014-11-06 23:09:44 -06:00
Ben Gruver
f1fe3a0062
Merge pull request #21 from whydoubt/floating-point-values
...
Floating point values
2014-08-16 11:55:01 -07:00
Jeff Smith
9cc35b2d05
No need to reevaluate 'resource != null'
2014-08-15 14:25:38 -05:00
Ben Gruver
5316638892
Improve the readability of the newline normalization stuff for tests
2014-07-19 20:33:37 -07:00
Ben Gruver
d33fd6773c
Implement implicit method/field references in baksmali
2014-07-19 20:26:50 -07:00
Jeff Smith
0b836342e2
Give comment-generating functions more precise naming
2014-02-17 00:08:50 -06:00
Jeff Smith
bfecccf113
Merge remote-tracking branch 'upstream/master' into floating-point-values
2014-02-16 22:29:04 -06:00
Ben Gruver
dd2079cd53
Fix NPE when using a custom inline method table
2014-01-29 19:39:34 -08:00
Ben Gruver
1d28b32ff5
Refactor the maven upload build stuff
...
This also adds the required javadoc jars
2014-01-18 11:33:39 -08:00
Ben Gruver
5b411f3447
Add gradle configuration for uploading smali artifacts to maven
2014-01-17 02:04:07 -08:00
Ben Gruver
eae0b0edbf
Make sure we always shut down the executor
...
Previously, an ExecutionException from the task could cause the process
to hang, because the ExecutorService was never shut down
2013-12-12 01:37:14 -08:00
Jeff Smith
86c677ba84
Merge remote-tracking branch 'upstream/master' into floating-point-values
2013-12-10 19:45:58 -06:00
Ben Gruver
fce4cc0c42
Replace use of System.lineSeparator(), to keep compatibility with java 6
2013-12-08 17:44:15 -08:00
Ben Gruver
338db9fdf7
Fix up option parsing code for resource id stuff to use 'i'
2013-12-08 17:44:15 -08:00
Ben Gruver
68564258a3
occured -> occurred
2013-12-08 17:44:15 -08:00
Ben Gruver
d0c0c84d66
Don't System.exit from baksmali.disassembleClass
2013-12-08 17:44:15 -08:00
Ben Gruver
65cb1628a0
Remove --check-package-private-access option
...
This ties the functionality to api >= 17
2013-12-08 17:44:15 -08:00
Ben Gruver
4f2620415d
Add better handling for various types of invalid instructions
2013-12-08 17:44:11 -08:00
Ben Gruver
ee3fb21461
Merge pull request #19 from whydoubt/master
...
Match and comment on resource IDs while performing baksmali
2013-12-07 14:53:21 -08:00
Jeff Smith
58d2efb8e5
baksmali: Write comments about possible floating-point values
2013-12-05 09:13:12 -06:00
Jeff Smith
20b7bbf63e
baksmali: Only perform resource ID lookup once
2013-11-19 17:10:38 -06:00
Jeff Smith
9cf653f093
baksmali: resource-id-files should not be a debug option
2013-11-19 17:10:32 -06:00
Jeff Smith
d607960cff
baksmali: Reverse pair ordering in resource-id-files option
2013-11-19 08:31:52 -06:00
Stephan Schmitz
4d9d58829b
Make AnalysisTest.java cross-platform compatible
...
Use System.lineSeparator() for cross-platform compatible line endings for runTest() method in AnalysisTest.java. The patch fixes build failures of type `org.jf.baksmali.AnalysisTest > DuplicateTest FAILED [junit.framework.ComparisonFailure at AnalysisTest.java:107]` on Windows systems.
2013-11-18 10:01:55 +01:00
Jeff Smith
eb0b009971
baksmali: resource IDs are 32-bit
2013-11-14 15:14:57 -06:00
Jeff Smith
7e9231a211
baksmali: Write comments about matched resource IDs
2013-11-11 19:44:31 -06:00
Jeff Smith
29d4ccc8a9
baksmali: add command-line option to specify resource ID files
2013-11-11 19:44:24 -06:00
Ben Gruver
318954d56b
Don't attempt to create the smali.jar/baksmali.jar symlinks on windows.
...
Unsurprisingly, ant.symlink is unsupported on windows.
2013-11-10 22:19:48 -08:00