android - Smali best place to inject code -
i making python script add trace each method able runtime method call in logcat. my application crashes time, don't ask me copy error log because not point of question. try inject code right after register declaration: .locals the first time used .registers directives got errors because of aliasing of local , parameters registers. i thought use .locals directive instead it's same. the different test made following ones: if difference between local , parameters registers greater 2 use v0 , v1 . else incremented .locals directive 2 , used v0 , v1 . but keep getting vfy errors. why .locals equals 0 there parameters p0 example. p0 should aliased v0 .locals 0, why if change .locals 2 , use v0 , v1 still vfy? i thinking add code before return directive @ least not matter if change local variable long not return variable edit: @jesusfreke thank comments. i trying improve python script suggestion. created customclass copy in root folder fact lo...