Commit Graph

38 Commits

Author SHA1 Message Date
Ben Gruver
0370416d90 Add the generated accessorTest to source control
Some java compilers don't generate the synthetic accessor methods in the
way that the accessorTest is trying to test. So we build the test dex
file using a known-good compiler and check it in, ensuring the test is
always run using an appropriate dex file.

Conflicts:
	brut.apktool.smali/dexlib2/build.gradle
2015-05-23 19:43:56 -05:00
Connor Tumbleson
1fb87e3e4c Post smali 2.0.6 cleanup
- fix smaliDecoder/AccessorTest to use new DexFileFactory params
 - remove unneeded ds/tree files
 - cleanup unmerged lines
2015-05-02 06:59:36 -05:00
Ben Gruver
91a47123bf Ensure the stream is closed in DexFileFactory.loadDexFile 2015-05-01 10:53:08 -05:00
Ben Gruver
395043667a Ensure that sparse switch items are written out in the correct order 2015-05-01 10:50:11 -05:00
Ben Gruver
6d3497f72d Add Member and Annotatable interfaces 2015-05-01 10:48:36 -05:00
Ben Gruver
eb3b01f318 Make sure the elements are sorted in an encoded annotation 2015-05-01 10:48:11 -05:00
Ben Gruver
757e1dac45 Don't assume dx is on-path. Rather, grab it from maven central
The version of dx in maven central seems to be fairly old, but it works
well enough for our purposes.

Conflicts:
	build.gradle
2015-05-01 10:48:00 -05:00
Igor Murashkin
58b7c27316 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-05-01 10:46:51 -05:00
Ben Gruver
d36b066007 Simplify how the accessorTest is built and run
Conflicts:
	brut.apktool.smali/dexlib2/build.gradle
	brut.apktool.smali/dexlib2/src/accessorTest/java/org/jf/dexlib2/AccessorTest.java
	dexlib2/src/accessorTest/java/org/jf/dexlib2/AccessorTest.java
	dexlib2/src/test/java/org/jf/dexlib2/AccessorTest.java
2015-05-01 10:41:41 -05:00
Jiri Hruska
9450cc915c Fix for Dalvik VM crash on parameter annotations
Dalvik VM before Jelly Bean MR1 (4.2) crashes if there are any
NO_OFFSET (0) values in parameter annotation list.
(https://code.google.com/p/android/issues/detail?id=35304)
2015-05-01 09:11:35 -05:00
Connor Tumbleson
2590521b33 fix all cherry-picks dumping files in wrong location 2015-01-21 08:10:42 -06:00
Ben Gruver
52482802dc 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.
2015-01-21 07:30:19 -06:00
Connor Tumbleson
89e6b06521 Implement dex entry for non classes.dex files
Conflicts:
	brut.apktool.smali/dexlib2/src/main/java/org/jf/dexlib2/DexFileFactory.java
2015-01-21 07:29:57 -06:00
Ben Gruver
6b6c2c09b6 Fix some generics issues when compiling with java 8 2015-01-21 07:27:17 -06:00
Ben Gruver
026d353fc7 Fix some javadoc issues 2015-01-21 07:25:12 -06:00
Ben Gruver
0153548c30 Expose the various fixed-size item counts in DexBackedDexFile 2015-01-21 07:24:58 -06:00
Ben Gruver
853da5a172 Refactor VariableSizeLookaheadIterator
Previously, when referencing instance fields from readNextItem,
the fields wouldn't have been initialized yet on the first call to
readNextItem
2015-01-21 07:24:47 -06:00
yyjdelete
3d3db44773 Use options.checkPackagePrivateAccess 2015-01-21 07:24:35 -06:00
yyjdelete
b2cf6b1d32 checkPackagePrivateAccess only for API 17(4.2)
Google revert this for compatibility.
see 7284c78e14 for details.

BTW, it seems that is also disabled for late 4.2
2015-01-21 07:24:24 -06:00
Ben Gruver
959133cbf0 Add some additional checks related to instruction size 2015-01-21 07:24:08 -06:00
edwardxwu
fe42130f05 Fixed the bug of not setting the location field of the instruction in addInstruction(i,instruction) method 2015-01-21 07:23:41 -06:00
Ben Gruver
5388ed57ba Fix potential NPE in MethodAnalyzer 2015-01-21 07:22:27 -06:00
Ben Gruver
1b0a917a6a Implement implicit method/field references in baksmali 2015-01-21 07:21:57 -06:00
Ben Gruver
4801482960 Add missing "break" from switch statement in BuilderClassPool 2015-01-21 07:21:27 -06:00
Ben Gruver
ca13778fe8 Ensure the annotation elements are sorted when written 2015-01-21 07:20:42 -06:00
Ben Gruver
9596513f6f Add support for non-standard invoke-object-init/range instructions 2015-01-21 07:14:14 -06:00
Ben Gruver
f6f5fecf18 Minor comment fix in MutableMethodImplementation 2015-01-21 07:12:48 -06:00
Ben Gruver
394bb25b7c Allow but ignore multiple exception handlers for the same exception 2014-08-27 13:07:35 -05:00
Connor Tumbleson
292e49de0a [dexlib2] allow disassemble of apks with non classes.dex files 2014-08-16 08:37:00 -05:00
Connor Tumbleson
a91e87bb04 update to smali 2.0.3 2014-01-19 10:37:31 -06:00
Connor Tumbleson
f89b51c74e Update to smali 2.0.2 2013-11-15 12:14:35 -06:00
Connor Tumbleson
03fc77cca8 [smali] update to 2.0 final 2013-10-11 11:43:59 -05:00
Connor Tumbleson
792188b9fe [smali] add untracked 2b6 files 2013-09-15 18:36:45 -05:00
Connor Tumbleson
79c68ed6d9 [smali] update to smali 2b6 2013-09-15 10:23:12 -05:00
Connor Tumbleson
652757cd36 [dexlib2] return UnresolvedClassException, instead of null when debug mode is enabled 2013-08-12 14:59:17 -05:00
Connor Tumbleson
7904ec2a7c dexlib2: ported "dontLoadClassPath feature" 2013-08-12 09:16:51 -05:00
Connor Tumbleson
a2c8d64d84 adjust build.gradle to handle apktool / dexlib2 2013-08-12 09:16:50 -05:00
Connor Tumbleson
007a6d45a2 Update to smali 2b5 2013-08-12 09:16:50 -05:00