Regarding the front camera: You can switch to the front camera by running:
pinhole - the camera app - must not be running, else you get "Device or resource busy" errors.
To switch back to the rear camera, rerun the script without arguments.
Code:
pinephone-camera-setup.sh front
To switch back to the rear camera, rerun the script without arguments.