356 Commits

Author SHA1 Message Date
Ben Gruver
4dda65fdb3 Add an opcode flag for jumbo opcodes 2011-11-20 15:47:53 -08:00
Ben Gruver
a43de2411e Add support for the invoke-object-init/jumbo odex opcode 2011-11-20 15:47:53 -08:00
Ben Gruver
4a5692f827 Add support for the return-void-barrier odex instruction 2011-11-20 15:47:49 -08:00
Ben Gruver
c8de336727 Use Format 35c for invoke-direct-empty, and get rid of Format 35s 2011-11-20 15:46:40 -08:00
Ben Gruver
ea7afb0265 Add support for the invoke-object-init/range opcode in ICS 2011-11-20 15:46:40 -08:00
Ben Gruver
5967598d01 Add support for specifying a custom inline method table to use while deodexing 2011-11-20 15:46:40 -08:00
Ben Gruver
c2f08d5123 Add support for an --api-level parameter 2011-11-20 15:46:40 -08:00
Ben Gruver
6729493700 Add support in MethodAnalyzer for the new opcodes 2011-11-20 15:46:40 -08:00
Ben Gruver
b0ca7cb99b Add support for auto-upgrading to /jumbo variants of instructions when needed/possible 2011-11-20 15:46:39 -08:00
Ben Gruver
c4db7e2473 Add support for Format5rc 2011-11-20 15:46:39 -08:00
Ben Gruver
de5b35dbb6 Add support for Format52c (field references) 2011-11-20 15:46:39 -08:00
Ben Gruver
1efc2c0388 Add support for Format52c (type references) 2011-11-20 15:46:39 -08:00
Ben Gruver
d863324ffb Add support for Format41c (field references) 2011-11-20 15:46:39 -08:00
Ben Gruver
8b3b577f00 Add additional checks for index size when writing various items 2011-11-20 15:46:39 -08:00
Ben Gruver
d12c769276 Add support for Format41c (type references) 2011-11-20 15:46:38 -08:00
Ben Gruver
9c5ea8fa92 Lay the groundwork for general 32-bit IndexedItem references 2011-11-20 15:46:38 -08:00
Ben Gruver
95cd71c2d0 Lay the groundwork for expanded (16-bit) opcodes 2011-11-20 15:46:32 -08:00
Ben Gruver
166fc9296e Refactor out the getRegCount method into a seperate InvokeInstruction interface 2011-11-19 11:39:49 -08:00
Ben Gruver
b0c62b9781 Seperate out execute-inline and execute-inline/range into seperate 35mi and 3rmi formats 2011-11-19 11:39:49 -08:00
Ben Gruver
3bfd77dff0 Use the term VtableIndex rather than MethodIndex for invoke-*-quick instructions/formats 2011-11-19 11:39:49 -08:00
Ben Gruver
8e51717604 Add support for the THROW_VERIFICATION_ERROR opcode in MethodAnalyzer 2011-11-19 11:39:49 -08:00
Ben Gruver
225535b1c9 Add .gitignore files to exclude the target directory for the various modules 2011-11-19 11:39:45 -08:00
Ben Gruver
94e5a39ad2 Add initial support for allowing assembly of odex instructions
Initially, only throw-verification-error is supported
2011-10-09 22:51:44 -04:00
Ben Gruver
bbe539f2d2 Add support for the throw-verification-error opcode 2011-10-09 22:51:39 -04:00
Ben Gruver
82cdb8a8af Fix an incorrectly formatted offset to the debug info, in the dump for a code item 2011-09-20 22:38:51 -04:00
Ben Gruver
049bba5d98 Fix an infinite loop in findMethodByMethodIdInternal 2011-08-14 20:09:12 -04:00
Ben Gruver
a91109b8a7 Take into account defining class information when resolving field offsets
This fixes an issue when deodexing, where a field offset is incorrectly
resolved when trying to access a field defined in an ancestor class
when the the child class defines a field with the same name

Kudos to brightidea @ xda-dev for digging into this issue and figuring
out the problem!
2011-08-13 02:22:16 -04:00
Ben Gruver
c2e3d1a320 Remove unused instanceFieldLookup field in ClassPath.ClassDef 2011-08-12 22:51:50 -04:00
jesusfreke@jesusfreke.com
fadcc2dcb9 Ignore the link section in the header
git-svn-id: https://smali.googlecode.com/svn/trunk@812 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2011-07-15 09:22:43 +00:00
jesusfreke@jesusfreke.com
2f376953b4 Add helper comments for synthetic member accessors
This adds a comment before a synthetic member accessor is called, which
mentions what member in the parent is being accessed

Kudos to jasta for suggesting this feature!

git-svn-id: https://smali.googlecode.com/svn/trunk@809 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2011-05-20 06:16:22 +00:00
jesusfreke@jesusfreke.com
7ed253b78b Fix bug in ByteArrayInput.readLong
Thanks to deuns.martinez for reporting this fix

git-svn-id: https://smali.googlecode.com/svn/trunk@808 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2011-05-15 17:06:57 +00:00
jesusfreke@jesusfreke.com
817f2e0a76 Fix invalid cast when deodexing an execute inline instruction on an odex file from eclair or earlier
git-svn-id: https://smali.googlecode.com/svn/trunk@807 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2011-01-02 18:39:15 +00:00
JesusFreke@JesusFreke.com
1ad2f503bb The fastIndexOf inline method should be a direct method, not virtual
git-svn-id: https://smali.googlecode.com/svn/trunk@800 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-12-22 01:49:08 +00:00
JesusFreke@JesusFreke.com
d4417d7269 add support for the new odex opcodes for volatile field access that were added in gingerbread
git-svn-id: https://smali.googlecode.com/svn/trunk@799 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-12-21 17:33:30 +00:00
JesusFreke@JesusFreke.com
595cdad3d6 Add support for the new inline methods added in gingerbread
git-svn-id: https://smali.googlecode.com/svn/trunk@798 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-12-21 17:33:25 +00:00
JesusFreke@JesusFreke.com
b9a19bf3f1 Remove deodexerant and related functionality
git-svn-id: https://smali.googlecode.com/svn/trunk@797 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-12-21 17:33:20 +00:00
JesusFreke@JesusFreke.com
8ec2ab7602 Add static helper method to TypeListItem
git-svn-id: https://smali.googlecode.com/svn/trunk@789 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-08-17 13:28:57 +00:00
JesusFreke@JesusFreke.com
bcc4d2d9e1 misc whitespace changes
git-svn-id: https://smali.googlecode.com/svn/trunk@783 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-08-02 00:58:03 +00:00
JesusFreke@JesusFreke.com
128e8279c3 Add modification notices to Apache licensed files
git-svn-id: https://smali.googlecode.com/svn/trunk@781 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-08-02 00:57:45 +00:00
JesusFreke@JesusFreke.com
854c577425 Fix an issue when assembling a file with blank annotation sets
git-svn-id: https://smali.googlecode.com/svn/trunk@776 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-07-29 03:10:18 +00:00
JesusFreke@JesusFreke.com
e01409c11f Change the way unresolvable odex instructions are handled, so that it doesn't cause problems with try/catch blocks
git-svn-id: https://smali.googlecode.com/svn/trunk@737 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-06-12 15:55:44 +00:00
JesusFreke@JesusFreke.com
41265daa5a Fix a NPE when looking up a non-existant method
git-svn-id: https://smali.googlecode.com/svn/trunk@732 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-06-10 01:49:26 +00:00
JesusFreke@JesusFreke.com
76f566a55b Use the /range instructions when deodexing an execute-inline/range instruction
git-svn-id: https://smali.googlecode.com/svn/trunk@731 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-06-10 01:43:18 +00:00
JesusFreke@JesusFreke.com
2880e1c625 Add the inline method table for froyo's dalvik
git-svn-id: https://smali.googlecode.com/svn/trunk@726 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-06-09 01:45:27 +00:00
JesusFreke@JesusFreke.com
14348d570e Add support for the new dey36 odex header
git-svn-id: https://smali.googlecode.com/svn/trunk@725 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-06-09 01:45:14 +00:00
JesusFreke@JesusFreke.com
cda416b795 Sort the annotations in an AnnotationSetItem based on the TypeIdItem index
git-svn-id: https://smali.googlecode.com/svn/trunk@714 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-04-17 07:02:48 +00:00
JesusFreke@JesusFreke.com
b3abca4c90 cleaned up imports
git-svn-id: https://smali.googlecode.com/svn/trunk@704 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-04-16 07:25:29 +00:00
JesusFreke@JesusFreke.com
2371e35aae Exit on the first error by default, but add the -I option for ignoring errors and continuing with disassembly
git-svn-id: https://smali.googlecode.com/svn/trunk@701 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-04-03 23:03:25 +00:00
JesusFreke@JesusFreke.com
0808ee81c6 use Array.clone instead of Arrays.copyOf, to be compliant with java 5
git-svn-id: https://smali.googlecode.com/svn/trunk@700 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-04-03 23:03:17 +00:00
JesusFreke@JesusFreke.com
c1cc0e0934 Add better support for the case when an odex file has missing classes
git-svn-id: https://smali.googlecode.com/svn/trunk@693 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-04-03 23:02:48 +00:00