Since it's a SM-930F exynos based model, custom recovery / root / custom rom (e.g. Hydra) is already available.
The problem could be the current battery charging status. Not sure if flashing of custom recovery / rom will work that way. You can try while connecting to an usb port with extended...