Added parameters for device and type to flash_device.sh.