526 Commits

Author SHA1 Message Date
JesusFreke@JesusFreke.com
8eaecd53d3 Load all the class path classes using TempClassInfo, before starting to creating the ClassDefs for them
This fixes an issue when a class in a boot class path jar has a superclass that is in a later boot class path jar

git-svn-id: https://smali.googlecode.com/svn/trunk@669 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-03-04 07:44:35 +00:00
JesusFreke@JesusFreke.com
74eeca35f7 Add additional error context for errors that occur while loading the boot class path files
git-svn-id: https://smali.googlecode.com/svn/trunk@668 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-03-04 07:44:08 +00:00
JesusFreke@JesusFreke.com
6786055f35 Move the HelpFormatter subclass to the util project and use it for both smali and baksmali
git-svn-id: https://smali.googlecode.com/svn/trunk@667 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-03-03 07:12:06 +00:00
JesusFreke@JesusFreke.com
c616a0dadc Add support for detecting the console width in unix and windows environments, and printing the usage info accordingly
git-svn-id: https://smali.googlecode.com/svn/trunk@666 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-03-03 07:11:32 +00:00
JesusFreke@JesusFreke.com
7bb8ace93b add -V option for baksmali to verify the bytecode
git-svn-id: https://smali.googlecode.com/svn/trunk@664 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-03-03 03:26:53 +00:00
JesusFreke@JesusFreke.com
7025dfb753 Split the analysis logic into an analysis pass and a verification pass
git-svn-id: https://smali.googlecode.com/svn/trunk@663 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-03-03 03:26:33 +00:00
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
7974e53f15 Use an integer to hold the state of the MethodAnalyzer, in preparation for splitting the analysis logic into an analysis pass and a verification pass.
git-svn-id: https://smali.googlecode.com/svn/trunk@661 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-03-03 03:25:53 +00:00
JesusFreke@JesusFreke.com
e0ce06f238 Update version to 1.2.1
git-svn-id: https://smali.googlecode.com/svn/trunk@660 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-03-03 03:25:30 +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
6d8f776838 Refactor the smali parameters so that the debug options aren't shown unless -? is specified twice (-??)
git-svn-id: https://smali.googlecode.com/svn/trunk@643 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-22 07:02:22 +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
09ee2ce454 When searching for the boot class path files, try alternate file endings as well
git-svn-id: https://smali.googlecode.com/svn/trunk@641 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-22 07:01:58 +00:00
JesusFreke@JesusFreke.com
67c0929d67 Updated version to 1.2
git-svn-id: https://smali.googlecode.com/svn/trunk@640 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-22 07:01:47 +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
2ba2d0f16b Use a pre-allocated buffer in Utf8Utils.utf8BytesToString, to avoid having to allocate a buffer on each call
git-svn-id: https://smali.googlecode.com/svn/trunk@636 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-22 00:56:36 +00:00
JesusFreke@JesusFreke.com
d79d9ebbe9 Tweak dexlib's "skip instructions" functionality so that it doesn't read in the CodeItems or DebugInfoItems at all
git-svn-id: https://smali.googlecode.com/svn/trunk@635 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-22 00:56:26 +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
20cfe7aa0f After analyzing a method, change any "Unknown" registers to "Uninit"
git-svn-id: https://smali.googlecode.com/svn/trunk@627 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-14 21:57:38 +00:00
JesusFreke@JesusFreke.com
eac512ae67 Add support for the "Uninit" register type
git-svn-id: https://smali.googlecode.com/svn/trunk@626 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-14 21:57:27 +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
1ed567427b Add support for unresolved types. This isn't fatal in all cases
git-svn-id: https://smali.googlecode.com/svn/trunk@622 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-14 20:04:03 +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
caea37a7d2 Implemented verification for the literal binary operation instructions
git-svn-id: https://smali.googlecode.com/svn/trunk@619 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-08 02:28:24 +00:00
JesusFreke@JesusFreke.com
122eba5cec Implemented verification for the 2-register binary operation instructions
git-svn-id: https://smali.googlecode.com/svn/trunk@618 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-08 02:28:18 +00:00
JesusFreke@JesusFreke.com
195e1a1071 Implemented verification for binary operation instructions
git-svn-id: https://smali.googlecode.com/svn/trunk@617 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-08 02:28:12 +00:00
JesusFreke@JesusFreke.com
1483cc8e68 Implemented verification for unary operation instructions
git-svn-id: https://smali.googlecode.com/svn/trunk@616 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-08 02:28:07 +00:00
JesusFreke@JesusFreke.com
85e17ca30a refactor the validation for source register types
git-svn-id: https://smali.googlecode.com/svn/trunk@615 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-08 02:28:01 +00:00
JesusFreke@JesusFreke.com
ee7ca05c81 Change the return value of analyzeInstruction and all the handle* methods from bool to void
git-svn-id: https://smali.googlecode.com/svn/trunk@614 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-08 02:27:55 +00:00
JesusFreke@JesusFreke.com
89e1413ef3 Implemented verification for invoke instructions
git-svn-id: https://smali.googlecode.com/svn/trunk@613 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-08 02:27:49 +00:00
JesusFreke@JesusFreke.com
300ad56aa3 Add the logic to iterate over all the instructions as the register information for them is updated
git-svn-id: https://smali.googlecode.com/svn/trunk@612 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-08 02:27:42 +00:00
JesusFreke@JesusFreke.com
fa323d30a0 When merging register types, an Unknown type and a known type should merge to the known type
git-svn-id: https://smali.googlecode.com/svn/trunk@611 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-08 02:27:36 +00:00
JesusFreke@JesusFreke.com
a0314c265e Handle uninitialized referenced appropriately
git-svn-id: https://smali.googlecode.com/svn/trunk@610 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-08 02:27:30 +00:00
JesusFreke@JesusFreke.com
b615ba6f51 Add concrete implementations of RegisterIterator for Format35c and Format3rc
git-svn-id: https://smali.googlecode.com/svn/trunk@609 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-08 02:27:23 +00:00
JesusFreke@JesusFreke.com
6192896f88 Add pastEnd() method to RegisterIterator
git-svn-id: https://smali.googlecode.com/svn/trunk@608 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-08 02:27:18 +00:00
JesusFreke@JesusFreke.com
06d1aacf61 Add getCount() method to RegisterIterator
git-svn-id: https://smali.googlecode.com/svn/trunk@607 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-08 02:27:12 +00:00
JesusFreke@JesusFreke.com
6d11e9062d Fix the register check for the source register in handleIputObject, and add misc TODO
git-svn-id: https://smali.googlecode.com/svn/trunk@606 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-01-27 07:09:38 +00:00
JesusFreke@JesusFreke.com
51cec00885 Implemented verification for sput-object
git-svn-id: https://smali.googlecode.com/svn/trunk@605 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-01-27 07:09:32 +00:00
JesusFreke@JesusFreke.com
f08a9e1c2c Implemented verification for sput-wide
git-svn-id: https://smali.googlecode.com/svn/trunk@604 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-01-27 07:09:26 +00:00
JesusFreke@JesusFreke.com
9d45d563fe Implemented verification for sput/sput-boolean/sput-byte/sput-char/sput-short
git-svn-id: https://smali.googlecode.com/svn/trunk@603 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-01-27 06:22:11 +00:00