[PATCH v2 33/45] sandbox: Support obtaining the next phase from an image