In the meantime I found the answer to my question in the comments.
To dump the whole flash using this edl tool(https://github.com/bkerler/edl). In case you brick it.
$ adb reboot edl
$ edl rl dumps --skip=userdata --genxml
or
$ edl rf flash.bin
To flash back on the openstick
$ edl qfil rawprogram0.xml patch0.xml .