Retrieving spark/device/app-hash

I’d like to calculate the app-hash before flashing, and then query the device to ensure that its app-hash is the same as the one I think I sent. I didn’t see support for this in the docs, does anyone know if this has been done before?

Try here. I’ve got the same question.