Changelog¶
0.2.8¶
Some small bug fixes in SmaliReader:
Fixed parsing of
.locallinesEOL comments are now captured correctly using a new regex
0.2.7¶
Some small bug fixes and behavior changes in _SmaliClassWriter
Fixed a bug where the default classloader would be used everytime in a
SmaliVMinstanceFixed a bug in
SmaliClass.fields()where a call to.items()was missing_SmaliClassWriter,_SmaliMethodWriter,_SmaliFieldWriterand_SmaliAnnotationWriternow return the result of the delegate visitor instead of a new one if the delegate is an instance of the target writer class.
0.2.6¶
Some bug fixes by WaferJay.
Fixed a bug in end of line comments not parsed properly in strings with # inside
Improved .catchall directive
Other fixes, see Commit details
0.2.5¶
Some fixes around _SmaliMethodWriter by WaferJay.
Added missing .end directives for packed-switch, sparse-switch and array-data
0.2.4¶
Improved pretty_name and dvm_name of
SVMType
0.2.3¶
Fixed issues #1 and #2
Added an appropriate error message upon invalid statements.
0.2.2¶
A small patch created by TheZ3ro fixing the following issues:
Fixed
sparse_switchexecutor that was not executed due to a typoString regex now support handling of unicode strings (e.g.
const-string v0, "\u06e4\u06eb”), which initially would result in an error
In addition, this patch introduces the following new features:
Hex values regex now support negative and positive numbers (e.g.
const v1, -0x1)Added
move_objectexecutorAdded
java.lang.String.hashCode()implementation as a direct-callRefactored direct-call implementations for Object and Class
0.2.1¶
Kudos to serenees for fixing these issues:
Fixed an issue where
Line.split_linewould return incorrect results if the input string started with the provided separator.Added “.subannotation” token verification
Added support to handle unnamed “.param” declarations
Changed exception descriptor of “.catchall” to
Ljava/lang/Exception;for all cases
0.2.0¶
This minor update includes a new smali type system and removes the SmaliValueProxy. The following changes were made:
Removed the class
SmaliValueProxycompletely, the methodsmali_valuenow returns one of: int, float, str, SVMType, boolNew classes
SVMTypeandSignatureto represent smali types:Some usage examples¶1from smali import SVMType, Signature 2 3# simple type instance 4t = SVMType("Lcom/example/Class;") 5t.simple_name # Class 6t.pretty_name # com.example.Class 7t.dvm_name # com/example/Class 8t.full_name # Lcom/example/Class; 9t.svm_type # SVMType.TYPES.CLASS 10 11# create new type instance for method signature 12m = SVMType("getName([BLjava/lang/String;)Ljava/lang/String;") 13m.svm_type # SVMType.TYPES.METHOD 14# retrieve signature instance 15s = m.signature or Signature(m) 16s.return_type # SVMType("Ljava/lang/String;") 17s.parameter_types # [SVMType("[B"), SVMType("Ljava/lang/String;")] 18s.name # getName 19s.declaring_class # would return the class before '->' (only if defined) 20 21# array types 22array = SVMType("[B") 23array.svm_type # SVMType.TYPES.ARRAY 24array.array_type # SVMType("B") 25array.dim # 1 (one dimension)
0.1.3¶
Fixed an issue in
SmaliReaderthat causes it to run into infinite loops (kudos to metalcorpe)Moved to Github-Pages instead of ReadTheDocs
Added the field
parentto an executionFrameto enable backtracking of call stacksSome issues around
TypeandSmaliValueProxyfixed
0.1.2¶
SmaliVMis now able to use customized executors.Note
The default class loader won’t throw any exception upon unknown by default. You can change this behaviour by setting the
use_strictattribute toTrue:vm = SmaliVM(use_strict=True)
Code was formatted properly
Documentation update
0.1.1¶
ISmali (interactive Smali shell) pre-release
Implementation of almost half of all Smali-opcodes
Fixed an error of
SmaliValueProxythat caused exceptions on operations with an object of the same classMultiple bug fixes in the process of class definition (import)
0.0.1¶
Start keeping changelog :)
Documentation on Smali language
Smali parser implementation (line-based)
Small Smali-VM