tools/env: lookup dev_type directly from flash_read_buf/flash_write_buf