fix get device script

Change-Id: Ic61e5624f6c1eff33e74716e4c57eed0f5ec90cd