[PATCH v3 31/43] sandbox: Support obtaining the next phase from an image