76 Commits

Author SHA1 Message Date
Ben Gruver
912a474644 Merge branch 'master' into smalidea 2015-03-31 20:02:14 -07:00
Ben Gruver
923f5a7d10 Fix a bounds check problem in IndentingWriter 2015-03-20 16:39:07 -07:00
Ben Gruver
75bef01d10 Merge branch 'master' into smalidea 2015-03-18 21:00:32 -07:00
Ben Gruver
32e76b181b Fix up the whitespace normalization in TextUtils.normalizeWhitespace
Previously, all inter-line whitespace was being removed. And it now
normalizes trailing new lines as well
2015-03-17 21:16:36 -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
8c1d8ddef2 Merge branch 'master' into smalidea3 2015-03-04 20:58:14 -08:00
Ben Gruver
ea4074fdcc Don't try to test for reserved file names
Instead, we'll just check os.name
2015-03-01 22:42:48 -08:00
Ben Gruver
bbc11c79e5 Add lexer implementation based on existing smali lexer 2015-01-21 09:32:00 -08:00
Ben Gruver
a4dd1fd25b Make ClassFileNameHandler thread-safe 2015-01-20 19:01:39 -08:00
Ben Gruver
e032f1d8c7 Refactor ClassFileNameHandler
This makes the logic quite a bit easier to follow, and fixes an issue
with the previous implementatation, where it didn't correctly handle
the case when were multiple long names that collided after being
shortened
2015-01-07 17:14:44 -08:00
Ben Gruver
aae58716e7 Fix some javadoc issues 2014-12-28 14:14:19 -08:00
Ben Gruver
d33fd6773c Implement implicit method/field references in baksmali 2014-07-19 20:26:50 -07:00
Ben Gruver
3b5d84c3ae Truncate filenames based on their utf-8 length 2014-02-01 14:43:54 -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
68564258a3 occured -> occurred 2013-12-08 17:44:15 -08:00
Ben Gruver
6cd686fbf5 Make windows reserved filename detection more robust
This checks for more reserved filenames than just aux
2013-09-14 11:35:53 -07:00
Ben Gruver
d868692e33 Truncate the filename for overly long class names 2013-09-14 11:33:18 -07:00
Ben Gruver
5ff4ee9a3f Add missing copyright/license headers 2013-09-14 00:43:41 -07:00
Ben Gruver
99b46173c5 Generify the IO requirements for writing a dex file
The DexWriter implementations now write to a generic "DexDataStore", instead
of writing directly to a file.

Also, writing of the DebugItems and CodeItems are linked, with the code
items being written to a temporary location, and then the entire code item
section is written as a batch after the debug item section.
2013-09-08 15:30:58 -07:00
Ben Gruver
7e25c35df7 Make baksmali thread safe, and add -j option 2013-05-12 12:31:24 -07:00
Ben Gruver
d38f3a7983 Fix up line number handling to be unsigned int safe 2013-05-03 19:35:47 -07:00
Ben Gruver
936cc551f7 Clean up some TODOs 2013-04-30 21:57:08 -07:00
Ben Gruver
1bf6f23245 Implementation of new generificationified writer functionality 2013-04-27 22:23:30 -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
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
7e58d497ef Improve the performance of the IndentingWriter 2013-04-09 17:42:33 -07:00
Ben Gruver
ffe82bdcb5 Fully remove the dependency on the old dexlib from baksmali 2013-04-08 00:09:15 -07:00
Ben Gruver
9531284b1b Port MethodAnalyzer and various dependencies from dexlib 2013-03-30 16:36:27 -07:00
Ben Gruver
31d87776c4 Refactor/rewrite the AnnotatedBytes class and helpers
This allows annotations to be added out-of-order, rather than the previous
requirement of forward-only annotating
2013-03-03 18:00:53 -08:00
Ben Gruver
46cefa3d5b Factor out dependency versions, and upgrade to gradle 14.0 2013-03-03 17:58:02 -08:00
Ben Gruver
60d834f951 Annotate StringDataItems 2013-03-02 15:21:33 -08:00
Ben Gruver
6d607ebe1d Annotate CodeItems 2013-03-02 14:04:51 -08:00
Ben Gruver
373ff22ec6 Beginning of annotated dump implementation 2013-02-24 15:58:24 -08:00
Ben Gruver
bfd74a869e Create AbstractForwardSequentialList util class 2013-02-24 15:30:25 -08:00
Ben Gruver
7d5439950f Fix various issues related to comparing method references. 2012-12-29 14:50:15 -08:00
Ben Gruver
3d0419c963 Track and seek to the current position in RandomAccessFileOutputStream 2012-12-28 17:40:46 -08:00
Ben Gruver
7dff6ada5e Add tests for DexWriter (and fixes to DexWriter, to make said tests pass) 2012-12-28 16:37:41 -08:00
Ben Gruver
9a90c5560c Refactor DexWriter to write to a generic OutputStream 2012-12-28 16:28:35 -08:00
Ben Gruver
4ffbfa2e71 Initial commit of writer functionality
It's not fully functional yet, but the structure is there, and it's
got most item types
2012-11-18 14:33:32 -08:00
Ben Gruver
22c3185bb7 Major cleanup of the interface and library in general 2012-11-17 17:51:36 -08:00
Ben Gruver
2d7e111135 Add sorted interface and immutable implementations 2012-11-12 22:55:06 -08:00
Ben Gruver
ddf2021942 Add @Nonnull for ImmutableListConverter methods 2012-11-12 22:25:15 -08:00
Ben Gruver
07cf2064e6 Fix logic that determine if an immutable list needs to be copied 2012-11-12 22:20:39 -08:00
Ben Gruver
b0383884fa Add and use ImmutabeleListUtils.nullToEmptyList() 2012-11-04 13:53:41 -08:00
Ben Gruver
8ae711cf3b Get rid of the vestigal commented out code in IndentingWriter 2012-11-03 01:08:04 -07:00
Ben Gruver
08840432d4 Use an iterable rather than a list for debug items 2012-10-27 22:39:07 -07:00
Ben Gruver
e593a563ae Add utf8BytesWithUtf16LengthToString method to Utf8Utils 2012-10-21 21:19:43 -07:00
Ben Gruver
09e6d003cb Use thread local storage for the temporary buffer in Utf8Utils 2012-10-21 21:19:43 -07:00