JesusFreke@JesusFreke.com
ef24b31c98
Refactor the MethodAnalyzer API so that the instructions are returned as a read-only list
...
git-svn-id: https://smali.googlecode.com/svn/trunk@662 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-03-03 03:26:17 +00:00
JesusFreke@JesusFreke.com
00fc68adf2
Update copyright notices
...
git-svn-id: https://smali.googlecode.com/svn/trunk@644 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-22 07:04:58 +00:00
JesusFreke@JesusFreke.com
f25f713426
change the default value for the -r parameter to ARGS|DEST
...
git-svn-id: https://smali.googlecode.com/svn/trunk@642 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-22 07:02:09 +00:00
JesusFreke@JesusFreke.com
819e8b92a0
Allow multiple class path directories to be specified
...
git-svn-id: https://smali.googlecode.com/svn/trunk@639 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-22 07:01:40 +00:00
JesusFreke@JesusFreke.com
e9b722eab0
Misc cleanup
...
git-svn-id: https://smali.googlecode.com/svn/trunk@638 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-22 07:01:23 +00:00
JesusFreke@JesusFreke.com
0c65e0f4f5
Implemented deodex functionality
...
git-svn-id: https://smali.googlecode.com/svn/trunk@637 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-22 00:57:15 +00:00
JesusFreke@JesusFreke.com
2bdbf739bf
Add a new option to add a comment line with the code offset for each instruction
...
git-svn-id: https://smali.googlecode.com/svn/trunk@634 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-22 00:56:14 +00:00
JesusFreke@JesusFreke.com
5b908115c0
Refactor options for baksmali
...
- Identified a set of options that are really only useful for debugging baksmali, and changed the short option character for them to be uppercase'
- Change the option letters for various options
- Don't display the debug options in the main usage info, but only if -? is specified twice (i.e. -??)
git-svn-id: https://smali.googlecode.com/svn/trunk@633 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-22 00:56:02 +00:00
JesusFreke@JesusFreke.com
928790f293
remove the "disable interning" functionality in dexlib
...
- rename the getInterned* methods to intern*
- add a lookup* method to a few item types that performs the same function, except that
it returns null if the item isn't found, instead of interning it
git-svn-id: https://smali.googlecode.com/svn/trunk@632 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-22 00:55:50 +00:00
JesusFreke@JesusFreke.com
f5defb97c0
Allow additional bootclasspath files to be added to the default, by prepending the bootclasspath value with a :
...
git-svn-id: https://smali.googlecode.com/svn/trunk@630 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-15 02:01:08 +00:00
JesusFreke@JesusFreke.com
3f7739cd09
Add support for specifying a base dir for the BOOTCLASSPATH files
...
git-svn-id: https://smali.googlecode.com/svn/trunk@629 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-15 02:00:58 +00:00
JesusFreke@JesusFreke.com
2e2a187734
Don't output register information on switch/array data structures
...
git-svn-id: https://smali.googlecode.com/svn/trunk@628 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-14 21:57:48 +00:00
JesusFreke@JesusFreke.com
1c56c7e750
Add finer grained control of what register information is printed out
...
git-svn-id: https://smali.googlecode.com/svn/trunk@625 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-14 20:04:59 +00:00
JesusFreke@JesusFreke.com
da69b22d6f
Use a double instead of an int as the sort value for method items
...
git-svn-id: https://smali.googlecode.com/svn/trunk@624 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-14 20:04:39 +00:00
JesusFreke@JesusFreke.com
db385ec3fd
Don't load the instructions in a code item when loading the BOOTCLASSPATH dex files
...
git-svn-id: https://smali.googlecode.com/svn/trunk@623 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-14 20:04:20 +00:00
JesusFreke@JesusFreke.com
c9be5e1303
Tons of fixes related to getting "verbose register info"/type analysis to work
...
git-svn-id: https://smali.googlecode.com/svn/trunk@621 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-11 00:58:02 +00:00
JesusFreke@JesusFreke.com
7e24a9f010
Preliminary implementation of "verbose register info" functionality
...
git-svn-id: https://smali.googlecode.com/svn/trunk@620 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-08 02:28:37 +00:00
JesusFreke@JesusFreke.com
fffb29fd9d
Implement ClassPath class, refactor analysis code to use new ClassPath functionality, start adding verification for individual opcodes
...
git-svn-id: https://smali.googlecode.com/svn/trunk@574 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-01-24 00:55:17 +00:00
JesusFreke@JesusFreke.com
7eef1e37e7
Add addition "FirstInstrucitonTest" method to the deodex_test1 baksmali test
...
git-svn-id: https://smali.googlecode.com/svn/trunk@563 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-01-12 08:10:37 +00:00
JesusFreke@JesusFreke.com
b2e1e2067d
deodex refactoring part 1
...
Significantly simplified how instructions are handled in baksmali. Normal
disassembly seems to be working, deodexing definitely not.
git-svn-id: https://smali.googlecode.com/svn/trunk@561 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-01-12 08:10:23 +00:00
JesusFreke@JesusFreke.com
575bd4ce54
Remove unused 'fixed' field from DeodexUtil.insn
...
git-svn-id: https://smali.googlecode.com/svn/trunk@560 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-01-12 08:09:51 +00:00
JesusFreke@JesusFreke.com
563bc66041
whitespace change
...
git-svn-id: https://smali.googlecode.com/svn/trunk@559 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-01-12 08:09:43 +00:00
JesusFreke@JesusFreke.com
42e4ef4892
Refactor the opcode enum to have a flags field, to store the odexOnly and canThrow flags
...
And get rid of the instructionThrowTable in DeodexUtil
git-svn-id: https://smali.googlecode.com/svn/trunk@558 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-01-12 08:09:35 +00:00
JesusFreke@JesusFreke.com
1f478c3228
Added comment for Deodexerant class
...
git-svn-id: https://smali.googlecode.com/svn/trunk@557 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-01-12 08:09:26 +00:00
JesusFreke@JesusFreke.com
f568b80d16
Moved DeodexUtil and Deodexerant classes to baksmali
...
git-svn-id: https://smali.googlecode.com/svn/trunk@556 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-01-12 08:09:19 +00:00
JesusFreke@JesusFreke.com
16a911620c
General cleanup/refactoring/maintentance
...
- Added some additional context information for exceptions in various locations
- Refactored all code offsets so that they use 2-byte code block address, instead of a byte offset.
- Additionally changed all "offset" terminology refering to code offsets to "address" instead
- Changed the way the getItemByIndex and getOffsettedItemByOffset work, so that they throw an
exception if the index/offset is -1/0.
- Added additional getOptionalItemByIndex and getOptionalOffsettedItemByOffset methods, to be used
in the cases where an index/offset of -1/0 is valid, to indicate the absence of an item
- Other misc cleanup/maintentance
git-svn-id: https://smali.googlecode.com/svn/trunk@552 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-01-12 07:56:16 +00:00
JesusFreke@JesusFreke.com
be2472d6d7
Add support for the upcoming execute-inline/range odexed instruction
...
git-svn-id: https://smali.googlecode.com/svn/trunk@544 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-01-01 22:35:54 +00:00
JesusFreke@JesusFreke.com
c9c2ec3d48
Add "support" for odexed instructions using Format3rms
...
Also, change the name of the invoke-*-range-quick opcodes to invoke-*-quick/range,
to be consistent with the naming scheme of non-odexed opcodes
git-svn-id: https://smali.googlecode.com/svn/trunk@542 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-01-01 22:35:35 +00:00
JesusFreke@JesusFreke.com
f322260c22
Add "support" for odexed instructions using Format22cs
...
git-svn-id: https://smali.googlecode.com/svn/trunk@541 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-01-01 22:35:21 +00:00
JesusFreke@JesusFreke.com
22296e7f83
Added assertion+comment, to clarify a misleading null check
...
git-svn-id: https://smali.googlecode.com/svn/trunk@536 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-12-31 01:25:32 +00:00
JesusFreke@JesusFreke.com
7d9b1b10f0
use createTemplate and createReference instead of makeTemplate and makeReference
...
git-svn-id: https://smali.googlecode.com/svn/trunk@534 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-12-31 01:25:19 +00:00
JesusFreke@JesusFreke.com
81ab1aa726
Add warning about disassembling an odex file without deodexing it
...
git-svn-id: https://smali.googlecode.com/svn/trunk@533 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-12-31 01:24:56 +00:00
JesusFreke@JesusFreke.com
7f9cfb3a68
rename "indexed labels" stuff to "sequential labels"
...
git-svn-id: https://smali.googlecode.com/svn/trunk@530 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-12-26 00:10:05 +00:00
JesusFreke@JesusFreke.com
630f5dc2dc
Add support for the -b option for baksmali, to suppress the output of debug info
...
git-svn-id: https://smali.googlecode.com/svn/trunk@522 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-12-25 23:05:20 +00:00
JesusFreke@JesusFreke.com
311ee79fab
Complete and fix-up the implementation of autofixing instructions
...
git-svn-id: https://smali.googlecode.com/svn/trunk@511 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-12-23 05:28:21 +00:00
JesusFreke@JesusFreke.com
fda2e631ac
Refactor instructions to store individual pieces of data instead of just using an offset into a buffer
...
Also included is a partial implementation of the logic needed to automatically fix various types of issues
git-svn-id: https://smali.googlecode.com/svn/trunk@502 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-12-23 05:26:59 +00:00
JesusFreke@JesusFreke.com
5867263eb5
line ending and trailing whitespace cleanup
...
git-svn-id: https://smali.googlecode.com/svn/trunk@500 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-12-23 05:25:59 +00:00
JesusFreke@JesusFreke.com
eb78b7fa64
Minor cleanup
...
git-svn-id: https://smali.googlecode.com/svn/trunk@499 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-12-23 05:24:58 +00:00
JesusFreke@JesusFreke.com
d1dc954863
Remove unused comment parameter for instruction method items
...
git-svn-id: https://smali.googlecode.com/svn/trunk@498 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-12-23 05:24:50 +00:00
JesusFreke@JesusFreke.com
e24e70f9ad
Handle unresolvable instructions in a more intellegent manner
...
Don't replace an unresolvable instruction with replacement instruction(s) that
are larger, to avoid inserting extra bytes, and possibly moving jump type
instructions too far from their targets.
git-svn-id: https://smali.googlecode.com/svn/trunk@497 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-12-23 05:24:27 +00:00
JesusFreke@JesusFreke.com
e2684fa219
- refactored/simplified the label code
...
- changed the handler_ label prefix to catch_ and catchall_
- added support for the new -i/--indexed-labels option, which numbers the labels incrementally for each method by type, rather than using the bytecode offset
git-svn-id: https://smali.googlecode.com/svn/trunk@493 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-12-01 08:14:21 +00:00
JesusFreke@JesusFreke.com
8555ce95d5
converted the labels in the deodex tests to the new label format
...
git-svn-id: https://smali.googlecode.com/svn/trunk@492 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-12-01 08:13:57 +00:00
JesusFreke@JesusFreke.com
a5fb30849d
minor verbage change for the -l/--use-locals option
...
git-svn-id: https://smali.googlecode.com/svn/trunk@491 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-11-23 07:27:19 +00:00
JesusFreke@JesusFreke.com
ff80035f43
add support for the .locals directive and the --use-locals/-l option for baksmali
...
git-svn-id: https://smali.googlecode.com/svn/trunk@489 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-11-23 06:47:33 +00:00
JesusFreke@JesusFreke.com
090e553f34
check if a static final field is set within the static constructor, and if so, add a comment stating such if it makes sense to do so (for primitive types, or reference/array types that have a non-null initializer)
...
git-svn-id: https://smali.googlecode.com/svn/trunk@481 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-09-19 04:48:50 +00:00
JesusFreke@JesusFreke.com
05c9404ecd
set the SparseArrays even if classDataItem is null
...
git-svn-id: https://smali.googlecode.com/svn/trunk@480 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-09-19 04:47:17 +00:00
JesusFreke@JesusFreke.com
29f49465ca
Use a SparseArray instead of a HashMap, and add get*Count methods to AnnotationDirectoryItem so we can initialize the SparseArrays with the correct capacity
...
git-svn-id: https://smali.googlecode.com/svn/trunk@478 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-09-19 03:18:35 +00:00
JesusFreke@JesusFreke.com
3d632a6234
Fixed the template for commented out labels
...
git-svn-id: https://smali.googlecode.com/svn/trunk@471 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-09-13 22:06:09 +00:00
JesusFreke@JesusFreke.com
4a0d9d3fa1
Change the sytax for labels from label: to :label
...
git-svn-id: https://smali.googlecode.com/svn/trunk@467 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-09-13 02:50:42 +00:00
JesusFreke@JesusFreke.com
04473936a1
remove test println
...
git-svn-id: https://smali.googlecode.com/svn/trunk@458 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-09-10 06:45:15 +00:00