update device code