aboutsummaryrefslogtreecommitdiff
path: root/smali
AgeCommit message (Collapse)Author
2018-08-20Update the tests to handle MethodHandle kind fixesAlbert Gorski
2018-08-20Fix support for the kind values of MethodHandleAlbert Gorski
The current implementation only supported 6 of the possible kind values for a MethodHandle object. However, as the link below shows there are in fact 9. All 9 can be seen in the MethodHandleType class which is used by dexdump to translate the kind value of a MethodHandle object to a string representation. https://android.googlesource.com/platform/art/+/android-8.1.0_r41/runtime/dex_file.h Moreover, this in fact lines up with the 9 different kinds for a MethodHandle object in standard java bytecode (though the values are swapped around for some reason). https://docs.oracle.com/javase/8/docs/api/java/lang/invoke/MethodHandleInfo.html These changes add in the additional 3 kind values and make sure all nesscary hooks using the kind values of MethodHandle reference them. For testing purposes, I found the easiest way to get correctly formatted invoke-custom and invoke-polymorphic instructions was to use the already generated dex files used to test dexdump. They can be found at the link below (invoke-custom.dex and invoke-polymorphic.dex). https://android.googlesource.com/platform/art/+/android-8.1.0_r41/test/dexdump/
2018-07-01Refactor most of the utility classes from util into dexlib2Ben Gruver
Now, util only contains the utilities that are needed by smali/baksmali, but not dexlib2. E.g. the common command line parsing utilities, some path utilities, etc. This also reverses the dependency between the util module and dexlib2.
2018-06-13MemoryDataStore: Rename the buffer getter methodLanchon
2018-05-23Add support for const-method-handle and const-method-type in the tree walkerBen Gruver
2018-05-23Add support for const-method-handle and const-method-type in the lexer and ↵Ben Gruver
parser
2018-05-23Add support for invoke-custom and related structures in the tree walkerBen Gruver
2018-05-23Add support for invoke-custom and related structures in the parser and lexerBen Gruver
2018-05-23Make method_prototype rule build and return a MethodProtoReferenceBen Gruver
2018-05-23"occured" -> "occurred" in SmaliTestUtilsBen Gruver
2018-05-23Create separate section for encoded arraysBen Gruver
2018-05-23Fix nullable issue in annotations ruleBen Gruver
2018-05-23Fix up a few non-immutable members in immutable encoded value implementationsBen Gruver
2018-02-28Make smali file iteration more deterministicBen Gruver
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.
2016-10-15Ensure all smali files are closed after the writing is completeAlbert Gorski
This makes sure that all smali files are closed after writing to them by surrounding the writer code with a try/finally block that closes the output stream once the writing has completed or when an exception occurs.
2016-10-15Unify how sections are referenced in DexPool and DexBuilderBen Gruver
2016-10-04Bad proguard! Don't strip out jcommander classes!Ben Gruver
2016-10-02Fix the proguard keep rules for smali/baksmaliBen Gruver
2016-09-17Remove the now-unused experimental opcodes flag/functionalityBen Gruver
2016-09-05Do a cleanup pass on the various commands/arguments/help textBen Gruver
2016-08-27Merge branch 'master' into v2.2_WIPBen Gruver
2016-08-17Revert "Add lambda experimental dalvik opcodes"Narayan Kamath
This reverts commit 144951a9e9e6c87866245f2bdeebf0ebedaa0e38.
2016-08-17smali/dexlib: deal with invoke-polymorphic / invoke-polymorphic/range.Narayan Kamath
- Introduces two new instruction formats, 45cc and 4rcc. As the name suggests, these instructions are similar to 35c and 3rc, expect that they encode an additional constant pool reference in their 4th byte. - Introduce two new instructions, invoke-polymorphic and invoke-polymorphic/range - used to implement signature polymorphism. - Allow instructions to directly reference the proto_id section of the dex file. This involves the introduction of a new kind of reference (MethodProtoReference) and has the side effect of cleaning up a fair amount of special casing in ProtoPool. - Disable support for ART version based switches (and remove LambdaTest which depends on it). Experimental lambda support and support for ART version based switches will be removed in a follow up change. Bug: 30550796 Test: test-art Test: ./gradlew build
2016-07-10Move existing smali tests to the org.jf.smali packageBen Gruver
2016-07-09Switch to jprante's jflex pluginBen Gruver
2016-05-28Revamp the CLI usage/help formattingBen Gruver
2016-05-16Update url in --version messageBen Gruver
2016-05-16Implement a new command line interface for smaliBen Gruver
2016-02-28Add more programmatic-friendly entry points for smali/baksmaliBen Gruver
This adds entry points that are more friendly to programmatic usage. E.g. no calls to System.exit()
2016-02-28Fix issue with parameter list parsingBen Gruver
This fixes an issue that was initially introduced in the smalidea branch
2016-02-28Get rid of the default 6 thread maximum thingBen Gruver
2016-02-20Clean up the jar namingBen Gruver
The previous naming was interfering with 'gr install' installing the artifacts locally.
2016-02-14Add the .tokens files to the binary jarBen Gruver
2016-02-13Merge branch 'master' into smalideaBen Gruver
2015-12-04Add a speculative fix for unicode filename errors on MacBen Gruver
2015-10-01Merge branch 'master' into smalideaBen Gruver
2015-09-29Add art-specific opcodes and opcode valuesBen Gruver
2015-09-05Add ability to list methods/fields/types when assembling with smaliBen Gruver
This can be useful in analyzing why you are going over the 64k method/field/type limit
2015-05-05Fix an NPE related to an array descriptor just before an EOFBen Gruver
2015-03-25Add usage type support for field usagesBen Gruver
2015-03-18Merge branch 'master' into smalideaBen Gruver
2015-03-18Don't wrap a large (>32k) register count in a register directiveBen Gruver
2015-03-16Add lambda experimental dalvik opcodesIgor Murashkin
* 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-04Refactor how PARAM_LIST is parsedBen Gruver
2015-03-04Merge branch 'master' into smalidea3Ben Gruver
2015-03-04Refactor how the PARAM_LIST_OR_ID thing is parsedBen Gruver
This gets rids of the empty placeholder tokens, which cause errors in IDEA's built-in lexer support code
2015-03-04Use [^] for the lexer's catch-all ruleBen Gruver
[^] matches the entire character set, while . doesn't match new lines, etc.
2015-03-01Use single-quotes in build.gradle files when double-quotes aren't neededBen Gruver
2015-03-01Use the antlr plugin for gradleBen Gruver
2015-03-01Use the jflex plugin for gradleBen Gruver