I reverse engineered some android apks to add some instrumentation for functional testing. I want to know given an smali as following how can I add something like
One of the simpler ways to add smali code, is to write the java code in a test android app. Disassemble using apktool. Look at the smali files to identify the smali code and use it for injecting into other apps that you have disassembled.
Download apktool here : http://ibotpeaches.github.io/Apktool/