<s> import sys <EOL> PATH_INSTALL = "<STR_LIT>" <EOL> sys . path . append ( PATH_INSTALL ) <EOL> from androguard . core . bytecodes import dvm <EOL> from androguard . core import androconf <EOL> from androguard . util import read <EOL> FILENAME_INPUT = "<STR_LIT>" <EOL> FILENAME_OUTPUT = "<STR_LIT>" <EOL> androconf . set_debug ( ) <EOL> vm = dvm . DalvikVMFormat ( read ( FILENAME_INPUT ) ) <EOL> print hex ( vm . header . link_off ) , hex ( vm . header . link_size ) <EOL> vm . header . link_off , vm . header . link_size = <NUM_LIT> , <NUM_LIT> <EOL> print hex ( vm . header . link_off ) , hex ( vm . header . link_size ) <EOL> new_dex = vm . save ( ) <EOL> with open ( FILENAME_OUTPUT , "<STR_LIT:wb>" ) as fd : <EOL> fd . write ( new_dex ) </s>
