On some devices, e.g. based on Snapdragon 805, you simply can. In other cases, the manufacturer chose to block the na?ve approach, but the native camera app knows how to do it, and, with some reverse engineering effort, you can reproduce their approach (I had partial success with Samsung S4 before I lost interest in that project).
But on most of available phones, there is a physical restriction: the two cameras share the same bus, and cannot be opened simultaneously, no matter how skillful you are in software.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…